Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.3/dft/scalar/codelets/n1_4.c @ 10:37bf6b4a2645
Add FFTW3
author | Chris Cannam |
---|---|
date | Wed, 20 Mar 2013 15:35:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
9:c0fb53affa76 | 10:37bf6b4a2645 |
---|---|
1 /* | |
2 * Copyright (c) 2003, 2007-11 Matteo Frigo | |
3 * Copyright (c) 2003, 2007-11 Massachusetts Institute of Technology | |
4 * | |
5 * This program is free software; you can redistribute it and/or modify | |
6 * it under the terms of the GNU General Public License as published by | |
7 * the Free Software Foundation; either version 2 of the License, or | |
8 * (at your option) any later version. | |
9 * | |
10 * This program is distributed in the hope that it will be useful, | |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 * GNU General Public License for more details. | |
14 * | |
15 * You should have received a copy of the GNU General Public License | |
16 * along with this program; if not, write to the Free Software | |
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
18 * | |
19 */ | |
20 | |
21 /* This file was automatically generated --- DO NOT EDIT */ | |
22 /* Generated on Sun Nov 25 07:35:42 EST 2012 */ | |
23 | |
24 #include "codelet-dft.h" | |
25 | |
26 #ifdef HAVE_FMA | |
27 | |
28 /* Generated by: ../../../genfft/gen_notw.native -fma -reorder-insns -schedule-for-pipeline -compact -variables 4 -pipeline-latency 4 -n 4 -name n1_4 -include n.h */ | |
29 | |
30 /* | |
31 * This function contains 16 FP additions, 0 FP multiplications, | |
32 * (or, 16 additions, 0 multiplications, 0 fused multiply/add), | |
33 * 13 stack variables, 0 constants, and 16 memory accesses | |
34 */ | |
35 #include "n.h" | |
36 | |
37 static void n1_4(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs) | |
38 { | |
39 { | |
40 INT i; | |
41 for (i = v; i > 0; i = i - 1, ri = ri + ivs, ii = ii + ivs, ro = ro + ovs, io = io + ovs, MAKE_VOLATILE_STRIDE(16, is), MAKE_VOLATILE_STRIDE(16, os)) { | |
42 E T4, Tb, T3, Tf, T9, T5, Tc, Td; | |
43 { | |
44 E T1, T2, T7, T8; | |
45 T1 = ri[0]; | |
46 T2 = ri[WS(is, 2)]; | |
47 T7 = ii[0]; | |
48 T8 = ii[WS(is, 2)]; | |
49 T4 = ri[WS(is, 1)]; | |
50 Tb = T1 - T2; | |
51 T3 = T1 + T2; | |
52 Tf = T7 + T8; | |
53 T9 = T7 - T8; | |
54 T5 = ri[WS(is, 3)]; | |
55 Tc = ii[WS(is, 1)]; | |
56 Td = ii[WS(is, 3)]; | |
57 } | |
58 { | |
59 E T6, Ta, Te, Tg; | |
60 T6 = T4 + T5; | |
61 Ta = T4 - T5; | |
62 Te = Tc - Td; | |
63 Tg = Tc + Td; | |
64 io[WS(os, 3)] = Ta + T9; | |
65 io[WS(os, 1)] = T9 - Ta; | |
66 ro[0] = T3 + T6; | |
67 ro[WS(os, 2)] = T3 - T6; | |
68 io[0] = Tf + Tg; | |
69 io[WS(os, 2)] = Tf - Tg; | |
70 ro[WS(os, 3)] = Tb - Te; | |
71 ro[WS(os, 1)] = Tb + Te; | |
72 } | |
73 } | |
74 } | |
75 } | |
76 | |
77 static const kdft_desc desc = { 4, "n1_4", {16, 0, 0, 0}, &GENUS, 0, 0, 0, 0 }; | |
78 | |
79 void X(codelet_n1_4) (planner *p) { | |
80 X(kdft_register) (p, n1_4, &desc); | |
81 } | |
82 | |
83 #else /* HAVE_FMA */ | |
84 | |
85 /* Generated by: ../../../genfft/gen_notw.native -compact -variables 4 -pipeline-latency 4 -n 4 -name n1_4 -include n.h */ | |
86 | |
87 /* | |
88 * This function contains 16 FP additions, 0 FP multiplications, | |
89 * (or, 16 additions, 0 multiplications, 0 fused multiply/add), | |
90 * 13 stack variables, 0 constants, and 16 memory accesses | |
91 */ | |
92 #include "n.h" | |
93 | |
94 static void n1_4(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs) | |
95 { | |
96 { | |
97 INT i; | |
98 for (i = v; i > 0; i = i - 1, ri = ri + ivs, ii = ii + ivs, ro = ro + ovs, io = io + ovs, MAKE_VOLATILE_STRIDE(16, is), MAKE_VOLATILE_STRIDE(16, os)) { | |
99 E T3, Tb, T9, Tf, T6, Ta, Te, Tg; | |
100 { | |
101 E T1, T2, T7, T8; | |
102 T1 = ri[0]; | |
103 T2 = ri[WS(is, 2)]; | |
104 T3 = T1 + T2; | |
105 Tb = T1 - T2; | |
106 T7 = ii[0]; | |
107 T8 = ii[WS(is, 2)]; | |
108 T9 = T7 - T8; | |
109 Tf = T7 + T8; | |
110 } | |
111 { | |
112 E T4, T5, Tc, Td; | |
113 T4 = ri[WS(is, 1)]; | |
114 T5 = ri[WS(is, 3)]; | |
115 T6 = T4 + T5; | |
116 Ta = T4 - T5; | |
117 Tc = ii[WS(is, 1)]; | |
118 Td = ii[WS(is, 3)]; | |
119 Te = Tc - Td; | |
120 Tg = Tc + Td; | |
121 } | |
122 ro[WS(os, 2)] = T3 - T6; | |
123 io[WS(os, 2)] = Tf - Tg; | |
124 ro[0] = T3 + T6; | |
125 io[0] = Tf + Tg; | |
126 io[WS(os, 1)] = T9 - Ta; | |
127 ro[WS(os, 1)] = Tb + Te; | |
128 io[WS(os, 3)] = Ta + T9; | |
129 ro[WS(os, 3)] = Tb - Te; | |
130 } | |
131 } | |
132 } | |
133 | |
134 static const kdft_desc desc = { 4, "n1_4", {16, 0, 0, 0}, &GENUS, 0, 0, 0, 0 }; | |
135 | |
136 void X(codelet_n1_4) (planner *p) { | |
137 X(kdft_register) (p, n1_4, &desc); | |
138 } | |
139 | |
140 #endif /* HAVE_FMA */ |