Rev 3 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | pj | 1 | /* |
2 | * Copyright (c) 1997-1999 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 Tue May 18 13:55:59 EDT 1999 */ |
||
22 | |||
107 | pj | 23 | #include <fftw-int.h> |
24 | #include <fftw.h> |
||
2 | pj | 25 | |
26 | /* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-backward 5 */ |
||
27 | |||
28 | /* |
||
29 | * This function contains 64 FP additions, 42 FP multiplications, |
||
30 | * (or, 42 additions, 20 multiplications, 22 fused multiply/add), |
||
31 | * 25 stack variables, and 40 memory accesses |
||
32 | */ |
||
33 | static const fftw_real K250000000 = FFTW_KONST(+0.250000000000000000000000000000000000000000000); |
||
34 | static const fftw_real K559016994 = FFTW_KONST(+0.559016994374947424102293417182819058860154590); |
||
35 | static const fftw_real K951056516 = FFTW_KONST(+0.951056516295153572116439333379382143405698634); |
||
36 | static const fftw_real K587785252 = FFTW_KONST(+0.587785252292473129168705954639072768597652438); |
||
37 | static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000); |
||
38 | static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000); |
||
39 | static const fftw_real K1_118033988 = FFTW_KONST(+1.118033988749894848204586834365638117720309180); |
||
40 | static const fftw_real K1_175570504 = FFTW_KONST(+1.175570504584946258337411909278145537195304875); |
||
41 | static const fftw_real K1_902113032 = FFTW_KONST(+1.902113032590307144232878666758764286811397268); |
||
42 | |||
43 | /* |
||
44 | * Generator Id's : |
||
107 | pj | 45 | * $Id: fhb_5.c,v 1.2 2003-03-24 11:14:57 pj Exp $ |
46 | * $Id: fhb_5.c,v 1.2 2003-03-24 11:14:57 pj Exp $ |
||
47 | * $Id: fhb_5.c,v 1.2 2003-03-24 11:14:57 pj Exp $ |
||
2 | pj | 48 | */ |
49 | |||
50 | void fftw_hc2hc_backward_5(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) |
||
51 | { |
||
52 | int i; |
||
53 | fftw_real *X; |
||
54 | fftw_real *Y; |
||
55 | X = A; |
||
56 | Y = A + (5 * iostride); |
||
57 | { |
||
58 | fftw_real tmp70; |
||
59 | fftw_real tmp72; |
||
60 | fftw_real tmp61; |
||
61 | fftw_real tmp64; |
||
62 | fftw_real tmp65; |
||
63 | fftw_real tmp66; |
||
64 | fftw_real tmp71; |
||
65 | fftw_real tmp67; |
||
66 | ASSERT_ALIGNED_DOUBLE(); |
||
67 | { |
||
68 | fftw_real tmp68; |
||
69 | fftw_real tmp69; |
||
70 | fftw_real tmp62; |
||
71 | fftw_real tmp63; |
||
72 | ASSERT_ALIGNED_DOUBLE(); |
||
73 | tmp68 = Y[-iostride]; |
||
74 | tmp69 = Y[-2 * iostride]; |
||
75 | tmp70 = (K1_902113032 * tmp68) + (K1_175570504 * tmp69); |
||
76 | tmp72 = (K1_902113032 * tmp69) - (K1_175570504 * tmp68); |
||
77 | tmp61 = X[0]; |
||
78 | tmp62 = X[iostride]; |
||
79 | tmp63 = X[2 * iostride]; |
||
80 | tmp64 = tmp62 + tmp63; |
||
81 | tmp65 = K1_118033988 * (tmp62 - tmp63); |
||
82 | tmp66 = tmp61 - (K500000000 * tmp64); |
||
83 | } |
||
84 | X[0] = tmp61 + (K2_000000000 * tmp64); |
||
85 | tmp71 = tmp66 - tmp65; |
||
86 | X[3 * iostride] = tmp71 - tmp72; |
||
87 | X[2 * iostride] = tmp71 + tmp72; |
||
88 | tmp67 = tmp65 + tmp66; |
||
89 | X[4 * iostride] = tmp67 + tmp70; |
||
90 | X[iostride] = tmp67 - tmp70; |
||
91 | } |
||
92 | X = X + dist; |
||
93 | Y = Y - dist; |
||
94 | for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 4) { |
||
95 | fftw_real tmp13; |
||
96 | fftw_real tmp32; |
||
97 | fftw_real tmp50; |
||
98 | fftw_real tmp39; |
||
99 | fftw_real tmp20; |
||
100 | fftw_real tmp38; |
||
101 | fftw_real tmp21; |
||
102 | fftw_real tmp34; |
||
103 | fftw_real tmp28; |
||
104 | fftw_real tmp33; |
||
105 | fftw_real tmp43; |
||
106 | fftw_real tmp55; |
||
107 | ASSERT_ALIGNED_DOUBLE(); |
||
108 | { |
||
109 | fftw_real tmp19; |
||
110 | fftw_real tmp31; |
||
111 | fftw_real tmp16; |
||
112 | fftw_real tmp30; |
||
113 | ASSERT_ALIGNED_DOUBLE(); |
||
114 | tmp13 = X[0]; |
||
115 | { |
||
116 | fftw_real tmp17; |
||
117 | fftw_real tmp18; |
||
118 | fftw_real tmp14; |
||
119 | fftw_real tmp15; |
||
120 | ASSERT_ALIGNED_DOUBLE(); |
||
121 | tmp17 = X[2 * iostride]; |
||
122 | tmp18 = Y[-3 * iostride]; |
||
123 | tmp19 = tmp17 + tmp18; |
||
124 | tmp31 = tmp17 - tmp18; |
||
125 | tmp14 = X[iostride]; |
||
126 | tmp15 = Y[-4 * iostride]; |
||
127 | tmp16 = tmp14 + tmp15; |
||
128 | tmp30 = tmp14 - tmp15; |
||
129 | } |
||
130 | tmp32 = (K587785252 * tmp30) - (K951056516 * tmp31); |
||
131 | tmp50 = (K951056516 * tmp30) + (K587785252 * tmp31); |
||
132 | tmp39 = K559016994 * (tmp16 - tmp19); |
||
133 | tmp20 = tmp16 + tmp19; |
||
134 | tmp38 = tmp13 - (K250000000 * tmp20); |
||
135 | } |
||
136 | { |
||
137 | fftw_real tmp27; |
||
138 | fftw_real tmp42; |
||
139 | fftw_real tmp24; |
||
140 | fftw_real tmp41; |
||
141 | ASSERT_ALIGNED_DOUBLE(); |
||
142 | tmp21 = Y[0]; |
||
143 | { |
||
144 | fftw_real tmp25; |
||
145 | fftw_real tmp26; |
||
146 | fftw_real tmp22; |
||
147 | fftw_real tmp23; |
||
148 | ASSERT_ALIGNED_DOUBLE(); |
||
149 | tmp25 = Y[-2 * iostride]; |
||
150 | tmp26 = X[3 * iostride]; |
||
151 | tmp27 = tmp25 - tmp26; |
||
152 | tmp42 = tmp25 + tmp26; |
||
153 | tmp22 = Y[-iostride]; |
||
154 | tmp23 = X[4 * iostride]; |
||
155 | tmp24 = tmp22 - tmp23; |
||
156 | tmp41 = tmp22 + tmp23; |
||
157 | } |
||
158 | tmp34 = K559016994 * (tmp24 - tmp27); |
||
159 | tmp28 = tmp24 + tmp27; |
||
160 | tmp33 = tmp21 - (K250000000 * tmp28); |
||
161 | tmp43 = (K587785252 * tmp41) - (K951056516 * tmp42); |
||
162 | tmp55 = (K951056516 * tmp41) + (K587785252 * tmp42); |
||
163 | } |
||
164 | X[0] = tmp13 + tmp20; |
||
165 | { |
||
166 | fftw_real tmp52; |
||
167 | fftw_real tmp58; |
||
168 | fftw_real tmp56; |
||
169 | fftw_real tmp60; |
||
170 | fftw_real tmp51; |
||
171 | fftw_real tmp54; |
||
172 | ASSERT_ALIGNED_DOUBLE(); |
||
173 | tmp51 = tmp34 + tmp33; |
||
174 | tmp52 = tmp50 + tmp51; |
||
175 | tmp58 = tmp51 - tmp50; |
||
176 | tmp54 = tmp39 + tmp38; |
||
177 | tmp56 = tmp54 - tmp55; |
||
178 | tmp60 = tmp54 + tmp55; |
||
179 | { |
||
180 | fftw_real tmp49; |
||
181 | fftw_real tmp53; |
||
182 | fftw_real tmp57; |
||
183 | fftw_real tmp59; |
||
184 | ASSERT_ALIGNED_DOUBLE(); |
||
185 | tmp49 = c_re(W[0]); |
||
186 | tmp53 = c_im(W[0]); |
||
187 | Y[-3 * iostride] = (tmp49 * tmp52) - (tmp53 * tmp56); |
||
188 | X[iostride] = (tmp53 * tmp52) + (tmp49 * tmp56); |
||
189 | tmp57 = c_re(W[3]); |
||
190 | tmp59 = c_im(W[3]); |
||
191 | Y[0] = (tmp57 * tmp58) - (tmp59 * tmp60); |
||
192 | X[4 * iostride] = (tmp59 * tmp58) + (tmp57 * tmp60); |
||
193 | } |
||
194 | } |
||
195 | Y[-4 * iostride] = tmp21 + tmp28; |
||
196 | { |
||
197 | fftw_real tmp36; |
||
198 | fftw_real tmp46; |
||
199 | fftw_real tmp44; |
||
200 | fftw_real tmp48; |
||
201 | fftw_real tmp35; |
||
202 | fftw_real tmp40; |
||
203 | ASSERT_ALIGNED_DOUBLE(); |
||
204 | tmp35 = tmp33 - tmp34; |
||
205 | tmp36 = tmp32 + tmp35; |
||
206 | tmp46 = tmp35 - tmp32; |
||
207 | tmp40 = tmp38 - tmp39; |
||
208 | tmp44 = tmp40 - tmp43; |
||
209 | tmp48 = tmp40 + tmp43; |
||
210 | { |
||
211 | fftw_real tmp29; |
||
212 | fftw_real tmp37; |
||
213 | fftw_real tmp45; |
||
214 | fftw_real tmp47; |
||
215 | ASSERT_ALIGNED_DOUBLE(); |
||
216 | tmp29 = c_re(W[1]); |
||
217 | tmp37 = c_im(W[1]); |
||
218 | Y[-2 * iostride] = (tmp29 * tmp36) - (tmp37 * tmp44); |
||
219 | X[2 * iostride] = (tmp37 * tmp36) + (tmp29 * tmp44); |
||
220 | tmp45 = c_re(W[2]); |
||
221 | tmp47 = c_im(W[2]); |
||
222 | Y[-iostride] = (tmp45 * tmp46) - (tmp47 * tmp48); |
||
223 | X[3 * iostride] = (tmp47 * tmp46) + (tmp45 * tmp48); |
||
224 | } |
||
225 | } |
||
226 | } |
||
227 | if (i == m) { |
||
228 | fftw_real tmp10; |
||
229 | fftw_real tmp12; |
||
230 | fftw_real tmp1; |
||
231 | fftw_real tmp4; |
||
232 | fftw_real tmp5; |
||
233 | fftw_real tmp6; |
||
234 | fftw_real tmp11; |
||
235 | fftw_real tmp7; |
||
236 | ASSERT_ALIGNED_DOUBLE(); |
||
237 | { |
||
238 | fftw_real tmp8; |
||
239 | fftw_real tmp9; |
||
240 | fftw_real tmp2; |
||
241 | fftw_real tmp3; |
||
242 | ASSERT_ALIGNED_DOUBLE(); |
||
243 | tmp8 = Y[-iostride]; |
||
244 | tmp9 = Y[0]; |
||
245 | tmp10 = (K1_902113032 * tmp8) + (K1_175570504 * tmp9); |
||
246 | tmp12 = (K1_175570504 * tmp8) - (K1_902113032 * tmp9); |
||
247 | tmp1 = X[2 * iostride]; |
||
248 | tmp2 = X[iostride]; |
||
249 | tmp3 = X[0]; |
||
250 | tmp4 = tmp2 + tmp3; |
||
251 | tmp5 = (K500000000 * tmp4) - tmp1; |
||
252 | tmp6 = K1_118033988 * (tmp3 - tmp2); |
||
253 | } |
||
254 | X[0] = tmp1 + (K2_000000000 * tmp4); |
||
255 | tmp11 = tmp6 - tmp5; |
||
256 | X[2 * iostride] = tmp11 + tmp12; |
||
257 | X[3 * iostride] = tmp12 - tmp11; |
||
258 | tmp7 = tmp5 + tmp6; |
||
259 | X[iostride] = tmp7 - tmp10; |
||
260 | X[4 * iostride] = -(tmp7 + tmp10); |
||
261 | } |
||
262 | } |
||
263 | |||
264 | static const int twiddle_order[] = |
||
265 | {1, 2, 3, 4}; |
||
266 | fftw_codelet_desc fftw_hc2hc_backward_5_desc = |
||
267 | { |
||
268 | "fftw_hc2hc_backward_5", |
||
269 | (void (*)()) fftw_hc2hc_backward_5, |
||
270 | 5, |
||
271 | FFTW_BACKWARD, |
||
272 | FFTW_HC2HC, |
||
273 | 124, |
||
274 | 4, |
||
275 | twiddle_order, |
||
276 | }; |