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:28 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 2 */
27
 
28
/*
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
32
 */
33
 
34
/*
35
 * Generator Id's :
107 pj 36
 * $Id: fhf_2.c,v 1.2 2003-03-24 11:14:57 pj Exp $
37
 * $Id: fhf_2.c,v 1.2 2003-03-24 11:14:57 pj Exp $
38
 * $Id: fhf_2.c,v 1.2 2003-03-24 11:14:57 pj Exp $
2 pj 39
 */
40
 
41
void fftw_hc2hc_forward_2(fftw_real *A, const fftw_complex *W, int iostride, int m, int dist)
42
{
43
     int i;
44
     fftw_real *X;
45
     fftw_real *Y;
46
     X = A;
47
     Y = A + (2 * iostride);
48
     {
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;
56
     }
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];
67
          {
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);
79
          }
80
          Y[-iostride] = tmp3 - tmp8;
81
          X[0] = tmp3 + tmp8;
82
          X[iostride] = -(tmp9 - tmp10);
83
          Y[0] = tmp10 + tmp9;
84
     }
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;
93
     }
94
}
95
 
96
static const int twiddle_order[] =
97
{1};
98
fftw_codelet_desc fftw_hc2hc_forward_2_desc =
99
{
100
     "fftw_hc2hc_forward_2",
101
     (void (*)()) fftw_hc2hc_forward_2,
102
     2,
103
     FFTW_FORWARD,
104
     FFTW_HC2HC,
105
     47,
106
     1,
107
     twiddle_order,
108
};