DSPLIB User Guide
DSPLIB_matMul_priv.h
Go to the documentation of this file.
1 /******************************************************************************
2  * *
3  * module name :DSPLIB *
4  * *
5  * module descripton :Matrix Multiply Accelerator Library module for C7x+MMA *
6  * *
7  * Copyright (C) 2017-2018 Texas Instruments Incorporated - https://www.ti.com/ *
8  * ALL RIGHTS RESERVED *
9  * *
10  ******************************************************************************/
11 
12 /********************************************************************************
13  * @file DSPLIB_matMul_priv.h
14  *
15  * @brief File to hold private parameter of function DSPLIB_matMul
16  *
17  * @version 0.1 - Mar 2022 : Initial Version
18  *
19  ********************************************************************************/
20 
21 #ifndef DSPLIB_MATMUL_IXX_IXX_OXX_PRIV_H_
22 #define DSPLIB_MATMUL_IXX_IXX_OXX_PRIV_H_
23 
24 #include "../common/DSPLIB_utility.h"
25 #include "DSPLIB_matMul.h"
26 
39 #define DSPLIB_MATMUL_IXX_IXX_OXX_PBLOCK_SIZE (5 * SE_PARAM_SIZE)
40 
47 /* #define DSPLIB_MATMUL_SE_UNROLL_FACTOR (8) */
48 
55  void *restrict pIn1,
56  void *restrict pIn2,
57  void *restrict pOut);
58 
90 template <typename dataType>
92  const DSPLIB_bufParams2D_t *bufParamsIn0,
93  const DSPLIB_bufParams2D_t *bufParamsIn1,
94  const DSPLIB_bufParams2D_t *bufParamsOut,
95  const DSPLIB_matMul_InitArgs *pKerInitArgs);
96 
123 template <typename dataType>
125 DSPLIB_matMul_exec_ci(DSPLIB_kernelHandle handle, void *restrict pIn1, void *restrict pIn2, void *restrict pOut);
126 
146 template <typename dataType>
147 extern DSPLIB_STATUS
148 DSPLIB_matMul_exec_cn(DSPLIB_kernelHandle handle, void *restrict pIn1, void *restrict pIn2, void *restrict pOut);
149 
153 typedef struct {
158  int32_t M;
159  int32_t N;
160  int32_t K;
164  int32_t KBlocks;
165  int32_t NBlocks;
167 
169 
191  DSPLIB_bufParams2D_t *bufParamsIn0,
192  DSPLIB_bufParams2D_t *bufParamsIn1,
193  DSPLIB_bufParams2D_t *bufParamsOut);
194 
195 template <typename dataType>
197  const DSPLIB_bufParams2D_t *bufParamsIn0,
198  const DSPLIB_bufParams2D_t *bufParamsIn1,
199  const DSPLIB_bufParams2D_t *bufParamsOut,
200  const DSPLIB_matMul_InitArgs *pKerInitArgs);
201 
202 template <typename dataType>
204  void *restrict pIn0,
205  void *restrict pIn1,
206  void *restrict pOut);
207 
208 template <typename dataType>
210  const DSPLIB_bufParams2D_t *bufParamsIn0,
211  const DSPLIB_bufParams2D_t *bufParamsIn1,
212  const DSPLIB_bufParams2D_t *bufParamsOut,
213  const DSPLIB_matMul_InitArgs *pKerInitArgs);
214 
215 template <typename dataType>
217  void *restrict pIn0,
218  void *restrict pIn1,
219  void *restrict pOut);
220 
221 #endif /* DSPLIB_MATMUL_IXX_IXX_OXX_PRIV_H_ */
222 
223 /* ======================================================================== */
224 /* End of file: DSPLIB_matMul.h */
225 /* ======================================================================== */
DSPLIB_STATUS DSPLIB_matMul_exec_ci(DSPLIB_kernelHandle handle, void *restrict pIn1, void *restrict pIn2, void *restrict pOut)
This function is the main execution function for the C7x implementation of the kernel....
DSPLIB_STATUS DSPLIB_matMul_init_cn(DSPLIB_kernelHandle handle, DSPLIB_bufParams2D_t *bufParamsIn0, DSPLIB_bufParams2D_t *bufParamsIn1, DSPLIB_bufParams2D_t *bufParamsOut)
This function is the initialization function for the natural C implementation of the kernel....
DSPLIB_STATUS DSPLIB_matMul_generic_init_ci(DSPLIB_kernelHandle handle, const DSPLIB_bufParams2D_t *bufParamsIn0, const DSPLIB_bufParams2D_t *bufParamsIn1, const DSPLIB_bufParams2D_t *bufParamsOut, const DSPLIB_matMul_InitArgs *pKerInitArgs)
DSPLIB_STATUS DSPLIB_matMul_init_ci(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 is the initialization function for the C7x implementation of the kernel....
DSPLIB_STATUS DSPLIB_matMul_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_matMul_N_unroll_init_ci(DSPLIB_kernelHandle handle, const DSPLIB_bufParams2D_t *bufParamsIn0, const DSPLIB_bufParams2D_t *bufParamsIn1, const DSPLIB_bufParams2D_t *bufParamsOut, const DSPLIB_matMul_InitArgs *pKerInitArgs)
DSPLIB_STATUS DSPLIB_matMul_generic_exec_ci(DSPLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
DSPLIB_STATUS(* pFxnDSPLIB_matMul_exec)(DSPLIB_kernelHandle handle, void *restrict pIn1, void *restrict pIn2, void *restrict pOut)
Macro to define the size of bufPblock array of DSPLIB_matMul_PrivArgs structure.
DSPLIB_STATUS DSPLIB_matMul_N_unroll_exec_ci(DSPLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
#define DSPLIB_MATMUL_IXX_IXX_OXX_PBLOCK_SIZE
Macro to define the size of bufPblock array of DSPLIB_matMul_PrivArgs structure.
DSPLIB_STATUS_NAME DSPLIB_STATUS
Return value for DSPLIB functions.
Definition: DSPLIB_types.h:170
DSPLIB_STATUS_NAME
The enumeration of all status codes.
Definition: DSPLIB_types.h:151
void * DSPLIB_kernelHandle
Handle type for DSPLIB operations.
Definition: DSPLIB_types.h:172
A structure for a 2 dimensional buffer descriptor.
Structure containing the parameters to initialize the kernel.
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...