Subversion Repositories shark

Rev

Rev 3 | 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:18 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 -twiddle 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 = FFTW_KONST(+0.866025403784438646763723170752936183471402627);
34
static const fftw_real K500000000 = FFTW_KONST(+0.500000000000000000000000000000000000000000000);
35
 
36
/*
37
 * Generator Id's :
107 pj 38
 * $Id: ftw_3.c,v 1.2 2003-03-24 11:14:52 pj Exp $
39
 * $Id: ftw_3.c,v 1.2 2003-03-24 11:14:52 pj Exp $
40
 * $Id: ftw_3.c,v 1.2 2003-03-24 11:14:52 pj Exp $
2 pj 41
 */
42
 
43
void fftw_twiddle_3(fftw_complex *A, const fftw_complex *W, int iostride, int m, int dist)
44
{
45
     int i;
46
     fftw_complex *inout;
47
     inout = A;
48
     for (i = m; i > 0; i = i - 1, inout = inout + dist, W = W + 2) {
49
          fftw_real tmp1;
50
          fftw_real tmp18;
51
          fftw_real tmp6;
52
          fftw_real tmp14;
53
          fftw_real tmp11;
54
          fftw_real tmp15;
55
          fftw_real tmp12;
56
          fftw_real tmp17;
57
          ASSERT_ALIGNED_DOUBLE();
58
          tmp1 = c_re(inout[0]);
59
          tmp18 = c_im(inout[0]);
60
          {
61
               fftw_real tmp3;
62
               fftw_real tmp5;
63
               fftw_real tmp2;
64
               fftw_real tmp4;
65
               ASSERT_ALIGNED_DOUBLE();
66
               tmp3 = c_re(inout[iostride]);
67
               tmp5 = c_im(inout[iostride]);
68
               tmp2 = c_re(W[0]);
69
               tmp4 = c_im(W[0]);
70
               tmp6 = (tmp2 * tmp3) - (tmp4 * tmp5);
71
               tmp14 = (tmp4 * tmp3) + (tmp2 * tmp5);
72
          }
73
          {
74
               fftw_real tmp8;
75
               fftw_real tmp10;
76
               fftw_real tmp7;
77
               fftw_real tmp9;
78
               ASSERT_ALIGNED_DOUBLE();
79
               tmp8 = c_re(inout[2 * iostride]);
80
               tmp10 = c_im(inout[2 * iostride]);
81
               tmp7 = c_re(W[1]);
82
               tmp9 = c_im(W[1]);
83
               tmp11 = (tmp7 * tmp8) - (tmp9 * tmp10);
84
               tmp15 = (tmp9 * tmp8) + (tmp7 * tmp10);
85
          }
86
          tmp12 = tmp6 + tmp11;
87
          tmp17 = tmp14 + tmp15;
88
          {
89
               fftw_real tmp13;
90
               fftw_real tmp16;
91
               fftw_real tmp19;
92
               fftw_real tmp20;
93
               ASSERT_ALIGNED_DOUBLE();
94
               c_re(inout[0]) = tmp1 + tmp12;
95
               tmp13 = tmp1 - (K500000000 * tmp12);
96
               tmp16 = K866025403 * (tmp14 - tmp15);
97
               c_re(inout[2 * iostride]) = tmp13 - tmp16;
98
               c_re(inout[iostride]) = tmp13 + tmp16;
99
               c_im(inout[0]) = tmp17 + tmp18;
100
               tmp19 = K866025403 * (tmp11 - tmp6);
101
               tmp20 = tmp18 - (K500000000 * tmp17);
102
               c_im(inout[iostride]) = tmp19 + tmp20;
103
               c_im(inout[2 * iostride]) = tmp20 - tmp19;
104
          }
105
     }
106
}
107
 
108
static const int twiddle_order[] =
109
{1, 2};
110
fftw_codelet_desc fftw_twiddle_3_desc =
111
{
112
     "fftw_twiddle_3",
113
     (void (*)()) fftw_twiddle_3,
114
     3,
115
     FFTW_FORWARD,
116
     FFTW_TWIDDLE,
117
     66,
118
     2,
119
     twiddle_order,
120
};