37 template <
typename dataType>
44 int32_t blockSize = pKerPrivArgs->
blockSize;
47 printf(
"Enter DSPLIB_dotprod_exec_cn\n");
50 dataType *pInLocal1 = (dataType *) pIn1;
51 dataType *pInLocal2 = (dataType *) pIn2;
52 dataType *pOutLocal = (dataType *) pOut;
55 printf(
"Enter pInLocal1 %p pInLocal2 %p pOut %p\n", pInLocal1, pInLocal2, pOut);
61 for (int32_t counter = 0; counter < blockSize; counter++) {
66 printf(
"counter %d a %d b %d\n", counter, a, b);
72 printf(
"counter %d out %d\n", counter, out);
93 int32_t blockSize = pKerPrivArgs->
blockSize;
96 printf(
"Enter DSPLIB_dotprod_exec_cn\n");
99 int8_t *pInLocal1 = (int8_t *) pIn1;
100 int8_t *pInLocal2 = (int8_t *) pIn2;
101 int32_t *pOutLocal = (int32_t *) pOut;
103 #if DSPLIB_DEBUGPRINT
104 printf(
"Enter pInLocal1 %p pInLocal2 %p pOut %p\n", pInLocal1, pInLocal2, pOut);
110 for (int32_t counter = 0; counter < blockSize; counter++) {
113 #if DSPLIB_DEBUGPRINT
115 printf(
"counter %d a %d b %d\n", counter, a, b);
118 out += (int32_t) a * (int32_t) b;
119 #if DSPLIB_DEBUGPRINT
121 printf(
"counter %d out %d\n", counter, out);
142 int32_t blockSize = pKerPrivArgs->
blockSize;
144 #if DSPLIB_DEBUGPRINT
145 printf(
"Enter DSPLIB_dotprod_exec_cn\n");
148 uint8_t *pInLocal1 = (uint8_t *) pIn1;
149 uint8_t *pInLocal2 = (uint8_t *) pIn2;
150 uint32_t *pOutLocal = (uint32_t *) pOut;
152 #if DSPLIB_DEBUGPRINT
153 printf(
"Enter pInLocal1 %p pInLocal2 %p pOut %p\n", pInLocal1, pInLocal2, pOut);
159 for (int32_t counter = 0; counter < blockSize; counter++) {
162 #if DSPLIB_DEBUGPRINT
164 printf(
"counter %d a %d b %d\n", counter, a, b);
167 out += (uint32_t) a * (uint32_t) b;
168 #if DSPLIB_DEBUGPRINT
170 printf(
"counter %d out %d\n", counter, out);
191 int32_t blockSize = pKerPrivArgs->
blockSize;
193 #if DSPLIB_DEBUGPRINT
194 printf(
"Enter DSPLIB_dotprod_exec_cn\n");
197 int16_t *pInLocal1 = (int16_t *) pIn1;
198 int16_t *pInLocal2 = (int16_t *) pIn2;
199 int64_t *pOutLocal = (int64_t *) pOut;
201 #if DSPLIB_DEBUGPRINT
202 printf(
"Enter pInLocal1 %p pInLocal2 %p pOut %p\n", pInLocal1, pInLocal2, pOut);
208 for (int32_t counter = 0; counter < blockSize; counter++) {
211 #if DSPLIB_DEBUGPRINT
213 printf(
"counter %d a %d b %d\n", counter, a, b);
216 out += (int64_t) a * (int64_t) b;
217 #if DSPLIB_DEBUGPRINT
219 printf(
"counter %d out %d\n", counter, out);
240 int32_t blockSize = pKerPrivArgs->
blockSize;
242 #if DSPLIB_DEBUGPRINT
243 printf(
"Enter DSPLIB_dotprod_exec_cn\n");
246 uint16_t *pInLocal1 = (uint16_t *) pIn1;
247 uint16_t *pInLocal2 = (uint16_t *) pIn2;
248 uint64_t *pOutLocal = (uint64_t *) pOut;
250 #if DSPLIB_DEBUGPRINT
251 printf(
"Enter pInLocal1 %p pInLocal2 %p pOut %p\n", pInLocal1, pInLocal2, pOut);
257 for (int32_t counter = 0; counter < blockSize; counter++) {
260 #if DSPLIB_DEBUGPRINT
262 printf(
"counter %d a %d b %d\n", counter, a, b);
265 out += (uint64_t) a * (uint64_t) b;
266 #if DSPLIB_DEBUGPRINT
268 printf(
"counter %d out %d\n", counter, out);
288 int32_t blockSize = pKerPrivArgs->
blockSize;
290 #if DSPLIB_DEBUGPRINT
291 printf(
"Enter DSPLIB_dotprod_exec_cn\n");
294 int32_t *pInLocal1 = (int32_t *) pIn1;
295 int32_t *pInLocal2 = (int32_t *) pIn2;
296 int64_t *pOutLocal = (int64_t *) pOut;
298 #if DSPLIB_DEBUGPRINT
299 printf(
"Enter pInLocal1 %p pInLocal2 %p pOut %p\n", pInLocal1, pInLocal2, pOut);
305 for (int32_t counter = 0; counter < blockSize; counter++) {
308 #if DSPLIB_DEBUGPRINT
310 printf(
"counter %d a %d b %d\n", counter, a, b);
313 out += (int64_t) a * (int64_t) b;
314 #if DSPLIB_DEBUGPRINT
316 printf(
"counter %d out %d\n", counter, out);
337 int32_t blockSize = pKerPrivArgs->
blockSize;
339 #if DSPLIB_DEBUGPRINT
340 printf(
"Enter DSPLIB_dotprod_exec_cn\n");
343 uint32_t *pInLocal1 = (uint32_t *) pIn1;
344 uint32_t *pInLocal2 = (uint32_t *) pIn2;
345 uint64_t *pOutLocal = (uint64_t *) pOut;
347 #if DSPLIB_DEBUGPRINT
348 printf(
"Enter pInLocal1 %p pInLocal2 %p pOut %p\n", pInLocal1, pInLocal2, pOut);
354 for (int32_t counter = 0; counter < blockSize; counter++) {
357 #if DSPLIB_DEBUGPRINT
359 printf(
"counter %d a %d b %d\n", counter, a, b);
363 #if DSPLIB_DEBUGPRINT
365 printf(
"counter %d out %d\n", counter, out);
377 void *restrict pOut);
381 void *restrict pOut);
385 void *restrict pOut);
389 void *restrict pOut);
393 void *restrict pOut);
397 void *restrict pOut);
401 void *restrict pOut);
405 void *restrict pOut);
DSPLIB_STATUS DSPLIB_dotprod_exec_cn(DSPLIB_kernelHandle handle, void *restrict pIn1, void *restrict pIn2, void *restrict pOut)
This function is the main execution function for the natural C implementation of the kernel....
DSPLIB_STATUS DSPLIB_dotprod_exec_cn< int8_t >(DSPLIB_kernelHandle handle, void *restrict pIn1, void *restrict pIn2, void *restrict pOut)
DSPLIB_STATUS DSPLIB_dotprod_exec_cn< uint32_t >(DSPLIB_kernelHandle handle, void *restrict pIn1, void *restrict pIn2, void *restrict pOut)
DSPLIB_STATUS DSPLIB_dotprod_exec_cn< int32_t >(DSPLIB_kernelHandle handle, void *restrict pIn1, void *restrict pIn2, void *restrict pOut)
template DSPLIB_STATUS DSPLIB_dotprod_exec_cn< double >(DSPLIB_kernelHandle handle, void *restrict pIn1, void *restrict pIn2, void *restrict pOut)
DSPLIB_STATUS DSPLIB_dotprod_exec_cn< uint16_t >(DSPLIB_kernelHandle handle, void *restrict pIn1, void *restrict pIn2, void *restrict pOut)
template DSPLIB_STATUS DSPLIB_dotprod_exec_cn< float >(DSPLIB_kernelHandle handle, void *restrict pIn1, void *restrict pIn2, void *restrict pOut)
DSPLIB_STATUS DSPLIB_dotprod_exec_cn< uint8_t >(DSPLIB_kernelHandle handle, void *restrict pIn1, void *restrict pIn2, void *restrict pOut)
DSPLIB_STATUS DSPLIB_dotprod_exec_cn< int16_t >(DSPLIB_kernelHandle handle, void *restrict pIn1, void *restrict pIn2, void *restrict pOut)
Header file for kernel's internal use. For the kernel's interface, please see DSPLIB_dotprod.
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_dotprod_init that will be retrieved and used by DSP...