43 uint8_t *pBlock = pKerPrivArgs->
bufPblock;
44 __SA_TEMPLATE_v1 sa1Params = __gen_SA_TEMPLATE_v1();
46 typedef typename c7x::make_full_vector<dataType>::type vec;
47 __SA_VECLEN SA_VECLEN = c7x::sa_veclen<vec>::value;
48 sa1Params.DIMFMT = __SA_DIMFMT_2D;
49 sa1Params.VECLEN = SA_VECLEN;
50 *(__SA_TEMPLATE_v1 *) ((uint8_t *) pBlock + (25 * SE_PARAM_SIZE)) = sa1Params;
60 kerInitArgsMatTrans.
dimX = pKerInitArgs->
dimX;
61 kerInitArgsMatTrans.
dimY = pKerInitArgs->
dimY;
63 uint32_t Nrows = pKerPrivArgs->
heightIn;
64 uint32_t Ncols = pKerPrivArgs->
widthIn;
79 bufParamsIn.
dim_y = bufParamsOut.
dim_x = Ncols1;
80 bufParamsIn.
dim_x = bufParamsOut.
dim_y = Nrows1;
83 pMatTransKerPrivArgs1->
heightIn = Ncols1;
84 pMatTransKerPrivArgs1->
widthIn = Nrows1;
87 DSPLIB_matTrans_init_ci<dataType>(pMatTransKerPrivArgs1, &bufParamsIn, &bufParamsOut, &kerInitArgsMatTrans);
91 bufParamsIn.
dim_y = bufParamsOut.
dim_x = Nrows1;
92 bufParamsIn.
dim_x = bufParamsOut.
dim_y = Nrows1;
95 pMatTransKerPrivArgs2->
heightIn = Nrows1;
96 pMatTransKerPrivArgs2->
widthIn = Nrows1;
99 DSPLIB_matTrans_init_ci<dataType>(pMatTransKerPrivArgs2, &bufParamsIn, &bufParamsOut, &kerInitArgsMatTrans);
103 bufParamsIn.
dim_y = bufParamsOut.
dim_x = Nrows1;
104 bufParamsIn.
dim_x = bufParamsOut.
dim_y = Ncols1;
107 pMatTransKerPrivArgs3->
heightIn = Nrows1;
108 pMatTransKerPrivArgs3->
widthIn = Ncols1;
111 DSPLIB_matTrans_init_ci<dataType>(pMatTransKerPrivArgs3, &bufParamsIn, &bufParamsOut, &kerInitArgsMatTrans);
114 bufParamsIn.
dim_y = bufParamsOut.
dim_x = Ncols1;
115 bufParamsIn.
dim_x = bufParamsOut.
dim_y = Nrows1;
118 pMatTransKerPrivArgs4->
heightIn = Ncols1;
119 pMatTransKerPrivArgs4->
widthIn = Nrows1;
122 DSPLIB_matTrans_init_ci<dataType>(pMatTransKerPrivArgs4, &bufParamsIn, &bufParamsOut, &kerInitArgsMatTrans);
125 bufParamsIn.
dim_y = bufParamsOut.
dim_x = Ncols1;
126 bufParamsIn.
dim_x = bufParamsOut.
dim_y = Ncols1;
129 pMatTransKerPrivArgs5->
heightIn = Ncols1;
130 pMatTransKerPrivArgs5->
widthIn = Ncols1;
133 DSPLIB_matTrans_init_ci<dataType>(pMatTransKerPrivArgs5, &bufParamsIn, &bufParamsOut, &kerInitArgsMatTrans);
154 template <
typename dataType>
159 int32_t colOutStride,
165 __SE_TEMPLATE_v1 se0Params = *(__SE_TEMPLATE_v1 *) ((uint8_t *) pBlock + (22 * SE_PARAM_SIZE));
166 __SA_TEMPLATE_v1 sa0Params = *(__SA_TEMPLATE_v1 *) ((uint8_t *) pBlock + (25 * SE_PARAM_SIZE));
168 typedef typename c7x::make_full_vector<dataType>::type vec;
169 int32_t eleCount = c7x::element_count_of<vec>::value;
170 int32_t nVec = DSPLIB_ceilingDiv(Ncols, eleCount);
171 int32_t loopCount = nVec * Nrows;
173 se0Params.ICNT0 = Ncols;
174 se0Params.ICNT1 = Nrows;
175 se0Params.DIM1 = colInStride;
177 sa0Params.ICNT0 = Ncols;
178 sa0Params.ICNT1 = Nrows;
179 sa0Params.DIM1 = colOutStride;
181 __SE0_OPEN(pIn, se0Params);
182 __SA0_OPEN(sa0Params);
183 for (int32_t i = 0; i < loopCount; i++) {
184 vec v1 = c7x::strm_eng<0, vec>::get_adv();
186 __vpred pred = c7x::strm_agen<0, vec>::get_vpred();
187 vec *pStore = c7x::strm_agen<0, vec>::get_adv(pOut);
188 __vstore_pred(pred, pStore, v1);
199 int32_t colOutStride,
206 int32_t colOutStride,
void DSPLIB_svd_blk_move_ci(dataType *pOut, dataType *pIn, int32_t Nrows, int32_t Ncols, int32_t colOutStride, int32_t colInStride, uint8_t *pBlock)
Copy input matrix pIn to pOut.
template void DSPLIB_svd_blk_move_ci< float >(float *pOut, float *pIn, int32_t Nrows, int32_t Ncols, int32_t colOutStride, int32_t colInStride, uint8_t *pBlock)
template void DSPLIB_svd_matTrans_init_ci< float >(DSPLIB_kernelHandle handle, const DSPLIB_svdInitArgs *pKerInitArgs)
void DSPLIB_svd_matTrans_init_ci(DSPLIB_kernelHandle handle, const DSPLIB_svdInitArgs *pKerInitArgs)
template void DSPLIB_svd_blk_move_ci< double >(double *pOut, double *pIn, int32_t Nrows, int32_t Ncols, int32_t colOutStride, int32_t colInStride, uint8_t *pBlock)
template void DSPLIB_svd_matTrans_init_ci< double >(DSPLIB_kernelHandle handle, const DSPLIB_svdInitArgs *pKerInitArgs)
Header file for kernel's internal use. For the kernel's interface, please see DSPLIB_svd.
#define DSPLIB_DEBUGPRINTFN(N, fmt,...)
void * DSPLIB_kernelHandle
Handle type for DSPLIB operations.
A structure for a 2 dimensional buffer descriptor.
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.
uint32_t dimX
Size of input data.
int8_t funcStyle
Variant of the function refer to DSPLIB_FUNCTION_STYLE
Structure that is reserved for internal use by the kernel.
int32_t strideOut
Stride between rows of output data matrix
uint32_t heightIn
Height of input data matrix
int32_t strideIn
Stride between rows of input data matrix
uint32_t widthIn
Size of input buffer for different batches DSPLIB_matTrans_init that will be retrieved and used by DS...
Structure containing the parameters to initialize the kernel.
uint32_t dimY
Size of input data dimY => Number of rows.
int8_t funcStyle
Variant of the function refer to DSPLIB_FUNCTION_STYLE
uint32_t dimX
Size of input data dimX => Number of columns.
Structure that is reserved for internal use by the kernel.
uint32_t widthIn
Size of input buffer for different batches DSPLIB_svd_init that will be retrieved and used by DSPLIB_...
DSPLIB_matTrans_PrivArgs pMatTransKerPrivArgs5
DSPLIB_matTrans_PrivArgs pMatTransKerPrivArgs2
uint32_t strideU
Stride between rows of U matrix
uint8_t bufPblock[DSPLIB_SVD_IXX_IXX_OXX_PBLOCK_SIZE]
Buffer to save SE & SA configuration parameters
DSPLIB_matTrans_PrivArgs pMatTransKerPrivArgs4
DSPLIB_matTrans_PrivArgs pMatTransKerPrivArgs1
Privargs for the matTrans kernel.
int32_t strideIn
Stride between rows of input data matrix
uint32_t strideV
Stride between rows of V matrix
DSPLIB_matTrans_PrivArgs pMatTransKerPrivArgs3
uint32_t heightIn
Height of input data matrix