43 #include "../common/c71/DSPLIB_inlines.h"
48 template <
typename dataType>
56 uint32_t blockSize = pKerPrivArgs->
blockSize;
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;
65 uint8_t *pBlock = pKerPrivArgs->
bufPblock;
67 typedef typename c7x::make_full_vector<dataType>::type vec;
68 SE_VECLEN = c7x::se_veclen<vec>::value;
69 SA_VECLEN = c7x::sa_veclen<vec>::value;
70 SE_ELETYPE = c7x::se_eletype<vec>::value;
73 int32_t eleCount = c7x::element_count_of<vec>::value;
74 printf(
"Enter eleCount %d\n", eleCount);
81 se0Params = __gen_SE_TEMPLATE_v1();
83 se0Params.ICNT0 = blockSize;
84 se0Params.VECLEN = SE_VECLEN;
85 se0Params.ELETYPE = SE_ELETYPE;
86 se0Params.DIMFMT = __SE_DIMFMT_1D;
91 sa0Params = __gen_SA_TEMPLATE_v1();
93 sa0Params.ICNT0 = blockSize;
94 sa0Params.DIM1 = blockSize;
95 sa0Params.VECLEN = SA_VECLEN;
96 sa0Params.DIMFMT = __SA_DIMFMT_1D;
119 template <
typename dataType,
int32_t dataIn>
123 uint32_t blockSize = pKerPrivArgs->
blockSize;
125 __SE_TEMPLATE_v1 se0Params;
126 __SA_TEMPLATE_v1 sa0Params;
128 dataType *restrict pInLocal = (dataType *) pIn;
129 dataType *restrict pOutLocal = (dataType *) pOut;
131 #if DSPLIB_DEBUGPRINT
132 printf(
"Enter DSPLIB_negate_exec_ci\n");
135 typedef typename c7x::make_full_vector<dataType>::type vec;
136 int32_t eleCount = c7x::element_count_of<vec>::value;
138 uint8_t *pBlock = pKerPrivArgs->
bufPblock;
143 __SE0_OPEN(pInLocal, se0Params);
146 __SA0_OPEN(sa0Params);
150 for (int32_t counter = 0; counter < blockSize; counter += eleCount) {
152 vec a = c7x::strm_eng<0, vec>::get_adv();
155 vec out = __sub_sat(zero, a);
159 __vpred tmp = c7x::strm_agen<0, vec>::get_vpred();
160 vec *VB1 = c7x::strm_agen<0, vec>::get_adv(pOutLocal);
162 __vstore_pred(tmp, VB1, out);
#define SE_SE0_PARAM_OFFSET
#define SE_SA0_PARAM_OFFSET
template DSPLIB_STATUS DSPLIB_negate_exec_ci< int16_t, DSPLIB_INT16 >(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
DSPLIB_STATUS DSPLIB_negate_exec_ci(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
This function is the main execution function for the C7x implementation of the kernel....
template DSPLIB_STATUS DSPLIB_negate_exec_ci< int32_t, DSPLIB_INT32 >(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
template DSPLIB_STATUS DSPLIB_negate_exec_ci< int8_t, DSPLIB_INT8 >(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
template DSPLIB_STATUS DSPLIB_negate_init_ci< int32_t >(DSPLIB_kernelHandle handle, const DSPLIB_bufParams1D_t *bufParamsIn, const DSPLIB_bufParams1D_t *bufParamsOut, const DSPLIB_negate_InitArgs *pKerInitArgs)
template DSPLIB_STATUS DSPLIB_negate_init_ci< int8_t >(DSPLIB_kernelHandle handle, const DSPLIB_bufParams1D_t *bufParamsIn, const DSPLIB_bufParams1D_t *bufParamsOut, const DSPLIB_negate_InitArgs *pKerInitArgs)
template DSPLIB_STATUS DSPLIB_negate_init_ci< int16_t >(DSPLIB_kernelHandle handle, const DSPLIB_bufParams1D_t *bufParamsIn, const DSPLIB_bufParams1D_t *bufParamsOut, const DSPLIB_negate_InitArgs *pKerInitArgs)
DSPLIB_STATUS DSPLIB_negate_init_ci(DSPLIB_kernelHandle handle, const DSPLIB_bufParams1D_t *bufParamsIn, const DSPLIB_bufParams1D_t *bufParamsOut, const DSPLIB_negate_InitArgs *pKerInitArgs)
This function is the initialization function for the C7x implementation of the kernel....
Header file for kernel's internal use. For the kernel's interface, please see DSPLIB_negate.
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_negate_init that will be retrieved and used by DSPL...
uint8_t bufPblock[DSPLIB_NEGATE_IXX_IXX_OXX_PBLOCK_SIZE]