Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* CMSIS-DSP built with ARM_MATH_LOOPUNROLL: biquad and vector functions up to 30% faster
* Updated CMSIS-DSP to v1.18.0
* Patches built without -fno-builtin and -mtune=cortex-m4: fminf, fmaxf, fabsf, sqrtf and friends compile to FPU instructions
* Added AdsrEnvelope block generate() and process(), up to 33% faster than per-sample
* Faster block processing (state kept in registers) in StateVariableFilter, SmoothingFilter, DcBlockingFilter, EnvelopeFollower, InterpolatingSignalGenerator and Sine, AntialiasedRamp, AntialiasedSquareWave and Vosim oscillators
Expand Down
235 changes: 7 additions & 228 deletions Libraries/CMSIS/DSP/Include/arm_common_tables.h

Large diffs are not rendered by default.

43 changes: 3 additions & 40 deletions Libraries/CMSIS/DSP/Include/arm_common_tables_f16.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
* limitations under the License.
*/

#ifndef _ARM_COMMON_TABLES_F16_H
#define _ARM_COMMON_TABLES_F16_H
#ifndef ARM_COMMON_TABLES_F16_H
#define ARM_COMMON_TABLES_F16_H

#include "arm_math_types_f16.h"

Expand All @@ -36,90 +36,53 @@ extern "C"
{
#endif

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FFT_ALLOW_TABLES)

/* F16 */
#if !defined(__CC_ARM) && defined(ARM_FLOAT16_SUPPORTED)
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_16)
extern const float16_t twiddleCoefF16_16[32];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_32)
extern const float16_t twiddleCoefF16_32[64];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_64)
extern const float16_t twiddleCoefF16_64[128];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_128)
extern const float16_t twiddleCoefF16_128[256];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_256)
extern const float16_t twiddleCoefF16_256[512];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_512)
extern const float16_t twiddleCoefF16_512[1024];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_1024)
extern const float16_t twiddleCoefF16_1024[2048];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_2048)
extern const float16_t twiddleCoefF16_2048[4096];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_4096)
extern const float16_t twiddleCoefF16_4096[8192];
#define twiddleCoefF16 twiddleCoefF16_4096
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */


#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_32)
extern const float16_t twiddleCoefF16_rfft_32[32];
#endif

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_64)
extern const float16_t twiddleCoefF16_rfft_64[64];
#endif

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_128)
extern const float16_t twiddleCoefF16_rfft_128[128];
#endif

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_256)
extern const float16_t twiddleCoefF16_rfft_256[256];
#endif

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_512)
extern const float16_t twiddleCoefF16_rfft_512[512];
#endif

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_1024)
extern const float16_t twiddleCoefF16_rfft_1024[1024];
#endif

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_2048)
extern const float16_t twiddleCoefF16_rfft_2048[2048];
#endif

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_4096)
extern const float16_t twiddleCoefF16_rfft_4096[4096];
#endif

#endif /* ARMAC5 */

#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FFT_ALLOW_TABLES) */

#if !defined(__CC_ARM) && defined(ARM_FLOAT16_SUPPORTED)

#if (defined(ARM_MATH_MVEF) || defined(ARM_MATH_HELIUM)) && !defined(ARM_MATH_AUTOVECTORIZE)
extern const float16_t exp_tab_f16[8];
extern const float16_t __logf_lut_f16[8];
#endif /* (defined(ARM_MATH_MVEF) || defined(ARM_MATH_HELIUM)) && !defined(ARM_MATH_AUTOVECTORIZE) */
#endif
#endif


Expand Down
4 changes: 2 additions & 2 deletions Libraries/CMSIS/DSP/Include/arm_const_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
* limitations under the License.
*/

#ifndef _ARM_CONST_STRUCTS_H
#define _ARM_CONST_STRUCTS_H
#ifndef ARM_CONST_STRUCTS_H
#define ARM_CONST_STRUCTS_H

#include "arm_math_types.h"
#include "arm_common_tables.h"
Expand Down
22 changes: 2 additions & 20 deletions Libraries/CMSIS/DSP/Include/arm_const_structs_f16.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
* limitations under the License.
*/

#ifndef _ARM_CONST_STRUCTS_F16_H
#define _ARM_CONST_STRUCTS_F16_H
#ifndef ARM_CONST_STRUCTS_F16_H
#define ARM_CONST_STRUCTS_F16_H

#include "arm_math_types_f16.h"
#include "arm_common_tables.h"
Expand All @@ -41,33 +41,15 @@ extern "C"
#endif

#if !defined(__CC_ARM) && defined(ARM_FLOAT16_SUPPORTED)
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_16) && defined(ARM_TABLE_BITREVIDX_FLT_16))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len16;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_32) && defined(ARM_TABLE_BITREVIDX_FLT_32))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len32;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_64) && defined(ARM_TABLE_BITREVIDX_FLT_64))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len64;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_128) && defined(ARM_TABLE_BITREVIDX_FLT_128))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len128;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_256) && defined(ARM_TABLE_BITREVIDX_FLT_256))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len256;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_512) && defined(ARM_TABLE_BITREVIDX_FLT_512))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len512;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_1024) && defined(ARM_TABLE_BITREVIDX_FLT_1024))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len1024;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_2048) && defined(ARM_TABLE_BITREVIDX_FLT_2048))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len2048;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_4096) && defined(ARM_TABLE_BITREVIDX_FLT_4096))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len4096;
#endif
#endif

