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_CMPLX_MULT_TEST(suffix, comparison_interface) \ |
||
| 11 | MATRIX_DEFINE_TEST_TEMPLATE_ELT2( \ |
||
| 12 | mat_cmplx_mult, \ |
||
| 13 | suffix, \ |
||
| 14 | MATRIX_TEST_CONFIG_MULTIPLICATIVE_OUTPUT, \ |
||
| 15 | MATRIX_TEST_VALID_MULTIPLICATIVE_DIMENSIONS, \ |
||
| 16 | comparison_interface) |
||
| 17 | |||
| 18 | JTEST_ARM_MAT_CMPLX_MULT_TEST(f32, MATRIX_SNR_COMPARE_INTERFACE); |
||
| 19 | JTEST_ARM_MAT_CMPLX_MULT_TEST(q31, MATRIX_COMPARE_INTERFACE); |
||
| 20 | |||
| 21 | /*--------------------------------------------------------------------------------*/ |
||
| 22 | /* Q15 Uses a Different interface than the others. */ |
||
| 23 | /*--------------------------------------------------------------------------------*/ |
||
| 24 | |||
| 25 | #define ARM_mat_cmplx_mult_q15_INPUT_INTERFACE(input_a_ptr, input_b_ptr) \ |
||
| 26 | PAREN(input_a_ptr, input_b_ptr, \ |
||
| 27 | (void *) &matrix_output_fut, \ |
||
| 28 | (q15_t *) matrix_output_scratch) |
||
| 29 | |||
| 30 | JTEST_DEFINE_TEST(arm_mat_cmplx_mult_q15_test, arm_mat_cmplx_mult_q15) |
||
| 31 | { |
||
| 32 | MATRIX_TEST_TEMPLATE_ELT2( |
||
| 33 | matrix_q15_a_inputs, |
||
| 34 | matrix_q15_b_inputs, |
||
| 35 | arm_matrix_instance_q15 * , |
||
| 36 | arm_matrix_instance_q15, |
||
| 37 | TYPE_FROM_ABBREV(q15), |
||
| 38 | arm_mat_cmplx_mult_q15, |
||
| 39 | ARM_mat_cmplx_mult_q15_INPUT_INTERFACE, |
||
| 40 | ref_mat_cmplx_mult_q15, |
||
| 41 | REF_mat_cmplx_mult_INPUT_INTERFACE, |
||
| 42 | MATRIX_TEST_CONFIG_MULTIPLICATIVE_OUTPUT, |
||
| 43 | MATRIX_TEST_VALID_MULTIPLICATIVE_DIMENSIONS, |
||
| 44 | MATRIX_COMPARE_INTERFACE); |
||
| 45 | } |
||
| 46 | |||
| 47 | /*--------------------------------------------------------------------------------*/ |
||
| 48 | /* Collect all tests in a group. */ |
||
| 49 | /*--------------------------------------------------------------------------------*/ |
||
| 50 | |||
| 51 | JTEST_DEFINE_GROUP(mat_cmplx_mult_tests) |
||
| 52 | { |
||
| 53 | /* |
||
| 54 | To skip a test, comment it out. |
||
| 55 | */ |
||
| 56 | JTEST_TEST_CALL(arm_mat_cmplx_mult_f32_test); |
||
| 57 | JTEST_TEST_CALL(arm_mat_cmplx_mult_q31_test); |
||
| 58 | JTEST_TEST_CALL(arm_mat_cmplx_mult_q15_test); |
||
| 59 | } |