Skip to content

Commit

Permalink
Correct issue #189
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe0606 committed Jul 1, 2024
1 parent 69d4b8e commit d7bff44
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion Include/arm_math_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__ )

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions Source/FilteringFunctions/arm_correlate_q7.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions Source/FilteringFunctions/arm_levinson_durbin_f16.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
4 changes: 2 additions & 2 deletions Source/FilteringFunctions/arm_levinson_durbin_f32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
4 changes: 2 additions & 2 deletions Source/FilteringFunctions/arm_levinson_durbin_q31.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions Source/MatrixFunctions/arm_mat_cmplx_mult_f16.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
4 changes: 2 additions & 2 deletions Source/StatisticsFunctions/arm_absmax_q7.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <stdint.h>
#include "arm_helium_utils.h"
Expand Down
4 changes: 2 additions & 2 deletions Source/SupportFunctions/arm_f16_to_float.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions Source/SupportFunctions/arm_float_to_f16.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions Source/TransformFunctions/arm_rfft_q15.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Source/TransformFunctions/arm_rfft_q31.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d7bff44

Please sign in to comment.