changed reading hint
[gromacs/adressmacs.git] / src / fftw / fhf_2.c
blob2c9b2e0095dda1b0c51e8831e4b4e1d9c817675a
1 /*
2 * Copyright (c) 1997-1999 Massachusetts Institute of Technology
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.
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.
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
20 /* This file was automatically generated --- DO NOT EDIT */
21 /* Generated on Tue May 18 13:55:28 EDT 1999 */
23 #include <fftw-int.h>
24 #include <fftw.h>
26 /* Generated by: ./genfft -magic-alignment-check -magic-twiddle-load-all -magic-variables 4 -magic-loopi -hc2hc-forward 2 */
29 * This function contains 8 FP additions, 4 FP multiplications,
30 * (or, 6 additions, 2 multiplications, 2 fused multiply/add),
31 * 11 stack variables, and 16 memory accesses
35 * Generator Id's :
36 * $Id$
37 * $Id$
38 * $Id$
41 void fftw_hc2hc_forward_2(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist)
43 int i;
44 fftw_real *X;
45 fftw_real *Y;
46 X = A;
47 Y = A + (2 * iostride);
49 fftw_real tmp11;
50 fftw_real tmp12;
51 ASSERT_ALIGNED_DOUBLE();
52 tmp11 = X[0];
53 tmp12 = X[iostride];
54 X[iostride] = tmp11 - tmp12;
55 X[0] = tmp11 + tmp12;
57 X = X + dist;
58 Y = Y - dist;
59 for (i = 2; i < m; i = i + 2, X = X + dist, Y = Y - dist, W = W + 1) {
60 fftw_real tmp3;
61 fftw_real tmp9;
62 fftw_real tmp8;
63 fftw_real tmp10;
64 ASSERT_ALIGNED_DOUBLE();
65 tmp3 = X[0];
66 tmp9 = Y[-iostride];
68 fftw_real tmp5;
69 fftw_real tmp7;
70 fftw_real tmp4;
71 fftw_real tmp6;
72 ASSERT_ALIGNED_DOUBLE();
73 tmp5 = X[iostride];
74 tmp7 = Y[0];
75 tmp4 = c_re(W[0]);
76 tmp6 = c_im(W[0]);
77 tmp8 = (tmp4 * tmp5) - (tmp6 * tmp7);
78 tmp10 = (tmp6 * tmp5) + (tmp4 * tmp7);
80 Y[-iostride] = tmp3 - tmp8;
81 X[0] = tmp3 + tmp8;
82 X[iostride] = -(tmp9 - tmp10);
83 Y[0] = tmp10 + tmp9;
85 if (i == m) {
86 fftw_real tmp1;
87 fftw_real tmp2;
88 ASSERT_ALIGNED_DOUBLE();
89 tmp1 = X[0];
90 X[0] = tmp1;
91 tmp2 = X[iostride];
92 Y[0] = -tmp2;
96 static const int twiddle_order[] =
97 {1};
98 fftw_codelet_desc fftw_hc2hc_forward_2_desc =
100 "fftw_hc2hc_forward_2",
101 (void (*)()) fftw_hc2hc_forward_2,
103 FFTW_FORWARD,
104 FFTW_HC2HC,
107 twiddle_order,