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 2 */
27 
28 /*
29  * This function contains 6 FP additions, 4 FP multiplications,
30  * (or, 4 additions, 2 multiplications, 2 fused multiply/add),
31  * 10 stack variables, and 8 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 
fftwi_twiddle_2(fftw_complex * A,const fftw_complex * W,int iostride,int m,int dist)41 void fftwi_twiddle_2(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 + 1) {
48 	  fftw_real tmp1;
49 	  fftw_real tmp8;
50 	  fftw_real tmp6;
51 	  fftw_real tmp7;
52 	  ASSERT_ALIGNED_DOUBLE;
53 	  tmp1 = c_re(inout[0]);
54 	  tmp8 = c_im(inout[0]);
55 	  {
56 	       fftw_real tmp3;
57 	       fftw_real tmp5;
58 	       fftw_real tmp2;
59 	       fftw_real tmp4;
60 	       ASSERT_ALIGNED_DOUBLE;
61 	       tmp3 = c_re(inout[iostride]);
62 	       tmp5 = c_im(inout[iostride]);
63 	       tmp2 = c_re(W[0]);
64 	       tmp4 = c_im(W[0]);
65 	       tmp6 = (tmp2 * tmp3) + (tmp4 * tmp5);
66 	       tmp7 = (tmp2 * tmp5) - (tmp4 * tmp3);
67 	  }
68 	  c_re(inout[iostride]) = tmp1 - tmp6;
69 	  c_re(inout[0]) = tmp1 + tmp6;
70 	  c_im(inout[0]) = tmp7 + tmp8;
71 	  c_im(inout[iostride]) = tmp8 - tmp7;
72      }
73 }
74 
75 static const int twiddle_order[] = { 1 };
76 fftw_codelet_desc fftwi_twiddle_2_desc = {
77      "fftwi_twiddle_2",
78      (void (*)()) fftwi_twiddle_2,
79      2,
80      FFTW_BACKWARD,
81      FFTW_TWIDDLE,
82      55,
83      1,
84      twiddle_order,
85 };
86