34 template <
typename dataType,
int32_t dataIn>
40 uint32_t blockSize = pKerPrivArgs->
blockSize;
43 printf(
"Enter DSPLIB_recip_exec_cn\n");
46 dataType *pInLocal = (dataType *) pIn;
47 dataType *pOutLocal = (dataType *) pOut;
51 for (int32_t counter = 0; counter < blockSize; counter++) {
55 printf(
"counter %d a %d\n", counter, a);
61 printf(
"counter %d y %d\n", counter, out);
86 int32_t blockSize = pKerPrivArgs->
blockSize;
89 printf(
"Enter DSPLIB_recip_exec_cn\n");
92 int16_t *pInLocal = (int16_t *) pIn;
93 int16_t *pOutLocal = (int16_t *) pOut;
105 for (int32_t i = 0; i < blockSize; i++) {
121 a = (int32_t)((uint32_t) a << (uint32_t)normal);
124 *(pOutLocal) = normal - 15;
133 for (int32_t j = 0; j < 15; j++) {
134 b = __sub_cond((uint32_t) b, (uint32_t) a);
137 b = (int32_t)((uint32_t) b & (uint32_t)0x7FFF);
144 *(pOutLocal + blockSize) = b;
158 for (int32_t i = 0; i < blockSize; i++) {
173 a = (int32_t)((uint32_t) a << (uint32_t)normal);
176 *pOutLocal++ = normal - 15;
182 for (int32_t j = 0; j < 15; j++) {
183 b = __sub_cond((uint32_t) b, (uint32_t) a);
186 b = (int32_t)((uint32_t) b & (uint32_t)0x7FFF);
template DSPLIB_STATUS DSPLIB_recip_exec_cn< double, DSPLIB_FLOAT64 >(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
DSPLIB_STATUS DSPLIB_recip_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....
DSPLIB_STATUS DSPLIB_recip_exec_cn< int16_t, DSPLIB_INT16 >(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
template DSPLIB_STATUS DSPLIB_recip_exec_cn< float, DSPLIB_FLOAT32 >(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
Header file for kernel's internal use. For the kernel's interface, please see DSPLIB_recip.
DSPLIB_STATUS_NAME
The enumeration of all status codes.
void * DSPLIB_kernelHandle
Handle type for DSPLIB operations.
@ DSPLIB_ERR_NOT_IMPLEMENTED
@ DSPLIB_HSTACK_ST
input is fixed point, store pattern is horizontal stack.
@ DSPLIB_INTERLEAVE_ST
input is fixed point, store pattern is interleaved.
DSPLIB_recip_storeStyle storeStyle
Fixed Point Output Store Style
Structure that is reserved for internal use by the kernel.
int32_t blockSize
Size of input buffer for different batches DSPLIB_recip_init that will be retrieved and used by DSPLI...
DSPLIB_recip_InitArgs initArgs