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:46 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 -twiddleinv 4 */ |
||
27 | |||
28 | /* |
||
29 | * This function contains 22 FP additions, 12 FP multiplications, |
||
30 | * (or, 16 additions, 6 multiplications, 6 fused multiply/add), |
||
31 | * 14 stack variables, and 16 memory accesses |
||
32 | */ |
||
33 | |||
34 | /* |
||
35 | * Generator Id's : |
||
107 | pj | 36 | * $Id: ftwi_4.c,v 1.2 2003-03-24 11:14:53 pj Exp $ |
37 | * $Id: ftwi_4.c,v 1.2 2003-03-24 11:14:53 pj Exp $ |
||
38 | * $Id: ftwi_4.c,v 1.2 2003-03-24 11:14:53 pj Exp $ |
||
2 | pj | 39 | */ |
40 | |||
41 | void fftwi_twiddle_4(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist) |
||
42 | { |
||
43 | int i; |
||
44 | fftw_complex *inout; |
||
45 | inout = A; |
||
46 | for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 3) { |
||
47 | fftw_real tmp1; |
||
48 | fftw_real tmp25; |
||
49 | fftw_real tmp6; |
||
50 | fftw_real tmp24; |
||
51 | fftw_real tmp12; |
||
52 | fftw_real tmp20; |
||
53 | fftw_real tmp17; |
||
54 | fftw_real tmp21; |
||
55 | ASSERT_ALIGNED_DOUBLE(); |
||
56 | tmp1 = c_re(inout[0]); |
||
57 | tmp25 = c_im(inout[0]); |
||
58 | { |
||
59 | fftw_real tmp3; |
||
60 | fftw_real tmp5; |
||
61 | fftw_real tmp2; |
||
62 | fftw_real tmp4; |
||
63 | ASSERT_ALIGNED_DOUBLE(); |
||
64 | tmp3 = c_re(inout[2 * iostride]); |
||
65 | tmp5 = c_im(inout[2 * iostride]); |
||
66 | tmp2 = c_re(W[1]); |
||
67 | tmp4 = c_im(W[1]); |
||
68 | tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5); |
||
69 | tmp24 = (tmp2 * tmp5) - (tmp4 * tmp3); |
||
70 | } |
||
71 | { |
||
72 | fftw_real tmp9; |
||
73 | fftw_real tmp11; |
||
74 | fftw_real tmp8; |
||
75 | fftw_real tmp10; |
||
76 | ASSERT_ALIGNED_DOUBLE(); |
||
77 | tmp9 = c_re(inout[iostride]); |
||
78 | tmp11 = c_im(inout[iostride]); |
||
79 | tmp8 = c_re(W[0]); |
||
80 | tmp10 = c_im(W[0]); |
||
81 | tmp12 = (tmp8 * tmp9) + (tmp10 * tmp11); |
||
82 | tmp20 = (tmp8 * tmp11) - (tmp10 * tmp9); |
||
83 | } |
||
84 | { |
||
85 | fftw_real tmp14; |
||
86 | fftw_real tmp16; |
||
87 | fftw_real tmp13; |
||
88 | fftw_real tmp15; |
||
89 | ASSERT_ALIGNED_DOUBLE(); |
||
90 | tmp14 = c_re(inout[3 * iostride]); |
||
91 | tmp16 = c_im(inout[3 * iostride]); |
||
92 | tmp13 = c_re(W[2]); |
||
93 | tmp15 = c_im(W[2]); |
||
94 | tmp17 = (tmp13 * tmp14) + (tmp15 * tmp16); |
||
95 | tmp21 = (tmp13 * tmp16) - (tmp15 * tmp14); |
||
96 | } |
||
97 | { |
||
98 | fftw_real tmp7; |
||
99 | fftw_real tmp18; |
||
100 | fftw_real tmp27; |
||
101 | fftw_real tmp28; |
||
102 | ASSERT_ALIGNED_DOUBLE(); |
||
103 | tmp7 = tmp1 + tmp6; |
||
104 | tmp18 = tmp12 + tmp17; |
||
105 | c_re(inout[2 * iostride]) = tmp7 - tmp18; |
||
106 | c_re(inout[0]) = tmp7 + tmp18; |
||
107 | tmp27 = tmp12 - tmp17; |
||
108 | tmp28 = tmp25 - tmp24; |
||
109 | c_im(inout[iostride]) = tmp27 + tmp28; |
||
110 | c_im(inout[3 * iostride]) = tmp28 - tmp27; |
||
111 | } |
||
112 | { |
||
113 | fftw_real tmp23; |
||
114 | fftw_real tmp26; |
||
115 | fftw_real tmp19; |
||
116 | fftw_real tmp22; |
||
117 | ASSERT_ALIGNED_DOUBLE(); |
||
118 | tmp23 = tmp20 + tmp21; |
||
119 | tmp26 = tmp24 + tmp25; |
||
120 | c_im(inout[0]) = tmp23 + tmp26; |
||
121 | c_im(inout[2 * iostride]) = tmp26 - tmp23; |
||
122 | tmp19 = tmp1 - tmp6; |
||
123 | tmp22 = tmp20 - tmp21; |
||
124 | c_re(inout[iostride]) = tmp19 - tmp22; |
||
125 | c_re(inout[3 * iostride]) = tmp19 + tmp22; |
||
126 | } |
||
127 | } |
||
128 | } |
||
129 | |||
130 | static const int twiddle_order[] = |
||
131 | {1, 2, 3}; |
||
132 | fftw_codelet_desc fftwi_twiddle_4_desc = |
||
133 | { |
||
134 | "fftwi_twiddle_4", |
||
135 | (void (*)()) fftwi_twiddle_4, |
||
136 | 4, |
||
137 | FFTW_BACKWARD, |
||
138 | FFTW_TWIDDLE, |
||
139 | 99, |
||
140 | 3, |
||
141 | twiddle_order, |
||
142 | }; |