From 515c07c57583ab89dd8bc99a6ccc25d871204836 Mon Sep 17 00:00:00 2001 From: Christophe Favergeon Date: Thu, 17 Jun 2021 07:51:54 +0200 Subject: [PATCH] CMSIS-DSP: Removed new compilation warnings with AC6.17 compiler. --- Include/arm_vec_math_f16.h | 29 +++++++++++--------------- Testing/Source/Tests/FIRF32.cpp | 5 ----- Testing/Source/Tests/FIRQ31.cpp | 2 -- Testing/Source/Tests/UnaryTestsF32.cpp | 2 -- Testing/Source/Tests/UnaryTestsF64.cpp | 3 --- 5 files changed, 12 insertions(+), 29 deletions(-) diff --git a/Include/arm_vec_math_f16.h b/Include/arm_vec_math_f16.h index ef6e2000..c79955ba 100755 --- a/Include/arm_vec_math_f16.h +++ b/Include/arm_vec_math_f16.h @@ -143,22 +143,17 @@ __STATIC_INLINE float16x8_t vtaylor_polyq_f16( return res; } -__STATIC_INLINE float16x8_t vmant_exp_f16( - float16x8_t x, - int16x8_t * e) -{ - any16x8_t r; - int16x8_t n; - - r.f = x; - n = r.i >> 10; - n = n - 15; - r.i = r.i - (n << 10); - - *e = n; - return r.f; -} - +#define VMANT_EXP_F16(x) \ + any16x8_t r; \ + int16x8_t n; \ + \ + r.f = x; \ + n = r.i >> 10; \ + n = n - 15; \ + r.i = r.i - (n << 10);\ + \ + vecExpUnBiased = n; \ + vecTmpFlt1 = r.f; __STATIC_INLINE float16x8_t vlogq_f16(float16x8_t vecIn) { @@ -170,7 +165,7 @@ __STATIC_INLINE float16x8_t vlogq_f16(float16x8_t vecIn) /* * extract exponent */ - vecTmpFlt1 = vmant_exp_f16(vecIn, &vecExpUnBiased); + VMANT_EXP_F16(vecIn); vecTmpFlt0 = vecTmpFlt1 * vecTmpFlt1; /* diff --git a/Testing/Source/Tests/FIRF32.cpp b/Testing/Source/Tests/FIRF32.cpp index dac3d5ee..2c1a8aea 100644 --- a/Testing/Source/Tests/FIRF32.cpp +++ b/Testing/Source/Tests/FIRF32.cpp @@ -49,9 +49,7 @@ static void checkInnerTail(float32_t *b) #if defined(ARM_MATH_MVEF) && !defined(ARM_MATH_AUTOVECTORIZE) int round; #endif - int nb=0; - /* @@ -66,9 +64,6 @@ static void checkInnerTail(float32_t *b) blockSize = configp[0]; numTaps = configp[1]; - - nb += 2*blockSize; - #if defined(ARM_MATH_MVEF) && !defined(ARM_MATH_AUTOVECTORIZE) /* Copy coefficients and pad to zero */ diff --git a/Testing/Source/Tests/FIRQ31.cpp b/Testing/Source/Tests/FIRQ31.cpp index 6277902b..01dac25a 100644 --- a/Testing/Source/Tests/FIRQ31.cpp +++ b/Testing/Source/Tests/FIRQ31.cpp @@ -40,7 +40,6 @@ static void checkInnerTail(q31_t *b) #endif int blockSize; int numTaps; - int nb=1; /* @@ -113,7 +112,6 @@ static void checkInnerTail(q31_t *b) configp += 2; orgcoefsp += numTaps; - nb += blockSize + blockSize; } diff --git a/Testing/Source/Tests/UnaryTestsF32.cpp b/Testing/Source/Tests/UnaryTestsF32.cpp index a024beb7..714f6fc7 100755 --- a/Testing/Source/Tests/UnaryTestsF32.cpp +++ b/Testing/Source/Tests/UnaryTestsF32.cpp @@ -622,7 +622,6 @@ void UnaryTestsF32::test_mat_inverse_f32() int i; arm_status status; - int nb=0; for(i=0;i < nbMatrixes ; i ++) { @@ -654,7 +653,6 @@ void UnaryTestsF32::test_mat_inverse_f32() inp1 += (rows * columns); - nb += (rows * columns); } diff --git a/Testing/Source/Tests/UnaryTestsF64.cpp b/Testing/Source/Tests/UnaryTestsF64.cpp index 1073c639..034e86bd 100755 --- a/Testing/Source/Tests/UnaryTestsF64.cpp +++ b/Testing/Source/Tests/UnaryTestsF64.cpp @@ -439,7 +439,6 @@ void UnaryTestsF64::test_mat_inverse_f64() int i; arm_status status; - int nb=0; for(i=0;i < nbMatrixes ; i ++) { @@ -472,8 +471,6 @@ void UnaryTestsF64::test_mat_inverse_f64() inp1 += (rows * columns); - nb += (rows * columns); - } ASSERT_EMPTY_TAIL(outputll);