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