42 printf(
"Enter DSPLIB_matMul_init_checkParams\n");
67 if ((bufParamsIn0->
dim_x != bufParamsIn1->
dim_y) ||
77 const void *restrict pIn0,
78 const void *restrict pIn1,
79 const void *restrict pOut)
84 printf(
"Enter DSPLIB_matMul_exec_checkParams\n");
86 if ((pIn0 == NULL) || (pIn1 == NULL) || (pOut == NULL)) {
105 uint32_t M = bufParamsOut->
dim_y;
106 uint32_t N = bufParamsOut->
dim_x;
107 uint32_t K = bufParamsIn0->
dim_x;
113 uint32_t datatype = bufParamsIn0->
data_type;
122 #if DSPLIB_DEBUGPRINT
123 printf(
"DSPLIB_DEBUGPRINT Enter DSPLIB_matMul_init\n");
135 #if DSPLIB_DEBUGPRINT
136 printf(
"DSPLIB_DEBUGPRINT CP 2 status %d\n", status);
142 #if DSPLIB_DEBUGPRINT
143 printf(
"DSPLIB_DEBUGPRINT bufParamsIn->data_type == DSPLIB_FLOAT32\n");
149 #if DSPLIB_DEBUGPRINT
150 printf(
"DSPLIB_DEBUGPRINT bufParamsIn->data_type == DSPLIB_FLOAT64\n");
159 #if DSPLIB_DEBUGPRINT
160 printf(
"DSPLIB_DEBUGPRINT CP 3 status %d\n", status);
170 #if DSPLIB_DEBUGPRINT
171 printf(
"DSPLIB_DEBUGPRINT Enter DSPLIB_matMul_exec\n");
176 status = pKerPrivArgs->
execute(handle, pIn0, pIn1, pOut);
template DSPLIB_STATUS DSPLIB_matMul_exec_ci< float >(DSPLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
template DSPLIB_STATUS DSPLIB_matMul_init_ci< float >(DSPLIB_kernelHandle handle, const DSPLIB_bufParams2D_t *bufParamsIn0, const DSPLIB_bufParams2D_t *bufParamsIn1, const DSPLIB_bufParams2D_t *bufParamsOut, const DSPLIB_matMul_InitArgs *pKerInitArgs)
template DSPLIB_STATUS DSPLIB_matMul_init_ci< double >(DSPLIB_kernelHandle handle, const DSPLIB_bufParams2D_t *bufParamsIn0, const DSPLIB_bufParams2D_t *bufParamsIn1, const DSPLIB_bufParams2D_t *bufParamsOut, const DSPLIB_matMul_InitArgs *pKerInitArgs)
template DSPLIB_STATUS DSPLIB_matMul_exec_ci< double >(DSPLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
template DSPLIB_STATUS DSPLIB_matMul_exec_cn< double >(DSPLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
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.
static int32_t DSPLIB_sizeof(uint32_t type)
Inline function returns number of bytes per element given a type of DSPLIB_data_type_e.
DSPLIB_STATUS_NAME
The enumeration of all status codes.
void * DSPLIB_kernelHandle
Handle type for DSPLIB operations.
@ DSPLIB_ERR_INVALID_DIMENSION
@ DSPLIB_ERR_NULL_POINTER
@ DSPLIB_ERR_INVALID_TYPE
DSPLIB_STATUS DSPLIB_matMul_exec_checkParams(DSPLIB_kernelHandle handle, const void *restrict pIn0, const void *restrict pIn1, const void *restrict pOut)
This function checks the validity of the parameters passed to DSPLIB_matMul_exec function....
DSPLIB_STATUS DSPLIB_matMul_exec(DSPLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
This function is the main kernel compute function.
DSPLIB_STATUS DSPLIB_matMul_init_checkParams(DSPLIB_kernelHandle handle, const DSPLIB_bufParams2D_t *bufParamsIn0, const DSPLIB_bufParams2D_t *bufParamsIn1, const DSPLIB_bufParams2D_t *bufParamsOut, const DSPLIB_matMul_InitArgs *pKerInitArgs)
This function checks the validity of the parameters passed to DSPLIB_matMul_init function....
int32_t DSPLIB_matMul_getHandleSize(DSPLIB_matMul_InitArgs *pKerInitArgs)
This is a query function to calculate the size of internal handle.
DSPLIB_STATUS DSPLIB_matMul_init(DSPLIB_kernelHandle handle, DSPLIB_bufParams2D_t *bufParamsIn0, DSPLIB_bufParams2D_t *bufParamsIn1, DSPLIB_bufParams2D_t *bufParamsOut, const DSPLIB_matMul_InitArgs *pKerInitArgs)
This function should be called before the DSPLIB_matMul_exec function is called. This function takes ...
A structure for a 2 dimensional buffer descriptor.
uint32_t data_type
Values are of type DSPLIB_data_type_e.
int32_t stride_y
Stride in Y dimension in bytes.
uint32_t dim_x
Width of buffer in X dimension in elements.
uint32_t dim_y
Height of buffer in Y dimension in elements.
Structure containing the parameters to initialize the kernel.
int8_t funcStyle
Variant of the function refer to DSPLIB_FUNCTION_STYLE
Structure that is reserved for internal use by the kernel.
pFxnDSPLIB_matMul_exec execute
Function pointer to point to the right execution variant between DSPLIB_matMul_exec_cn and DSPLIB_mat...
int32_t strideIn1Elements
int32_t strideIn0Elements
int32_t strideOutElements