summaryrefslogtreecommitdiff
path: root/src/fftw3/dft/codelets/standard/n1_6.c
blob: 114679d3912129776b137262dde0275a6dd4b5fc (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
/*
 * 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 6 -name n1_6 -include n.h */

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

#include "n.h"

static void n1_6(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, int v, int ivs, int ovs)
{
     DK(KP866025403, +0.866025403784438646763723170752936183471402627);
     DK(KP500000000, +0.500000000000000000000000000000000000000000000);
     int i;
     for (i = v; i > 0; i = i - 1, ri = ri + ivs, ii = ii + ivs, ro = ro + ovs, io = io + ovs) {
	  E T3, Tb, Tq, Tx, T6, Tc, T9, Td, Ta, Te, Ti, Tu, Tl, Tv, Tr;
	  E Ty;
	  {
	       E T1, T2, To, Tp;
	       T1 = ri[0];
	       T2 = ri[WS(is, 3)];
	       T3 = T1 - T2;
	       Tb = T1 + T2;
	       To = ii[0];
	       Tp = ii[WS(is, 3)];
	       Tq = To - Tp;
	       Tx = To + Tp;
	  }
	  {
	       E T4, T5, T7, T8;
	       T4 = ri[WS(is, 2)];
	       T5 = ri[WS(is, 5)];
	       T6 = T4 - T5;
	       Tc = T4 + T5;
	       T7 = ri[WS(is, 4)];
	       T8 = ri[WS(is, 1)];
	       T9 = T7 - T8;
	       Td = T7 + T8;
	  }
	  Ta = T6 + T9;
	  Te = Tc + Td;
	  {
	       E Tg, Th, Tj, Tk;
	       Tg = ii[WS(is, 2)];
	       Th = ii[WS(is, 5)];
	       Ti = Tg - Th;
	       Tu = Tg + Th;
	       Tj = ii[WS(is, 4)];
	       Tk = ii[WS(is, 1)];
	       Tl = Tj - Tk;
	       Tv = Tj + Tk;
	  }
	  Tr = Ti + Tl;
	  Ty = Tu + Tv;
	  ro[WS(os, 3)] = T3 + Ta;
	  io[WS(os, 3)] = Tq + Tr;
	  ro[0] = Tb + Te;
	  io[0] = Tx + Ty;
	  {
	       E Tf, Tm, Tn, Ts;
	       Tf = FNMS(KP500000000, Ta, T3);
	       Tm = KP866025403 * (Ti - Tl);
	       ro[WS(os, 5)] = Tf - Tm;
	       ro[WS(os, 1)] = Tf + Tm;
	       Tn = KP866025403 * (T9 - T6);
	       Ts = FNMS(KP500000000, Tr, Tq);
	       io[WS(os, 1)] = Tn + Ts;
	       io[WS(os, 5)] = Ts - Tn;
	  }
	  {
	       E Tt, Tw, Tz, TA;
	       Tt = FNMS(KP500000000, Te, Tb);
	       Tw = KP866025403 * (Tu - Tv);
	       ro[WS(os, 2)] = Tt - Tw;
	       ro[WS(os, 4)] = Tt + Tw;
	       Tz = FNMS(KP500000000, Ty, Tx);
	       TA = KP866025403 * (Td - Tc);
	       io[WS(os, 2)] = Tz - TA;
	       io[WS(os, 4)] = TA + Tz;
	  }
     }
}

static const kdft_desc desc = { 6, "n1_6", {32, 4, 4, 0}, &GENUS, 0, 0, 0, 0 };
void X(codelet_n1_6) (planner *p) {
     X(kdft_register) (p, n1_6, &desc);
}