1 /*
2 * Copyright (c) 1997-1999, 2003 Massachusetts Institute of Technology
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 */
19
20 /* This file was automatically generated --- DO NOT EDIT */
21 /* Generated on Mon Mar 24 02:07:38 EST 2003 */
22
23 #include "fftw-int.h"
24 #include "fftw.h"
25
26 /* Generated by: /homee/stevenj/cvs/fftw/gensrc/genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -twiddle 8 */
27
28 /*
29 * This function contains 66 FP additions, 32 FP multiplications,
30 * (or, 52 additions, 18 multiplications, 14 fused multiply/add),
31 * 28 stack variables, and 32 memory accesses
32 */
33 static const fftw_real K707106781 =
34 FFTW_KONST(+0.707106781186547524400844362104849039284835938);
35
36 /*
37 * Generator Id's :
38 * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $
39 * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $
40 * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $
41 */
42
fftw_twiddle_8(fftw_complex * A,const fftw_complex * W,int iostride,int m,int dist)43 void fftw_twiddle_8(fftw_complex *A, const fftw_complex *W, int iostride,
44 int m, int dist)
45 {
46 int i;
47 fftw_complex *inout;
48 inout = A;
49 for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 7) {
50 fftw_real tmp7;
51 fftw_real tmp43;
52 fftw_real tmp71;
53 fftw_real tmp76;
54 fftw_real tmp41;
55 fftw_real tmp53;
56 fftw_real tmp56;
57 fftw_real tmp65;
58 fftw_real tmp18;
59 fftw_real tmp77;
60 fftw_real tmp46;
61 fftw_real tmp68;
62 fftw_real tmp30;
63 fftw_real tmp48;
64 fftw_real tmp51;
65 fftw_real tmp64;
66 ASSERT_ALIGNED_DOUBLE;
67 {
68 fftw_real tmp1;
69 fftw_real tmp70;
70 fftw_real tmp6;
71 fftw_real tmp69;
72 ASSERT_ALIGNED_DOUBLE;
73 tmp1 = c_re(inout[0]);
74 tmp70 = c_im(inout[0]);
75 {
76 fftw_real tmp3;
77 fftw_real tmp5;
78 fftw_real tmp2;
79 fftw_real tmp4;
80 ASSERT_ALIGNED_DOUBLE;
81 tmp3 = c_re(inout[4 * iostride]);
82 tmp5 = c_im(inout[4 * iostride]);
83 tmp2 = c_re(W[3]);
84 tmp4 = c_im(W[3]);
85 tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5);
86 tmp69 = (tmp4 * tmp3) + (tmp2 * tmp5);
87 }
88 tmp7 = tmp1 + tmp6;
89 tmp43 = tmp1 - tmp6;
90 tmp71 = tmp69 + tmp70;
91 tmp76 = tmp70 - tmp69;
92 }
93 {
94 fftw_real tmp35;
95 fftw_real tmp54;
96 fftw_real tmp40;
97 fftw_real tmp55;
98 ASSERT_ALIGNED_DOUBLE;
99 {
100 fftw_real tmp32;
101 fftw_real tmp34;
102 fftw_real tmp31;
103 fftw_real tmp33;
104 ASSERT_ALIGNED_DOUBLE;
105 tmp32 = c_re(inout[7 * iostride]);
106 tmp34 = c_im(inout[7 * iostride]);
107 tmp31 = c_re(W[6]);
108 tmp33 = c_im(W[6]);
109 tmp35 = (tmp31 * tmp32) - (tmp33 * tmp34);
110 tmp54 = (tmp33 * tmp32) + (tmp31 * tmp34);
111 }
112 {
113 fftw_real tmp37;
114 fftw_real tmp39;
115 fftw_real tmp36;
116 fftw_real tmp38;
117 ASSERT_ALIGNED_DOUBLE;
118 tmp37 = c_re(inout[3 * iostride]);
119 tmp39 = c_im(inout[3 * iostride]);
120 tmp36 = c_re(W[2]);
121 tmp38 = c_im(W[2]);
122 tmp40 = (tmp36 * tmp37) - (tmp38 * tmp39);
123 tmp55 = (tmp38 * tmp37) + (tmp36 * tmp39);
124 }
125 tmp41 = tmp35 + tmp40;
126 tmp53 = tmp35 - tmp40;
127 tmp56 = tmp54 - tmp55;
128 tmp65 = tmp54 + tmp55;
129 }
130 {
131 fftw_real tmp12;
132 fftw_real tmp44;
133 fftw_real tmp17;
134 fftw_real tmp45;
135 ASSERT_ALIGNED_DOUBLE;
136 {
137 fftw_real tmp9;
138 fftw_real tmp11;
139 fftw_real tmp8;
140 fftw_real tmp10;
141 ASSERT_ALIGNED_DOUBLE;
142 tmp9 = c_re(inout[2 * iostride]);
143 tmp11 = c_im(inout[2 * iostride]);
144 tmp8 = c_re(W[1]);
145 tmp10 = c_im(W[1]);
146 tmp12 = (tmp8 * tmp9) - (tmp10 * tmp11);
147 tmp44 = (tmp10 * tmp9) + (tmp8 * tmp11);
148 }
149 {
150 fftw_real tmp14;
151 fftw_real tmp16;
152 fftw_real tmp13;
153 fftw_real tmp15;
154 ASSERT_ALIGNED_DOUBLE;
155 tmp14 = c_re(inout[6 * iostride]);
156 tmp16 = c_im(inout[6 * iostride]);
157 tmp13 = c_re(W[5]);
158 tmp15 = c_im(W[5]);
159 tmp17 = (tmp13 * tmp14) - (tmp15 * tmp16);
160 tmp45 = (tmp15 * tmp14) + (tmp13 * tmp16);
161 }
162 tmp18 = tmp12 + tmp17;
163 tmp77 = tmp12 - tmp17;
164 tmp46 = tmp44 - tmp45;
165 tmp68 = tmp44 + tmp45;
166 }
167 {
168 fftw_real tmp24;
169 fftw_real tmp49;
170 fftw_real tmp29;
171 fftw_real tmp50;
172 ASSERT_ALIGNED_DOUBLE;
173 {
174 fftw_real tmp21;
175 fftw_real tmp23;
176 fftw_real tmp20;
177 fftw_real tmp22;
178 ASSERT_ALIGNED_DOUBLE;
179 tmp21 = c_re(inout[iostride]);
180 tmp23 = c_im(inout[iostride]);
181 tmp20 = c_re(W[0]);
182 tmp22 = c_im(W[0]);
183 tmp24 = (tmp20 * tmp21) - (tmp22 * tmp23);
184 tmp49 = (tmp22 * tmp21) + (tmp20 * tmp23);
185 }
186 {
187 fftw_real tmp26;
188 fftw_real tmp28;
189 fftw_real tmp25;
190 fftw_real tmp27;
191 ASSERT_ALIGNED_DOUBLE;
192 tmp26 = c_re(inout[5 * iostride]);
193 tmp28 = c_im(inout[5 * iostride]);
194 tmp25 = c_re(W[4]);
195 tmp27 = c_im(W[4]);
196 tmp29 = (tmp25 * tmp26) - (tmp27 * tmp28);
197 tmp50 = (tmp27 * tmp26) + (tmp25 * tmp28);
198 }
199 tmp30 = tmp24 + tmp29;
200 tmp48 = tmp24 - tmp29;
201 tmp51 = tmp49 - tmp50;
202 tmp64 = tmp49 + tmp50;
203 }
204 {
205 fftw_real tmp19;
206 fftw_real tmp42;
207 fftw_real tmp63;
208 fftw_real tmp66;
209 ASSERT_ALIGNED_DOUBLE;
210 tmp19 = tmp7 + tmp18;
211 tmp42 = tmp30 + tmp41;
212 c_re(inout[4 * iostride]) = tmp19 - tmp42;
213 c_re(inout[0]) = tmp19 + tmp42;
214 {
215 fftw_real tmp73;
216 fftw_real tmp74;
217 fftw_real tmp67;
218 fftw_real tmp72;
219 ASSERT_ALIGNED_DOUBLE;
220 tmp73 = tmp41 - tmp30;
221 tmp74 = tmp71 - tmp68;
222 c_im(inout[2 * iostride]) = tmp73 + tmp74;
223 c_im(inout[6 * iostride]) = tmp74 - tmp73;
224 tmp67 = tmp64 + tmp65;
225 tmp72 = tmp68 + tmp71;
226 c_im(inout[0]) = tmp67 + tmp72;
227 c_im(inout[4 * iostride]) = tmp72 - tmp67;
228 }
229 tmp63 = tmp7 - tmp18;
230 tmp66 = tmp64 - tmp65;
231 c_re(inout[6 * iostride]) = tmp63 - tmp66;
232 c_re(inout[2 * iostride]) = tmp63 + tmp66;
233 {
234 fftw_real tmp59;
235 fftw_real tmp78;
236 fftw_real tmp62;
237 fftw_real tmp75;
238 fftw_real tmp60;
239 fftw_real tmp61;
240 ASSERT_ALIGNED_DOUBLE;
241 tmp59 = tmp43 - tmp46;
242 tmp78 = tmp76 - tmp77;
243 tmp60 = tmp51 - tmp48;
244 tmp61 = tmp53 + tmp56;
245 tmp62 = K707106781 * (tmp60 - tmp61);
246 tmp75 = K707106781 * (tmp60 + tmp61);
247 c_re(inout[7 * iostride]) = tmp59 - tmp62;
248 c_re(inout[3 * iostride]) = tmp59 + tmp62;
249 c_im(inout[iostride]) = tmp75 + tmp78;
250 c_im(inout[5 * iostride]) = tmp78 - tmp75;
251 }
252 {
253 fftw_real tmp47;
254 fftw_real tmp80;
255 fftw_real tmp58;
256 fftw_real tmp79;
257 fftw_real tmp52;
258 fftw_real tmp57;
259 ASSERT_ALIGNED_DOUBLE;
260 tmp47 = tmp43 + tmp46;
261 tmp80 = tmp77 + tmp76;
262 tmp52 = tmp48 + tmp51;
263 tmp57 = tmp53 - tmp56;
264 tmp58 = K707106781 * (tmp52 + tmp57);
265 tmp79 = K707106781 * (tmp57 - tmp52);
266 c_re(inout[5 * iostride]) = tmp47 - tmp58;
267 c_re(inout[iostride]) = tmp47 + tmp58;
268 c_im(inout[3 * iostride]) = tmp79 + tmp80;
269 c_im(inout[7 * iostride]) = tmp80 - tmp79;
270 }
271 }
272 }
273 }
274
275 static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7 };
276 fftw_codelet_desc fftw_twiddle_8_desc = {
277 "fftw_twiddle_8",
278 (void (*)()) fftw_twiddle_8,
279 8,
280 FFTW_FORWARD,
281 FFTW_TWIDDLE,
282 176,
283 7,
284 twiddle_order,
285 };
286