42 printf(
"Enter DSPLIB_matMul_fixed_init_checkParams\n");
64 if ((bufParamsIn0->
dim_x != bufParamsIn1->
dim_y) ||
74 const void *restrict pIn0,
75 const void *restrict pIn1,
76 const void *restrict pOut)
81 printf(
"Enter DSPLIB_matMul_fixed_exec_checkParams\n");
83 if ((pIn0 == NULL) || (pIn1 == NULL) || (pOut == NULL)) {
102 uint32_t M = bufParamsOut->
dim_y;
103 uint32_t N = bufParamsOut->
dim_x;
104 uint32_t K = bufParamsIn0->
dim_x;
109 pKerPrivArgs->
qs = pKerInitArgs->
qs;
111 uint32_t datatype = bufParamsIn0->
data_type;
120 #if DSPLIB_DEBUGPRINT
121 printf(
"DSPLIB_DEBUGPRINT Enter DSPLIB_matMul_fixed_init\n");
133 #if DSPLIB_DEBUGPRINT
134 printf(
"DSPLIB_DEBUGPRINT CP 2 status %d\n", status);
140 #if DSPLIB_DEBUGPRINT
141 printf(
"DSPLIB_DEBUGPRINT bufParamsIn->data_type == DSPLIB_INT8_T\n");
145 bufParamsOut, pKerInitArgs);
148 #if DSPLIB_DEBUGPRINT
149 printf(
"DSPLIB_DEBUGPRINT bufParamsIn->data_type == DSPLIB_INT16_T\n");
153 bufParamsOut, pKerInitArgs);
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_fixed_exec\n");
176 status = pKerPrivArgs->
execute(handle, pIn0, pIn1, pOut);
template DSPLIB_STATUS DSPLIB_matMul_fixed_init_ci< DSPLIB_MATMAPY_FXD_I16S_O16S >(DSPLIB_kernelHandle handle, const DSPLIB_bufParams2D_t *bufParamsIn0, const DSPLIB_bufParams2D_t *bufParamsIn1, const DSPLIB_bufParams2D_t *bufParamsOut, const DSPLIB_matMul_fixed_InitArgs *pKerInitArgs)
template DSPLIB_STATUS DSPLIB_matMul_fixed_exec_ci< DSPLIB_MATMAPY_FXD_I16S_O16S >(DSPLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
template DSPLIB_STATUS DSPLIB_matMul_fixed_exec_ci< DSPLIB_MATMAPY_FXD_I8S_O8S >(DSPLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
template DSPLIB_STATUS DSPLIB_matMul_fixed_init_ci< DSPLIB_MATMAPY_FXD_I8S_O8S >(DSPLIB_kernelHandle handle, const DSPLIB_bufParams2D_t *bufParamsIn0, const DSPLIB_bufParams2D_t *bufParamsIn1, const DSPLIB_bufParams2D_t *bufParamsOut, const DSPLIB_matMul_fixed_InitArgs *pKerInitArgs)
template DSPLIB_STATUS DSPLIB_matMul_fixed_exec_cn< int8_t >(DSPLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
template DSPLIB_STATUS DSPLIB_matMul_fixed_exec_cn< int16_t >(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_fixed.
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
int32_t DSPLIB_matMul_fixed_getHandleSize(DSPLIB_matMul_fixed_InitArgs *pKerInitArgs)
This is a query function to calculate the size of internal handle.
DSPLIB_STATUS DSPLIB_matMul_fixed_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_fixed_exec function....
DSPLIB_STATUS DSPLIB_matMul_fixed_init(DSPLIB_kernelHandle handle, DSPLIB_bufParams2D_t *bufParamsIn0, DSPLIB_bufParams2D_t *bufParamsIn1, DSPLIB_bufParams2D_t *bufParamsOut, const DSPLIB_matMul_fixed_InitArgs *pKerInitArgs)
This function should be called before the DSPLIB_matMul_fixed_exec function is called....
DSPLIB_STATUS DSPLIB_matMul_fixed_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_fixed_init_checkParams(DSPLIB_kernelHandle handle, const DSPLIB_bufParams2D_t *bufParamsIn0, const DSPLIB_bufParams2D_t *bufParamsIn1, const DSPLIB_bufParams2D_t *bufParamsOut, const DSPLIB_matMul_fixed_InitArgs *pKerInitArgs)
This function checks the validity of the parameters passed to DSPLIB_matMul_fixed_init function....
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_fixed_exec execute
Function pointer to point to the right execution variant between DSPLIB_matMul_fixed_exec_cn and DSPL...
int32_t strideIn0Elements
int32_t strideOutElements
int32_t strideIn1Elements