From 60a6ec107d9ba62ffa0ad828538d873cee9c6291 Mon Sep 17 00:00:00 2001 From: Christophe Favergeon Date: Tue, 16 Jul 2024 07:55:01 +0200 Subject: [PATCH] Correct issue #197 : missing prototypes --- .../arm_boolean_distance_template.h | 17 +++++++++++++++++ Source/FastMathFunctions/arm_vlog_f16.c | 4 ++-- Source/FastMathFunctions/arm_vlog_q15.c | 2 +- Source/FastMathFunctions/arm_vlog_q31.c | 2 +- Source/FilteringFunctions/arm_fir_q7.c | 4 ++-- Source/TransformFunctions/arm_bitreversal.c | 15 +++++++++++++++ Source/TransformFunctions/arm_bitreversal2.c | 15 +++++++++++++++ Source/TransformFunctions/arm_bitreversal_f16.c | 6 ++++++ Source/TransformFunctions/arm_cfft_f32.c | 4 ++-- Source/TransformFunctions/arm_cfft_f64.c | 2 +- Source/TransformFunctions/arm_cfft_radix8_f16.c | 5 +++++ Source/TransformFunctions/arm_cfft_radix8_f32.c | 6 ++++++ Testing/cmsis_build/cdefault.yml | 3 +++ 13 files changed, 76 insertions(+), 9 deletions(-) diff --git a/Source/DistanceFunctions/arm_boolean_distance_template.h b/Source/DistanceFunctions/arm_boolean_distance_template.h index 4103382b..ab724feb 100755 --- a/Source/DistanceFunctions/arm_boolean_distance_template.h +++ b/Source/DistanceFunctions/arm_boolean_distance_template.h @@ -52,6 +52,23 @@ #define FUNC(EXT) _FUNC(arm_boolean_distance, EXT) +extern void FUNC(EXT)(const uint32_t *pA + , const uint32_t *pB + , uint32_t numberOfBools +#ifdef TT + , uint32_t *cTT +#endif +#ifdef FF + , uint32_t *cFF +#endif +#ifdef TF + , uint32_t *cTF +#endif +#ifdef FT + , uint32_t *cFT +#endif + ); + /** * @brief Elements of boolean distances * diff --git a/Source/FastMathFunctions/arm_vlog_f16.c b/Source/FastMathFunctions/arm_vlog_f16.c index 826237c3..56bcfcf2 100755 --- a/Source/FastMathFunctions/arm_vlog_f16.c +++ b/Source/FastMathFunctions/arm_vlog_f16.c @@ -72,7 +72,7 @@ static float16_t lut_logf16[NB_LUT_LOGF16]={ 0.0625,-0.00195305,0.0000804357}; -float16_t logf16_scalar(float16_t x) +static float16_t logf16_scalar(float16_t x) { int16_t i = arm_typecast_s16_f16(x); @@ -108,7 +108,7 @@ float16_t logf16_scalar(float16_t x) #include "arm_vec_math_f16.h" -float16x8_t vlogq_lut_f16(float16x8_t vecIn) +static float16x8_t vlogq_lut_f16(float16x8_t vecIn) { int16x8_t i = vreinterpretq_s16_f16(vecIn); diff --git a/Source/FastMathFunctions/arm_vlog_q15.c b/Source/FastMathFunctions/arm_vlog_q15.c index 661da853..c55370e3 100755 --- a/Source/FastMathFunctions/arm_vlog_q15.c +++ b/Source/FastMathFunctions/arm_vlog_q15.c @@ -128,7 +128,7 @@ static uint16_t arm_scalar_log_q15(uint16_t src) #if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE) -q15x8_t vlogq_q15(q15x8_t src) +static q15x8_t vlogq_q15(q15x8_t src) { int i; diff --git a/Source/FastMathFunctions/arm_vlog_q31.c b/Source/FastMathFunctions/arm_vlog_q31.c index 962889d0..8824eb34 100755 --- a/Source/FastMathFunctions/arm_vlog_q31.c +++ b/Source/FastMathFunctions/arm_vlog_q31.c @@ -123,7 +123,7 @@ static uint32_t arm_scalar_log_q31(uint32_t src) #if defined(ARM_MATH_MVEI) && !defined(ARM_MATH_AUTOVECTORIZE) -q31x4_t vlogq_q31(q31x4_t src) +static q31x4_t vlogq_q31(q31x4_t src) { int32_t i; diff --git a/Source/FilteringFunctions/arm_fir_q7.c b/Source/FilteringFunctions/arm_fir_q7.c index 4d067d14..e03f6472 100755 --- a/Source/FilteringFunctions/arm_fir_q7.c +++ b/Source/FilteringFunctions/arm_fir_q7.c @@ -152,7 +152,7 @@ static void arm_fir_q7_49_64_mve(const arm_fir_instance_q7 * S, } -ARM_DSP_ATTRIBUTE void arm_fir_q7_33_48_mve(const arm_fir_instance_q7 * S, +static void arm_fir_q7_33_48_mve(const arm_fir_instance_q7 * S, const q7_t * __restrict pSrc, q7_t * __restrict pDst, uint32_t blockSize) { @@ -175,7 +175,7 @@ static void arm_fir_q7_17_32_mve(const arm_fir_instance_q7 * S, } -ARM_DSP_ATTRIBUTE void arm_fir_q7_1_16_mve(const arm_fir_instance_q7 * S, +static void arm_fir_q7_1_16_mve(const arm_fir_instance_q7 * S, const q7_t * __restrict pSrc, q7_t * __restrict pDst, uint32_t blockSize) { diff --git a/Source/TransformFunctions/arm_bitreversal.c b/Source/TransformFunctions/arm_bitreversal.c index e71935cf..7ba683fe 100644 --- a/Source/TransformFunctions/arm_bitreversal.c +++ b/Source/TransformFunctions/arm_bitreversal.c @@ -29,6 +29,11 @@ #include "dsp/transform_functions.h" #include "arm_common_tables.h" +void arm_bitreversal_f32( + float32_t * pSrc, + uint16_t fftSize, + uint16_t bitRevFactor, + const uint16_t * pBitRevTab); /** @brief In-place floating-point bit reversal function. @@ -99,6 +104,11 @@ ARM_DSP_ATTRIBUTE void arm_bitreversal_f32( } } +void arm_bitreversal_q31( + q31_t * pSrc, + uint32_t fftLen, + uint16_t bitRevFactor, + const uint16_t * pBitRevTab); /** @brief In-place Q31 bit reversal function. @@ -168,6 +178,11 @@ ARM_DSP_ATTRIBUTE void arm_bitreversal_q31( } } +void arm_bitreversal_q15( + q15_t * pSrc16, + uint32_t fftLen, + uint16_t bitRevFactor, + const uint16_t * pBitRevTab); /** diff --git a/Source/TransformFunctions/arm_bitreversal2.c b/Source/TransformFunctions/arm_bitreversal2.c index 5c47d333..fe63e978 100644 --- a/Source/TransformFunctions/arm_bitreversal2.c +++ b/Source/TransformFunctions/arm_bitreversal2.c @@ -29,6 +29,11 @@ #include "dsp/transform_functions.h" #include "arm_common_tables.h" +void arm_bitreversal_64( + uint64_t *pSrc, + const uint16_t bitRevLen, + const uint16_t *pBitRevTab); + /** @brief In-place 64 bit reversal function. @@ -64,6 +69,11 @@ ARM_DSP_ATTRIBUTE void arm_bitreversal_64( } } +void arm_bitreversal_32( + uint32_t *pSrc, + const uint16_t bitRevLen, + const uint16_t *pBitRevTab); + /** @brief In-place 32 bit reversal function. @param[in,out] pSrc points to in-place buffer of unknown 32-bit data type @@ -97,6 +107,11 @@ ARM_DSP_ATTRIBUTE void arm_bitreversal_32( } } +void arm_bitreversal_16( + uint16_t *pSrc, + const uint16_t bitRevLen, + const uint16_t *pBitRevTab); + /** @brief In-place 16 bit reversal function. diff --git a/Source/TransformFunctions/arm_bitreversal_f16.c b/Source/TransformFunctions/arm_bitreversal_f16.c index 04718b3f..03498e2a 100755 --- a/Source/TransformFunctions/arm_bitreversal_f16.c +++ b/Source/TransformFunctions/arm_bitreversal_f16.c @@ -28,6 +28,12 @@ #include "dsp/transform_functions_f16.h" +void arm_bitreversal_f16( +float16_t * pSrc, +uint16_t fftSize, +uint16_t bitRevFactor, +const uint16_t * pBitRevTab); + /* * @brief In-place bit reversal function. * @param[in, out] *pSrc points to the in-place buffer of floating-point data type. diff --git a/Source/TransformFunctions/arm_cfft_f32.c b/Source/TransformFunctions/arm_cfft_f32.c index 17627a45..4733fae6 100755 --- a/Source/TransformFunctions/arm_cfft_f32.c +++ b/Source/TransformFunctions/arm_cfft_f32.c @@ -754,7 +754,7 @@ extern void arm_bitreversal_32( */ -ARM_DSP_ATTRIBUTE void arm_cfft_radix8by2_f32 (arm_cfft_instance_f32 * S, float32_t * p1) +static void arm_cfft_radix8by2_f32 (arm_cfft_instance_f32 * S, float32_t * p1) { uint32_t L = S->fftLen; float32_t * pCol1, * pCol2, * pMid1, * pMid2; @@ -868,7 +868,7 @@ ARM_DSP_ATTRIBUTE void arm_cfft_radix8by2_f32 (arm_cfft_instance_f32 * S, float3 arm_radix8_butterfly_f32 (pCol2, L, (float32_t *) S->pTwiddle, 2U); } -ARM_DSP_ATTRIBUTE void arm_cfft_radix8by4_f32 (arm_cfft_instance_f32 * S, float32_t * p1) +static void arm_cfft_radix8by4_f32 (arm_cfft_instance_f32 * S, float32_t * p1) { uint32_t L = S->fftLen >> 1; float32_t * pCol1, *pCol2, *pCol3, *pCol4, *pEnd1, *pEnd2, *pEnd3, *pEnd4; diff --git a/Source/TransformFunctions/arm_cfft_f64.c b/Source/TransformFunctions/arm_cfft_f64.c index 9f7fbfa6..8d4eb9c0 100644 --- a/Source/TransformFunctions/arm_cfft_f64.c +++ b/Source/TransformFunctions/arm_cfft_f64.c @@ -186,7 +186,7 @@ ARM_DSP_ATTRIBUTE void arm_radix4_butterfly_f64( * @param[in] twidCoefModifier twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */ -ARM_DSP_ATTRIBUTE void arm_cfft_radix4by2_f64( +static void arm_cfft_radix4by2_f64( float64_t * pSrc, uint32_t fftLen, const float64_t * pCoef) diff --git a/Source/TransformFunctions/arm_cfft_radix8_f16.c b/Source/TransformFunctions/arm_cfft_radix8_f16.c index 877153bb..2c8b3a2e 100755 --- a/Source/TransformFunctions/arm_cfft_radix8_f16.c +++ b/Source/TransformFunctions/arm_cfft_radix8_f16.c @@ -30,6 +30,11 @@ #if defined(ARM_FLOAT16_SUPPORTED) +void arm_radix8_butterfly_f16( + float16_t * pSrc, + uint16_t fftLen, + const float16_t * pCoef, + uint16_t twidCoefModifier); /* ---------------------------------------------------------------------- * Internal helper function used by the FFTs diff --git a/Source/TransformFunctions/arm_cfft_radix8_f32.c b/Source/TransformFunctions/arm_cfft_radix8_f32.c index 2c2ca675..1f24c557 100644 --- a/Source/TransformFunctions/arm_cfft_radix8_f32.c +++ b/Source/TransformFunctions/arm_cfft_radix8_f32.c @@ -33,6 +33,12 @@ * Internal helper function used by the FFTs * -------------------------------------------------------------------- */ +void arm_radix8_butterfly_f32( + float32_t * pSrc, + uint16_t fftLen, + const float32_t * pCoef, + uint16_t twidCoefModifier); + /** brief Core function for the floating-point CFFT butterfly process. param[in,out] pSrc points to the in-place buffer of floating-point data type. diff --git a/Testing/cmsis_build/cdefault.yml b/Testing/cmsis_build/cdefault.yml index f8eb36fe..c148f12f 100644 --- a/Testing/cmsis_build/cdefault.yml +++ b/Testing/cmsis_build/cdefault.yml @@ -28,6 +28,7 @@ default: - -Wno-parentheses-equality - -Wno-reserved-identifier - -ffunction-sections + - -Wmissing-prototypes - -DARM_DSP_ATTRIBUTE="__attribute__((weak))" - -DARM_DSP_TABLE_ATTRIBUTE="__attribute__((section (\"dsp_table\")))" CPP: @@ -70,6 +71,7 @@ default: - -Wno-maybe-uninitialized - -fdata-sections - -mfp16-format=ieee + - -Wmissing-prototypes - -DARM_DSP_ATTRIBUTE="__attribute__((weak))" - -DARM_DSP_TABLE_ATTRIBUTE="__attribute__((section (\"dsp_table\")))" CPP: @@ -120,6 +122,7 @@ default: - -Wno-parentheses-equality - -Wno-reserved-identifier - -ffunction-sections + - -Wmissing-prototypes - -DARM_DSP_ATTRIBUTE="__attribute__((weak))" - -DARM_DSP_TABLE_ATTRIBUTE="__attribute__((section (\"dsp_table\")))" CPP: