summaryrefslogtreecommitdiff
path: root/src/fftw3/rdft/codelets/hc2r/hb_6.c
blob: 1a246968247ed4406d3fc5dc47419d763d3fd2b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
/*
 * Copyright (c) 2003 Matteo Frigo
 * Copyright (c) 2003 Massachusetts Institute of Technology
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */

/* This file was automatically generated --- DO NOT EDIT */
/* Generated on Sat Jul  5 22:11:25 EDT 2003 */

#include "codelet-rdft.h"

/* Generated by: /homee/stevenj/cvs/fftw3.0.1/genfft/gen_hc2hc -compact -variables 4 -sign 1 -n 6 -dif -name hb_6 -include hb.h */

/*
 * This function contains 46 FP additions, 28 FP multiplications,
 * (or, 32 additions, 14 multiplications, 14 fused multiply/add),
 * 25 stack variables, and 24 memory accesses
 */
/*
 * Generator Id's : 
 * $Id: hb_6.c,v 1.1 2008/10/17 06:12:08 scuri Exp $
 * $Id: hb_6.c,v 1.1 2008/10/17 06:12:08 scuri Exp $
 * $Id: hb_6.c,v 1.1 2008/10/17 06:12:08 scuri Exp $
 */

#include "hb.h"

static const R *hb_6(R *rio, R *iio, const R *W, stride ios, int m, int dist)
{
     DK(KP500000000, +0.500000000000000000000000000000000000000000000);
     DK(KP866025403, +0.866025403784438646763723170752936183471402627);
     int i;
     for (i = m - 2; i > 0; i = i - 2, rio = rio + dist, iio = iio - dist, W = W + 10) {
	  E T3, Ty, Tp, TE, Ta, TO, Tm, TB, Tj, TL, Tq, TH;
	  {
	       E T1, T2, Tn, To;
	       T1 = rio[0];
	       T2 = iio[-WS(ios, 3)];
	       T3 = T1 + T2;
	       Ty = T1 - T2;
	       Tn = iio[0];
	       To = rio[WS(ios, 3)];
	       Tp = Tn - To;
	       TE = Tn + To;
	  }
	  {
	       E T6, Tz, T9, TA;
	       {
		    E T4, T5, T7, T8;
		    T4 = rio[WS(ios, 2)];
		    T5 = iio[-WS(ios, 5)];
		    T6 = T4 + T5;
		    Tz = T4 - T5;
		    T7 = iio[-WS(ios, 4)];
		    T8 = rio[WS(ios, 1)];
		    T9 = T7 + T8;
		    TA = T7 - T8;
	       }
	       Ta = T6 + T9;
	       TO = KP866025403 * (Tz - TA);
	       Tm = KP866025403 * (T6 - T9);
	       TB = Tz + TA;
	  }
	  {
	       E Tf, TF, Ti, TG;
	       {
		    E Td, Te, Tg, Th;
		    Td = iio[-WS(ios, 1)];
		    Te = rio[WS(ios, 4)];
		    Tf = Td - Te;
		    TF = Te + Td;
		    Tg = iio[-WS(ios, 2)];
		    Th = rio[WS(ios, 5)];
		    Ti = Tg - Th;
		    TG = Tg + Th;
	       }
	       Tj = KP866025403 * (Tf - Ti);
	       TL = KP866025403 * (TF + TG);
	       Tq = Tf + Ti;
	       TH = TF - TG;
	  }
	  rio[0] = T3 + Ta;
	  iio[-WS(ios, 5)] = Tp + Tq;
	  {
	       E TC, TI, Tx, TD;
	       TC = Ty + TB;
	       TI = TE - TH;
	       Tx = W[4];
	       TD = W[5];
	       rio[WS(ios, 3)] = FNMS(TD, TI, Tx * TC);
	       iio[-WS(ios, 2)] = FMA(TD, TC, Tx * TI);
	  }
	  {
	       E Tk, Tu, Ts, Tw, Tc, Tr;
	       Tc = FNMS(KP500000000, Ta, T3);
	       Tk = Tc + Tj;
	       Tu = Tc - Tj;
	       Tr = FNMS(KP500000000, Tq, Tp);
	       Ts = Tm + Tr;
	       Tw = Tr - Tm;
	       {
		    E Tb, Tl, Tt, Tv;
		    Tb = W[6];
		    Tl = W[7];
		    rio[WS(ios, 4)] = FNMS(Tl, Ts, Tb * Tk);
		    iio[-WS(ios, 1)] = FMA(Tl, Tk, Tb * Ts);
		    Tt = W[2];
		    Tv = W[3];
		    rio[WS(ios, 2)] = FNMS(Tv, Tw, Tt * Tu);
		    iio[-WS(ios, 3)] = FMA(Tv, Tu, Tt * Tw);
	       }
	  }
	  {
	       E TM, TU, TQ, TS, TK, TP;
	       TK = FNMS(KP500000000, TB, Ty);
	       TM = TK - TL;
	       TU = TK + TL;
	       TP = FMA(KP500000000, TH, TE);
	       TQ = TO + TP;
	       TS = TP - TO;
	       {
		    E TJ, TN, TR, TT;
		    TJ = W[0];
		    TN = W[1];
		    rio[WS(ios, 1)] = FNMS(TN, TQ, TJ * TM);
		    iio[-WS(ios, 4)] = FMA(TJ, TQ, TN * TM);
		    TR = W[8];
		    TT = W[9];
		    iio[0] = FMA(TR, TS, TT * TU);
		    rio[WS(ios, 5)] = FNMS(TT, TS, TR * TU);
	       }
	  }
     }
     return W;
}

static const tw_instr twinstr[] = {
     {TW_FULL, 0, 6},
     {TW_NEXT, 1, 0}
};

static const hc2hc_desc desc = { 6, "hb_6", twinstr, {32, 14, 14, 0}, &GENUS, 0, 0, 0 };

void X(codelet_hb_6) (planner *p) {
     X(khc2hc_dif_register) (p, hb_6, &desc);
}