47 #include "../common/c71/DSPLIB_inlines.h"
51 template <
typename dataType>
58 __SE_TEMPLATE_v1 se0Params;
59 __SA_TEMPLATE_v1 sa0Params;
61 __SE_ELETYPE SE_ELETYPE;
62 __SE_VECLEN SE_VECLEN;
63 __SA_VECLEN SA_VECLEN;
67 uint8_t *pBlock = pKerPrivArgs->
bufPblock;
68 uint32_t blockSize = pKerPrivArgs->
blockSize;
70 typedef typename c7x::make_full_vector<dataType>::type vec;
71 SE_VECLEN = c7x::se_veclen<vec>::value;
72 SA_VECLEN = c7x::sa_veclen<vec>::value;
73 SE_ELETYPE = c7x::se_eletype<vec>::value;
76 int32_t eleCount = c7x::element_count_of<vec>::value;
77 printf(
"Enter eleCount %d\n", eleCount);
83 se0Params = __gen_SE_TEMPLATE_v1();
85 se0Params.ICNT0 = blockSize;
86 se0Params.ELETYPE = SE_ELETYPE;
87 se0Params.VECLEN = SE_VECLEN;
88 se0Params.DIMFMT = __SE_DIMFMT_1D;
93 sa0Params = __gen_SA_TEMPLATE_v1();
95 sa0Params.ICNT0 = blockSize;
96 sa0Params.DIM1 = blockSize;
97 sa0Params.VECLEN = SA_VECLEN;
98 sa0Params.DIMFMT = __SA_DIMFMT_1D;
146 template <
typename dataType,
int32_t dataIn>
151 uint32_t blockSize = pKerPrivArgs->
blockSize;
153 __SE_TEMPLATE_v1 se0Params;
154 __SA_TEMPLATE_v1 sa0Params;
156 dataType *restrict pInLocal1 = (dataType *) pIn1;
157 dataType *restrict pInLocal2 = (dataType *) pIn2;
158 dataType *restrict pOutLocal = (dataType *) pOut;
160 #if DSPLIB_DEBUGPRINT
161 printf(
"Enter DSPLIB_minEvery_exec_ci\n");
164 typedef typename c7x::make_full_vector<dataType>::type vec;
165 int32_t eleCount = c7x::element_count_of<vec>::value;
167 #if DSPLIB_DEBUGPRINT
168 printf(
"Enter eleCount %d\n", eleCount);
171 uint8_t *pBlock = pKerPrivArgs->
bufPblock;
176 __SE0_OPEN(pInLocal1, se0Params);
177 __SE1_OPEN(pInLocal2, se0Params);
180 __SA0_OPEN(sa0Params);
182 #if DSPLIB_DEBUGPRINT
183 printf(
"DSPLIB_DEBUGPRINT blockSize %d\n", blockSize);
188 for (int32_t counter = 0; counter < (int32_t)blockSize; counter += eleCount) {
189 vec a = c7x::strm_eng<0, vec>::get_adv();
190 vec b = c7x::strm_eng<1, vec>::get_adv();
197 __vpred tmp = c7x::strm_agen<0, vec>::get_vpred();
198 vec *VB1 = c7x::strm_agen<0, vec>::get_adv(pOutLocal);
200 __vstore_pred(tmp, VB1, out);
201 #if DSPLIB_DEBUGPRINT
219 void *restrict pOut);
224 void *restrict pOut);
229 void *restrict pOut);
234 void *restrict pOut);
239 void *restrict pOut);
244 void *restrict pOut);
249 void *restrict pOut);
254 void *restrict pOut);
#define SE_SE0_PARAM_OFFSET
#define SE_SA0_PARAM_OFFSET
template DSPLIB_STATUS DSPLIB_minEvery_exec_ci< uint8_t, DSPLIB_UINT8 >(DSPLIB_kernelHandle handle, void *restrict pIn1, void *restrict pIn2, void *restrict pOut)
template DSPLIB_STATUS DSPLIB_minEvery_exec_ci< int16_t, DSPLIB_INT16 >(DSPLIB_kernelHandle handle, void *restrict pIn1, void *restrict pIn2, void *restrict pOut)
template DSPLIB_STATUS DSPLIB_minEvery_init_ci< uint8_t >(DSPLIB_kernelHandle handle, const DSPLIB_bufParams1D_t *bufParamsIn, const DSPLIB_bufParams1D_t *bufParamsOut, const DSPLIB_minEvery_InitArgs *pKerInitArgs)
template DSPLIB_STATUS DSPLIB_minEvery_exec_ci< uint16_t, DSPLIB_UINT16 >(DSPLIB_kernelHandle handle, void *restrict pIn1, void *restrict pIn2, void *restrict pOut)
template DSPLIB_STATUS DSPLIB_minEvery_exec_ci< int32_t, DSPLIB_INT32 >(DSPLIB_kernelHandle handle, void *restrict pIn1, void *restrict pIn2, void *restrict pOut)
template DSPLIB_STATUS DSPLIB_minEvery_exec_ci< uint32_t, DSPLIB_UINT32 >(DSPLIB_kernelHandle handle, void *restrict pIn1, void *restrict pIn2, void *restrict pOut)
template DSPLIB_STATUS DSPLIB_minEvery_init_ci< double >(DSPLIB_kernelHandle handle, const DSPLIB_bufParams1D_t *bufParamsIn, const DSPLIB_bufParams1D_t *bufParamsOut, const DSPLIB_minEvery_InitArgs *pKerInitArgs)
DSPLIB_STATUS DSPLIB_minEvery_init_ci(DSPLIB_kernelHandle handle, const DSPLIB_bufParams1D_t *bufParamsIn, const DSPLIB_bufParams1D_t *bufParamsOut, const DSPLIB_minEvery_InitArgs *pKerInitArgs)
This function is the initialization function for the C7x implementation of the kernel....
template DSPLIB_STATUS DSPLIB_minEvery_init_ci< int32_t >(DSPLIB_kernelHandle handle, const DSPLIB_bufParams1D_t *bufParamsIn, const DSPLIB_bufParams1D_t *bufParamsOut, const DSPLIB_minEvery_InitArgs *pKerInitArgs)
template DSPLIB_STATUS DSPLIB_minEvery_init_ci< float >(DSPLIB_kernelHandle handle, const DSPLIB_bufParams1D_t *bufParamsIn, const DSPLIB_bufParams1D_t *bufParamsOut, const DSPLIB_minEvery_InitArgs *pKerInitArgs)
template DSPLIB_STATUS DSPLIB_minEvery_init_ci< uint32_t >(DSPLIB_kernelHandle handle, const DSPLIB_bufParams1D_t *bufParamsIn, const DSPLIB_bufParams1D_t *bufParamsOut, const DSPLIB_minEvery_InitArgs *pKerInitArgs)
template DSPLIB_STATUS DSPLIB_minEvery_init_ci< int8_t >(DSPLIB_kernelHandle handle, const DSPLIB_bufParams1D_t *bufParamsIn, const DSPLIB_bufParams1D_t *bufParamsOut, const DSPLIB_minEvery_InitArgs *pKerInitArgs)
template DSPLIB_STATUS DSPLIB_minEvery_exec_ci< float, DSPLIB_FLOAT32 >(DSPLIB_kernelHandle handle, void *restrict pIn1, void *restrict pIn2, void *restrict pOut)
DSPLIB_STATUS DSPLIB_minEvery_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....
template DSPLIB_STATUS DSPLIB_minEvery_exec_ci< int8_t, DSPLIB_INT8 >(DSPLIB_kernelHandle handle, void *restrict pIn1, void *restrict pIn2, void *restrict pOut)
template DSPLIB_STATUS DSPLIB_minEvery_exec_ci< double, DSPLIB_FLOAT64 >(DSPLIB_kernelHandle handle, void *restrict pIn1, void *restrict pIn2, void *restrict pOut)
template DSPLIB_STATUS DSPLIB_minEvery_init_ci< uint16_t >(DSPLIB_kernelHandle handle, const DSPLIB_bufParams1D_t *bufParamsIn, const DSPLIB_bufParams1D_t *bufParamsOut, const DSPLIB_minEvery_InitArgs *pKerInitArgs)
template DSPLIB_STATUS DSPLIB_minEvery_init_ci< int16_t >(DSPLIB_kernelHandle handle, const DSPLIB_bufParams1D_t *bufParamsIn, const DSPLIB_bufParams1D_t *bufParamsOut, const DSPLIB_minEvery_InitArgs *pKerInitArgs)
Header file for kernel's internal use. For the kernel's interface, please see DSPLIB_minEvery.
DSPLIB_STATUS_NAME
The enumeration of all status codes.
void * DSPLIB_kernelHandle
Handle type for DSPLIB operations.
A structure for a 1 dimensional buffer descriptor.
Structure containing the parameters to initialize the kernel.
Structure that is reserved for internal use by the kernel.
int32_t blockSize
Size of input buffer for different batches DSPLIB_minEvery_init that will be retrieved and used by DS...
uint8_t bufPblock[DSPLIB_MINEVERY_IXX_IXX_OXX_PBLOCK_SIZE]