| Bsoft 1.9 Bernard's software package

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

ftwi_4.c
Go to the documentation of this file.
1 /*
2 * Copyright (c) 1997-1999, 2003 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 Mon Mar 24 02:08:25 EST 2003 */
22
23 #include "fftw-int.h"
24 #include "fftw.h"
25
26 /* Generated by: /homee/stevenj/cvs/fftw/gensrc/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 :
36 * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $
37 * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $
38 * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $
39 */
40
41 void fftwi_twiddle_4(fftw_complex *A, const fftw_complex *W, int iostride,
42 int m, int dist)
43 {
44 int i;
45 fftw_complex *inout;
46 inout = A;
47 for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 3) {
48 fftw_real tmp1;
49 fftw_real tmp25;
50 fftw_real tmp6;
51 fftw_real tmp24;
52 fftw_real tmp12;
53 fftw_real tmp20;
54 fftw_real tmp17;
55 fftw_real tmp21;
56 ASSERT_ALIGNED_DOUBLE;
57 tmp1 = c_re(inout[0]);
58 tmp25 = c_im(inout[0]);
59 {
60 fftw_real tmp3;
61 fftw_real tmp5;
62 fftw_real tmp2;
63 fftw_real tmp4;
64 ASSERT_ALIGNED_DOUBLE;
65 tmp3 = c_re(inout[2 * iostride]);
66 tmp5 = c_im(inout[2 * iostride]);
67 tmp2 = c_re(W[1]);
68 tmp4 = c_im(W[1]);
69 tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5);
70 tmp24 = (tmp2 * tmp5) - (tmp4 * tmp3);
71 }
72 {
73 fftw_real tmp9;
74 fftw_real tmp11;
75 fftw_real tmp8;
76 fftw_real tmp10;
77 ASSERT_ALIGNED_DOUBLE;
78 tmp9 = c_re(inout[iostride]);
79 tmp11 = c_im(inout[iostride]);
80 tmp8 = c_re(W[0]);
81 tmp10 = c_im(W[0]);
82 tmp12 = (tmp8 * tmp9) + (tmp10 * tmp11);
83 tmp20 = (tmp8 * tmp11) - (tmp10 * tmp9);
84 }
85 {
86 fftw_real tmp14;
87 fftw_real tmp16;
88 fftw_real tmp13;
89 fftw_real tmp15;
90 ASSERT_ALIGNED_DOUBLE;
91 tmp14 = c_re(inout[3 * iostride]);
92 tmp16 = c_im(inout[3 * iostride]);
93 tmp13 = c_re(W[2]);
94 tmp15 = c_im(W[2]);
95 tmp17 = (tmp13 * tmp14) + (tmp15 * tmp16);
96 tmp21 = (tmp13 * tmp16) - (tmp15 * tmp14);
97 }
98 {
99 fftw_real tmp7;
100 fftw_real tmp18;
101 fftw_real tmp27;
102 fftw_real tmp28;
103 ASSERT_ALIGNED_DOUBLE;
104 tmp7 = tmp1 + tmp6;
105 tmp18 = tmp12 + tmp17;
106 c_re(inout[2 * iostride]) = tmp7 - tmp18;
107 c_re(inout[0]) = tmp7 + tmp18;
108 tmp27 = tmp12 - tmp17;
109 tmp28 = tmp25 - tmp24;
110 c_im(inout[iostride]) = tmp27 + tmp28;
111 c_im(inout[3 * iostride]) = tmp28 - tmp27;
112 }
113 {
114 fftw_real tmp23;
115 fftw_real tmp26;
116 fftw_real tmp19;
117 fftw_real tmp22;
118 ASSERT_ALIGNED_DOUBLE;
119 tmp23 = tmp20 + tmp21;
120 tmp26 = tmp24 + tmp25;
121 c_im(inout[0]) = tmp23 + tmp26;
122 c_im(inout[2 * iostride]) = tmp26 - tmp23;
123 tmp19 = tmp1 - tmp6;
124 tmp22 = tmp20 - tmp21;
125 c_re(inout[iostride]) = tmp19 - tmp22;
126 c_re(inout[3 * iostride]) = tmp19 + tmp22;
127 }
128 }
129 }
130
131 static const int twiddle_order[] = { 1, 2, 3 };
132 fftw_codelet_desc fftwi_twiddle_4_desc = {
133 "fftwi_twiddle_4",
134 (void (*)()) fftwi_twiddle_4,
135 4,
136 FFTW_BACKWARD,
137 FFTW_TWIDDLE,
138 99,
139 3,
140 twiddle_order,
141 };
fftw_codelet_desc
Definition: fftw.h:126
fftw-int.h
fftw_complex
Definition: fftw.h:57
fftw.h
FFTW_TWIDDLE
Definition: fftw.h:121
fftwi_twiddle_4
void fftwi_twiddle_4(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist)
Definition: ftwi_4.c:41
fftwi_twiddle_4_desc
fftw_codelet_desc fftwi_twiddle_4_desc
Definition: ftwi_4.c:132
c_re
#define c_re(c)
Definition: fftw.h:60
FFTW_BACKWARD
Definition: fftw.h:64
ASSERT_ALIGNED_DOUBLE
#define ASSERT_ALIGNED_DOUBLE
Definition: fftw-int.h:236
c_im
#define c_im(c)
Definition: fftw.h:61
fftw_real
float fftw_real
Definition: fftw.h:49