1 #include "libmontiumc.h"
\r
2 #ifndef FFT_H_INCLUDED
\r
3 #define FFT_H_INCLUDED
\r
5 /* Define some parameters for this FFT algorithm. We prefix them
\r
6 * with PARAM_ so we can still use variable names like 'n' :-) */
\r
8 /* 2log of number of tiles */
\r
10 /** 2log of total FFT size */
\r
13 /* Note that the FFT size on each tile 2^(n-q) must be at least 8! */
\r
15 /* But don't change these: */
\r
16 /* Number of tiles */
\r
17 #define PARAM_Q (1 << PARAM_q)
\r
18 /** Total FFT size */
\r
19 #define PARAM_N (1 << PARAM_n)
\r
20 /** FFT size on each tile */
\r
21 #define PARAM_N_t (PARAM_N / PARAM_Q)
\r
22 /** 2log of FFT size on each tile */
\r
23 #define PARAM_n_t (PARAM_n - PARAM_q)
\r
25 #ifndef __MONTIUMCC__
\r
30 * Support structure to store the result of a butterfly.
\r
40 * Support structure to store teh inputs for a butterfly.
\r
52 * A struct to hold all the used memories. We put these in
\r
53 * a struct, so we can store them in a local variable and
\r
54 * pass them around in arguments, so we can change the memories
\r
55 * allocated to each on ever stage (MontiumC doesn't support
\r
56 * reassigning global mem variables).
\r
59 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
62 INLINE struct bf_out butterfly(struct bf_in in);
\r
65 /* Values for the second_half argument */
\r
66 #define FIRST_HALF 0
\r
67 #define SECOND_HALF 1
\r
69 /* Values for the stage_odd argument */
\r
70 #define EVEN_STAGE 0
\r
73 /* Values for the cycle_odd argument */
\r
74 #define EVEN_CYCLE 0
\r
77 #endif // !FFT_H_INCLUDED
\r