Bsoft  1.9
Bernard's software package
ftwi_3.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:24 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 3 */
27 
28 /*
29  * This function contains 16 FP additions, 12 FP multiplications,
30  * (or, 10 additions, 6 multiplications, 6 fused multiply/add),
31  * 14 stack variables, and 12 memory accesses
32  */
33 static const fftw_real K866025403 =
34 FFTW_KONST(+0.866025403784438646763723170752936183471402627);
35 static const fftw_real K500000000 =
36 FFTW_KONST(+0.500000000000000000000000000000000000000000000);
37 
38 /*
39  * Generator Id's :
40  * $Id: exprdag.ml,v 1.43 2003/03/16 23:43:46 stevenj Exp $
41  * $Id: fft.ml,v 1.44 2003/03/16 23:43:46 stevenj Exp $
42  * $Id: to_c.ml,v 1.26 2003/03/16 23:43:46 stevenj Exp $
43  */
44 
45 void fftwi_twiddle_3(fftw_complex *A, const fftw_complex *W, int iostride,
46  int m, int dist)
47 {
48  int i;
49  fftw_complex *inout;
50  inout = A;
51  for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 2) {
52  fftw_real tmp1;
53  fftw_real tmp18;
54  fftw_real tmp6;
55  fftw_real tmp15;
56  fftw_real tmp11;
57  fftw_real tmp14;
58  fftw_real tmp12;
59  fftw_real tmp17;
61  tmp1 = c_re(inout[0]);
62  tmp18 = c_im(inout[0]);
63  {
64  fftw_real tmp3;
65  fftw_real tmp5;
66  fftw_real tmp2;
67  fftw_real tmp4;
69  tmp3 = c_re(inout[iostride]);
70  tmp5 = c_im(inout[iostride]);
71  tmp2 = c_re(W[0]);
72  tmp4 = c_im(W[0]);
73  tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5);
74  tmp15 = (tmp2 * tmp5) - (tmp4 * tmp3);
75  }
76  {
77  fftw_real tmp8;
78  fftw_real tmp10;
79  fftw_real tmp7;
80  fftw_real tmp9;
82  tmp8 = c_re(inout[2 * iostride]);
83  tmp10 = c_im(inout[2 * iostride]);
84  tmp7 = c_re(W[1]);
85  tmp9 = c_im(W[1]);
86  tmp11 = (tmp7 * tmp8) + (tmp9 * tmp10);
87  tmp14 = (tmp7 * tmp10) - (tmp9 * tmp8);
88  }
89  tmp12 = tmp6 + tmp11;
90  tmp17 = tmp15 + tmp14;
91  {
92  fftw_real tmp13;
93  fftw_real tmp16;
94  fftw_real tmp19;
95  fftw_real tmp20;
97  c_re(inout[0]) = tmp1 + tmp12;
98  tmp13 = tmp1 - (K500000000 * tmp12);
99  tmp16 = K866025403 * (tmp14 - tmp15);
100  c_re(inout[2 * iostride]) = tmp13 - tmp16;
101  c_re(inout[iostride]) = tmp13 + tmp16;
102  c_im(inout[0]) = tmp17 + tmp18;
103  tmp19 = K866025403 * (tmp6 - tmp11);
104  tmp20 = tmp18 - (K500000000 * tmp17);
105  c_im(inout[iostride]) = tmp19 + tmp20;
106  c_im(inout[2 * iostride]) = tmp20 - tmp19;
107  }
108  }
109 }
110 
111 static const int twiddle_order[] = { 1, 2 };
113  "fftwi_twiddle_3",
114  (void (*)()) fftwi_twiddle_3,
115  3,
117  FFTW_TWIDDLE,
118  77,
119  2,
120  twiddle_order,
121 };
#define FFTW_KONST(x)
Definition: fftw-int.h:178
#define c_re(c)
Definition: fftw.h:60
#define ASSERT_ALIGNED_DOUBLE
Definition: fftw-int.h:236
void fftwi_twiddle_3(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist)
Definition: ftwi_3.c:45
#define c_im(c)
Definition: fftw.h:61
float fftw_real
Definition: fftw.h:49
fftw_codelet_desc fftwi_twiddle_3_desc
Definition: ftwi_3.c:112