Subversion Repositories shark

Rev

Rev 107 | 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:58 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-backward 4 */
27
 
28
/*
29
 * This function contains 34 FP additions, 18 FP multiplications,
30
 * (or, 28 additions, 12 multiplications, 6 fused multiply/add),
31
 * 15 stack variables, and 32 memory accesses
32
 */
33
static const fftw_real K1_414213562 = FFTW_KONST(+1.414213562373095048801688724209698078569671875);
34
static const fftw_real K2_000000000 = FFTW_KONST(+2.000000000000000000000000000000000000000000000);
35
 
36
/*
37
 * Generator Id's :
107 pj 38
 * $Id: fhb_4.c,v 1.2 2003-03-24 11:14:57 pj Exp $
39
 * $Id: fhb_4.c,v 1.2 2003-03-24 11:14:57 pj Exp $
40
 * $Id: fhb_4.c,v 1.2 2003-03-24 11:14:57 pj Exp $
2 pj 41
 */
42
 
43
void fftw_hc2hc_backward_4(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 + (4 * iostride);
50
     {
51
          fftw_real tmp39;
52
          fftw_real tmp42;
53
          fftw_real tmp37;
54
          fftw_real tmp40;
55
          ASSERT_ALIGNED_DOUBLE();
56
          {
57
               fftw_real tmp38;
58
               fftw_real tmp41;
59
               fftw_real tmp35;
60
               fftw_real tmp36;
61
               ASSERT_ALIGNED_DOUBLE();
62
               tmp38 = X[iostride];
63
               tmp39 = K2_000000000 * tmp38;
64
               tmp41 = Y[-iostride];
65
               tmp42 = K2_000000000 * tmp41;
66
               tmp35 = X[0];
67
               tmp36 = X[2 * iostride];
68
               tmp37 = tmp35 + tmp36;
69
               tmp40 = tmp35 - tmp36;
70
          }
71
          X[2 * iostride] = tmp37 - tmp39;
72
          X[0] = tmp37 + tmp39;
73
          X[3 * iostride] = tmp40 + tmp42;
74
          X[iostride] = tmp40 - tmp42;
75
     }
76
     X = X + dist;
77
     Y = Y - dist;
78
     for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 3) {
79
          fftw_real tmp9;
80
          fftw_real tmp28;
81
          fftw_real tmp18;
82
          fftw_real tmp25;
83
          fftw_real tmp12;
84
          fftw_real tmp24;
85
          fftw_real tmp21;
86
          fftw_real tmp29;
87
          ASSERT_ALIGNED_DOUBLE();
88
          {
89
               fftw_real tmp7;
90
               fftw_real tmp8;
91
               fftw_real tmp16;
92
               fftw_real tmp17;
93
               ASSERT_ALIGNED_DOUBLE();
94
               tmp7 = X[0];
95
               tmp8 = Y[-2 * iostride];
96
               tmp9 = tmp7 + tmp8;
97
               tmp28 = tmp7 - tmp8;
98
               tmp16 = Y[0];
99
               tmp17 = X[2 * iostride];
100
               tmp18 = tmp16 - tmp17;
101
               tmp25 = tmp16 + tmp17;
102
          }
103
          {
104
               fftw_real tmp10;
105
               fftw_real tmp11;
106
               fftw_real tmp19;
107
               fftw_real tmp20;
108
               ASSERT_ALIGNED_DOUBLE();
109
               tmp10 = X[iostride];
110
               tmp11 = Y[-3 * iostride];
111
               tmp12 = tmp10 + tmp11;
112
               tmp24 = tmp10 - tmp11;
113
               tmp19 = Y[-iostride];
114
               tmp20 = X[3 * iostride];
115
               tmp21 = tmp19 - tmp20;
116
               tmp29 = tmp19 + tmp20;
117
          }
118
          X[0] = tmp9 + tmp12;
119
          {
120
               fftw_real tmp14;
121
               fftw_real tmp22;
122
               fftw_real tmp13;
123
               fftw_real tmp15;
124
               ASSERT_ALIGNED_DOUBLE();
125
               tmp14 = tmp9 - tmp12;
126
               tmp22 = tmp18 - tmp21;
127
               tmp13 = c_re(W[1]);
128
               tmp15 = c_im(W[1]);
129
               X[2 * iostride] = (tmp13 * tmp14) + (tmp15 * tmp22);
130
               Y[-iostride] = (tmp13 * tmp22) - (tmp15 * tmp14);
131
          }
132
          Y[-3 * iostride] = tmp18 + tmp21;
133
          {
134
               fftw_real tmp26;
135
               fftw_real tmp30;
136
               fftw_real tmp23;
137
               fftw_real tmp27;
138
               ASSERT_ALIGNED_DOUBLE();
139
               tmp26 = tmp24 + tmp25;
140
               tmp30 = tmp28 - tmp29;
141
               tmp23 = c_re(W[0]);
142
               tmp27 = c_im(W[0]);
143
               Y[-2 * iostride] = (tmp23 * tmp26) - (tmp27 * tmp30);
144
               X[iostride] = (tmp27 * tmp26) + (tmp23 * tmp30);
145
          }
146
          {
147
               fftw_real tmp32;
148
               fftw_real tmp34;
149
               fftw_real tmp31;
150
               fftw_real tmp33;
151
               ASSERT_ALIGNED_DOUBLE();
152
               tmp32 = tmp25 - tmp24;
153
               tmp34 = tmp28 + tmp29;
154
               tmp31 = c_re(W[2]);
155
               tmp33 = c_im(W[2]);
156
               Y[0] = (tmp31 * tmp32) - (tmp33 * tmp34);
157
               X[3 * iostride] = (tmp33 * tmp32) + (tmp31 * tmp34);
158
          }
159
     }
160
     if (i == m) {
161
          fftw_real tmp1;
162
          fftw_real tmp2;
163
          fftw_real tmp3;
164
          fftw_real tmp4;
165
          fftw_real tmp5;
166
          fftw_real tmp6;
167
          ASSERT_ALIGNED_DOUBLE();
168
          tmp1 = X[0];
169
          tmp2 = X[iostride];
170
          tmp3 = tmp1 - tmp2;
171
          tmp4 = Y[0];
172
          tmp5 = Y[-iostride];
173
          tmp6 = tmp4 + tmp5;
174
          X[0] = K2_000000000 * (tmp1 + tmp2);
175
          X[2 * iostride] = -(K2_000000000 * (tmp4 - tmp5));
176
          X[iostride] = K1_414213562 * (tmp3 - tmp6);
177
          X[3 * iostride] = -(K1_414213562 * (tmp3 + tmp6));
178
     }
179
}
180
 
181
static const int twiddle_order[] =
182
{1, 2, 3};
183
fftw_codelet_desc fftw_hc2hc_backward_4_desc =
184
{
185
     "fftw_hc2hc_backward_4",
186
     (void (*)()) fftw_hc2hc_backward_4,
187
     4,
188
     FFTW_BACKWARD,
189
     FFTW_HC2HC,
190
     102,
191
     3,
192
     twiddle_order,
193
};