Initial import.
[Faustine.git] / dsp_files / fft.23.tmp.dsp
1 import ( "math.lib" ) ;
2 import ( "complex.lib" ) ;
3
4 concats = case {
5 (1) => _, 1 : vectorize ;
6 (m) => concats(m - 1), ( _, 1 : vectorize) : #;
7 };
8
9 subvect_even(n) = par(i, (n/2), (_, (i, 2 : *) : [])) : concats(n/2);
10 subvect_odd(n) = par(i, (n/2), (_, (i, 2 : * : _, 1 : +) : [])) : concats(n/2);
11
12 //evens = case {
13 // (2) => _,! ;
14 // (n) => _,!,evens(n - 2);
15 //};
16
17 //subvect_even(n) = _ <: evens(n);
18
19 //odds = case {
20 // (0) => [1] : vectorize(1);
21 // (n) => odds(n - 2) # ( [n - 1] : vectorize(1));
22
23 //};
24
25
26 //subvect_odd(n) = _ <: odds(n);
27
28 eo(n) = _ <: subvect_even(n), subvect_odd(n);
29
30 output = serialize, serialize : vectorize(1), vectorize(1) : #;
31
32 //process = (1,2,3,4,5,6,7,8) : evens(8);
33
34 process = _ : eo(8);