From d7bff448e952748a28a19b97c1dbdf36c705c39c Mon Sep 17 00:00:00 2001 From: Christophe Favergeon Date: Mon, 1 Jul 2024 11:44:12 +0200 Subject: [PATCH] Correct issue #189 --- Include/arm_math_types.h | 2 +- .../FilteringFunctions/arm_biquad_cascade_stereo_df2T_f16.c | 4 ++-- Source/FilteringFunctions/arm_correlate_q7.c | 4 ++-- Source/FilteringFunctions/arm_levinson_durbin_f16.c | 4 ++-- Source/FilteringFunctions/arm_levinson_durbin_f32.c | 4 ++-- Source/FilteringFunctions/arm_levinson_durbin_q31.c | 4 ++-- Source/MatrixFunctions/arm_mat_cmplx_mult_f16.c | 4 ++-- Source/StatisticsFunctions/arm_absmax_q7.c | 4 ++-- Source/SupportFunctions/arm_f16_to_float.c | 4 ++-- Source/SupportFunctions/arm_float_to_f16.c | 4 ++-- Source/TransformFunctions/arm_rfft_q15.c | 4 ++-- Source/TransformFunctions/arm_rfft_q31.c | 6 +++--- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Include/arm_math_types.h b/Include/arm_math_types.h index 30fd3ab6..74ae8485 100755 --- a/Include/arm_math_types.h +++ b/Include/arm_math_types.h @@ -64,7 +64,7 @@ extern "C" #pragma GCC diagnostic ignored "-Wconversion" #pragma GCC diagnostic ignored "-Wunused-parameter" // Disable some code having issue with GCC - #define __CMSIS_GCC_H + #define ARM_DSP_BUILT_WITH_GCC #elif defined ( __ICCARM__ ) diff --git a/Source/FilteringFunctions/arm_biquad_cascade_stereo_df2T_f16.c b/Source/FilteringFunctions/arm_biquad_cascade_stereo_df2T_f16.c index b2a80676..4e13b1b8 100755 --- a/Source/FilteringFunctions/arm_biquad_cascade_stereo_df2T_f16.c +++ b/Source/FilteringFunctions/arm_biquad_cascade_stereo_df2T_f16.c @@ -46,11 +46,11 @@ @param[in] blockSize number of samples to process */ -#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(__CMSIS_GCC_H) +#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(ARM_DSP_BUILT_WITH_GCC) #pragma GCC warning "Scalar version of arm_biquad_cascade_stereo_df2T_f16 built. Helium version has build issues with gcc." #endif -#if (defined(ARM_MATH_MVE_FLOAT16) && defined(ARM_MATH_HELIUM_EXPERIMENTAL)) && !defined(ARM_MATH_AUTOVECTORIZE) && !defined(__CMSIS_GCC_H) +#if (defined(ARM_MATH_MVE_FLOAT16) && defined(ARM_MATH_HELIUM_EXPERIMENTAL)) && !defined(ARM_MATH_AUTOVECTORIZE) && !defined(ARM_DSP_BUILT_WITH_GCC) ARM_DSP_ATTRIBUTE void arm_biquad_cascade_stereo_df2T_f16( const arm_biquad_cascade_stereo_df2T_instance_f16 * S, const float16_t * pSrc, diff --git a/Source/FilteringFunctions/arm_correlate_q7.c b/Source/FilteringFunctions/arm_correlate_q7.c index 7be4d6b3..dbe3fd8e 100644 --- a/Source/FilteringFunctions/arm_correlate_q7.c +++ b/Source/FilteringFunctions/arm_correlate_q7.c @@ -56,11 +56,11 @@ Refer to \ref arm_correlate_opt_q7() for a faster implementation of this function. */ -#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(__CMSIS_GCC_H) +#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(ARM_DSP_BUILT_WITH_GCC) #pragma GCC warning "Scalar version of arm_correlate_q7 built. Helium version has build issues with gcc." #endif -#if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE) && !defined(__CMSIS_GCC_H) +#if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE) && !defined(ARM_DSP_BUILT_WITH_GCC) #include "arm_helium_utils.h" #include "arm_vec_filtering.h" diff --git a/Source/FilteringFunctions/arm_levinson_durbin_f16.c b/Source/FilteringFunctions/arm_levinson_durbin_f16.c index dd224904..4b83d75c 100755 --- a/Source/FilteringFunctions/arm_levinson_durbin_f16.c +++ b/Source/FilteringFunctions/arm_levinson_durbin_f16.c @@ -47,11 +47,11 @@ @param[in] nbCoefs number of autoregressive coefficients */ -#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(__CMSIS_GCC_H) +#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(ARM_DSP_BUILT_WITH_GCC) #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) +#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && !defined(ARM_DSP_BUILT_WITH_GCC) #include "arm_helium_utils.h" diff --git a/Source/FilteringFunctions/arm_levinson_durbin_f32.c b/Source/FilteringFunctions/arm_levinson_durbin_f32.c index cc4125fe..71fe2340 100755 --- a/Source/FilteringFunctions/arm_levinson_durbin_f32.c +++ b/Source/FilteringFunctions/arm_levinson_durbin_f32.c @@ -50,11 +50,11 @@ @param[in] nbCoefs number of autoregressive coefficients */ -#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(__CMSIS_GCC_H) +#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(ARM_DSP_BUILT_WITH_GCC) #pragma GCC warning "Scalar version of arm_levinson_durbin_f32 built. Helium version has build issues with gcc." #endif -#if defined(ARM_MATH_MVEF) && !defined(ARM_MATH_AUTOVECTORIZE) && !defined(__CMSIS_GCC_H) +#if defined(ARM_MATH_MVEF) && !defined(ARM_MATH_AUTOVECTORIZE) && !defined(ARM_DSP_BUILT_WITH_GCC) #include "arm_helium_utils.h" diff --git a/Source/FilteringFunctions/arm_levinson_durbin_q31.c b/Source/FilteringFunctions/arm_levinson_durbin_q31.c index 33089f4d..95f240ca 100755 --- a/Source/FilteringFunctions/arm_levinson_durbin_q31.c +++ b/Source/FilteringFunctions/arm_levinson_durbin_q31.c @@ -108,11 +108,11 @@ __STATIC_FORCEINLINE q31_t divide(q31_t n, q31_t d) @param[in] nbCoefs number of autoregressive coefficients */ -#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(__CMSIS_GCC_H) +#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(ARM_DSP_BUILT_WITH_GCC) #pragma GCC warning "Scalar version of arm_levinson_durbin_q31 built. Helium version has build issues with gcc." #endif -#if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE) && !defined(__CMSIS_GCC_H) +#if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE) && !defined(ARM_DSP_BUILT_WITH_GCC) #define LANE23_MASK 0xFF00 diff --git a/Source/MatrixFunctions/arm_mat_cmplx_mult_f16.c b/Source/MatrixFunctions/arm_mat_cmplx_mult_f16.c index 6fb74447..1b94e713 100755 --- a/Source/MatrixFunctions/arm_mat_cmplx_mult_f16.c +++ b/Source/MatrixFunctions/arm_mat_cmplx_mult_f16.c @@ -51,11 +51,11 @@ - \ref ARM_MATH_SIZE_MISMATCH : Matrix size check failed */ -#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(__CMSIS_GCC_H) +#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(ARM_DSP_BUILT_WITH_GCC) #pragma GCC warning "Scalar version of arm_mat_cmplx_mult_f16 built. Helium version has build issues with gcc." #endif -#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && !defined(__CMSIS_GCC_H) +#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && !defined(ARM_DSP_BUILT_WITH_GCC) #include "arm_helium_utils.h" diff --git a/Source/StatisticsFunctions/arm_absmax_q7.c b/Source/StatisticsFunctions/arm_absmax_q7.c index 7efdfcf6..464db96b 100755 --- a/Source/StatisticsFunctions/arm_absmax_q7.c +++ b/Source/StatisticsFunctions/arm_absmax_q7.c @@ -45,12 +45,12 @@ @param[out] pIndex index of maximum value returned here */ -#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(__CMSIS_GCC_H) +#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(ARM_DSP_BUILT_WITH_GCC) #pragma GCC warning "Scalar version of arm_absmax_q7 built. Helium version has build issues with gcc." #endif -#if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE) && !defined(__CMSIS_GCC_H) +#if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE) && !defined(ARM_DSP_BUILT_WITH_GCC) #include #include "arm_helium_utils.h" diff --git a/Source/SupportFunctions/arm_f16_to_float.c b/Source/SupportFunctions/arm_f16_to_float.c index 10378ab0..cd19f171 100755 --- a/Source/SupportFunctions/arm_f16_to_float.c +++ b/Source/SupportFunctions/arm_f16_to_float.c @@ -52,11 +52,11 @@ */ -#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(__CMSIS_GCC_H) +#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(ARM_DSP_BUILT_WITH_GCC) #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) +#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && !defined(ARM_DSP_BUILT_WITH_GCC) ARM_DSP_ATTRIBUTE void arm_f16_to_float( const float16_t * pSrc, diff --git a/Source/SupportFunctions/arm_float_to_f16.c b/Source/SupportFunctions/arm_float_to_f16.c index 55767313..10950c57 100755 --- a/Source/SupportFunctions/arm_float_to_f16.c +++ b/Source/SupportFunctions/arm_float_to_f16.c @@ -47,11 +47,11 @@ @param[in] blockSize number of samples in each vector */ -#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(__CMSIS_GCC_H) +#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && defined(ARM_DSP_BUILT_WITH_GCC) #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) +#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE) && !defined(ARM_DSP_BUILT_WITH_GCC) ARM_DSP_ATTRIBUTE void arm_float_to_f16( const float32_t * pSrc, diff --git a/Source/TransformFunctions/arm_rfft_q15.c b/Source/TransformFunctions/arm_rfft_q15.c index 9e8d40df..0e82e708 100644 --- a/Source/TransformFunctions/arm_rfft_q15.c +++ b/Source/TransformFunctions/arm_rfft_q15.c @@ -159,7 +159,7 @@ ARM_DSP_ATTRIBUTE void arm_rfft_q15( #include "arm_helium_utils.h" #include "arm_vec_fft.h" -#if defined(__CMSIS_GCC_H) +#if defined(ARM_DSP_BUILT_WITH_GCC) #define MVE_CMPLX_MULT_FX_AxB_S16(A,B) vqdmladhxq_s16(vqdmlsdhq_s16((__typeof(A))vuninitializedq_s16(), A, B), A, B) #define MVE_CMPLX_MULT_FX_AxConjB_S16(A,B) vqdmladhq_s16(vqdmlsdhxq_s16((__typeof(A))vuninitializedq_s16(), A, B), A, B) @@ -205,7 +205,7 @@ ARM_DSP_ATTRIBUTE void arm_split_rfft_q15( q15x8_t coefA = vldrhq_gather_shifted_offset_s16(pCoefAb, offsetCoef); q15x8_t coefB = vldrhq_gather_shifted_offset_s16(pCoefBb, offsetCoef); -#if defined(__CMSIS_GCC_H) +#if defined(ARM_DSP_BUILT_WITH_GCC) q15x8_t out = vhaddq_s16(MVE_CMPLX_MULT_FX_AxB_S16(in1, coefA), MVE_CMPLX_MULT_FX_AxConjB_S16(coefB, in2)); #else diff --git a/Source/TransformFunctions/arm_rfft_q31.c b/Source/TransformFunctions/arm_rfft_q31.c index 43174e61..1ef35b6a 100644 --- a/Source/TransformFunctions/arm_rfft_q31.c +++ b/Source/TransformFunctions/arm_rfft_q31.c @@ -157,7 +157,7 @@ ARM_DSP_ATTRIBUTE void arm_rfft_q31( #include "arm_helium_utils.h" #include "arm_vec_fft.h" -#if defined(__CMSIS_GCC_H) +#if defined(ARM_DSP_BUILT_WITH_GCC) #define MVE_CMPLX_MULT_FX_AxB_S32(A,B) vqdmladhxq_s32(vqdmlsdhq_s32((__typeof(A))vuninitializedq_s32(), A, B), A, B) #define MVE_CMPLX_MULT_FX_AxConjB_S32(A,B) vqdmladhq_s32(vqdmlsdhxq_s32((__typeof(A))vuninitializedq_s32(), A, B), A, B) @@ -199,7 +199,7 @@ ARM_DSP_ATTRIBUTE void arm_split_rfft_q31( q31x4_t in2 = vldrwq_gather_shifted_offset_s32(pSrc, offset); q31x4_t coefA = vldrwq_gather_shifted_offset_s32(pCoefAb, offsetCoef); q31x4_t coefB = vldrwq_gather_shifted_offset_s32(pCoefBb, offsetCoef); -#if defined(__CMSIS_GCC_H) +#if defined(ARM_DSP_BUILT_WITH_GCC) q31x4_t out = vhaddq_s32(MVE_CMPLX_MULT_FX_AxB_S32(in1, coefA),MVE_CMPLX_MULT_FX_AxConjB_S32(coefB, in2)); #else q31x4_t out = vhaddq_s32(MVE_CMPLX_MULT_FX_AxB(in1, coefA, q31x4_t), @@ -357,7 +357,7 @@ ARM_DSP_ATTRIBUTE void arm_split_rifft_q31( q31x4_t coefB = vldrwq_gather_shifted_offset_s32(pCoefBb, offsetCoef); /* can we avoid the conjugate here ? */ -#if defined(__CMSIS_GCC_H) +#if defined(ARM_DSP_BUILT_WITH_GCC) q31x4_t out = vhaddq_s32(MVE_CMPLX_MULT_FX_AxConjB_S32(in1, coefA), vmulq_s32(conj, MVE_CMPLX_MULT_FX_AxB_S32(in2, coefB))); #else