| #include "edge-impulse-sdk/dsp/config.hpp" |
| #if EIDSP_LOAD_CMSIS_DSP_SOURCES |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| #define FFTINIT(EXT,SIZE) \ |
| S->bitRevLength = arm_cfft_sR_##EXT##_len##SIZE.bitRevLength; \ |
| S->pBitRevTable = arm_cfft_sR_##EXT##_len##SIZE.pBitRevTable; \ |
| S->pTwiddle = arm_cfft_sR_##EXT##_len##SIZE.pTwiddle; |
|
|
| |
| |
| |
| |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| #include "edge-impulse-sdk/CMSIS/DSP/Include/dsp/transform_functions.h" |
| #include "edge-impulse-sdk/CMSIS/DSP/Include/arm_common_tables.h" |
| #include "edge-impulse-sdk/CMSIS/DSP/Include/arm_const_structs.h" |
|
|
|
|
| arm_status arm_cfft_init_f64( |
| arm_cfft_instance_f64 * S, |
| uint16_t fftLen) |
| { |
| |
| arm_status status = ARM_MATH_SUCCESS; |
|
|
| |
| S->fftLen = fftLen; |
|
|
| |
| S->pTwiddle = NULL; |
|
|
|
|
| |
| switch (S->fftLen) { |
| #if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F64_4096) && defined(ARM_TABLE_BITREVIDX_FLT_4096)) |
| |
| case 4096U: |
| |
| FFTINIT(f64,4096); |
| break; |
| #endif |
|
|
| #if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F64_2048) && defined(ARM_TABLE_BITREVIDX_FLT_2048)) |
| |
| case 2048U: |
| |
| FFTINIT(f64,2048); |
|
|
| break; |
| #endif |
|
|
| #if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F64_1024) && defined(ARM_TABLE_BITREVIDX_FLT_1024)) |
| |
| case 1024U: |
| |
| FFTINIT(f64,1024); |
|
|
| break; |
| #endif |
|
|
| #if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F64_512) && defined(ARM_TABLE_BITREVIDX_FLT_512)) |
| |
| case 512U: |
| |
| FFTINIT(f64,512); |
| break; |
| #endif |
|
|
| #if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F64_256) && defined(ARM_TABLE_BITREVIDX_FLT_256)) |
| case 256U: |
| FFTINIT(f64,256); |
| break; |
| #endif |
|
|
| #if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F64_128) && defined(ARM_TABLE_BITREVIDX_FLT_128)) |
| case 128U: |
| FFTINIT(f64,128); |
| break; |
| #endif |
|
|
| #if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F64_64) && defined(ARM_TABLE_BITREVIDX_FLT_64)) |
| case 64U: |
| FFTINIT(f64,64); |
| break; |
| #endif |
|
|
| #if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F64_32) && defined(ARM_TABLE_BITREVIDX_FLT_32)) |
| case 32U: |
| FFTINIT(f64,32); |
| break; |
| #endif |
|
|
| #if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F64_16) && defined(ARM_TABLE_BITREVIDX_FLT_16)) |
| case 16U: |
| |
| FFTINIT(f64,16); |
| break; |
| #endif |
|
|
| default: |
| |
| status = ARM_MATH_ARGUMENT_ERROR; |
| break; |
| } |
|
|
|
|
| return (status); |
| } |
|
|
| |
| |
| |
|
|
| #endif |
|
|