#ifdef __cplusplus
Expand Down
24 changes: 10 additions & 14 deletions Libraries/CMSIS/DSP/Include/arm_helium_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
* limitations under the License.
*/

#ifndef _ARM_UTILS_HELIUM_H_
#define _ARM_UTILS_HELIUM_H_
#ifndef ARM_UTILS_HELIUM_H_
#define ARM_UTILS_HELIUM_H_


#ifdef __cplusplus
Expand Down Expand Up @@ -105,17 +105,17 @@ __STATIC_FORCEINLINE float16_t vecAddAcrossF16Mve(float16x8_t in)
in = vaddq_f16(tmpVec, in);
acc = (_Float16)vgetq_lane_f16(in, 0) + (_Float16)vgetq_lane_f16(in, 4);

return acc;
return (float16_t)acc;
}

__STATIC_FORCEINLINE float16x8_t __mve_cmplx_sum_intra_vec_f16(
float16x8_t vecIn)
{
float16x8_t vecTmp, vecOut;
uint32_t tmp;
uint32_t tmp = 0;

vecTmp = (float16x8_t) vrev64q_s32((int32x4_t) vecIn);
// TO TRACK : using canonical addition leads to unefficient code generation for f16
// TO TRACK : using canonical addition leads to inefficient code generation for f16
// vecTmp = vecTmp + vecAccCpx0;
/*
* Compute
Expand All @@ -135,7 +135,7 @@ __STATIC_FORCEINLINE float16x8_t __mve_cmplx_sum_intra_vec_f16(
*/
vecOut = vaddq_f16(vecOut, vecTmp);
/*
* Cmplx sum is in 4rd & 5th f16 elt
* Cmplx sum is in 4th & 5th f16 elt
* return full vector
*/
return vecOut;
Expand All @@ -155,7 +155,7 @@ __STATIC_FORCEINLINE void mve_cmplx_sum_intra_vec_f16(
{
float16x8_t vecOut = __mve_cmplx_sum_intra_vec_f16(vecIn);
/*
* Cmplx sum is in 4rd & 5th f16 elt
* Cmplx sum is in 4th & 5th f16 elt
* use 32-bit extraction
*/
*(float32_t *) pOut = ((float32x4_t) vecOut)[2];
Expand Down Expand Up @@ -364,7 +364,7 @@ __STATIC_INLINE arm_status arm_mat_cmplx_trans_32bit(
vecIn = vldrwq_gather_shifted_offset(pDataC, vecOffsCur);
vstrwq(pDataDestR, vecIn);
pDataDestR += 4;
vecOffsCur = vaddq(vecOffsCur, (srcCols << 2));
vecOffsCur = vaddq_n_u32(vecOffsCur, (srcCols << 2));
/*
* Decrement the blockSize loop counter
*/
Expand Down Expand Up @@ -551,7 +551,7 @@ __STATIC_INLINE arm_status arm_mat_cmplx_trans_16bit(
* build [0, 1, 2xcol, 2xcol+1, 4xcol, 4xcol+1, 6xcol, 6xcol+1]
*/
vecOffsRef = vldrhq_u16((uint16_t const *) loadCmplxCol);
vecOffsRef = vmulq(vecOffsRef, (uint16_t) (srcCols * CMPLX_DIM))
vecOffsRef = vmulq_n_u16(vecOffsRef, (uint16_t) (srcCols * CMPLX_DIM))
+ viwdupq_u16((uint32_t)0, (uint16_t) 2, 1);

pDataRow = pDataSrc;
Expand All @@ -569,7 +569,7 @@ __STATIC_INLINE arm_status arm_mat_cmplx_trans_16bit(
vecIn = vldrhq_gather_shifted_offset(pDataC, vecOffsCur);
vstrhq(pDataDestR, vecIn);
pDataDestR+= 8; // VEC_LANES_U16
vecOffsCur = vaddq(vecOffsCur, (srcCols << 3));
vecOffsCur = vaddq_n_u16(vecOffsCur, (srcCols << 3));
/*
* Decrement the blockSize loop counter
*/
Expand Down Expand Up @@ -609,7 +609,6 @@ Definitions available for MVEI only
#define MVE_ASRL_SAT32(acc, shift) ((sqrshrl(acc, -(32-shift)) >> 32) & 0xffffffff)


#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_FAST_SQRT_Q31_MVE)
__STATIC_INLINE q31x4_t FAST_VSQRT_Q31(q31x4_t vecIn)
{
q63x2_t vecTmpLL;
Expand Down Expand Up @@ -675,9 +674,7 @@ __STATIC_INLINE q31x4_t FAST_VSQRT_Q31(q31x4_t vecIn)

return vecDst;
}
#endif

#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_FAST_SQRT_Q15_MVE)
__STATIC_INLINE q15x8_t FAST_VSQRT_Q15(q15x8_t vecIn)
{
q31x4_t vecTmpLev, vecTmpLodd, vecSignL;
Expand Down Expand Up @@ -742,7 +739,6 @@ __STATIC_INLINE q15x8_t FAST_VSQRT_Q15(q15x8_t vecIn)

return vecDst;
}
#endif

#endif /* defined (ARM_MATH_HELIUM) || defined(ARM_MATH_MVEI) */

Expand Down
Loading
Loading