summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJukka Ojanen <jukka.ojanen@linkotec.net>2015-03-16 13:33:41 +0200
committerJukka Ojanen <jukka.ojanen@linkotec.net>2015-03-16 13:33:41 +0200
commitee6ea4e982e6d4dd18cbe3703cfd24ae737e0ed1 (patch)
tree76b065924b99e2cbd8de0b8584c2da09446f1ee1
parent1ea951f98b7f35c42c49394a75ae3b8cf3e62dfe (diff)
downloadffts-ee6ea4e982e6d4dd18cbe3703cfd24ae737e0ed1.zip
ffts-ee6ea4e982e6d4dd18cbe3703cfd24ae737e0ed1.tar.gz
Don't generate lookup tables when size is less than 32
-rw-r--r--src/ffts.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ffts.c b/src/ffts.c
index 8f809db..b0e4d27 100644
--- a/src/ffts.c
+++ b/src/ffts.c
@@ -483,12 +483,12 @@ ffts_plan_t *ffts_init_1d(size_t N, int sign)
p->destroy = ffts_free_1d;
p->N = N;
- /* generate lookup tables */
- if (N > 4 && ffts_generate_luts(p, N, leaf_N, sign)) {
- goto cleanup;
- }
-
if (N >= 32) {
+ /* generate lookup tables */
+ if (ffts_generate_luts(p, N, leaf_N, sign)) {
+ goto cleanup;
+ }
+
p->offsets = ffts_init_offsets(N, leaf_N);
if (!p->offsets) {
goto cleanup;
OpenPOWER on IntegriCloud