| Bsoft 1.9 Bernard's software package

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

ftw_5.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: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 -twiddle 5 */
27
28 /*
29 * This function contains 40 FP additions, 28 FP multiplications,
30 * (or, 26 additions, 14 multiplications, 14 fused multiply/add),
31 * 26 stack variables, and 20 memory accesses
32 */
33 static const fftw_real K250000000 =
34 FFTW_KONST(+0.250000000000000000000000000000000000000000000);
35 static const fftw_real K559016994 =
36 FFTW_KONST(+0.559016994374947424102293417182819058860154590);
37 static const fftw_real K587785252 =
38 FFTW_KONST(+0.587785252292473129168705954639072768597652438);
39 static const fftw_real K951056516 =
40 FFTW_KONST(+0.951056516295153572116439333379382143405698634);
41
42 /*
43 * Generator Id's :
44 * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $
45 * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $
46 * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $
47 */
48
49 void fftw_twiddle_5(fftw_complex *A, const fftw_complex *W, int iostride,
50 int m, int dist)
51 {
52 int i;
53 fftw_complex *inout;
54 inout = A;
55 for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 4) {
56 fftw_real tmp1;
57 fftw_real tmp40;
58 fftw_real tmp30;
59 fftw_real tmp33;
60 fftw_real tmp37;
61 fftw_real tmp38;
62 fftw_real tmp39;
63 fftw_real tmp45;
64 fftw_real tmp44;
65 fftw_real tmp12;
66 fftw_real tmp23;
67 fftw_real tmp24;
68 ASSERT_ALIGNED_DOUBLE;
69 tmp1 = c_re(inout[0]);
70 tmp40 = c_im(inout[0]);
71 {
72 fftw_real tmp6;
73 fftw_real tmp28;
74 fftw_real tmp22;
75 fftw_real tmp32;
76 fftw_real tmp11;
77 fftw_real tmp29;
78 fftw_real tmp17;
79 fftw_real tmp31;
80 ASSERT_ALIGNED_DOUBLE;
81 {
82 fftw_real tmp3;
83 fftw_real tmp5;
84 fftw_real tmp2;
85 fftw_real tmp4;
86 ASSERT_ALIGNED_DOUBLE;
87 tmp3 = c_re(inout[iostride]);
88 tmp5 = c_im(inout[iostride]);
89 tmp2 = c_re(W[0]);
90 tmp4 = c_im(W[0]);
91 tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5);
92 tmp28 = (tmp4 * tmp3) + (tmp2 * tmp5);
93 }
94 {
95 fftw_real tmp19;
96 fftw_real tmp21;
97 fftw_real tmp18;
98 fftw_real tmp20;
99 ASSERT_ALIGNED_DOUBLE;
100 tmp19 = c_re(inout[3 * iostride]);
101 tmp21 = c_im(inout[3 * iostride]);
102 tmp18 = c_re(W[2]);
103 tmp20 = c_im(W[2]);
104 tmp22 = (tmp18 * tmp19) - (tmp20 * tmp21);
105 tmp32 = (tmp20 * tmp19) + (tmp18 * tmp21);
106 }
107 {
108 fftw_real tmp8;
109 fftw_real tmp10;
110 fftw_real tmp7;
111 fftw_real tmp9;
112 ASSERT_ALIGNED_DOUBLE;
113 tmp8 = c_re(inout[4 * iostride]);
114 tmp10 = c_im(inout[4 * iostride]);
115 tmp7 = c_re(W[3]);
116 tmp9 = c_im(W[3]);
117 tmp11 = (tmp7 * tmp8) - (tmp9 * tmp10);
118 tmp29 = (tmp9 * tmp8) + (tmp7 * tmp10);
119 }
120 {
121 fftw_real tmp14;
122 fftw_real tmp16;
123 fftw_real tmp13;
124 fftw_real tmp15;
125 ASSERT_ALIGNED_DOUBLE;
126 tmp14 = c_re(inout[2 * iostride]);
127 tmp16 = c_im(inout[2 * iostride]);
128 tmp13 = c_re(W[1]);
129 tmp15 = c_im(W[1]);
130 tmp17 = (tmp13 * tmp14) - (tmp15 * tmp16);
131 tmp31 = (tmp15 * tmp14) + (tmp13 * tmp16);
132 }
133 tmp30 = tmp28 - tmp29;
134 tmp33 = tmp31 - tmp32;
135 tmp37 = tmp28 + tmp29;
136 tmp38 = tmp31 + tmp32;
137 tmp39 = tmp37 + tmp38;
138 tmp45 = tmp17 - tmp22;
139 tmp44 = tmp6 - tmp11;
140 tmp12 = tmp6 + tmp11;
141 tmp23 = tmp17 + tmp22;
142 tmp24 = tmp12 + tmp23;
143 }
144 c_re(inout[0]) = tmp1 + tmp24;
145 {
146 fftw_real tmp34;
147 fftw_real tmp36;
148 fftw_real tmp27;
149 fftw_real tmp35;
150 fftw_real tmp25;
151 fftw_real tmp26;
152 ASSERT_ALIGNED_DOUBLE;
153 tmp34 = (K951056516 * tmp30) + (K587785252 * tmp33);
154 tmp36 = (K951056516 * tmp33) - (K587785252 * tmp30);
155 tmp25 = K559016994 * (tmp12 - tmp23);
156 tmp26 = tmp1 - (K250000000 * tmp24);
157 tmp27 = tmp25 + tmp26;
158 tmp35 = tmp26 - tmp25;
159 c_re(inout[4 * iostride]) = tmp27 - tmp34;
160 c_re(inout[iostride]) = tmp27 + tmp34;
161 c_re(inout[2 * iostride]) = tmp35 - tmp36;
162 c_re(inout[3 * iostride]) = tmp35 + tmp36;
163 }
164 c_im(inout[0]) = tmp39 + tmp40;
165 {
166 fftw_real tmp46;
167 fftw_real tmp47;
168 fftw_real tmp43;
169 fftw_real tmp48;
170 fftw_real tmp41;
171 fftw_real tmp42;
172 ASSERT_ALIGNED_DOUBLE;
173 tmp46 = (K951056516 * tmp44) + (K587785252 * tmp45);
174 tmp47 = (K951056516 * tmp45) - (K587785252 * tmp44);
175 tmp41 = K559016994 * (tmp37 - tmp38);
176 tmp42 = tmp40 - (K250000000 * tmp39);
177 tmp43 = tmp41 + tmp42;
178 tmp48 = tmp42 - tmp41;
179 c_im(inout[iostride]) = tmp43 - tmp46;
180 c_im(inout[4 * iostride]) = tmp46 + tmp43;
181 c_im(inout[2 * iostride]) = tmp47 + tmp48;
182 c_im(inout[3 * iostride]) = tmp48 - tmp47;
183 }
184 }
185 }
186
187 static const int twiddle_order[] = { 1, 2, 3, 4 };
188 fftw_codelet_desc fftw_twiddle_5_desc = {
189 "fftw_twiddle_5",
190 (void (*)()) fftw_twiddle_5,
191 5,
192 FFTW_FORWARD,
193 FFTW_TWIDDLE,
194 110,
195 4,
196 twiddle_order,
197 };
fftw_twiddle_5
void fftw_twiddle_5(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist)
Definition: ftw_5.c:49
fftw_codelet_desc
Definition: fftw.h:126
fftw-int.h
fftw_complex
Definition: fftw.h:57
FFTW_KONST
#define FFTW_KONST(x)
Definition: fftw-int.h:178
fftw.h
FFTW_TWIDDLE
Definition: fftw.h:121
c_re
#define c_re(c)
Definition: fftw.h:60
fftw_twiddle_5_desc
fftw_codelet_desc fftw_twiddle_5_desc
Definition: ftw_5.c:188
ASSERT_ALIGNED_DOUBLE
#define ASSERT_ALIGNED_DOUBLE
Definition: fftw-int.h:236
c_im
#define c_im(c)
Definition: fftw.h:61
fftw_real
float fftw_real
Definition: fftw.h:49
FFTW_FORWARD
Definition: fftw.h:64