* Make the FFT size a bit larger.
[matthijs/projects/montium-fft.git] / FFT.h
diff --git a/FFT.h b/FFT.h
index cb4cdf19dbf6f6a607f06bed5c49154fde593b94..b94386e6f4e0d82bbe6f651f9aeaafc89ca930f4 100644 (file)
--- a/FFT.h
+++ b/FFT.h
@@ -2,24 +2,27 @@
 #ifndef FFT_H_INCLUDED\r
 #define FFT_H_INCLUDED\r
 \r
-#define BIT_SIZE 3\r
-#define SIZE (1<<BIT_SIZE)\r
-\r
+/* Define some parameters for this FFT algorithm. We prefix them \r
+ * with PARAM_ so we can still use variable names like 'n' :-) */\r
 /* Change these: */\r
 /* 2log of number of tiles */\r
-#define q 2\r
+#define PARAM_q 2\r
 /** 2log of total FFT size */\r
-#define n 4\r
+#define PARAM_n 12\r
+\r
+/* Note that the FFT size on each tile 2^(n-q) must be at least\r
+ * 8 and always a multiple of 4. The number of stages on each \r
+ * tile (n-q) must also be a multiple of 2. */\r
 \r
 /* But don't change these: */\r
 /* Number of tiles */\r
-#define Q (1 << q)\r
+#define PARAM_Q (1 << PARAM_q)\r
 /** Total FFT size */\r
-#define N (1 << n)\r
+#define PARAM_N (1 << PARAM_n)\r
 /** FFT size on each tile */\r
-#define N_t (N / Q)\r
+#define PARAM_N_t (PARAM_N / PARAM_Q)\r
 /** 2log of FFT size on each tile */\r
-#define n_t (n - q)\r
+#define PARAM_n_t (PARAM_n - PARAM_q)\r
 \r
 #ifndef __MONTIUMCC__\r
        void pre_run();\r
@@ -58,7 +61,6 @@
                mem input_a_re, input_a_im, input_b_re, input_b_im, output_a_re, output_a_im, output_b_re, output_b_im, twiddle_re, twiddle_im;\r
        };\r
        \r
-       void init();\r
        INLINE struct bf_out butterfly(struct bf_in in);\r
        void run(void); \r
        \r
        /* Values for the cycle_odd argument */\r
 #define EVEN_CYCLE 0\r
 #define ODD_CYCLE 1\r
+       \r
+enum in_strategy {     \r
+       REGULAR_IN,\r
+       DISTRIBUTED_IN,\r
+};\r
 \r
+enum out_strategy {\r
+       REGULAR_OUT,\r
+       DISTRIBUTED_OUT,\r
+       BITREVERSED_OUT,\r
+};\r
 \r
-       \r
 #endif // !FFT_H_INCLUDED\r