Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 2 | mjames | 1 | #include "jtest.h" |
| 2 | #include "matrix_test_data.h" |
||
| 3 | #include "arr_desc.h" |
||
| 4 | #include "arm_math.h" /* FUTs */ |
||
| 5 | #include "ref.h" /* Reference Functions */ |
||
| 6 | #include "test_templates.h" |
||
| 7 | #include "matrix_templates.h" |
||
| 8 | #include "type_abbrev.h" |
||
| 9 | |||
| 10 | #define JTEST_ARM_MAT_MULT_FAST_TEST(suffix) \ |
||
| 11 | MATRIX_DEFINE_TEST_TEMPLATE_ELT2( \ |
||
| 12 | mat_mult_fast, \ |
||
| 13 | suffix, \ |
||
| 14 | MATRIX_TEST_CONFIG_MULTIPLICATIVE_OUTPUT, \ |
||
| 15 | MATRIX_TEST_VALID_MULTIPLICATIVE_DIMENSIONS, \ |
||
| 16 | MATRIX_SNR_COMPARE_INTERFACE) |
||
| 17 | |||
| 18 | JTEST_ARM_MAT_MULT_FAST_TEST(q31); |
||
| 19 | |||
| 20 | /*--------------------------------------------------------------------------------*/ |
||
| 21 | /* Q15 Uses a Different interface than the others. */ |
||
| 22 | /*--------------------------------------------------------------------------------*/ |
||
| 23 | |||
| 24 | #define ARM_mat_mult_fast_q15_INPUT_INTERFACE(input_a_ptr, input_b_ptr) \ |
||
| 25 | PAREN(input_a_ptr, input_b_ptr, \ |
||
| 26 | (void *) &matrix_output_fut, \ |
||
| 27 | (q15_t *) matrix_output_scratch) |
||
| 28 | |||
| 29 | JTEST_DEFINE_TEST(arm_mat_mult_fast_q15_test, arm_mat_mult_fast_q15) |
||
| 30 | { |
||
| 31 | MATRIX_TEST_TEMPLATE_ELT2( |
||
| 32 | matrix_q15_a_inputs, |
||
| 33 | matrix_q15_b_inputs, |
||
| 34 | arm_matrix_instance_q15 * , |
||
| 35 | arm_matrix_instance_q15, |
||
| 36 | TYPE_FROM_ABBREV(q15), |
||
| 37 | arm_mat_mult_fast_q15, |
||
| 38 | ARM_mat_mult_fast_q15_INPUT_INTERFACE, |
||
| 39 | ref_mat_mult_fast_q15, |
||
| 40 | REF_mat_mult_fast_INPUT_INTERFACE, |
||
| 41 | MATRIX_TEST_CONFIG_MULTIPLICATIVE_OUTPUT, |
||
| 42 | MATRIX_TEST_VALID_MULTIPLICATIVE_DIMENSIONS, |
||
| 43 | MATRIX_SNR_COMPARE_INTERFACE); |
||
| 44 | } |
||
| 45 | |||
| 46 | /*--------------------------------------------------------------------------------*/ |
||
| 47 | /* Collect all tests in a group. */ |
||
| 48 | /*--------------------------------------------------------------------------------*/ |
||
| 49 | |||
| 50 | JTEST_DEFINE_GROUP(mat_mult_fast_tests) |
||
| 51 | { |
||
| 52 | /* |
||
| 53 | To skip a test, comment it out. |
||
| 54 | */ |
||
| 55 | JTEST_TEST_CALL(arm_mat_mult_fast_q31_test); |
||
| 56 | JTEST_TEST_CALL(arm_mat_mult_fast_q15_test); |
||
| 57 | } |