summaryrefslogtreecommitdiff
path: root/src/fftw3/dft/codelets/standard/n1_8.c
blob: 114592daa68ceff5093cd1414dba50ab2a027211 (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
/*
 * 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 21:29:32 EDT 2003 */

#include "codelet-dft.h"

/* Generated by: /homee/stevenj/cvs/fftw3.0.1/genfft/gen_notw -compact -variables 4 -n 8 -name n1_8 -include n.h */

/*
 * This function contains 52 FP additions, 4 FP multiplications,
 * (or, 52 additions, 4 multiplications, 0 fused multiply/add),
 * 28 stack variables, and 32 memory accesses
 */
/*
 * Generator Id's : 
 * $Id: n1_8.c,v 1.1 2008/10/17 06:11:09 scuri Exp $
 * $Id: n1_8.c,v 1.1 2008/10/17 06:11:09 scuri Exp $
 * $Id: n1_8.c,v 1.1 2008/10/17 06:11:09 scuri Exp $
 */

#include "n.h"

static void n1_8(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, int v, int ivs, int ovs)
{
     DK(KP707106781, +0.707106781186547524400844362104849039284835938);
     int i;
     for (i = v; i > 0; i = i - 1, ri = ri + ivs, ii = ii + ivs, ro = ro + ovs, io = io + ovs) {
	  E T3, Tn, Ti, TC, T6, TB, Tl, To, Td, TN, Tz, TH, Ta, TM, Tu;
	  E TG;
	  {
	       E T1, T2, Tj, Tk;
	       T1 = ri[0];
	       T2 = ri[WS(is, 4)];
	       T3 = T1 + T2;
	       Tn = T1 - T2;
	       {
		    E Tg, Th, T4, T5;
		    Tg = ii[0];
		    Th = ii[WS(is, 4)];
		    Ti = Tg + Th;
		    TC = Tg - Th;
		    T4 = ri[WS(is, 2)];
		    T5 = ri[WS(is, 6)];
		    T6 = T4 + T5;
		    TB = T4 - T5;
	       }
	       Tj = ii[WS(is, 2)];
	       Tk = ii[WS(is, 6)];
	       Tl = Tj + Tk;
	       To = Tj - Tk;
	       {
		    E Tb, Tc, Tv, Tw, Tx, Ty;
		    Tb = ri[WS(is, 7)];
		    Tc = ri[WS(is, 3)];
		    Tv = Tb - Tc;
		    Tw = ii[WS(is, 7)];
		    Tx = ii[WS(is, 3)];
		    Ty = Tw - Tx;
		    Td = Tb + Tc;
		    TN = Tw + Tx;
		    Tz = Tv - Ty;
		    TH = Tv + Ty;
	       }
	       {
		    E T8, T9, Tq, Tr, Ts, Tt;
		    T8 = ri[WS(is, 1)];
		    T9 = ri[WS(is, 5)];
		    Tq = T8 - T9;
		    Tr = ii[WS(is, 1)];
		    Ts = ii[WS(is, 5)];
		    Tt = Tr - Ts;
		    Ta = T8 + T9;
		    TM = Tr + Ts;
		    Tu = Tq + Tt;
		    TG = Tt - Tq;
	       }
	  }
	  {
	       E T7, Te, TP, TQ;
	       T7 = T3 + T6;
	       Te = Ta + Td;
	       ro[WS(os, 4)] = T7 - Te;
	       ro[0] = T7 + Te;
	       TP = Ti + Tl;
	       TQ = TM + TN;
	       io[WS(os, 4)] = TP - TQ;
	       io[0] = TP + TQ;
	  }
	  {
	       E Tf, Tm, TL, TO;
	       Tf = Td - Ta;
	       Tm = Ti - Tl;
	       io[WS(os, 2)] = Tf + Tm;
	       io[WS(os, 6)] = Tm - Tf;
	       TL = T3 - T6;
	       TO = TM - TN;
	       ro[WS(os, 6)] = TL - TO;
	       ro[WS(os, 2)] = TL + TO;
	  }
	  {
	       E Tp, TA, TJ, TK;
	       Tp = Tn + To;
	       TA = KP707106781 * (Tu + Tz);
	       ro[WS(os, 5)] = Tp - TA;
	       ro[WS(os, 1)] = Tp + TA;
	       TJ = TC - TB;
	       TK = KP707106781 * (TG + TH);
	       io[WS(os, 5)] = TJ - TK;
	       io[WS(os, 1)] = TJ + TK;
	  }
	  {
	       E TD, TE, TF, TI;
	       TD = TB + TC;
	       TE = KP707106781 * (Tz - Tu);
	       io[WS(os, 7)] = TD - TE;
	       io[WS(os, 3)] = TD + TE;
	       TF = Tn - To;
	       TI = KP707106781 * (TG - TH);
	       ro[WS(os, 7)] = TF - TI;
	       ro[WS(os, 3)] = TF + TI;
	  }
     }
}

static const kdft_desc desc = { 8, "n1_8", {52, 4, 0, 0}, &GENUS, 0, 0, 0, 0 };
void X(codelet_n1_8) (planner *p) {
     X(kdft_register) (p, n1_8, &desc);
}