44 pKerPrivArgs->
M = src0_addr->
dim_y;
45 pKerPrivArgs->
K = src0_addr->
dim_x;
46 pKerPrivArgs->
N = src1_addr->
dim_x;
51 template <
typename dataType,
typename accumulateType>
59 accumulateType product, sum;
63 int32_t M = pKerPrivArgs->
M;
64 int32_t K = pKerPrivArgs->
K;
65 int32_t N = pKerPrivArgs->
N;
73 const dataType *A = (
const dataType *)src0;
74 const dataType *B = (
const dataType *)src1;
75 dataType *C = (dataType *)dst;
77 for (m = 0; m < M; m++) {
78 for (n = 0; n < N; n++) {
80 for (k = 0; k < K; k++){
84 C[n + m*strideC] = FFTLIB_UTIL_shiftAndRound<accumulateType, dataType>(sum, shift);
86 #if defined(FFTLIB_INDUCE_NATURALC_ERROR)
87 C[n + m*StrideC] = 77;
FFTLIB_STATUS FFTLIB_LINALG_matrixMatrixMultiply_ixX_ixX_oxX_exec_cn(FFTLIB_kernelHandle handle, const void *src0, const void *src1, void *dst)
This function is the main execution function for the natural C implementation of the matrix-matrix mu...
template FFTLIB_STATUS FFTLIB_LINALG_matrixMatrixMultiply_ixX_ixX_oxX_exec_cn< int32_t, FFTLIB_int128_t >(FFTLIB_kernelHandle handle, const void *src0, const void *src1, void *dst)
template FFTLIB_STATUS FFTLIB_LINALG_matrixMatrixMultiply_ixX_ixX_oxX_exec_cn< int16_t, int64_t >(FFTLIB_kernelHandle handle, const void *src0, const void *src1, void *dst)
FFTLIB_STATUS FFTLIB_LINALG_matrixMatrixMultiply_ixX_ixX_oxX_init_cn(FFTLIB_kernelHandle handle, const FFTLIB_bufParams2D_t *src0_addr, const FFTLIB_bufParams2D_t *src1_addr, const FFTLIB_bufParams2D_t *dst_addr, const FFTLIB_LINALG_matrixMatrixMultiply_ixX_ixX_oxX_InitArgs *pKerInitArgs)
This function is the initialization function for the natural C implementation of the kernel.
template FFTLIB_STATUS FFTLIB_LINALG_matrixMatrixMultiply_ixX_ixX_oxX_exec_cn< int8_t, int32_t >(FFTLIB_kernelHandle handle, const void *src0, const void *src1, void *dst)
Header file for kernel's internal use. For the kernel's interface, please see FFTLIB_LINALG_matrixMat...
void * FFTLIB_kernelHandle
Handle type for FFTLIB operations.
FFTLIB_STATUS_NAME
The enumeration of all status codes.
static void FFTLIB_UTIL_mult(int64_t *ph, int64_t *pl, int64_t a, int64_t b)
This structure holds all the initialization parameters for matrix- matrix multiplication.
int8_t shift
Output shift value.
This structure holds all private arguments.
int32_t strideBElements
Row stride for the B matrix.
int32_t K
Number of blocks in the horizontal dimension of the first input matrix. In the case of natural C code...
int32_t M
Number of blocks in the vertical dimension of the first input matrix. In the case of natural C code,...
int32_t strideCElements
Row stride for the C matrix.
int32_t strideAElements
Row stride for the A matrix.
int32_t N
Number of blocks in the horizontal dimension of the second input matrix. In the case of natural C cod...
FFTLIB_LINALG_matrixMatrixMultiply_ixX_ixX_oxX_InitArgs initArgs
Structure holding initialization parameters.
A structure for a 2 dimensional buffer descriptor.
uint32_t dim_y
Height of buffer in Y dimension in elements.
uint32_t dim_x
Width of buffer in X dimension in elements.