tests: lib: cmsis_dsp: matrix: Update Binary Q15 tests for 1.9.0

This commit updates the matrix Binary Q15 test patterns and
implementations for the CMSIS-DSP 1.9.0.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit is contained in:
Stephanos Ioannidis 2021-08-20 22:04:39 +09:00 committed by Carles Cufí
commit ec4d7ef037
2 changed files with 9914 additions and 9442 deletions

View file

@ -1,6 +1,6 @@
/*
* Copyright (c) 2020 Stephanos Ioannidis <root@stephanos.io>
* Copyright (C) 2010-2020 ARM Limited or its affiliates. All rights reserved.
* Copyright (c) 2021 Stephanos Ioannidis <root@stephanos.io>
* Copyright (C) 2010-2021 ARM Limited or its affiliates. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -32,6 +32,7 @@ static void test_op2(int op, const q15_t *input1, const q15_t *input2,
uint16_t *dims = (uint16_t *)in_dims;
q15_t *tmp1, *tmp2, *scratch, *output;
uint16_t rows, internal, columns;
arm_status status;
arm_matrix_instance_q15 mat_in1;
arm_matrix_instance_q15 mat_in2;
@ -81,13 +82,18 @@ static void test_op2(int op, const q15_t *input1, const q15_t *input2,
/* Run test function */
switch (op) {
case OP2_MULT:
arm_mat_mult_q15(
&mat_in1, &mat_in2, &mat_out, scratch);
status = arm_mat_mult_q15(
&mat_in1, &mat_in2, &mat_out,
scratch);
break;
default:
zassert_unreachable("invalid operation");
}
/* Validate status */
zassert_equal(status, ARM_MATH_SUCCESS,
ASSERT_MSG_INCORRECT_COMP_RESULT);
/* Increment output pointer */
mat_out.pData += (rows * columns);
}
@ -121,6 +127,7 @@ static void test_op2c(int op, const q15_t *input1, const q15_t *input2,
uint16_t *dims = (uint16_t *)in_dims;
q15_t *tmp1, *tmp2, *scratch, *output;
uint16_t rows, internal, columns;
arm_status status;
arm_matrix_instance_q15 mat_in1;
arm_matrix_instance_q15 mat_in2;
@ -170,13 +177,18 @@ static void test_op2c(int op, const q15_t *input1, const q15_t *input2,
/* Run test function */
switch (op) {
case OP2C_CMPLX_MULT:
arm_mat_cmplx_mult_q15(
&mat_in1, &mat_in2, &mat_out, scratch);
status = arm_mat_cmplx_mult_q15(
&mat_in1, &mat_in2, &mat_out,
scratch);
break;
default:
zassert_unreachable("invalid operation");
}
/* Validate status */
zassert_equal(status, ARM_MATH_SUCCESS,
ASSERT_MSG_INCORRECT_COMP_RESULT);
/* Increment output pointer */
mat_out.pData += (2 * rows * columns);
}

File diff suppressed because it is too large Load diff