extern "C" { extern void col_test(); } #include "allocator.h" #include #include #include #include #include #include "dsp/matrix_functions.h" #include "matrix_utils.h" template static void test() { std::cout << "----\r\n"; std::cout << R << " x " << C << "\r\n"; #if defined(STATIC_TEST) PMat a; PVector ref; #else PMat a(R,C); PVector ref(R); #endif init_array(a,R*C); INIT_SYSTICK; START_CYCLE_MEASUREMENT; startSectionNB(1); #if defined(STATIC_TEST) PVector res = copy(a.col(4)); #else PVector res = copy(a.col(4)); #endif stopSectionNB(1); STOP_CYCLE_MEASUREMENT; INIT_SYSTICK; START_CYCLE_MEASUREMENT; for(int i=0;i void all_col_test() { const int nb_tails = TailForTests::tail; const int nb_loops = TailForTests::loop; title("Col test"); test(); test(); test(); test(); test(); test(); test(); test(); test(); } void col_test() { #if defined(COL_TEST) #if defined(F64_DT) all_col_test(); #endif #if defined(F32_DT) all_col_test(); #endif #if defined(F16_DT) && !defined(DISABLEFLOAT16) all_col_test(); #endif #if defined(Q31_DT) all_col_test(); #endif #if defined(Q15_DT) all_col_test(); #endif #if defined(Q7_DT) all_col_test(); #endif #endif }