* Prefix all algorithm parameters with PARAM_ so we can still use variable
authorunknown <s0042331@.dynamic.ewi.utwente.nl>
Thu, 27 Mar 2008 12:42:04 +0000 (13:42 +0100)
committerunknown <s0042331@.dynamic.ewi.utwente.nl>
Thu, 27 Mar 2008 12:42:04 +0000 (13:42 +0100)
   names such as 'n'.

FFT.h
FFT.mc

diff --git a/FFT.h b/FFT.h
index 07f3948d80f41eca06cb462c7d5c4b050824e448..0b51d26f433abb3936a67bad13dd1254b22642fc 100644 (file)
--- a/FFT.h
+++ b/FFT.h
@@ -5,21 +5,23 @@
 #define BIT_SIZE 3\r
 #define SIZE (1<<BIT_SIZE)\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
 /* Change these: */\r
 /* 2log of number of tiles */\r
-#define q 2\r
+#define PARAM_q 2\r
 /** 2log of total FFT size */\r
 /** 2log of total FFT size */\r
-#define n 4\r
+#define PARAM_n 4\r
 \r
 /* But don't change these: */\r
 /* Number of tiles */\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
 /** Total FFT size */\r
-#define N (1 << n)\r
+#define PARAM_N (1 << PARAM_n)\r
 /** FFT size on each tile */\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
 /** 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
 \r
 #ifndef __MONTIUMCC__\r
        void pre_run();\r
diff --git a/FFT.mc b/FFT.mc
index 6df71adcf9574508b3254204185c092ce8e12746..330b7f5be67632df7d362477e7651dc8492ac31c 100644 (file)
--- a/FFT.mc
+++ b/FFT.mc
@@ -179,7 +179,7 @@ INLINE void do_half_regular_stage(struct mems m, bool stage_odd, bool second_hal
        /* Now, do a single stage. That means N_t / 2 cycles. Since we do 2\r
         * cycles on every iteration, plus one before and after the loop,\r
         * we will loop N_t / 4 - 1 times. */\r
        /* Now, do a single stage. That means N_t / 2 cycles. Since we do 2\r
         * cycles on every iteration, plus one before and after the loop,\r
         * we will loop N_t / 4 - 1 times. */\r
-       init_loop(LC2, (N_t / 4) - 1);\r
+       init_loop(LC2, (PARAM_N_t / 4) - 1);\r
        do {\r
                /* Write outputs of previous cycle */\r
                write_output_regular(m, out, second_half);\r
        do {\r
                /* Write outputs of previous cycle */\r
                write_output_regular(m, out, second_half);\r