Просмотр исходного кода

CMSIS-DSP: Correcting some build issues with Helium f16 code when building with gcc.

Christophe Favergeon 4 лет назад
Родитель
Сommit
a4168d3ca5

+ 5 - 1
CMSIS/DSP/Source/FilteringFunctions/arm_levinson_durbin_f16.c

@@ -48,7 +48,11 @@
   @return        none
  */
 
-#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE)
+#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(__CMSIS_GCC_H)
+#pragma GCC warning "Scalar version of arm_levinson_durbin_f16 built. Helium version has build issues with gcc."
+#endif 
+
+#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) &&  !defined(__CMSIS_GCC_H)
 
 #include "arm_helium_utils.h"
 

+ 5 - 1
CMSIS/DSP/Source/SupportFunctions/arm_f16_to_float.c

@@ -53,7 +53,11 @@
 
  */
 
-#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE)
+#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(__CMSIS_GCC_H)
+#pragma GCC warning "Scalar version of arm_f16_to_float built. Helium version has build issues with gcc."
+#endif 
+
+#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) &&  !defined(__CMSIS_GCC_H)
 
 void arm_f16_to_float(
   const float16_t * pSrc,

+ 5 - 1
CMSIS/DSP/Source/SupportFunctions/arm_float_to_f16.c

@@ -49,7 +49,11 @@
 
  */
 
-#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE)
+#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(__CMSIS_GCC_H)
+#pragma GCC warning "Scalar version of arm_float_to_f16 built. Helium version has build issues with gcc."
+#endif 
+
+#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) &&  !defined(__CMSIS_GCC_H)
 
 void arm_float_to_f16(
   const float32_t * pSrc,

+ 2 - 1
CMSIS/DSP/Testing/Source/Tests/FIRF16.cpp

@@ -45,8 +45,9 @@ static void checkInnerTail(float16_t *b)
 #endif
         int blockSize;
         int numTaps;
+#if defined(ARM_MATH_MVEF) && !defined(ARM_MATH_AUTOVECTORIZE)
         int round;
-
+#endif
         
 
         /*

+ 1 - 1
CMSIS/DSP/Testing/Source/Tests/UnaryTestsF16.cpp

@@ -2,7 +2,7 @@
 #include <stdio.h>
 #include "Error.h"
 
-#define SNR_THRESHOLD 60
+#define SNR_THRESHOLD 59
 
 /* 
 

+ 7 - 2
CMSIS/DoxyGen/DSP/src/history.txt

@@ -45,10 +45,15 @@
       Q15 scalar division
 
       GCC issues:
+      Some functions have build issues when building Helium code with gcc. So
+      they are replaced with a less efficient scalar version when built with gcc.
       - Scalar version of arm_mat_cmplx_mult_f16.c built with Helium target
       - Scalar version of arm_biquad_cascade_stereo_df2T_f16.c built with Helium target.
-      - Scalar version of arm_levinson_durbin_f32 built with Helium target
-      - Scalar version of arm_levinson_durbin_q31 built with Helium target
+      - Scalar version of arm_levinson_durbin_f32.c  built with Helium target
+      - Scalar version of arm_levinson_durbin_f16.c  built with Helium target
+      - Scalar version of arm_levinson_durbin_q31.c  built with Helium target
+      - Scalar version of arm_float_to_f16.c  built with Helium target
+      - Scalar version of arm_f16_to_float.c  built with Helium target
 
       Important:
       - Initialization of FIRs has changed for the Helium version. Read the