diff options
author | Anthony Blake <anthonix@me.com> | 2014-01-05 14:32:16 -0800 |
---|---|---|
committer | Anthony Blake <anthonix@me.com> | 2014-01-05 14:32:16 -0800 |
commit | fa1780c68593762b1e4bdbc46d83912db3eba27a (patch) | |
tree | 2af703b1878f647161a852eea15409b8707b4c56 /src/ffts.c | |
parent | bedc7ea023b2a4cef8ca0a79c50941ed36e786d4 (diff) | |
parent | d70b38d65f5afec50ae43c20edf3927d11dfa734 (diff) | |
download | ffts-fa1780c68593762b1e4bdbc46d83912db3eba27a.zip ffts-fa1780c68593762b1e4bdbc46d83912db3eba27a.tar.gz |
Merge pull request #20 from dennisss/android-neon-fixes
Android neon fixes
Diffstat (limited to 'src/ffts.c')
-rw-r--r-- | src/ffts.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -53,6 +53,18 @@ #endif void ffts_execute(ffts_plan_t *p, const void * in, void * out) { + +//TODO: Define NEEDS_ALIGNED properly instead +#if defined(HAVE_SSE) || defined(HAVE_NEON) + if(((int)in % 16) != 0) { + LOG("ffts_execute: input buffer needs to be aligned to a 128bit boundary\n"); + } + + if(((int)out % 16) != 0) { + LOG("ffts_execute: output buffer needs to be aligned to a 128bit boundary\n"); + } +#endif + p->transform(p, (const float *)in, (float *)out); } @@ -85,6 +97,11 @@ void ffts_free_1d(ffts_plan_t *p) { } ffts_plan_t *ffts_init_1d(size_t N, int sign) { + if(N == 0 || (N & (N - 1)) != 0){ + LOG("FFT size must be a power of two\n"); + return NULL; + } + ffts_plan_t *p = malloc(sizeof(ffts_plan_t)); size_t leafN = 8; size_t i; |