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