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