40 template <u
int32_t implementationType>
41 inline void blk_eswap_compute(uint8_t *restrict srcPtr, uint8_t *restrict dstPtr, uint32_t blockSize);
49 for (uint32_t cntr = 0; cntr < blockSize; cntr++) {
50 tempBuff[0] = srcPtr[cntr * 2 + 1];
51 tempBuff[1] = srcPtr[cntr * 2 + 0];
53 dstPtr[cntr * 2 + 0] = tempBuff[0];
54 dstPtr[cntr * 2 + 1] = tempBuff[1];
65 for (uint32_t cntr = 0; cntr < blockSize; cntr++) {
66 tempBuff[0] = srcPtr[cntr * 4 + 3];
67 tempBuff[1] = srcPtr[cntr * 4 + 2];
68 tempBuff[2] = srcPtr[cntr * 4 + 1];
69 tempBuff[3] = srcPtr[cntr * 4 + 0];
71 dstPtr[cntr * 4 + 0] = tempBuff[0];
72 dstPtr[cntr * 4 + 1] = tempBuff[1];
73 dstPtr[cntr * 4 + 2] = tempBuff[2];
74 dstPtr[cntr * 4 + 3] = tempBuff[3];
85 for (uint32_t cntr = 0; cntr < blockSize; cntr++) {
86 tempBuff[0] = srcPtr[cntr * 8 + 7];
87 tempBuff[1] = srcPtr[cntr * 8 + 6];
88 tempBuff[2] = srcPtr[cntr * 8 + 5];
89 tempBuff[3] = srcPtr[cntr * 8 + 4];
90 tempBuff[4] = srcPtr[cntr * 8 + 3];
91 tempBuff[5] = srcPtr[cntr * 8 + 2];
92 tempBuff[6] = srcPtr[cntr * 8 + 1];
93 tempBuff[7] = srcPtr[cntr * 8 + 0];
95 dstPtr[cntr * 8 + 0] = tempBuff[0];
96 dstPtr[cntr * 8 + 1] = tempBuff[1];
97 dstPtr[cntr * 8 + 2] = tempBuff[2];
98 dstPtr[cntr * 8 + 3] = tempBuff[3];
99 dstPtr[cntr * 8 + 4] = tempBuff[4];
100 dstPtr[cntr * 8 + 5] = tempBuff[5];
101 dstPtr[cntr * 8 + 6] = tempBuff[6];
102 dstPtr[cntr * 8 + 7] = tempBuff[7];
107 template <
typename dataType, u
int32_t implementationType>
115 uint32_t blockSize = pKerPrivArgs->
blockSize;
117 uint8_t *srcPtr = (uint8_t *) pIn;
118 uint8_t *dstPtr = (uint8_t *) pOut;
123 DSPLIB_DEBUGPRINTFN(0,
"srcPtr: %p dstPtr: %p blockSize: %d\n", srcPtr, dstPtr, blockSize);
125 blk_eswap_compute<implementationType>(srcPtr, dstPtr, blockSize);
template DSPLIB_STATUS DSPLIB_blk_eswap_exec_cn< float, DSPLIB_UINT32 >(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
void blk_eswap_compute< DSPLIB_UINT16 >(uint8_t *restrict srcPtr, uint8_t *restrict dstPtr, uint32_t blockSize)
DSPLIB_STATUS DSPLIB_blk_eswap_init_cn(DSPLIB_kernelHandle handle, DSPLIB_bufParams1D_t *bufParamsIn, DSPLIB_bufParams1D_t *bufParamsOut, const DSPLIB_blk_eswap_InitArgs *pKerInitArgs)
This function is the initialization function for the natural C implementation of the kernel....
template DSPLIB_STATUS DSPLIB_blk_eswap_exec_cn< int32_t, DSPLIB_UINT32 >(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
template DSPLIB_STATUS DSPLIB_blk_eswap_exec_cn< uint32_t, DSPLIB_UINT32 >(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
template DSPLIB_STATUS DSPLIB_blk_eswap_exec_cn< uint16_t, DSPLIB_UINT16 >(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
template DSPLIB_STATUS DSPLIB_blk_eswap_exec_cn< uint64_t, DSPLIB_UINT64 >(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
void blk_eswap_compute< DSPLIB_UINT32 >(uint8_t *restrict srcPtr, uint8_t *restrict dstPtr, uint32_t blockSize)
template DSPLIB_STATUS DSPLIB_blk_eswap_exec_cn< int64_t, DSPLIB_UINT64 >(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
void blk_eswap_compute< DSPLIB_UINT64 >(uint8_t *restrict srcPtr, uint8_t *restrict dstPtr, uint32_t blockSize)
template DSPLIB_STATUS DSPLIB_blk_eswap_exec_cn< int16_t, DSPLIB_UINT16 >(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
void blk_eswap_compute(uint8_t *restrict srcPtr, uint8_t *restrict dstPtr, uint32_t blockSize)
DSPLIB_STATUS DSPLIB_blk_eswap_exec_cn(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
This function is the main execution function for the natural C implementation of the kernel....
template DSPLIB_STATUS DSPLIB_blk_eswap_exec_cn< double, DSPLIB_UINT64 >(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
Header file for kernel's internal use. For the kernel's interface, please see DSPLIB_blk_eswap.
#define DSPLIB_DEBUGPRINTFN(N, fmt,...)
DSPLIB_STATUS_NAME
The enumeration of all status codes.
void * DSPLIB_kernelHandle
Handle type for DSPLIB operations.
Structure containing the parameters to initialize the kernel.
Structure that is reserved for internal use by the kernel.
int32_t blockSize
Size of input buffer for different batches DSPLIB_blk_eswap_init that will be retrieved and used by D...
A structure for a 1 dimensional buffer descriptor.