tests: lib: cmsis_dsp: matrix: Update Binary F32 tests for 1.9.0
This commit updates the matrix Binary F32 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
5101f6b7d5
commit
518589efb4
2 changed files with 8712 additions and 7784 deletions
|
@ -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
|
||||
*/
|
||||
|
@ -30,6 +30,7 @@ static void test_op2(int op, const uint32_t *input1, const uint32_t *input2,
|
|||
uint16_t *dims = (uint16_t *)in_dims;
|
||||
float32_t *tmp1, *tmp2, *output;
|
||||
uint16_t rows, internal, columns;
|
||||
arm_status status;
|
||||
|
||||
arm_matrix_instance_f32 mat_in1;
|
||||
arm_matrix_instance_f32 mat_in2;
|
||||
|
@ -76,12 +77,17 @@ static void test_op2(int op, const uint32_t *input1, const uint32_t *input2,
|
|||
/* Run test function */
|
||||
switch (op) {
|
||||
case OP2_MULT:
|
||||
arm_mat_mult_f32(&mat_in1, &mat_in2, &mat_out);
|
||||
status = arm_mat_mult_f32(&mat_in1, &mat_in2,
|
||||
&mat_out);
|
||||
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);
|
||||
}
|
||||
|
@ -115,6 +121,7 @@ static void test_op2c(int op, const uint32_t *input1, const uint32_t *input2,
|
|||
uint16_t *dims = (uint16_t *)in_dims;
|
||||
float32_t *tmp1, *tmp2, *output;
|
||||
uint16_t rows, internal, columns;
|
||||
arm_status status;
|
||||
|
||||
arm_matrix_instance_f32 mat_in1;
|
||||
arm_matrix_instance_f32 mat_in2;
|
||||
|
@ -161,12 +168,17 @@ static void test_op2c(int op, const uint32_t *input1, const uint32_t *input2,
|
|||
/* Run test function */
|
||||
switch (op) {
|
||||
case OP2C_CMPLX_MULT:
|
||||
arm_mat_cmplx_mult_f32(&mat_in1, &mat_in2, &mat_out);
|
||||
status = arm_mat_cmplx_mult_f32(&mat_in1, &mat_in2,
|
||||
&mat_out);
|
||||
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);
|
||||
}
|
||||
|
|
16476
tests/lib/cmsis_dsp/matrix/src/binary_f32.pat
generated
16476
tests/lib/cmsis_dsp/matrix/src/binary_f32.pat
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue