47 template <
typename dataType>
52 int32_t colStride = stride /
sizeof(dataType);
53 typedef typename c7x::make_full_vector<dataType>::type vec;
54 __SA_VECLEN SA_VECLEN = c7x::sa_veclen<vec>::value;
55 __SA_TEMPLATE_v1 sa0Params = __gen_SA_TEMPLATE_v1();
57 sa0Params.ICNT0 = nRows;
58 sa0Params.DIM1 = colStride;
59 sa0Params.ICNT1 = nRows;
60 sa0Params.DIMFMT = __SA_DIMFMT_2D;
61 sa0Params.VECLEN = SA_VECLEN;
62 sa0Params.DECDIM1 = __SA_DECDIM_DIM1;
63 sa0Params.DECDIM1_WIDTH = nRows * colStride;
65 *(__SA_TEMPLATE_v1 *) ((uint8_t *) pBlock) = sa0Params;
71 template <
typename dataType>
76 typedef typename c7x::make_full_vector<dataType>::type vec;
78 int32_t colStrideOrder = strideR /
sizeof(dataType);
80 __SE_ELETYPE SE_ELETYPE = c7x::se_eletype<vec>::value;
81 __SE_VECLEN SE_VECLEN = c7x::se_veclen<vec>::value;
82 __SA_VECLEN SA_VECLEN = c7x::sa_veclen<vec>::value;
84 __SE_TEMPLATE_v1 seMatrixParams = __gen_SE_TEMPLATE_v1();
85 __SA_TEMPLATE_v1 saMatrixParams = __gen_SA_TEMPLATE_v1();
87 seMatrixParams.ICNT0 = nCols;
88 seMatrixParams.ICNT1 = nRows;
89 seMatrixParams.DIM1 = colStrideOrder;
90 seMatrixParams.DIMFMT = __SE_DIMFMT_2D;
91 seMatrixParams.ELETYPE = SE_ELETYPE;
92 seMatrixParams.VECLEN = SE_VECLEN;
94 saMatrixParams.ICNT0 = nCols;
95 saMatrixParams.ICNT1 = nRows;
96 saMatrixParams.DIM1 = colStrideOrder;
97 saMatrixParams.DIMFMT = __SA_DIMFMT_2D;
98 saMatrixParams.VECLEN = SA_VECLEN;
100 *(__SE_TEMPLATE_v1 *) ((uint8_t *) pBlock) = seMatrixParams;
101 *(__SA_TEMPLATE_v1 *) ((uint8_t *) pBlock + (SE_PARAM_SIZE)) = saMatrixParams;
113 template <
typename dataType>
118 typedef typename c7x::make_full_vector<dataType>::type vec;
120 uint32_t eleCount = c7x::element_count_of<vec>::value;
122 __SA_TEMPLATE_v1 sa0Params = *(__SA_TEMPLATE_v1 *) ((uint8_t *) pBlock);
123 __SA_TEMPLATE_v1 sa1Params = *(__SA_TEMPLATE_v1 *) ((uint8_t *) pBlock);
125 int32_t iter1 = DSPLIB_ceilingDiv(nRows, eleCount);
126 vec zeroVec = (vec) 0;
128 __SA0_OPEN(sa0Params);
130 for (int32_t horizontal = 0; horizontal < iter1 * nRows; horizontal++) {
131 __vpred pred = c7x::strm_agen<0, vec>::get_vpred();
132 vec *pStoreVec = c7x::strm_agen<0, vec>::get_adv(pMat);
133 __vstore_pred(pred, pStoreVec, zeroVec);
139 sa1Params.ICNT1 = nRows / 2;
140 sa1Params.DIM1 = 2 * (colStride + 1);
143 sa0Params.ICNT1 = nRows - sa1Params.ICNT1;
144 sa0Params.DIM1 = 2 * (colStride + 1);
146 __SA0_OPEN(sa0Params);
147 if (sa1Params.ICNT1 != 0) {
148 __SA1_OPEN(sa1Params);
151 for (int32_t diag = 0; diag < nRows; diag += 2) {
152 dataType *pDiag = c7x::strm_agen<0, dataType>::get_adv(pMat);
154 dataType *pDiag1 = c7x::strm_agen<1, dataType>::get_adv(pMat + (colStride + 1));
167 template <
typename dataType>
172 int32_t colOutStride,
178 __SE_TEMPLATE_v1 se0Params = *(__SE_TEMPLATE_v1 *) ((uint8_t *) pBlock);
179 __SA_TEMPLATE_v1 sa0Params = *(__SA_TEMPLATE_v1 *) ((uint8_t *) pBlock + (SE_PARAM_SIZE));
181 typedef typename c7x::make_full_vector<dataType>::type vec;
183 int32_t eleCount = c7x::element_count_of<vec>::value;
184 int32_t nVec = DSPLIB_ceilingDiv(Ncols, eleCount);
185 int32_t loopCount = nVec * Nrows;
187 __SE0_OPEN(pIn, se0Params);
188 __SA0_OPEN(sa0Params);
189 for (int32_t i = 0; i < loopCount; i++) {
190 vec v1 = c7x::strm_eng<0, vec>::get_adv();
192 __vpred pred = c7x::strm_agen<0, vec>::get_vpred();
193 vec *pStore = c7x::strm_agen<0, vec>::get_adv(pOut);
194 __vstore_pred(pred, pStore, v1);
205 int32_t colOutStride,
212 int32_t colOutStride,
template void DSPLIB_qrd_blk_move_init_ci< double >(int32_t nRows, int32_t nCols, int32_t strideR, uint8_t *pBlock)
void DSPLIB_qrd_blk_move_exec_ci(dataType *pOut, dataType *pIn, int32_t Nrows, int32_t Ncols, int32_t colOutStride, int32_t colInStride, uint8_t *pBlock)
void DSPLIB_qrd_identity_matrix_generate_init_ci(int32_t nRows, int32_t stride, uint8_t *pBlock)
void DSPLIB_qrd_identity_matrix_generate_exec_ci(dataType *pMat, int32_t nRows, int32_t colStride, uint8_t *pBlock)
template void DSPLIB_qrd_identity_matrix_generate_exec_ci< double >(double *pMat, int32_t nRows, int32_t colStride, uint8_t *pBlock)
template void DSPLIB_qrd_identity_matrix_generate_exec_ci< float >(float *pMat, int32_t nRows, int32_t colStride, uint8_t *pBlock)
void DSPLIB_qrd_blk_move_init_ci(int32_t nRows, int32_t nCols, int32_t strideR, uint8_t *pBlock)
template void DSPLIB_qrd_identity_matrix_generate_init_ci< float >(int32_t nRows, int32_t stride, uint8_t *pBlock)
template void DSPLIB_qrd_identity_matrix_generate_init_ci< double >(int32_t nRows, int32_t strideQ, uint8_t *pBloc)
template void DSPLIB_qrd_blk_move_exec_ci< float >(float *pOut, float *pIn, int32_t Nrows, int32_t Ncols, int32_t colOutStride, int32_t colInStride, uint8_t *pBlock)
template void DSPLIB_qrd_blk_move_exec_ci< double >(double *pOut, double *pIn, int32_t Nrows, int32_t Ncols, int32_t colOutStride, int32_t colInStride, uint8_t *pBlock)
template void DSPLIB_qrd_blk_move_init_ci< float >(int32_t nRows, int32_t nCols, int32_t strideR, uint8_t *pBlock)
#define DSPLIB_DEBUGPRINTFN(N, fmt,...)