summaryrefslogtreecommitdiffstats
path: root/src/ffts.c
diff options
context:
space:
mode:
authorAnthony Blake <anthonix@me.com>2012-12-03 14:45:20 +1300
committerAnthony Blake <anthonix@me.com>2012-12-03 14:45:20 +1300
commitec477d4f3e4f23a2221cbf0614f3fec26de3d9f2 (patch)
tree5cafd0e455d1fec11a6ca674377a91ae328cf4b8 /src/ffts.c
parentd1cbc1f7e86fc6d93922b4daa825b8f1b2696679 (diff)
downloadffts-ec477d4f3e4f23a2221cbf0614f3fec26de3d9f2.zip
ffts-ec477d4f3e4f23a2221cbf0614f3fec26de3d9f2.tar.gz
Added static mode
Diffstat (limited to 'src/ffts.c')
-rw-r--r--src/ffts.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/ffts.c b/src/ffts.c
index 298bd4d..ada4fca 100644
--- a/src/ffts.c
+++ b/src/ffts.c
@@ -34,7 +34,12 @@
#include "macros.h"
//#include "mini_macros.h"
#include "patterns.h"
-#include "codegen.h"
+
+#ifdef DYNAMIC_DISABLED
+ #include "ffts_static.h"
+#else
+ #include "codegen.h"
+#endif
#include <errno.h>
#include <sys/mman.h>
@@ -54,7 +59,6 @@ void ffts_free(ffts_plan_t *p) {
p->destroy(p);
}
-
void ffts_free_1d(ffts_plan_t *p) {
size_t i;
@@ -325,7 +329,17 @@ ffts_plan_t *ffts_init_1d(size_t N, int sign) {
p->N = N;
p->lastlut = w;
p->n_luts = n_luts;
+#ifdef DYNAMIC_DISABLED
+ if(sign < 0) {
+ if(N >= 32) p->transform = ffts_static_transform_f;
+ }else{
+ if(N >= 32) p->transform = ffts_static_transform_i;
+ }
+
+#else
if(N>=32) ffts_generate_func_code(p, N, leafN, sign);
+#endif
return p;
}
+
OpenPOWER on IntegriCloud