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:08:32 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 -twiddleinv 9 */
27
28 /*
29 * This function contains 96 FP additions, 72 FP multiplications,
30 * (or, 60 additions, 36 multiplications, 36 fused multiply/add),
31 * 34 stack variables, and 36 memory accesses
32 */
33 static const fftw_real K642787609 =
34 FFTW_KONST(+0.642787609686539326322643409907263432907559884);
35 static const fftw_real K766044443 =
36 FFTW_KONST(+0.766044443118978035202392650555416673935832457);
37 static const fftw_real K939692620 =
38 FFTW_KONST(+0.939692620785908384054109277324731469936208134);
39 static const fftw_real K342020143 =
40 FFTW_KONST(+0.342020143325668733044099614682259580763083368);
41 static const fftw_real K984807753 =
42 FFTW_KONST(+0.984807753012208059366743024589523013670643252);
43 static const fftw_real K173648177 =
44 FFTW_KONST(+0.173648177666930348851716626769314796000375677);
45 static const fftw_real K500000000 =
46 FFTW_KONST(+0.500000000000000000000000000000000000000000000);
47 static const fftw_real K866025403 =
48 FFTW_KONST(+0.866025403784438646763723170752936183471402627);
49
50 /*
51 * Generator Id's :
52 * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $
53 * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $
54 * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $
55 */
56
fftwi_twiddle_9(fftw_complex * A,const fftw_complex * W,int iostride,int m,int dist)57 void fftwi_twiddle_9(fftw_complex *A, const fftw_complex *W, int iostride,
58 int m, int dist)
59 {
60 int i;
61 fftw_complex *inout;
62 inout = A;
63 for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 8) {
64 fftw_real tmp1;
65 fftw_real tmp99;
66 fftw_real tmp64;
67 fftw_real tmp98;
68 fftw_real tmp105;
69 fftw_real tmp104;
70 fftw_real tmp12;
71 fftw_real tmp61;
72 fftw_real tmp47;
73 fftw_real tmp78;
74 fftw_real tmp89;
75 fftw_real tmp54;
76 fftw_real tmp75;
77 fftw_real tmp90;
78 fftw_real tmp30;
79 fftw_real tmp68;
80 fftw_real tmp86;
81 fftw_real tmp59;
82 fftw_real tmp71;
83 fftw_real tmp87;
84 ASSERT_ALIGNED_DOUBLE;
85 {
86 fftw_real tmp6;
87 fftw_real tmp63;
88 fftw_real tmp11;
89 fftw_real tmp62;
90 ASSERT_ALIGNED_DOUBLE;
91 tmp1 = c_re(inout[0]);
92 tmp99 = c_im(inout[0]);
93 {
94 fftw_real tmp3;
95 fftw_real tmp5;
96 fftw_real tmp2;
97 fftw_real tmp4;
98 ASSERT_ALIGNED_DOUBLE;
99 tmp3 = c_re(inout[3 * iostride]);
100 tmp5 = c_im(inout[3 * iostride]);
101 tmp2 = c_re(W[2]);
102 tmp4 = c_im(W[2]);
103 tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5);
104 tmp63 = (tmp2 * tmp5) - (tmp4 * tmp3);
105 }
106 {
107 fftw_real tmp8;
108 fftw_real tmp10;
109 fftw_real tmp7;
110 fftw_real tmp9;
111 ASSERT_ALIGNED_DOUBLE;
112 tmp8 = c_re(inout[6 * iostride]);
113 tmp10 = c_im(inout[6 * iostride]);
114 tmp7 = c_re(W[5]);
115 tmp9 = c_im(W[5]);
116 tmp11 = (tmp7 * tmp8) + (tmp9 * tmp10);
117 tmp62 = (tmp7 * tmp10) - (tmp9 * tmp8);
118 }
119 tmp64 = K866025403 * (tmp62 - tmp63);
120 tmp98 = tmp63 + tmp62;
121 tmp105 = tmp99 - (K500000000 * tmp98);
122 tmp104 = K866025403 * (tmp6 - tmp11);
123 tmp12 = tmp6 + tmp11;
124 tmp61 = tmp1 - (K500000000 * tmp12);
125 }
126 {
127 fftw_real tmp35;
128 fftw_real tmp50;
129 fftw_real tmp40;
130 fftw_real tmp51;
131 fftw_real tmp45;
132 fftw_real tmp52;
133 fftw_real tmp46;
134 fftw_real tmp53;
135 ASSERT_ALIGNED_DOUBLE;
136 {
137 fftw_real tmp32;
138 fftw_real tmp34;
139 fftw_real tmp31;
140 fftw_real tmp33;
141 ASSERT_ALIGNED_DOUBLE;
142 tmp32 = c_re(inout[2 * iostride]);
143 tmp34 = c_im(inout[2 * iostride]);
144 tmp31 = c_re(W[1]);
145 tmp33 = c_im(W[1]);
146 tmp35 = (tmp31 * tmp32) + (tmp33 * tmp34);
147 tmp50 = (tmp31 * tmp34) - (tmp33 * tmp32);
148 }
149 {
150 fftw_real tmp37;
151 fftw_real tmp39;
152 fftw_real tmp36;
153 fftw_real tmp38;
154 ASSERT_ALIGNED_DOUBLE;
155 tmp37 = c_re(inout[5 * iostride]);
156 tmp39 = c_im(inout[5 * iostride]);
157 tmp36 = c_re(W[4]);
158 tmp38 = c_im(W[4]);
159 tmp40 = (tmp36 * tmp37) + (tmp38 * tmp39);
160 tmp51 = (tmp36 * tmp39) - (tmp38 * tmp37);
161 }
162 {
163 fftw_real tmp42;
164 fftw_real tmp44;
165 fftw_real tmp41;
166 fftw_real tmp43;
167 ASSERT_ALIGNED_DOUBLE;
168 tmp42 = c_re(inout[8 * iostride]);
169 tmp44 = c_im(inout[8 * iostride]);
170 tmp41 = c_re(W[7]);
171 tmp43 = c_im(W[7]);
172 tmp45 = (tmp41 * tmp42) + (tmp43 * tmp44);
173 tmp52 = (tmp41 * tmp44) - (tmp43 * tmp42);
174 }
175 tmp46 = tmp40 + tmp45;
176 tmp53 = tmp51 + tmp52;
177 {
178 fftw_real tmp76;
179 fftw_real tmp77;
180 fftw_real tmp73;
181 fftw_real tmp74;
182 ASSERT_ALIGNED_DOUBLE;
183 tmp47 = tmp35 + tmp46;
184 tmp76 = tmp35 - (K500000000 * tmp46);
185 tmp77 = K866025403 * (tmp52 - tmp51);
186 tmp78 = tmp76 - tmp77;
187 tmp89 = tmp76 + tmp77;
188 tmp54 = tmp50 + tmp53;
189 tmp73 = tmp50 - (K500000000 * tmp53);
190 tmp74 = K866025403 * (tmp40 - tmp45);
191 tmp75 = tmp73 - tmp74;
192 tmp90 = tmp74 + tmp73;
193 }
194 }
195 {
196 fftw_real tmp18;
197 fftw_real tmp55;
198 fftw_real tmp23;
199 fftw_real tmp56;
200 fftw_real tmp28;
201 fftw_real tmp57;
202 fftw_real tmp29;
203 fftw_real tmp58;
204 ASSERT_ALIGNED_DOUBLE;
205 {
206 fftw_real tmp15;
207 fftw_real tmp17;
208 fftw_real tmp14;
209 fftw_real tmp16;
210 ASSERT_ALIGNED_DOUBLE;
211 tmp15 = c_re(inout[iostride]);
212 tmp17 = c_im(inout[iostride]);
213 tmp14 = c_re(W[0]);
214 tmp16 = c_im(W[0]);
215 tmp18 = (tmp14 * tmp15) + (tmp16 * tmp17);
216 tmp55 = (tmp14 * tmp17) - (tmp16 * tmp15);
217 }
218 {
219 fftw_real tmp20;
220 fftw_real tmp22;
221 fftw_real tmp19;
222 fftw_real tmp21;
223 ASSERT_ALIGNED_DOUBLE;
224 tmp20 = c_re(inout[4 * iostride]);
225 tmp22 = c_im(inout[4 * iostride]);
226 tmp19 = c_re(W[3]);
227 tmp21 = c_im(W[3]);
228 tmp23 = (tmp19 * tmp20) + (tmp21 * tmp22);
229 tmp56 = (tmp19 * tmp22) - (tmp21 * tmp20);
230 }
231 {
232 fftw_real tmp25;
233 fftw_real tmp27;
234 fftw_real tmp24;
235 fftw_real tmp26;
236 ASSERT_ALIGNED_DOUBLE;
237 tmp25 = c_re(inout[7 * iostride]);
238 tmp27 = c_im(inout[7 * iostride]);
239 tmp24 = c_re(W[6]);
240 tmp26 = c_im(W[6]);
241 tmp28 = (tmp24 * tmp25) + (tmp26 * tmp27);
242 tmp57 = (tmp24 * tmp27) - (tmp26 * tmp25);
243 }
244 tmp29 = tmp23 + tmp28;
245 tmp58 = tmp56 + tmp57;
246 {
247 fftw_real tmp66;
248 fftw_real tmp67;
249 fftw_real tmp69;
250 fftw_real tmp70;
251 ASSERT_ALIGNED_DOUBLE;
252 tmp30 = tmp18 + tmp29;
253 tmp66 = tmp18 - (K500000000 * tmp29);
254 tmp67 = K866025403 * (tmp57 - tmp56);
255 tmp68 = tmp66 - tmp67;
256 tmp86 = tmp66 + tmp67;
257 tmp59 = tmp55 + tmp58;
258 tmp69 = tmp55 - (K500000000 * tmp58);
259 tmp70 = K866025403 * (tmp23 - tmp28);
260 tmp71 = tmp69 - tmp70;
261 tmp87 = tmp70 + tmp69;
262 }
263 }
264 {
265 fftw_real tmp60;
266 fftw_real tmp13;
267 fftw_real tmp48;
268 fftw_real tmp49;
269 ASSERT_ALIGNED_DOUBLE;
270 tmp60 = K866025403 * (tmp54 - tmp59);
271 tmp13 = tmp1 + tmp12;
272 tmp48 = tmp30 + tmp47;
273 tmp49 = tmp13 - (K500000000 * tmp48);
274 c_re(inout[0]) = tmp13 + tmp48;
275 c_re(inout[3 * iostride]) = tmp49 + tmp60;
276 c_re(inout[6 * iostride]) = tmp49 - tmp60;
277 }
278 {
279 fftw_real tmp101;
280 fftw_real tmp97;
281 fftw_real tmp100;
282 fftw_real tmp102;
283 ASSERT_ALIGNED_DOUBLE;
284 tmp101 = K866025403 * (tmp30 - tmp47);
285 tmp97 = tmp59 + tmp54;
286 tmp100 = tmp98 + tmp99;
287 tmp102 = tmp100 - (K500000000 * tmp97);
288 c_im(inout[0]) = tmp97 + tmp100;
289 c_im(inout[6 * iostride]) = tmp102 - tmp101;
290 c_im(inout[3 * iostride]) = tmp101 + tmp102;
291 }
292 {
293 fftw_real tmp65;
294 fftw_real tmp110;
295 fftw_real tmp80;
296 fftw_real tmp111;
297 fftw_real tmp84;
298 fftw_real tmp109;
299 fftw_real tmp81;
300 fftw_real tmp112;
301 ASSERT_ALIGNED_DOUBLE;
302 tmp65 = tmp61 - tmp64;
303 tmp110 = tmp105 - tmp104;
304 {
305 fftw_real tmp72;
306 fftw_real tmp79;
307 fftw_real tmp82;
308 fftw_real tmp83;
309 ASSERT_ALIGNED_DOUBLE;
310 tmp72 = (K173648177 * tmp68) - (K984807753 * tmp71);
311 tmp79 = (K342020143 * tmp75) + (K939692620 * tmp78);
312 tmp80 = tmp72 - tmp79;
313 tmp111 = K866025403 * (tmp72 + tmp79);
314 tmp82 = (K342020143 * tmp78) - (K939692620 * tmp75);
315 tmp83 = (K173648177 * tmp71) + (K984807753 * tmp68);
316 tmp84 = K866025403 * (tmp82 - tmp83);
317 tmp109 = tmp83 + tmp82;
318 }
319 c_re(inout[2 * iostride]) = tmp65 + tmp80;
320 tmp81 = tmp65 - (K500000000 * tmp80);
321 c_re(inout[8 * iostride]) = tmp81 - tmp84;
322 c_re(inout[5 * iostride]) = tmp81 + tmp84;
323 c_im(inout[2 * iostride]) = tmp109 + tmp110;
324 tmp112 = tmp110 - (K500000000 * tmp109);
325 c_im(inout[5 * iostride]) = tmp111 + tmp112;
326 c_im(inout[8 * iostride]) = tmp112 - tmp111;
327 }
328 {
329 fftw_real tmp85;
330 fftw_real tmp106;
331 fftw_real tmp92;
332 fftw_real tmp107;
333 fftw_real tmp96;
334 fftw_real tmp103;
335 fftw_real tmp93;
336 fftw_real tmp108;
337 ASSERT_ALIGNED_DOUBLE;
338 tmp85 = tmp61 + tmp64;
339 tmp106 = tmp104 + tmp105;
340 {
341 fftw_real tmp88;
342 fftw_real tmp91;
343 fftw_real tmp94;
344 fftw_real tmp95;
345 ASSERT_ALIGNED_DOUBLE;
346 tmp88 = (K766044443 * tmp86) - (K642787609 * tmp87);
347 tmp91 = (K173648177 * tmp89) - (K984807753 * tmp90);
348 tmp92 = tmp88 + tmp91;
349 tmp107 = K866025403 * (tmp88 - tmp91);
350 tmp94 = (K173648177 * tmp90) + (K984807753 * tmp89);
351 tmp95 = (K766044443 * tmp87) + (K642787609 * tmp86);
352 tmp96 = K866025403 * (tmp94 - tmp95);
353 tmp103 = tmp95 + tmp94;
354 }
355 c_re(inout[iostride]) = tmp85 + tmp92;
356 tmp93 = tmp85 - (K500000000 * tmp92);
357 c_re(inout[7 * iostride]) = tmp93 - tmp96;
358 c_re(inout[4 * iostride]) = tmp93 + tmp96;
359 c_im(inout[iostride]) = tmp103 + tmp106;
360 tmp108 = tmp106 - (K500000000 * tmp103);
361 c_im(inout[4 * iostride]) = tmp107 + tmp108;
362 c_im(inout[7 * iostride]) = tmp108 - tmp107;
363 }
364 }
365 }
366
367 static const int twiddle_order[] = { 1, 2, 3, 4, 5, 6, 7, 8 };
368 fftw_codelet_desc fftwi_twiddle_9_desc = {
369 "fftwi_twiddle_9",
370 (void (*)()) fftwi_twiddle_9,
371 9,
372 FFTW_BACKWARD,
373 FFTW_TWIDDLE,
374 209,
375 8,
376 twiddle_order,
377 };
378