37 template <
typename dataType>
43 uint32_t blockSize = pKerPrivArgs->
blockSize;
46 printf(
"Enter DSPLIB_sqrAdd_exec_cn\n");
49 dataType *pInLocal1 = (dataType *) pIn;
50 dataType *pOutLocal = (dataType *) pOut;
53 printf(
"Enter pInLocal1 %p pOut %p\n", pInLocal1, pOut);
59 for (int32_t counter = 0; counter < blockSize; counter++) {
63 printf(
"counter %d a %f\n", counter, a);
71 printf(
"DSPLIB_DEBUGPRINT DSPLIB_sqrAdd_exec_cn result %lf\n", out);
85 uint32_t blockSize = pKerPrivArgs->
blockSize;
88 printf(
"Enter DSPLIB_sqrAdd_exec_cn\n");
91 int8_t *pInLocal1 = (int8_t *) pIn;
92 int32_t *pOutLocal = (int32_t *) pOut;
95 printf(
"Enter pInLocal1 %p pOut %p\n", pInLocal1, pOut);
101 for (int32_t counter = 0; counter < blockSize; counter++) {
103 #if DSPLIB_DEBUGPRINT
105 printf(
"counter %d a %f\n", counter, a);
108 out += ((int32_t) a * (int32_t) a);
112 #if DSPLIB_DEBUGPRINT
113 printf(
"DSPLIB_DEBUGPRINT DSPLIB_sqrAdd_exec_cn result %lf\n", out);
127 uint32_t blockSize = pKerPrivArgs->
blockSize;
129 #if DSPLIB_DEBUGPRINT
130 printf(
"Enter DSPLIB_sqrAdd_exec_cn\n");
133 uint8_t *pInLocal1 = (uint8_t *) pIn;
134 uint32_t *pOutLocal = (uint32_t *) pOut;
136 #if DSPLIB_DEBUGPRINT
137 printf(
"Enter pInLocal1 %p pOut %p\n", pInLocal1, pOut);
143 for (int32_t counter = 0; counter < blockSize; counter++) {
145 #if DSPLIB_DEBUGPRINT
147 printf(
"counter %d a %f\n", counter, a);
150 out += ((uint32_t) a * (uint32_t) a);
154 #if DSPLIB_DEBUGPRINT
155 printf(
"DSPLIB_DEBUGPRINT DSPLIB_sqrAdd_exec_cn result %lf\n", out);
169 uint32_t blockSize = pKerPrivArgs->
blockSize;
171 #if DSPLIB_DEBUGPRINT
172 printf(
"Enter DSPLIB_sqrAdd_exec_cn\n");
175 int16_t *pInLocal1 = (int16_t *) pIn;
176 int64_t *pOutLocal = (int64_t *) pOut;
178 #if DSPLIB_DEBUGPRINT
179 printf(
"Enter pInLocal1 %p pOut %p\n", pInLocal1, pOut);
185 for (int32_t counter = 0; counter < blockSize; counter++) {
187 #if DSPLIB_DEBUGPRINT
189 printf(
"counter %d a %f\n", counter, a);
192 out += ((int64_t) a * (int64_t) a);
196 #if DSPLIB_DEBUGPRINT
197 printf(
"DSPLIB_DEBUGPRINT DSPLIB_sqrAdd_exec_cn result %lf\n", out);
211 uint32_t blockSize = pKerPrivArgs->
blockSize;
213 #if DSPLIB_DEBUGPRINT
214 printf(
"Enter DSPLIB_sqrAdd_exec_cn\n");
217 uint16_t *pInLocal1 = (uint16_t *) pIn;
218 uint64_t *pOutLocal = (uint64_t *) pOut;
220 #if DSPLIB_DEBUGPRINT
221 printf(
"Enter pInLocal1 %p pOut %p\n", pInLocal1, pOut);
227 for (int32_t counter = 0; counter < blockSize; counter++) {
229 #if DSPLIB_DEBUGPRINT
231 printf(
"counter %d a %f\n", counter, a);
234 out += ((uint64_t) a * (uint64_t) a);
238 #if DSPLIB_DEBUGPRINT
239 printf(
"DSPLIB_DEBUGPRINT DSPLIB_sqrAdd_exec_cn result %lf\n", out);
253 uint32_t blockSize = pKerPrivArgs->
blockSize;
255 #if DSPLIB_DEBUGPRINT
256 printf(
"Enter DSPLIB_sqrAdd_exec_cn\n");
259 int32_t *pInLocal1 = (int32_t *) pIn;
260 int64_t *pOutLocal = (int64_t *) pOut;
262 #if DSPLIB_DEBUGPRINT
263 printf(
"Enter pInLocal1 %p pOut %p\n", pInLocal1, pOut);
269 for (int32_t counter = 0; counter < blockSize; counter++) {
271 #if DSPLIB_DEBUGPRINT
273 printf(
"counter %d a %f\n", counter, a);
276 out += ((int64_t) a * (int64_t) a);
280 #if DSPLIB_DEBUGPRINT
281 printf(
"DSPLIB_DEBUGPRINT DSPLIB_sqrAdd_exec_cn result %lf\n", out);
295 uint32_t blockSize = pKerPrivArgs->
blockSize;
297 #if DSPLIB_DEBUGPRINT
298 printf(
"Enter DSPLIB_sqrAdd_exec_cn\n");
301 uint32_t *pInLocal1 = (uint32_t *) pIn;
302 uint64_t *pOutLocal = (uint64_t *) pOut;
304 #if DSPLIB_DEBUGPRINT
305 printf(
"Enter pInLocal1 %p pOut %p\n", pInLocal1, pOut);
311 for (int32_t counter = 0; counter < blockSize; counter++) {
313 #if DSPLIB_DEBUGPRINT
315 printf(
"counter %d a %f\n", counter, a);
318 out += ((uint64_t) a * (uint64_t) a);
322 #if DSPLIB_DEBUGPRINT
323 printf(
"DSPLIB_DEBUGPRINT DSPLIB_sqrAdd_exec_cn result %lf\n", out);
DSPLIB_STATUS DSPLIB_sqrAdd_exec_cn< uint16_t >(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
DSPLIB_STATUS DSPLIB_sqrAdd_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_sqrAdd_exec_cn< int32_t >(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
DSPLIB_STATUS DSPLIB_sqrAdd_exec_cn< int8_t >(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
DSPLIB_STATUS DSPLIB_sqrAdd_exec_cn< uint8_t >(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
template DSPLIB_STATUS DSPLIB_sqrAdd_exec_cn< double >(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
template DSPLIB_STATUS DSPLIB_sqrAdd_exec_cn< float >(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
DSPLIB_STATUS DSPLIB_sqrAdd_exec_cn< int16_t >(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
DSPLIB_STATUS DSPLIB_sqrAdd_exec_cn< uint32_t >(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
Header file for kernel's internal use. For the kernel's interface, please see DSPLIB_sqrAdd.
DSPLIB_STATUS_NAME
The enumeration of all status codes.
void * DSPLIB_kernelHandle
Handle type for DSPLIB operations.
Structure that is reserved for internal use by the kernel.
int32_t blockSize
Size of input buffer for different batches DSPLIB_sqrAdd_init that will be retrieved and used by DSPL...