From 83912a936029d95dd5b943fbad779db5f6307c12 Mon Sep 17 00:00:00 2001 From: Christophe Favergeon Date: Tue, 13 Apr 2021 07:08:10 +0200 Subject: [PATCH] CMSIS-DSP: Correction of issue 1169 Build issues when building with ARM_MATH_SIZE_MISMATCH defined are corrected. Improvement to the tests to track ARM_MATH_SIZE_MISMATCH error detection. --- Include/arm_helium_utils.h | 4 ++-- Platforms/NORMALFVP/platform.cmake | 3 +++ Source/MatrixFunctions/arm_mat_ldlt_f32.c | 6 ++---- Source/MatrixFunctions/arm_mat_ldlt_f64.c | 3 +-- Source/MatrixFunctions/arm_mat_mult_f16.c | 2 +- .../arm_mat_solve_lower_triangular_f16.c | 8 ++++---- .../arm_mat_solve_lower_triangular_f32.c | 13 ++++++------ .../arm_mat_solve_lower_triangular_f64.c | 4 ++-- Source/MatrixFunctions/arm_mat_trans_q7.c | 4 ++-- Testing/Source/Tests/BinaryTestsF16.cpp | 8 ++++++-- Testing/Source/Tests/BinaryTestsF32.cpp | 8 ++++++-- Testing/Source/Tests/BinaryTestsF64.cpp | 4 +++- Testing/Source/Tests/BinaryTestsQ15.cpp | 8 ++++++-- Testing/Source/Tests/BinaryTestsQ31.cpp | 8 ++++++-- Testing/Source/Tests/BinaryTestsQ7.cpp | 4 +++- Testing/Source/Tests/FIRF32.cpp | 2 ++ Testing/Source/Tests/FIRQ15.cpp | 2 +- Testing/Source/Tests/FIRQ31.cpp | 2 +- Testing/Source/Tests/FIRQ7.cpp | 3 ++- Testing/Source/Tests/UnaryTestsF16.cpp | 20 ++++++++++++++----- Testing/Source/Tests/UnaryTestsF32.cpp | 20 ++++++++++++++----- Testing/Source/Tests/UnaryTestsF64.cpp | 12 ++++++++--- Testing/Source/Tests/UnaryTestsQ15.cpp | 20 ++++++++++++++----- Testing/Source/Tests/UnaryTestsQ31.cpp | 20 ++++++++++++++----- Testing/Source/Tests/UnaryTestsQ7.cpp | 4 +++- 25 files changed, 131 insertions(+), 61 deletions(-) diff --git a/Include/arm_helium_utils.h b/Include/arm_helium_utils.h index a4cf0420..f2c62057 100755 --- a/Include/arm_helium_utils.h +++ b/Include/arm_helium_utils.h @@ -335,7 +335,7 @@ __STATIC_INLINE arm_status arm_mat_cmplx_trans_32bit( /* * Set status as ARM_MATH_SIZE_MISMATCH */ - return = ARM_MATH_SIZE_MISMATCH; + return ARM_MATH_SIZE_MISMATCH; } #else (void)dstRows; @@ -535,7 +535,7 @@ __STATIC_INLINE arm_status arm_mat_cmplx_trans_16bit( /* * Set status as ARM_MATH_SIZE_MISMATCH */ - return = ARM_MATH_SIZE_MISMATCH; + return ARM_MATH_SIZE_MISMATCH; } #else (void)dstRows; diff --git a/Platforms/NORMALFVP/platform.cmake b/Platforms/NORMALFVP/platform.cmake index 8a097de3..b39377ca 100755 --- a/Platforms/NORMALFVP/platform.cmake +++ b/Platforms/NORMALFVP/platform.cmake @@ -1,2 +1,5 @@ function(configure_platform PROJECTNAME ROOT CORE PLATFORMFOLDER) + if (GCC) + target_sources(${PROJECTNAME} PRIVATE ${PLATFORMFOLDER}/${CORE}/Startup/GCC/startup_asm_${CORE}.S) + endif() endfunction() \ No newline at end of file diff --git a/Source/MatrixFunctions/arm_mat_ldlt_f32.c b/Source/MatrixFunctions/arm_mat_ldlt_f32.c index 442594aa..f8d35fa7 100755 --- a/Source/MatrixFunctions/arm_mat_ldlt_f32.c +++ b/Source/MatrixFunctions/arm_mat_ldlt_f32.c @@ -102,8 +102,7 @@ arm_status arm_mat_ldlt_f32( if ((pSrc->numRows != pSrc->numCols) || (pl->numRows != pl->numCols) || (pd->numRows != pd->numCols) || - (pp->numRows != pp->numCols) || - (pl->numRows != pl->numRows) ) + (pl->numRows != pd->numRows) ) { /* Set status as ARM_MATH_SIZE_MISMATCH */ status = ARM_MATH_SIZE_MISMATCH; @@ -380,8 +379,7 @@ arm_status arm_mat_ldlt_f32( if ((pSrc->numRows != pSrc->numCols) || (pl->numRows != pl->numCols) || (pd->numRows != pd->numCols) || - (pp->numRows != pp->numCols) || - (pl->numRows != pl->numRows) ) + (pl->numRows != pd->numRows) ) { /* Set status as ARM_MATH_SIZE_MISMATCH */ status = ARM_MATH_SIZE_MISMATCH; diff --git a/Source/MatrixFunctions/arm_mat_ldlt_f64.c b/Source/MatrixFunctions/arm_mat_ldlt_f64.c index d1a6d0e3..bf9eef74 100755 --- a/Source/MatrixFunctions/arm_mat_ldlt_f64.c +++ b/Source/MatrixFunctions/arm_mat_ldlt_f64.c @@ -88,8 +88,7 @@ arm_status arm_mat_ldlt_f64( if ((pSrc->numRows != pSrc->numCols) || (pl->numRows != pl->numCols) || (pd->numRows != pd->numCols) || - (pp->numRows != pp->numCols) || - (pl->numRows != pl->numRows) ) + (pl->numRows != pd->numRows) ) { /* Set status as ARM_MATH_SIZE_MISMATCH */ status = ARM_MATH_SIZE_MISMATCH; diff --git a/Source/MatrixFunctions/arm_mat_mult_f16.c b/Source/MatrixFunctions/arm_mat_mult_f16.c index 1530e791..993f7912 100755 --- a/Source/MatrixFunctions/arm_mat_mult_f16.c +++ b/Source/MatrixFunctions/arm_mat_mult_f16.c @@ -402,7 +402,7 @@ arm_status arm_mat_mult_f16( (pSrcB->numCols != pDst->numCols) ) { /* Set status as ARM_MATH_SIZE_MISMATCH */ - status = ARM_MATH_SIZE_MISMATCH; + return(ARM_MATH_SIZE_MISMATCH); } else diff --git a/Source/MatrixFunctions/arm_mat_solve_lower_triangular_f16.c b/Source/MatrixFunctions/arm_mat_solve_lower_triangular_f16.c index 7696be6b..f5ff889e 100755 --- a/Source/MatrixFunctions/arm_mat_solve_lower_triangular_f16.c +++ b/Source/MatrixFunctions/arm_mat_solve_lower_triangular_f16.c @@ -61,9 +61,9 @@ #ifdef ARM_MATH_MATRIX_CHECK /* Check for matrix mismatch condition */ - if ((ut->numRows != lt->numCols) || + if ((lt->numRows != lt->numCols) || (a->numRows != a->numCols) || - (ut->numRows != a->numRows) ) + (lt->numRows != a->numRows) ) { /* Set status as ARM_MATH_SIZE_MISMATCH */ status = ARM_MATH_SIZE_MISMATCH; @@ -162,9 +162,9 @@ #ifdef ARM_MATH_MATRIX_CHECK /* Check for matrix mismatch condition */ - if ((ut->numRows != lt->numCols) || + if ((lt->numRows != lt->numCols) || (a->numRows != a->numCols) || - (ut->numRows != a->numRows) ) + (lt->numRows != a->numRows) ) { /* Set status as ARM_MATH_SIZE_MISMATCH */ status = ARM_MATH_SIZE_MISMATCH; diff --git a/Source/MatrixFunctions/arm_mat_solve_lower_triangular_f32.c b/Source/MatrixFunctions/arm_mat_solve_lower_triangular_f32.c index 6279830d..80eb3e13 100755 --- a/Source/MatrixFunctions/arm_mat_solve_lower_triangular_f32.c +++ b/Source/MatrixFunctions/arm_mat_solve_lower_triangular_f32.c @@ -60,9 +60,9 @@ #ifdef ARM_MATH_MATRIX_CHECK /* Check for matrix mismatch condition */ - if ((ut->numRows != lt->numCols) || + if ((lt->numRows != lt->numCols) || (a->numRows != a->numCols) || - (ut->numRows != a->numRows) ) + (lt->numRows != a->numRows) ) { /* Set status as ARM_MATH_SIZE_MISMATCH */ status = ARM_MATH_SIZE_MISMATCH; @@ -161,9 +161,9 @@ #ifdef ARM_MATH_MATRIX_CHECK /* Check for matrix mismatch condition */ - if ((ut->numRows != lt->numCols) || + if ((lt->numRows != lt->numCols) || (a->numRows != a->numCols) || - (ut->numRows != a->numRows) ) + (lt->numRows != a->numRows) ) { /* Set status as ARM_MATH_SIZE_MISMATCH */ status = ARM_MATH_SIZE_MISMATCH; @@ -259,11 +259,10 @@ #ifdef ARM_MATH_MATRIX_CHECK - /* Check for matrix mismatch condition */ - if ((ut->numRows != lt->numCols) || + if ((lt->numRows != lt->numCols) || (a->numRows != a->numCols) || - (ut->numRows != a->numRows) ) + (lt->numRows != a->numRows) ) { /* Set status as ARM_MATH_SIZE_MISMATCH */ status = ARM_MATH_SIZE_MISMATCH; diff --git a/Source/MatrixFunctions/arm_mat_solve_lower_triangular_f64.c b/Source/MatrixFunctions/arm_mat_solve_lower_triangular_f64.c index 6d0d35f1..67a3dd0b 100755 --- a/Source/MatrixFunctions/arm_mat_solve_lower_triangular_f64.c +++ b/Source/MatrixFunctions/arm_mat_solve_lower_triangular_f64.c @@ -55,9 +55,9 @@ #ifdef ARM_MATH_MATRIX_CHECK /* Check for matrix mismatch condition */ - if ((ut->numRows != lt->numCols) || + if ((lt->numRows != lt->numCols) || (a->numRows != a->numCols) || - (ut->numRows != a->numRows) ) + (lt->numRows != a->numRows) ) { /* Set status as ARM_MATH_SIZE_MISMATCH */ status = ARM_MATH_SIZE_MISMATCH; diff --git a/Source/MatrixFunctions/arm_mat_trans_q7.c b/Source/MatrixFunctions/arm_mat_trans_q7.c index ee841946..bbdb8ba3 100755 --- a/Source/MatrixFunctions/arm_mat_trans_q7.c +++ b/Source/MatrixFunctions/arm_mat_trans_q7.c @@ -61,10 +61,10 @@ arm_status arm_mat_trans_q7(const arm_matrix_instance_q7 *pSrc, arm_matrix_insta #ifdef ARM_MATH_MATRIX_CHECK /* Check for matrix mismatch condition */ - if ((pSrc->numRows != pDst->dstCols) || (pSrc->srcCols != pDst->numCols)) + if ((pSrc->numRows != pDst->numCols) || (pSrc->numCols != pDst->numRows)) { /* Set status as ARM_MATH_SIZE_MISMATCH */ - return = ARM_MATH_SIZE_MISMATCH; + return ARM_MATH_SIZE_MISMATCH; } #endif diff --git a/Testing/Source/Tests/BinaryTestsF16.cpp b/Testing/Source/Tests/BinaryTestsF16.cpp index b60e3766..3c7002f9 100755 --- a/Testing/Source/Tests/BinaryTestsF16.cpp +++ b/Testing/Source/Tests/BinaryTestsF16.cpp @@ -55,6 +55,7 @@ a double precision computation. void BinaryTestsF16::test_mat_mult_f16() { LOADDATA2(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -64,7 +65,8 @@ a double precision computation. PREPAREDATA2(); - arm_mat_mult_f16(&this->in1,&this->in2,&this->out); + status=arm_mat_mult_f16(&this->in1,&this->in2,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); @@ -81,6 +83,7 @@ a double precision computation. void BinaryTestsF16::test_mat_cmplx_mult_f16() { LOADDATA2(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -90,7 +93,8 @@ a double precision computation. PREPAREDATA2(); - arm_mat_cmplx_mult_f16(&this->in1,&this->in2,&this->out); + status=arm_mat_cmplx_mult_f16(&this->in1,&this->in2,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (2*rows * columns); diff --git a/Testing/Source/Tests/BinaryTestsF32.cpp b/Testing/Source/Tests/BinaryTestsF32.cpp index b90045fa..d552d87a 100755 --- a/Testing/Source/Tests/BinaryTestsF32.cpp +++ b/Testing/Source/Tests/BinaryTestsF32.cpp @@ -54,6 +54,7 @@ a double precision computation. void BinaryTestsF32::test_mat_mult_f32() { LOADDATA2(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -63,7 +64,8 @@ a double precision computation. PREPAREDATA2(); - arm_mat_mult_f32(&this->in1,&this->in2,&this->out); + status=arm_mat_mult_f32(&this->in1,&this->in2,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); @@ -82,6 +84,7 @@ a double precision computation. void BinaryTestsF32::test_mat_cmplx_mult_f32() { LOADDATA2(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -92,7 +95,8 @@ a double precision computation. PREPAREDATA2(); - arm_mat_cmplx_mult_f32(&this->in1,&this->in2,&this->out); + status=arm_mat_cmplx_mult_f32(&this->in1,&this->in2,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (2*rows * columns); diff --git a/Testing/Source/Tests/BinaryTestsF64.cpp b/Testing/Source/Tests/BinaryTestsF64.cpp index 53324c8c..f1e1eaf7 100755 --- a/Testing/Source/Tests/BinaryTestsF64.cpp +++ b/Testing/Source/Tests/BinaryTestsF64.cpp @@ -54,6 +54,7 @@ a double precision computation. void BinaryTestsF64::test_mat_mult_f64() { LOADDATA2(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -63,7 +64,8 @@ a double precision computation. PREPAREDATA2(); - arm_mat_mult_f64(&this->in1,&this->in2,&this->out); + status=arm_mat_mult_f64(&this->in1,&this->in2,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); diff --git a/Testing/Source/Tests/BinaryTestsQ15.cpp b/Testing/Source/Tests/BinaryTestsQ15.cpp index 72da9426..c6ff67a9 100755 --- a/Testing/Source/Tests/BinaryTestsQ15.cpp +++ b/Testing/Source/Tests/BinaryTestsQ15.cpp @@ -59,6 +59,7 @@ a double precision computation. void BinaryTestsQ15::test_mat_mult_q15() { LOADDATA2(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -68,7 +69,8 @@ a double precision computation. PREPAREDATA2(); - arm_mat_mult_q15(&this->in1,&this->in2,&this->out,tmpPtr); + status=arm_mat_mult_q15(&this->in1,&this->in2,&this->out,tmpPtr); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); @@ -88,6 +90,7 @@ a double precision computation. void BinaryTestsQ15::test_mat_cmplx_mult_q15() { LOADDATA2(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -98,7 +101,8 @@ a double precision computation. PREPAREDATA2(); - arm_mat_cmplx_mult_q15(&this->in1,&this->in2,&this->out,tmpPtr); + status=arm_mat_cmplx_mult_q15(&this->in1,&this->in2,&this->out,tmpPtr); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (2*rows * columns); diff --git a/Testing/Source/Tests/BinaryTestsQ31.cpp b/Testing/Source/Tests/BinaryTestsQ31.cpp index 2f93e737..7dee08ea 100755 --- a/Testing/Source/Tests/BinaryTestsQ31.cpp +++ b/Testing/Source/Tests/BinaryTestsQ31.cpp @@ -54,6 +54,7 @@ a double precision computation. void BinaryTestsQ31::test_mat_mult_q31() { LOADDATA2(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -63,7 +64,8 @@ a double precision computation. PREPAREDATA2(); - arm_mat_mult_q31(&this->in1,&this->in2,&this->out); + status=arm_mat_mult_q31(&this->in1,&this->in2,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); @@ -82,6 +84,7 @@ a double precision computation. void BinaryTestsQ31::test_mat_cmplx_mult_q31() { LOADDATA2(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -91,7 +94,8 @@ a double precision computation. PREPAREDATA2(); - arm_mat_cmplx_mult_q31(&this->in1,&this->in2,&this->out); + status=arm_mat_cmplx_mult_q31(&this->in1,&this->in2,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (2*rows * columns); diff --git a/Testing/Source/Tests/BinaryTestsQ7.cpp b/Testing/Source/Tests/BinaryTestsQ7.cpp index 3f1aa992..accd3f4b 100755 --- a/Testing/Source/Tests/BinaryTestsQ7.cpp +++ b/Testing/Source/Tests/BinaryTestsQ7.cpp @@ -56,6 +56,7 @@ a double precision computation. void BinaryTestsQ7::test_mat_mult_q7() { LOADDATA2(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -65,7 +66,8 @@ a double precision computation. PREPAREDATA2(); - arm_mat_mult_q7(&this->in1,&this->in2,&this->out,tmpPtr); + status=arm_mat_mult_q7(&this->in1,&this->in2,&this->out,tmpPtr); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); diff --git a/Testing/Source/Tests/FIRF32.cpp b/Testing/Source/Tests/FIRF32.cpp index 90e3cb1b..dac3d5ee 100644 --- a/Testing/Source/Tests/FIRF32.cpp +++ b/Testing/Source/Tests/FIRF32.cpp @@ -46,7 +46,9 @@ static void checkInnerTail(float32_t *b) #endif int blockSize; int numTaps; +#if defined(ARM_MATH_MVEF) && !defined(ARM_MATH_AUTOVECTORIZE) int round; +#endif int nb=0; diff --git a/Testing/Source/Tests/FIRQ15.cpp b/Testing/Source/Tests/FIRQ15.cpp index f4db51ea..3fc1253f 100644 --- a/Testing/Source/Tests/FIRQ15.cpp +++ b/Testing/Source/Tests/FIRQ15.cpp @@ -36,10 +36,10 @@ static void checkInnerTail(q15_t *b) unsigned long i; #if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE) int j; + int round; #endif int blockSize; int numTaps; - int round; /* diff --git a/Testing/Source/Tests/FIRQ31.cpp b/Testing/Source/Tests/FIRQ31.cpp index 695e43b4..6277902b 100644 --- a/Testing/Source/Tests/FIRQ31.cpp +++ b/Testing/Source/Tests/FIRQ31.cpp @@ -36,10 +36,10 @@ static void checkInnerTail(q31_t *b) unsigned long i; #if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE) int j; + int round; #endif int blockSize; int numTaps; - int round; int nb=1; /* diff --git a/Testing/Source/Tests/FIRQ7.cpp b/Testing/Source/Tests/FIRQ7.cpp index 69423504..310ce987 100644 --- a/Testing/Source/Tests/FIRQ7.cpp +++ b/Testing/Source/Tests/FIRQ7.cpp @@ -36,10 +36,11 @@ static void checkInnerTail(q7_t *b) unsigned long i; #if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE) int j; + int round; #endif int blockSize; int numTaps; - int round; + /* diff --git a/Testing/Source/Tests/UnaryTestsF16.cpp b/Testing/Source/Tests/UnaryTestsF16.cpp index 84abe1f7..7504005b 100755 --- a/Testing/Source/Tests/UnaryTestsF16.cpp +++ b/Testing/Source/Tests/UnaryTestsF16.cpp @@ -167,6 +167,7 @@ void UnaryTestsF16::test_mat_vec_mult_f16() void UnaryTestsF16::test_mat_add_f16() { LOADDATA2(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -175,7 +176,8 @@ void UnaryTestsF16::test_mat_vec_mult_f16() PREPAREDATA2(); - arm_mat_add_f16(&this->in1,&this->in2,&this->out); + status=arm_mat_add_f16(&this->in1,&this->in2,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); @@ -192,6 +194,7 @@ void UnaryTestsF16::test_mat_vec_mult_f16() void UnaryTestsF16::test_mat_sub_f16() { LOADDATA2(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -200,7 +203,8 @@ void UnaryTestsF16::test_mat_sub_f16() PREPAREDATA2(); - arm_mat_sub_f16(&this->in1,&this->in2,&this->out); + status=arm_mat_sub_f16(&this->in1,&this->in2,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); @@ -217,6 +221,7 @@ void UnaryTestsF16::test_mat_sub_f16() void UnaryTestsF16::test_mat_scale_f16() { LOADDATA1(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -225,7 +230,8 @@ void UnaryTestsF16::test_mat_scale_f16() PREPAREDATA1(false); - arm_mat_scale_f16(&this->in1,0.5f,&this->out); + status=arm_mat_scale_f16(&this->in1,0.5f,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); @@ -242,6 +248,7 @@ void UnaryTestsF16::test_mat_scale_f16() void UnaryTestsF16::test_mat_trans_f16() { LOADDATA1(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -250,7 +257,8 @@ void UnaryTestsF16::test_mat_trans_f16() PREPAREDATA1(true); - arm_mat_trans_f16(&this->in1,&this->out); + status=arm_mat_trans_f16(&this->in1,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); @@ -267,6 +275,7 @@ void UnaryTestsF16::test_mat_trans_f16() void UnaryTestsF16::test_mat_cmplx_trans_f16() { LOADDATA1(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -275,7 +284,8 @@ void UnaryTestsF16::test_mat_cmplx_trans_f16() PREPAREDATA1C(true); - arm_mat_cmplx_trans_f16(&this->in1,&this->out); + status=arm_mat_cmplx_trans_f16(&this->in1,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += 2*(rows * columns); diff --git a/Testing/Source/Tests/UnaryTestsF32.cpp b/Testing/Source/Tests/UnaryTestsF32.cpp index 6c987ae6..a5120fe8 100755 --- a/Testing/Source/Tests/UnaryTestsF32.cpp +++ b/Testing/Source/Tests/UnaryTestsF32.cpp @@ -191,6 +191,7 @@ void UnaryTestsF32::test_mat_vec_mult_f32() void UnaryTestsF32::test_mat_add_f32() { LOADDATA2(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -199,7 +200,8 @@ void UnaryTestsF32::test_mat_vec_mult_f32() PREPAREDATA2(); - arm_mat_add_f32(&this->in1,&this->in2,&this->out); + status=arm_mat_add_f32(&this->in1,&this->in2,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); @@ -216,6 +218,7 @@ void UnaryTestsF32::test_mat_vec_mult_f32() void UnaryTestsF32::test_mat_sub_f32() { LOADDATA2(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -224,7 +227,8 @@ void UnaryTestsF32::test_mat_sub_f32() PREPAREDATA2(); - arm_mat_sub_f32(&this->in1,&this->in2,&this->out); + status=arm_mat_sub_f32(&this->in1,&this->in2,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); @@ -241,6 +245,7 @@ void UnaryTestsF32::test_mat_sub_f32() void UnaryTestsF32::test_mat_scale_f32() { LOADDATA1(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -249,7 +254,8 @@ void UnaryTestsF32::test_mat_scale_f32() PREPAREDATA1(false); - arm_mat_scale_f32(&this->in1,0.5f,&this->out); + status=arm_mat_scale_f32(&this->in1,0.5f,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); @@ -266,6 +272,7 @@ void UnaryTestsF32::test_mat_scale_f32() void UnaryTestsF32::test_mat_trans_f32() { LOADDATA1(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -274,7 +281,8 @@ void UnaryTestsF32::test_mat_trans_f32() PREPAREDATA1(true); - arm_mat_trans_f32(&this->in1,&this->out); + status=arm_mat_trans_f32(&this->in1,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); @@ -291,6 +299,7 @@ void UnaryTestsF32::test_mat_trans_f32() void UnaryTestsF32::test_mat_cmplx_trans_f32() { LOADDATA1(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -299,7 +308,8 @@ void UnaryTestsF32::test_mat_cmplx_trans_f32() PREPAREDATA1C(true); - arm_mat_cmplx_trans_f32(&this->in1,&this->out); + status=arm_mat_cmplx_trans_f32(&this->in1,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += 2*(rows * columns); diff --git a/Testing/Source/Tests/UnaryTestsF64.cpp b/Testing/Source/Tests/UnaryTestsF64.cpp index 7ded3f21..a839fad6 100755 --- a/Testing/Source/Tests/UnaryTestsF64.cpp +++ b/Testing/Source/Tests/UnaryTestsF64.cpp @@ -116,6 +116,7 @@ void UnaryTestsF64::test_mat_add_f64() void UnaryTestsF64::test_mat_sub_f64() { LOADDATA2(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -124,7 +125,8 @@ void UnaryTestsF64::test_mat_sub_f64() PREPAREDATA2(); - arm_mat_sub_f64(&this->in1,&this->in2,&this->out); + status=arm_mat_sub_f64(&this->in1,&this->in2,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); @@ -145,6 +147,7 @@ void UnaryTestsF64::test_mat_scale_f64() void UnaryTestsF64::test_mat_trans_f64() { LOADDATA1(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -153,7 +156,8 @@ void UnaryTestsF64::test_mat_trans_f64() PREPAREDATA1(true); - arm_mat_trans_f64(&this->in1,&this->out); + status=arm_mat_trans_f64(&this->in1,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); @@ -178,6 +182,7 @@ void UnaryTestsF64::test_mat_inverse_f64() int nbMatrixes = dims.nbSamples(); int rows,columns; int i; + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -186,7 +191,8 @@ void UnaryTestsF64::test_mat_inverse_f64() PREPAREDATA1(false); - arm_mat_inverse_f64(&this->in1,&this->out); + status=arm_mat_inverse_f64(&this->in1,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); inp1 += (rows * columns); diff --git a/Testing/Source/Tests/UnaryTestsQ15.cpp b/Testing/Source/Tests/UnaryTestsQ15.cpp index 33b89849..722fa7e9 100755 --- a/Testing/Source/Tests/UnaryTestsQ15.cpp +++ b/Testing/Source/Tests/UnaryTestsQ15.cpp @@ -145,6 +145,7 @@ a double precision computation. void UnaryTestsQ15::test_mat_add_q15() { LOADDATA2(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -153,7 +154,8 @@ a double precision computation. PREPAREDATA2(); - arm_mat_add_q15(&this->in1,&this->in2,&this->out); + status=arm_mat_add_q15(&this->in1,&this->in2,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); @@ -170,6 +172,7 @@ a double precision computation. void UnaryTestsQ15::test_mat_sub_q15() { LOADDATA2(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -178,7 +181,8 @@ void UnaryTestsQ15::test_mat_sub_q15() PREPAREDATA2(); - arm_mat_sub_q15(&this->in1,&this->in2,&this->out); + status=arm_mat_sub_q15(&this->in1,&this->in2,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); @@ -195,6 +199,7 @@ void UnaryTestsQ15::test_mat_sub_q15() void UnaryTestsQ15::test_mat_scale_q15() { LOADDATA1(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -203,7 +208,8 @@ void UnaryTestsQ15::test_mat_scale_q15() PREPAREDATA1(false); - arm_mat_scale_q15(&this->in1,ONEHALF,0,&this->out); + status=arm_mat_scale_q15(&this->in1,ONEHALF,0,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); @@ -220,6 +226,7 @@ void UnaryTestsQ15::test_mat_scale_q15() void UnaryTestsQ15::test_mat_trans_q15() { LOADDATA1(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -228,7 +235,8 @@ void UnaryTestsQ15::test_mat_trans_q15() PREPAREDATA1(true); - arm_mat_trans_q15(&this->in1,&this->out); + status=arm_mat_trans_q15(&this->in1,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); @@ -245,6 +253,7 @@ void UnaryTestsQ15::test_mat_trans_q15() void UnaryTestsQ15::test_mat_cmplx_trans_q15() { LOADDATA1(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -253,7 +262,8 @@ void UnaryTestsQ15::test_mat_cmplx_trans_q15() PREPAREDATA1C(true); - arm_mat_cmplx_trans_q15(&this->in1,&this->out); + status=arm_mat_cmplx_trans_q15(&this->in1,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += 2*(rows * columns); diff --git a/Testing/Source/Tests/UnaryTestsQ31.cpp b/Testing/Source/Tests/UnaryTestsQ31.cpp index f85d8275..09412399 100755 --- a/Testing/Source/Tests/UnaryTestsQ31.cpp +++ b/Testing/Source/Tests/UnaryTestsQ31.cpp @@ -143,6 +143,7 @@ a double precision computation. void UnaryTestsQ31::test_mat_add_q31() { LOADDATA2(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -151,7 +152,8 @@ a double precision computation. PREPAREDATA2(); - arm_mat_add_q31(&this->in1,&this->in2,&this->out); + status=arm_mat_add_q31(&this->in1,&this->in2,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); @@ -168,6 +170,7 @@ a double precision computation. void UnaryTestsQ31::test_mat_sub_q31() { LOADDATA2(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -176,7 +179,8 @@ void UnaryTestsQ31::test_mat_sub_q31() PREPAREDATA2(); - arm_mat_sub_q31(&this->in1,&this->in2,&this->out); + status=arm_mat_sub_q31(&this->in1,&this->in2,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); @@ -193,6 +197,7 @@ void UnaryTestsQ31::test_mat_sub_q31() void UnaryTestsQ31::test_mat_scale_q31() { LOADDATA1(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -201,7 +206,8 @@ void UnaryTestsQ31::test_mat_scale_q31() PREPAREDATA1(false); - arm_mat_scale_q31(&this->in1,ONEHALF,0,&this->out); + status=arm_mat_scale_q31(&this->in1,ONEHALF,0,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); @@ -218,6 +224,7 @@ void UnaryTestsQ31::test_mat_scale_q31() void UnaryTestsQ31::test_mat_trans_q31() { LOADDATA1(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -226,7 +233,8 @@ void UnaryTestsQ31::test_mat_trans_q31() PREPAREDATA1(true); - arm_mat_trans_q31(&this->in1,&this->out); + status=arm_mat_trans_q31(&this->in1,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns); @@ -243,6 +251,7 @@ void UnaryTestsQ31::test_mat_trans_q31() void UnaryTestsQ31::test_mat_cmplx_trans_q31() { LOADDATA1(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -251,7 +260,8 @@ void UnaryTestsQ31::test_mat_cmplx_trans_q31() PREPAREDATA1C(true); - arm_mat_cmplx_trans_q31(&this->in1,&this->out); + status=arm_mat_cmplx_trans_q31(&this->in1,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += 2*(rows * columns); diff --git a/Testing/Source/Tests/UnaryTestsQ7.cpp b/Testing/Source/Tests/UnaryTestsQ7.cpp index e2763e93..4d7202ad 100755 --- a/Testing/Source/Tests/UnaryTestsQ7.cpp +++ b/Testing/Source/Tests/UnaryTestsQ7.cpp @@ -126,6 +126,7 @@ a double precision computation. void UnaryTestsQ7::test_mat_trans_q7() { LOADDATA1(); + arm_status status; for(i=0;i < nbMatrixes ; i ++) { @@ -134,7 +135,8 @@ void UnaryTestsQ7::test_mat_trans_q7() PREPAREDATA1(true); - arm_mat_trans_q7(&this->in1,&this->out); + status=arm_mat_trans_q7(&this->in1,&this->out); + ASSERT_TRUE(status==ARM_MATH_SUCCESS); outp += (rows * columns);