32 template <
typename dataType>
44 dataType product, sum;
46 int32_t M = pKerPrivArgs->
M;
47 int32_t K = pKerPrivArgs->
K;
48 int32_t N = pKerPrivArgs->
N;
54 printf(
"Enter DSPLIB_matMul_exec_cn\n");
58 printf(
"DSPLIB_matMul_exec_cn: M = %d, N = %d, K = %d, strideIn0 = %d, strideIn1 = %d, strideOut = %d\n", M, N, K,
59 strideIn0, strideIn1, strideOut);
62 const dataType *restrict A = (
const dataType *) pIn0;
63 const dataType *restrict B = (
const dataType *) pIn1;
64 dataType *restrict C = (dataType *) pOut;
66 for (m = 0; m < M; m++) {
67 for (n = 0; n < N; n++) {
69 for (k = 0; k < K; k++) {
73 product = A[k + m * strideIn0] * B[n + k * strideIn1];
76 C[n + m * strideOut] = sum;
template DSPLIB_STATUS DSPLIB_matMul_exec_cn< double >(DSPLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
DSPLIB_STATUS DSPLIB_matMul_exec_cn(DSPLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
This function is the main execution function for the natural C implementation of the kernel....
template DSPLIB_STATUS DSPLIB_matMul_exec_cn< float >(DSPLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
Header file for kernel's internal use. For the kernel's interface, please see DSPLIB_matMul.
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 strideIn1Elements
int32_t strideIn0Elements
int32_t strideOutElements