Bsoft  1.9
Bernard's software package
ftw_16.c
Go to the documentation of this file.
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:43 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 16 */
27 
28 /*
29  * This function contains 174 FP additions, 84 FP multiplications,
30  * (or, 136 additions, 46 multiplications, 38 fused multiply/add),
31  * 50 stack variables, and 64 memory accesses
32  */
33 static const fftw_real K382683432 =
34 FFTW_KONST(+0.382683432365089771728459984030398866761344562);
35 static const fftw_real K923879532 =
36 FFTW_KONST(+0.923879532511286756128183189396788286822416626);
37 static const fftw_real K707106781 =
38 FFTW_KONST(+0.707106781186547524400844362104849039284835938);
39 
40 /*
41  * Generator Id's :
42  * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $
43  * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $
44  * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $
45  */
46 
47 void fftw_twiddle_16(fftw_complex *A, const fftw_complex *W, int iostride,
48  int m, int dist)
49 {
50  int i;
51  fftw_complex *inout;
52  inout = A;
53  for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 15) {
54  fftw_real tmp7;
55  fftw_real tmp91;
56  fftw_real tmp180;
57  fftw_real tmp193;
58  fftw_real tmp18;
59  fftw_real tmp194;
60  fftw_real tmp94;
61  fftw_real tmp177;
62  fftw_real tmp77;
63  fftw_real tmp88;
64  fftw_real tmp161;
65  fftw_real tmp128;
66  fftw_real tmp144;
67  fftw_real tmp162;
68  fftw_real tmp163;
69  fftw_real tmp164;
70  fftw_real tmp123;
71  fftw_real tmp143;
72  fftw_real tmp30;
73  fftw_real tmp152;
74  fftw_real tmp100;
75  fftw_real tmp136;
76  fftw_real tmp41;
77  fftw_real tmp153;
78  fftw_real tmp105;
79  fftw_real tmp137;
80  fftw_real tmp54;
81  fftw_real tmp65;
82  fftw_real tmp156;
83  fftw_real tmp117;
84  fftw_real tmp141;
85  fftw_real tmp157;
86  fftw_real tmp158;
87  fftw_real tmp159;
88  fftw_real tmp112;
89  fftw_real tmp140;
91  {
92  fftw_real tmp1;
93  fftw_real tmp179;
94  fftw_real tmp6;
95  fftw_real tmp178;
97  tmp1 = c_re(inout[0]);
98  tmp179 = c_im(inout[0]);
99  {
100  fftw_real tmp3;
101  fftw_real tmp5;
102  fftw_real tmp2;
103  fftw_real tmp4;
105  tmp3 = c_re(inout[8 * iostride]);
106  tmp5 = c_im(inout[8 * iostride]);
107  tmp2 = c_re(W[7]);
108  tmp4 = c_im(W[7]);
109  tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5);
110  tmp178 = (tmp4 * tmp3) + (tmp2 * tmp5);
111  }
112  tmp7 = tmp1 + tmp6;
113  tmp91 = tmp1 - tmp6;
114  tmp180 = tmp178 + tmp179;
115  tmp193 = tmp179 - tmp178;
116  }
117  {
118  fftw_real tmp12;
119  fftw_real tmp92;
120  fftw_real tmp17;
121  fftw_real tmp93;
123  {
124  fftw_real tmp9;
125  fftw_real tmp11;
126  fftw_real tmp8;
127  fftw_real tmp10;
129  tmp9 = c_re(inout[4 * iostride]);
130  tmp11 = c_im(inout[4 * iostride]);
131  tmp8 = c_re(W[3]);
132  tmp10 = c_im(W[3]);
133  tmp12 = (tmp8 * tmp9) - (tmp10 * tmp11);
134  tmp92 = (tmp10 * tmp9) + (tmp8 * tmp11);
135  }
136  {
137  fftw_real tmp14;
138  fftw_real tmp16;
139  fftw_real tmp13;
140  fftw_real tmp15;
142  tmp14 = c_re(inout[12 * iostride]);
143  tmp16 = c_im(inout[12 * iostride]);
144  tmp13 = c_re(W[11]);
145  tmp15 = c_im(W[11]);
146  tmp17 = (tmp13 * tmp14) - (tmp15 * tmp16);
147  tmp93 = (tmp15 * tmp14) + (tmp13 * tmp16);
148  }
149  tmp18 = tmp12 + tmp17;
150  tmp194 = tmp12 - tmp17;
151  tmp94 = tmp92 - tmp93;
152  tmp177 = tmp92 + tmp93;
153  }
154  {
155  fftw_real tmp71;
156  fftw_real tmp124;
157  fftw_real tmp87;
158  fftw_real tmp121;
159  fftw_real tmp76;
160  fftw_real tmp125;
161  fftw_real tmp82;
162  fftw_real tmp120;
164  {
165  fftw_real tmp68;
166  fftw_real tmp70;
167  fftw_real tmp67;
168  fftw_real tmp69;
170  tmp68 = c_re(inout[15 * iostride]);
171  tmp70 = c_im(inout[15 * iostride]);
172  tmp67 = c_re(W[14]);
173  tmp69 = c_im(W[14]);
174  tmp71 = (tmp67 * tmp68) - (tmp69 * tmp70);
175  tmp124 = (tmp69 * tmp68) + (tmp67 * tmp70);
176  }
177  {
178  fftw_real tmp84;
179  fftw_real tmp86;
180  fftw_real tmp83;
181  fftw_real tmp85;
183  tmp84 = c_re(inout[11 * iostride]);
184  tmp86 = c_im(inout[11 * iostride]);
185  tmp83 = c_re(W[10]);
186  tmp85 = c_im(W[10]);
187  tmp87 = (tmp83 * tmp84) - (tmp85 * tmp86);
188  tmp121 = (tmp85 * tmp84) + (tmp83 * tmp86);
189  }
190  {
191  fftw_real tmp73;
192  fftw_real tmp75;
193  fftw_real tmp72;
194  fftw_real tmp74;
196  tmp73 = c_re(inout[7 * iostride]);
197  tmp75 = c_im(inout[7 * iostride]);
198  tmp72 = c_re(W[6]);
199  tmp74 = c_im(W[6]);
200  tmp76 = (tmp72 * tmp73) - (tmp74 * tmp75);
201  tmp125 = (tmp74 * tmp73) + (tmp72 * tmp75);
202  }
203  {
204  fftw_real tmp79;
205  fftw_real tmp81;
206  fftw_real tmp78;
207  fftw_real tmp80;
209  tmp79 = c_re(inout[3 * iostride]);
210  tmp81 = c_im(inout[3 * iostride]);
211  tmp78 = c_re(W[2]);
212  tmp80 = c_im(W[2]);
213  tmp82 = (tmp78 * tmp79) - (tmp80 * tmp81);
214  tmp120 = (tmp80 * tmp79) + (tmp78 * tmp81);
215  }
216  {
217  fftw_real tmp126;
218  fftw_real tmp127;
219  fftw_real tmp119;
220  fftw_real tmp122;
222  tmp77 = tmp71 + tmp76;
223  tmp88 = tmp82 + tmp87;
224  tmp161 = tmp77 - tmp88;
225  tmp126 = tmp124 - tmp125;
226  tmp127 = tmp82 - tmp87;
227  tmp128 = tmp126 + tmp127;
228  tmp144 = tmp126 - tmp127;
229  tmp162 = tmp124 + tmp125;
230  tmp163 = tmp120 + tmp121;
231  tmp164 = tmp162 - tmp163;
232  tmp119 = tmp71 - tmp76;
233  tmp122 = tmp120 - tmp121;
234  tmp123 = tmp119 - tmp122;
235  tmp143 = tmp119 + tmp122;
236  }
237  }
238  {
239  fftw_real tmp24;
240  fftw_real tmp96;
241  fftw_real tmp29;
242  fftw_real tmp97;
243  fftw_real tmp98;
244  fftw_real tmp99;
246  {
247  fftw_real tmp21;
248  fftw_real tmp23;
249  fftw_real tmp20;
250  fftw_real tmp22;
252  tmp21 = c_re(inout[2 * iostride]);
253  tmp23 = c_im(inout[2 * iostride]);
254  tmp20 = c_re(W[1]);
255  tmp22 = c_im(W[1]);
256  tmp24 = (tmp20 * tmp21) - (tmp22 * tmp23);
257  tmp96 = (tmp22 * tmp21) + (tmp20 * tmp23);
258  }
259  {
260  fftw_real tmp26;
261  fftw_real tmp28;
262  fftw_real tmp25;
263  fftw_real tmp27;
265  tmp26 = c_re(inout[10 * iostride]);
266  tmp28 = c_im(inout[10 * iostride]);
267  tmp25 = c_re(W[9]);
268  tmp27 = c_im(W[9]);
269  tmp29 = (tmp25 * tmp26) - (tmp27 * tmp28);
270  tmp97 = (tmp27 * tmp26) + (tmp25 * tmp28);
271  }
272  tmp30 = tmp24 + tmp29;
273  tmp152 = tmp96 + tmp97;
274  tmp98 = tmp96 - tmp97;
275  tmp99 = tmp24 - tmp29;
276  tmp100 = tmp98 - tmp99;
277  tmp136 = tmp99 + tmp98;
278  }
279  {
280  fftw_real tmp35;
281  fftw_real tmp102;
282  fftw_real tmp40;
283  fftw_real tmp103;
284  fftw_real tmp101;
285  fftw_real tmp104;
287  {
288  fftw_real tmp32;
289  fftw_real tmp34;
290  fftw_real tmp31;
291  fftw_real tmp33;
293  tmp32 = c_re(inout[14 * iostride]);
294  tmp34 = c_im(inout[14 * iostride]);
295  tmp31 = c_re(W[13]);
296  tmp33 = c_im(W[13]);
297  tmp35 = (tmp31 * tmp32) - (tmp33 * tmp34);
298  tmp102 = (tmp33 * tmp32) + (tmp31 * tmp34);
299  }
300  {
301  fftw_real tmp37;
302  fftw_real tmp39;
303  fftw_real tmp36;
304  fftw_real tmp38;
306  tmp37 = c_re(inout[6 * iostride]);
307  tmp39 = c_im(inout[6 * iostride]);
308  tmp36 = c_re(W[5]);
309  tmp38 = c_im(W[5]);
310  tmp40 = (tmp36 * tmp37) - (tmp38 * tmp39);
311  tmp103 = (tmp38 * tmp37) + (tmp36 * tmp39);
312  }
313  tmp41 = tmp35 + tmp40;
314  tmp153 = tmp102 + tmp103;
315  tmp101 = tmp35 - tmp40;
316  tmp104 = tmp102 - tmp103;
317  tmp105 = tmp101 + tmp104;
318  tmp137 = tmp101 - tmp104;
319  }
320  {
321  fftw_real tmp48;
322  fftw_real tmp108;
323  fftw_real tmp64;
324  fftw_real tmp115;
325  fftw_real tmp53;
326  fftw_real tmp109;
327  fftw_real tmp59;
328  fftw_real tmp114;
330  {
331  fftw_real tmp45;
332  fftw_real tmp47;
333  fftw_real tmp44;
334  fftw_real tmp46;
336  tmp45 = c_re(inout[iostride]);
337  tmp47 = c_im(inout[iostride]);
338  tmp44 = c_re(W[0]);
339  tmp46 = c_im(W[0]);
340  tmp48 = (tmp44 * tmp45) - (tmp46 * tmp47);
341  tmp108 = (tmp46 * tmp45) + (tmp44 * tmp47);
342  }
343  {
344  fftw_real tmp61;
345  fftw_real tmp63;
346  fftw_real tmp60;
347  fftw_real tmp62;
349  tmp61 = c_re(inout[13 * iostride]);
350  tmp63 = c_im(inout[13 * iostride]);
351  tmp60 = c_re(W[12]);
352  tmp62 = c_im(W[12]);
353  tmp64 = (tmp60 * tmp61) - (tmp62 * tmp63);
354  tmp115 = (tmp62 * tmp61) + (tmp60 * tmp63);
355  }
356  {
357  fftw_real tmp50;
358  fftw_real tmp52;
359  fftw_real tmp49;
360  fftw_real tmp51;
362  tmp50 = c_re(inout[9 * iostride]);
363  tmp52 = c_im(inout[9 * iostride]);
364  tmp49 = c_re(W[8]);
365  tmp51 = c_im(W[8]);
366  tmp53 = (tmp49 * tmp50) - (tmp51 * tmp52);
367  tmp109 = (tmp51 * tmp50) + (tmp49 * tmp52);
368  }
369  {
370  fftw_real tmp56;
371  fftw_real tmp58;
372  fftw_real tmp55;
373  fftw_real tmp57;
375  tmp56 = c_re(inout[5 * iostride]);
376  tmp58 = c_im(inout[5 * iostride]);
377  tmp55 = c_re(W[4]);
378  tmp57 = c_im(W[4]);
379  tmp59 = (tmp55 * tmp56) - (tmp57 * tmp58);
380  tmp114 = (tmp57 * tmp56) + (tmp55 * tmp58);
381  }
382  {
383  fftw_real tmp113;
384  fftw_real tmp116;
385  fftw_real tmp110;
386  fftw_real tmp111;
388  tmp54 = tmp48 + tmp53;
389  tmp65 = tmp59 + tmp64;
390  tmp156 = tmp54 - tmp65;
391  tmp113 = tmp48 - tmp53;
392  tmp116 = tmp114 - tmp115;
393  tmp117 = tmp113 - tmp116;
394  tmp141 = tmp113 + tmp116;
395  tmp157 = tmp108 + tmp109;
396  tmp158 = tmp114 + tmp115;
397  tmp159 = tmp157 - tmp158;
398  tmp110 = tmp108 - tmp109;
399  tmp111 = tmp59 - tmp64;
400  tmp112 = tmp110 + tmp111;
401  tmp140 = tmp110 - tmp111;
402  }
403  }
404  {
405  fftw_real tmp107;
406  fftw_real tmp131;
407  fftw_real tmp202;
408  fftw_real tmp204;
409  fftw_real tmp130;
410  fftw_real tmp203;
411  fftw_real tmp134;
412  fftw_real tmp199;
414  {
415  fftw_real tmp95;
416  fftw_real tmp106;
417  fftw_real tmp200;
418  fftw_real tmp201;
420  tmp95 = tmp91 - tmp94;
421  tmp106 = K707106781 * (tmp100 - tmp105);
422  tmp107 = tmp95 + tmp106;
423  tmp131 = tmp95 - tmp106;
424  tmp200 = K707106781 * (tmp137 - tmp136);
425  tmp201 = tmp194 + tmp193;
426  tmp202 = tmp200 + tmp201;
427  tmp204 = tmp201 - tmp200;
428  }
429  {
430  fftw_real tmp118;
431  fftw_real tmp129;
432  fftw_real tmp132;
433  fftw_real tmp133;
435  tmp118 = (K923879532 * tmp112) + (K382683432 * tmp117);
436  tmp129 = (K382683432 * tmp123) - (K923879532 * tmp128);
437  tmp130 = tmp118 + tmp129;
438  tmp203 = tmp129 - tmp118;
439  tmp132 = (K382683432 * tmp112) - (K923879532 * tmp117);
440  tmp133 = (K382683432 * tmp128) + (K923879532 * tmp123);
441  tmp134 = tmp132 - tmp133;
442  tmp199 = tmp132 + tmp133;
443  }
444  c_re(inout[11 * iostride]) = tmp107 - tmp130;
445  c_re(inout[3 * iostride]) = tmp107 + tmp130;
446  c_re(inout[15 * iostride]) = tmp131 - tmp134;
447  c_re(inout[7 * iostride]) = tmp131 + tmp134;
448  c_im(inout[3 * iostride]) = tmp199 + tmp202;
449  c_im(inout[11 * iostride]) = tmp202 - tmp199;
450  c_im(inout[7 * iostride]) = tmp203 + tmp204;
451  c_im(inout[15 * iostride]) = tmp204 - tmp203;
452  }
453  {
454  fftw_real tmp139;
455  fftw_real tmp147;
456  fftw_real tmp196;
457  fftw_real tmp198;
458  fftw_real tmp146;
459  fftw_real tmp197;
460  fftw_real tmp150;
461  fftw_real tmp191;
463  {
464  fftw_real tmp135;
465  fftw_real tmp138;
466  fftw_real tmp192;
467  fftw_real tmp195;
469  tmp135 = tmp91 + tmp94;
470  tmp138 = K707106781 * (tmp136 + tmp137);
471  tmp139 = tmp135 + tmp138;
472  tmp147 = tmp135 - tmp138;
473  tmp192 = K707106781 * (tmp100 + tmp105);
474  tmp195 = tmp193 - tmp194;
475  tmp196 = tmp192 + tmp195;
476  tmp198 = tmp195 - tmp192;
477  }
478  {
479  fftw_real tmp142;
480  fftw_real tmp145;
481  fftw_real tmp148;
482  fftw_real tmp149;
484  tmp142 = (K382683432 * tmp140) + (K923879532 * tmp141);
485  tmp145 = (K923879532 * tmp143) - (K382683432 * tmp144);
486  tmp146 = tmp142 + tmp145;
487  tmp197 = tmp145 - tmp142;
488  tmp148 = (K923879532 * tmp140) - (K382683432 * tmp141);
489  tmp149 = (K923879532 * tmp144) + (K382683432 * tmp143);
490  tmp150 = tmp148 - tmp149;
491  tmp191 = tmp148 + tmp149;
492  }
493  c_re(inout[9 * iostride]) = tmp139 - tmp146;
494  c_re(inout[iostride]) = tmp139 + tmp146;
495  c_re(inout[13 * iostride]) = tmp147 - tmp150;
496  c_re(inout[5 * iostride]) = tmp147 + tmp150;
497  c_im(inout[iostride]) = tmp191 + tmp196;
498  c_im(inout[9 * iostride]) = tmp196 - tmp191;
499  c_im(inout[5 * iostride]) = tmp197 + tmp198;
500  c_im(inout[13 * iostride]) = tmp198 - tmp197;
501  }
502  {
503  fftw_real tmp155;
504  fftw_real tmp167;
505  fftw_real tmp188;
506  fftw_real tmp190;
507  fftw_real tmp166;
508  fftw_real tmp189;
509  fftw_real tmp170;
510  fftw_real tmp185;
512  {
513  fftw_real tmp151;
514  fftw_real tmp154;
515  fftw_real tmp186;
516  fftw_real tmp187;
518  tmp151 = tmp7 - tmp18;
519  tmp154 = tmp152 - tmp153;
520  tmp155 = tmp151 + tmp154;
521  tmp167 = tmp151 - tmp154;
522  tmp186 = tmp41 - tmp30;
523  tmp187 = tmp180 - tmp177;
524  tmp188 = tmp186 + tmp187;
525  tmp190 = tmp187 - tmp186;
526  }
527  {
528  fftw_real tmp160;
529  fftw_real tmp165;
530  fftw_real tmp168;
531  fftw_real tmp169;
533  tmp160 = tmp156 + tmp159;
534  tmp165 = tmp161 - tmp164;
535  tmp166 = K707106781 * (tmp160 + tmp165);
536  tmp189 = K707106781 * (tmp165 - tmp160);
537  tmp168 = tmp159 - tmp156;
538  tmp169 = tmp161 + tmp164;
539  tmp170 = K707106781 * (tmp168 - tmp169);
540  tmp185 = K707106781 * (tmp168 + tmp169);
541  }
542  c_re(inout[10 * iostride]) = tmp155 - tmp166;
543  c_re(inout[2 * iostride]) = tmp155 + tmp166;
544  c_re(inout[14 * iostride]) = tmp167 - tmp170;
545  c_re(inout[6 * iostride]) = tmp167 + tmp170;
546  c_im(inout[2 * iostride]) = tmp185 + tmp188;
547  c_im(inout[10 * iostride]) = tmp188 - tmp185;
548  c_im(inout[6 * iostride]) = tmp189 + tmp190;
549  c_im(inout[14 * iostride]) = tmp190 - tmp189;
550  }
551  {
552  fftw_real tmp43;
553  fftw_real tmp171;
554  fftw_real tmp182;
555  fftw_real tmp184;
556  fftw_real tmp90;
557  fftw_real tmp183;
558  fftw_real tmp174;
559  fftw_real tmp175;
561  {
562  fftw_real tmp19;
563  fftw_real tmp42;
564  fftw_real tmp176;
565  fftw_real tmp181;
567  tmp19 = tmp7 + tmp18;
568  tmp42 = tmp30 + tmp41;
569  tmp43 = tmp19 + tmp42;
570  tmp171 = tmp19 - tmp42;
571  tmp176 = tmp152 + tmp153;
572  tmp181 = tmp177 + tmp180;
573  tmp182 = tmp176 + tmp181;
574  tmp184 = tmp181 - tmp176;
575  }
576  {
577  fftw_real tmp66;
578  fftw_real tmp89;
579  fftw_real tmp172;
580  fftw_real tmp173;
582  tmp66 = tmp54 + tmp65;
583  tmp89 = tmp77 + tmp88;
584  tmp90 = tmp66 + tmp89;
585  tmp183 = tmp89 - tmp66;
586  tmp172 = tmp157 + tmp158;
587  tmp173 = tmp162 + tmp163;
588  tmp174 = tmp172 - tmp173;
589  tmp175 = tmp172 + tmp173;
590  }
591  c_re(inout[8 * iostride]) = tmp43 - tmp90;
592  c_re(inout[0]) = tmp43 + tmp90;
593  c_re(inout[12 * iostride]) = tmp171 - tmp174;
594  c_re(inout[4 * iostride]) = tmp171 + tmp174;
595  c_im(inout[0]) = tmp175 + tmp182;
596  c_im(inout[8 * iostride]) = tmp182 - tmp175;
597  c_im(inout[4 * iostride]) = tmp183 + tmp184;
598  c_im(inout[12 * iostride]) = tmp184 - tmp183;
599  }
600  }
601 }
602 
603 static const int twiddle_order[] =
604  { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
606  "fftw_twiddle_16",
607  (void (*)()) fftw_twiddle_16,
608  16,
609  FFTW_FORWARD,
610  FFTW_TWIDDLE,
611  352,
612  15,
613  twiddle_order,
614 };
#define FFTW_KONST(x)
Definition: fftw-int.h:178
fftw_codelet_desc fftw_twiddle_16_desc
Definition: ftw_16.c:605
#define c_re(c)
Definition: fftw.h:60
#define ASSERT_ALIGNED_DOUBLE
Definition: fftw-int.h:236
#define c_im(c)
Definition: fftw.h:61
void fftw_twiddle_16(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist)
Definition: ftw_16.c:47
float fftw_real
Definition: fftw.h:49