~ubuntu-branches/ubuntu/trusty/fftw/trusty

« back to all changes in this revision

Viewing changes to rfftw/fhf_2.c

  • Committer: Bazaar Package Importer
  • Author(s): James A. Treacy
  • Date: 2002-03-05 00:28:49 UTC
  • Revision ID: james.westby@ubuntu.com-20020305002849-q0grqhlbeugn4y5j
Tags: upstream-2.1.3
ImportĀ upstreamĀ versionĀ 2.1.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 Sun Nov  7 20:44:42 EST 1999 */
 
22
 
 
23
#include <fftw-int.h>
 
24
#include <fftw.h>
 
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 : 
 
36
 * $Id: exprdag.ml,v 1.41 1999/05/26 15:44:14 fftw Exp $
 
37
 * $Id: fft.ml,v 1.43 1999/05/17 19:44:18 fftw Exp $
 
38
 * $Id: to_c.ml,v 1.25 1999/10/26 21:41:32 stevenj Exp $
 
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
};