Mercurial > hg > peckfft
comparison peck_fft.h @ 4:2d6c49fcafcb
neon2 and neon4 support
| author | Peter Meerwald <p.meerwald@bct-electronic.com> |
|---|---|
| date | Fri, 16 Sep 2011 14:04:19 +0200 |
| parents | 3b31bd44a09f |
| children |
comparison
equal
deleted
inserted
replaced
| 3:3b31bd44a09f | 4:2d6c49fcafcb |
|---|---|
| 8 | 8 |
| 9 #ifdef __cplusplus | 9 #ifdef __cplusplus |
| 10 extern "C" { | 10 extern "C" { |
| 11 #endif | 11 #endif |
| 12 | 12 |
| 13 #ifdef USE_SIMD | 13 #define SIMD_SSE2 1 |
| 14 # include <xmmintrin.h> | 14 #define SIMD_NEON4 2 |
| 15 # define peck_fft_scalar __m128 | 15 #define SIMD_NEON2 3 |
| 16 #define PECK_FFT_MALLOC(nbytes) _mm_malloc(nbytes, 16) | 16 |
| 17 #define PECK_FFT_FREE _mm_free | 17 #if USE_SIMD == SIMD_SSE2 |
| 18 #include <xmmintrin.h> | |
| 19 #define peck_fft_scalar __m128 | |
| 20 #define PECK_FFT_MALLOC(nbytes) _mm_malloc(nbytes, 16) | |
| 21 #define PECK_FFT_FREE _mm_free | |
| 22 #elif USE_SIMD == SIMD_NEON4 | |
| 23 #include <arm_neon.h> | |
| 24 #define peck_fft_scalar float32x4_t | |
| 25 #define PECK_FFT_MALLOC malloc | |
| 26 #define PECK_FFT_FREE free | |
| 27 #elif USE_SIMD == SIMD_NEON2 | |
| 28 #include <arm_neon.h> | |
| 29 #define peck_fft_scalar float32x2_t | |
| 30 #define PECK_FFT_MALLOC malloc | |
| 31 #define PECK_FFT_FREE free | |
| 18 #else | 32 #else |
| 19 #define PECK_FFT_MALLOC malloc | 33 #define PECK_FFT_MALLOC malloc |
| 20 #define PECK_FFT_FREE free | 34 #define PECK_FFT_FREE free |
| 21 #endif | 35 #endif |
| 22 | 36 |
| 23 | 37 |
| 24 #ifdef FIXED_POINT | 38 #ifdef FIXED_POINT |
| 25 #include <sys/types.h> | 39 #include <sys/types.h> |
