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:
parent
ee02e7ae64
commit
ec4d7ef037
2 changed files with 9914 additions and 9442 deletions
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2020 Stephanos Ioannidis <root@stephanos.io>
|
* Copyright (c) 2021 Stephanos Ioannidis <root@stephanos.io>
|
||||||
* Copyright (C) 2010-2020 ARM Limited or its affiliates. All rights reserved.
|
* Copyright (C) 2010-2021 ARM Limited or its affiliates. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* 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;
|
uint16_t *dims = (uint16_t *)in_dims;
|
||||||
q15_t *tmp1, *tmp2, *scratch, *output;
|
q15_t *tmp1, *tmp2, *scratch, *output;
|
||||||
uint16_t rows, internal, columns;
|
uint16_t rows, internal, columns;
|
||||||
|
arm_status status;
|
||||||
|
|
||||||
arm_matrix_instance_q15 mat_in1;
|
arm_matrix_instance_q15 mat_in1;
|
||||||
arm_matrix_instance_q15 mat_in2;
|
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 */
|
/* Run test function */
|
||||||
switch (op) {
|
switch (op) {
|
||||||
case OP2_MULT:
|
case OP2_MULT:
|
||||||
arm_mat_mult_q15(
|
status = arm_mat_mult_q15(
|
||||||
&mat_in1, &mat_in2, &mat_out, scratch);
|
&mat_in1, &mat_in2, &mat_out,
|
||||||
|
scratch);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
zassert_unreachable("invalid operation");
|
zassert_unreachable("invalid operation");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Validate status */
|
||||||
|
zassert_equal(status, ARM_MATH_SUCCESS,
|
||||||
|
ASSERT_MSG_INCORRECT_COMP_RESULT);
|
||||||
|
|
||||||
/* Increment output pointer */
|
/* Increment output pointer */
|
||||||
mat_out.pData += (rows * columns);
|
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;
|
uint16_t *dims = (uint16_t *)in_dims;
|
||||||
q15_t *tmp1, *tmp2, *scratch, *output;
|
q15_t *tmp1, *tmp2, *scratch, *output;
|
||||||
uint16_t rows, internal, columns;
|
uint16_t rows, internal, columns;
|
||||||
|
arm_status status;
|
||||||
|
|
||||||
arm_matrix_instance_q15 mat_in1;
|
arm_matrix_instance_q15 mat_in1;
|
||||||
arm_matrix_instance_q15 mat_in2;
|
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 */
|
/* Run test function */
|
||||||
switch (op) {
|
switch (op) {
|
||||||
case OP2C_CMPLX_MULT:
|
case OP2C_CMPLX_MULT:
|
||||||
arm_mat_cmplx_mult_q15(
|
status = arm_mat_cmplx_mult_q15(
|
||||||
&mat_in1, &mat_in2, &mat_out, scratch);
|
&mat_in1, &mat_in2, &mat_out,
|
||||||
|
scratch);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
zassert_unreachable("invalid operation");
|
zassert_unreachable("invalid operation");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Validate status */
|
||||||
|
zassert_equal(status, ARM_MATH_SUCCESS,
|
||||||
|
ASSERT_MSG_INCORRECT_COMP_RESULT);
|
||||||
|
|
||||||
/* Increment output pointer */
|
/* Increment output pointer */
|
||||||
mat_out.pData += (2 * rows * columns);
|
mat_out.pData += (2 * rows * columns);
|
||||||
}
|
}
|
||||||
|
|
19332
tests/lib/cmsis_dsp/matrix/src/binary_q15.pat
generated
19332
tests/lib/cmsis_dsp/matrix/src/binary_q15.pat
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue