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:29 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 4 */ |
||
27 | |||
28 | /* |
||
29 | * This function contains 34 FP additions, 14 FP multiplications, |
||
30 | * (or, 28 additions, 8 multiplications, 6 fused multiply/add), |
||
31 | * 15 stack variables, and 32 memory accesses |
||
32 | */ |
||
33 | static const fftw_real K707106781 = FFTW_KONST(+0.707106781186547524400844362104849039284835938); |
||
34 | |||
35 | /* |
||
36 | * Generator Id's : |
||
107 | pj | 37 | * $Id: fhf_4.c,v 1.2 2003-03-24 11:14:58 pj Exp $ |
38 | * $Id: fhf_4.c,v 1.2 2003-03-24 11:14:58 pj Exp $ |
||
39 | * $Id: fhf_4.c,v 1.2 2003-03-24 11:14:58 pj Exp $ |
||
2 | pj | 40 | */ |
41 | |||
42 | void fftw_hc2hc_forward_4(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist) |
||
43 | { |
||
44 | int i; |
||
45 | fftw_real *X; |
||
46 | fftw_real *Y; |
||
47 | X = A; |
||
48 | Y = A + (4 * iostride); |
||
49 | { |
||
50 | fftw_real tmp35; |
||
51 | fftw_real tmp36; |
||
52 | fftw_real tmp37; |
||
53 | fftw_real tmp38; |
||
54 | fftw_real tmp39; |
||
55 | fftw_real tmp40; |
||
56 | ASSERT_ALIGNED_DOUBLE(); |
||
57 | tmp35 = X[0]; |
||
58 | tmp36 = X[2 * iostride]; |
||
59 | tmp37 = tmp35 + tmp36; |
||
60 | tmp38 = X[iostride]; |
||
61 | tmp39 = X[3 * iostride]; |
||
62 | tmp40 = tmp38 + tmp39; |
||
63 | X[iostride] = tmp35 - tmp36; |
||
64 | Y[-iostride] = -(tmp38 - tmp39); |
||
65 | X[2 * iostride] = tmp37 - tmp40; |
||
66 | X[0] = tmp37 + tmp40; |
||
67 | } |
||
68 | X = X + dist; |
||
69 | Y = Y - dist; |
||
70 | for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 3) { |
||
71 | fftw_real tmp7; |
||
72 | fftw_real tmp30; |
||
73 | fftw_real tmp12; |
||
74 | fftw_real tmp29; |
||
75 | fftw_real tmp18; |
||
76 | fftw_real tmp26; |
||
77 | fftw_real tmp23; |
||
78 | fftw_real tmp27; |
||
79 | ASSERT_ALIGNED_DOUBLE(); |
||
80 | tmp7 = X[0]; |
||
81 | tmp30 = Y[-3 * iostride]; |
||
82 | { |
||
83 | fftw_real tmp9; |
||
84 | fftw_real tmp11; |
||
85 | fftw_real tmp8; |
||
86 | fftw_real tmp10; |
||
87 | ASSERT_ALIGNED_DOUBLE(); |
||
88 | tmp9 = X[2 * iostride]; |
||
89 | tmp11 = Y[-iostride]; |
||
90 | tmp8 = c_re(W[1]); |
||
91 | tmp10 = c_im(W[1]); |
||
92 | tmp12 = (tmp8 * tmp9) - (tmp10 * tmp11); |
||
93 | tmp29 = (tmp10 * tmp9) + (tmp8 * tmp11); |
||
94 | } |
||
95 | { |
||
96 | fftw_real tmp15; |
||
97 | fftw_real tmp17; |
||
98 | fftw_real tmp14; |
||
99 | fftw_real tmp16; |
||
100 | ASSERT_ALIGNED_DOUBLE(); |
||
101 | tmp15 = X[iostride]; |
||
102 | tmp17 = Y[-2 * iostride]; |
||
103 | tmp14 = c_re(W[0]); |
||
104 | tmp16 = c_im(W[0]); |
||
105 | tmp18 = (tmp14 * tmp15) - (tmp16 * tmp17); |
||
106 | tmp26 = (tmp16 * tmp15) + (tmp14 * tmp17); |
||
107 | } |
||
108 | { |
||
109 | fftw_real tmp20; |
||
110 | fftw_real tmp22; |
||
111 | fftw_real tmp19; |
||
112 | fftw_real tmp21; |
||
113 | ASSERT_ALIGNED_DOUBLE(); |
||
114 | tmp20 = X[3 * iostride]; |
||
115 | tmp22 = Y[0]; |
||
116 | tmp19 = c_re(W[2]); |
||
117 | tmp21 = c_im(W[2]); |
||
118 | tmp23 = (tmp19 * tmp20) - (tmp21 * tmp22); |
||
119 | tmp27 = (tmp21 * tmp20) + (tmp19 * tmp22); |
||
120 | } |
||
121 | { |
||
122 | fftw_real tmp13; |
||
123 | fftw_real tmp24; |
||
124 | fftw_real tmp33; |
||
125 | fftw_real tmp34; |
||
126 | ASSERT_ALIGNED_DOUBLE(); |
||
127 | tmp13 = tmp7 + tmp12; |
||
128 | tmp24 = tmp18 + tmp23; |
||
129 | Y[-2 * iostride] = tmp13 - tmp24; |
||
130 | X[0] = tmp13 + tmp24; |
||
131 | tmp33 = tmp18 - tmp23; |
||
132 | tmp34 = tmp30 - tmp29; |
||
133 | X[3 * iostride] = -(tmp33 + tmp34); |
||
134 | Y[-iostride] = tmp34 - tmp33; |
||
135 | } |
||
136 | { |
||
137 | fftw_real tmp31; |
||
138 | fftw_real tmp32; |
||
139 | fftw_real tmp25; |
||
140 | fftw_real tmp28; |
||
141 | ASSERT_ALIGNED_DOUBLE(); |
||
142 | tmp31 = tmp29 + tmp30; |
||
143 | tmp32 = tmp26 + tmp27; |
||
144 | X[2 * iostride] = -(tmp31 - tmp32); |
||
145 | Y[0] = tmp32 + tmp31; |
||
146 | tmp25 = tmp7 - tmp12; |
||
147 | tmp28 = tmp26 - tmp27; |
||
148 | Y[-3 * iostride] = tmp25 - tmp28; |
||
149 | X[iostride] = tmp25 + tmp28; |
||
150 | } |
||
151 | } |
||
152 | if (i == m) { |
||
153 | fftw_real tmp1; |
||
154 | fftw_real tmp6; |
||
155 | fftw_real tmp4; |
||
156 | fftw_real tmp5; |
||
157 | fftw_real tmp2; |
||
158 | fftw_real tmp3; |
||
159 | ASSERT_ALIGNED_DOUBLE(); |
||
160 | tmp1 = X[0]; |
||
161 | tmp6 = X[2 * iostride]; |
||
162 | tmp2 = X[iostride]; |
||
163 | tmp3 = X[3 * iostride]; |
||
164 | tmp4 = K707106781 * (tmp2 - tmp3); |
||
165 | tmp5 = K707106781 * (tmp2 + tmp3); |
||
166 | X[iostride] = tmp1 - tmp4; |
||
167 | X[0] = tmp1 + tmp4; |
||
168 | Y[0] = -(tmp5 + tmp6); |
||
169 | Y[-iostride] = tmp6 - tmp5; |
||
170 | } |
||
171 | } |
||
172 | |||
173 | static const int twiddle_order[] = |
||
174 | {1, 2, 3}; |
||
175 | fftw_codelet_desc fftw_hc2hc_forward_4_desc = |
||
176 | { |
||
177 | "fftw_hc2hc_forward_4", |
||
178 | (void (*)()) fftw_hc2hc_forward_4, |
||
179 | 4, |
||
180 | FFTW_FORWARD, |
||
181 | FFTW_HC2HC, |
||
182 | 91, |
||
183 | 3, |
||
184 | twiddle_order, |
||
185 | }; |