#include "dsplib.h" extern "C" { void DSPF_dp_blk_move2( const double * x, double *restrict r, const int nx){ #pragma MUST_ITERATE(2,,2) for(int i(0); i < nx; i++){ r[i] = x[i]; } } void DSPF_dp_mat_mul2( const double *restrict x, const int r1, const int c1, const double *restrict y, const int c2, double *restrict r){ #pragma MUST_ITERATE(2,,2) for(int i(0); i < r1; i++){ #pragma MUST_ITERATE(2,,2) for(int j(0); j < c2; j++){ double temp(0); #pragma MUST_ITERATE(2,,2) for(int k(0); k < c1; k++){ temp += x[i * c1 + k] * y[k * c2 + j]; } r[i * c2 + j] = temp; } } } void DSPF_dp_mat_trans2( const double *restrict x, const int rows, const int cols, double *restrict r){ #pragma MUST_ITERATE(2,,2) for(int i(0); i < cols; i++){ #pragma MUST_ITERATE(2,,2) for(int j(0); j < rows; j++){ r[i * rows + j] = x[i + cols * j]; } } } }