Mercurial > hg > js-dsp-test
comparison fft/fftw/fftw-3.3.4/rdft/scalar/r2cb/r2cb_10.c @ 19:26056e866c29
Add FFTW to comparison table
author | Chris Cannam |
---|---|
date | Tue, 06 Oct 2015 13:08:39 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
18:8db794ca3e0b | 19:26056e866c29 |
---|---|
1 /* | |
2 * Copyright (c) 2003, 2007-14 Matteo Frigo | |
3 * Copyright (c) 2003, 2007-14 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 Tue Mar 4 13:50:24 EST 2014 */ | |
23 | |
24 #include "codelet-rdft.h" | |
25 | |
26 #ifdef HAVE_FMA | |
27 | |
28 /* Generated by: ../../../genfft/gen_r2cb.native -fma -reorder-insns -schedule-for-pipeline -compact -variables 4 -pipeline-latency 4 -sign 1 -n 10 -name r2cb_10 -include r2cb.h */ | |
29 | |
30 /* | |
31 * This function contains 34 FP additions, 20 FP multiplications, | |
32 * (or, 14 additions, 0 multiplications, 20 fused multiply/add), | |
33 * 30 stack variables, 5 constants, and 20 memory accesses | |
34 */ | |
35 #include "r2cb.h" | |
36 | |
37 static void r2cb_10(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs) | |
38 { | |
39 DK(KP1_902113032, +1.902113032590307144232878666758764286811397268); | |
40 DK(KP1_118033988, +1.118033988749894848204586834365638117720309180); | |
41 DK(KP2_000000000, +2.000000000000000000000000000000000000000000000); | |
42 DK(KP500000000, +0.500000000000000000000000000000000000000000000); | |
43 DK(KP618033988, +0.618033988749894848204586834365638117720309180); | |
44 { | |
45 INT i; | |
46 for (i = v; i > 0; i = i - 1, R0 = R0 + ovs, R1 = R1 + ovs, Cr = Cr + ivs, Ci = Ci + ivs, MAKE_VOLATILE_STRIDE(40, rs), MAKE_VOLATILE_STRIDE(40, csr), MAKE_VOLATILE_STRIDE(40, csi)) { | |
47 E Tb, T3, Tc, T6, Tq, To, Ty, Tw, Td, T9; | |
48 { | |
49 E Tu, Tn, T7, Tv, Tk, T8; | |
50 { | |
51 E T1, T2, Tl, Tm; | |
52 T1 = Cr[0]; | |
53 T2 = Cr[WS(csr, 5)]; | |
54 Tl = Ci[WS(csi, 2)]; | |
55 Tm = Ci[WS(csi, 3)]; | |
56 { | |
57 E Ti, Tj, T4, T5; | |
58 Ti = Ci[WS(csi, 4)]; | |
59 Tb = T1 + T2; | |
60 T3 = T1 - T2; | |
61 Tu = Tl + Tm; | |
62 Tn = Tl - Tm; | |
63 Tj = Ci[WS(csi, 1)]; | |
64 T4 = Cr[WS(csr, 2)]; | |
65 T5 = Cr[WS(csr, 3)]; | |
66 T7 = Cr[WS(csr, 4)]; | |
67 Tv = Ti + Tj; | |
68 Tk = Ti - Tj; | |
69 Tc = T4 + T5; | |
70 T6 = T4 - T5; | |
71 T8 = Cr[WS(csr, 1)]; | |
72 } | |
73 } | |
74 Tq = FMA(KP618033988, Tk, Tn); | |
75 To = FNMS(KP618033988, Tn, Tk); | |
76 Ty = FNMS(KP618033988, Tu, Tv); | |
77 Tw = FMA(KP618033988, Tv, Tu); | |
78 Td = T7 + T8; | |
79 T9 = T7 - T8; | |
80 } | |
81 { | |
82 E Te, Tg, Ta, Ts, Tf, Tr; | |
83 Te = Tc + Td; | |
84 Tg = Tc - Td; | |
85 Ta = T6 + T9; | |
86 Ts = T6 - T9; | |
87 Tf = FNMS(KP500000000, Te, Tb); | |
88 R0[0] = FMA(KP2_000000000, Te, Tb); | |
89 Tr = FNMS(KP500000000, Ta, T3); | |
90 R1[WS(rs, 2)] = FMA(KP2_000000000, Ta, T3); | |
91 { | |
92 E Th, Tp, Tt, Tx; | |
93 Th = FNMS(KP1_118033988, Tg, Tf); | |
94 Tp = FMA(KP1_118033988, Tg, Tf); | |
95 Tt = FMA(KP1_118033988, Ts, Tr); | |
96 Tx = FNMS(KP1_118033988, Ts, Tr); | |
97 R0[WS(rs, 3)] = FNMS(KP1_902113032, Tq, Tp); | |
98 R0[WS(rs, 2)] = FMA(KP1_902113032, Tq, Tp); | |
99 R0[WS(rs, 1)] = FMA(KP1_902113032, To, Th); | |
100 R0[WS(rs, 4)] = FNMS(KP1_902113032, To, Th); | |
101 R1[WS(rs, 1)] = FNMS(KP1_902113032, Ty, Tx); | |
102 R1[WS(rs, 3)] = FMA(KP1_902113032, Ty, Tx); | |
103 R1[WS(rs, 4)] = FMA(KP1_902113032, Tw, Tt); | |
104 R1[0] = FNMS(KP1_902113032, Tw, Tt); | |
105 } | |
106 } | |
107 } | |
108 } | |
109 } | |
110 | |
111 static const kr2c_desc desc = { 10, "r2cb_10", {14, 0, 20, 0}, &GENUS }; | |
112 | |
113 void X(codelet_r2cb_10) (planner *p) { | |
114 X(kr2c_register) (p, r2cb_10, &desc); | |
115 } | |
116 | |
117 #else /* HAVE_FMA */ | |
118 | |
119 /* Generated by: ../../../genfft/gen_r2cb.native -compact -variables 4 -pipeline-latency 4 -sign 1 -n 10 -name r2cb_10 -include r2cb.h */ | |
120 | |
121 /* | |
122 * This function contains 34 FP additions, 14 FP multiplications, | |
123 * (or, 26 additions, 6 multiplications, 8 fused multiply/add), | |
124 * 26 stack variables, 5 constants, and 20 memory accesses | |
125 */ | |
126 #include "r2cb.h" | |
127 | |
128 static void r2cb_10(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs) | |
129 { | |
130 DK(KP500000000, +0.500000000000000000000000000000000000000000000); | |
131 DK(KP1_902113032, +1.902113032590307144232878666758764286811397268); | |
132 DK(KP1_175570504, +1.175570504584946258337411909278145537195304875); | |
133 DK(KP2_000000000, +2.000000000000000000000000000000000000000000000); | |
134 DK(KP1_118033988, +1.118033988749894848204586834365638117720309180); | |
135 { | |
136 INT i; | |
137 for (i = v; i > 0; i = i - 1, R0 = R0 + ovs, R1 = R1 + ovs, Cr = Cr + ivs, Ci = Ci + ivs, MAKE_VOLATILE_STRIDE(40, rs), MAKE_VOLATILE_STRIDE(40, csr), MAKE_VOLATILE_STRIDE(40, csi)) { | |
138 E T3, Tb, Tn, Tv, Tk, Tu, Ta, Ts, Te, Tg, Ti, Tj; | |
139 { | |
140 E T1, T2, Tl, Tm; | |
141 T1 = Cr[0]; | |
142 T2 = Cr[WS(csr, 5)]; | |
143 T3 = T1 - T2; | |
144 Tb = T1 + T2; | |
145 Tl = Ci[WS(csi, 4)]; | |
146 Tm = Ci[WS(csi, 1)]; | |
147 Tn = Tl - Tm; | |
148 Tv = Tl + Tm; | |
149 } | |
150 Ti = Ci[WS(csi, 2)]; | |
151 Tj = Ci[WS(csi, 3)]; | |
152 Tk = Ti - Tj; | |
153 Tu = Ti + Tj; | |
154 { | |
155 E T6, Tc, T9, Td; | |
156 { | |
157 E T4, T5, T7, T8; | |
158 T4 = Cr[WS(csr, 2)]; | |
159 T5 = Cr[WS(csr, 3)]; | |
160 T6 = T4 - T5; | |
161 Tc = T4 + T5; | |
162 T7 = Cr[WS(csr, 4)]; | |
163 T8 = Cr[WS(csr, 1)]; | |
164 T9 = T7 - T8; | |
165 Td = T7 + T8; | |
166 } | |
167 Ta = T6 + T9; | |
168 Ts = KP1_118033988 * (T6 - T9); | |
169 Te = Tc + Td; | |
170 Tg = KP1_118033988 * (Tc - Td); | |
171 } | |
172 R1[WS(rs, 2)] = FMA(KP2_000000000, Ta, T3); | |
173 R0[0] = FMA(KP2_000000000, Te, Tb); | |
174 { | |
175 E To, Tq, Th, Tp, Tf; | |
176 To = FNMS(KP1_902113032, Tn, KP1_175570504 * Tk); | |
177 Tq = FMA(KP1_902113032, Tk, KP1_175570504 * Tn); | |
178 Tf = FNMS(KP500000000, Te, Tb); | |
179 Th = Tf - Tg; | |
180 Tp = Tg + Tf; | |
181 R0[WS(rs, 1)] = Th - To; | |
182 R0[WS(rs, 2)] = Tp + Tq; | |
183 R0[WS(rs, 4)] = Th + To; | |
184 R0[WS(rs, 3)] = Tp - Tq; | |
185 } | |
186 { | |
187 E Tw, Ty, Tt, Tx, Tr; | |
188 Tw = FNMS(KP1_902113032, Tv, KP1_175570504 * Tu); | |
189 Ty = FMA(KP1_902113032, Tu, KP1_175570504 * Tv); | |
190 Tr = FNMS(KP500000000, Ta, T3); | |
191 Tt = Tr - Ts; | |
192 Tx = Ts + Tr; | |
193 R1[WS(rs, 3)] = Tt - Tw; | |
194 R1[WS(rs, 4)] = Tx + Ty; | |
195 R1[WS(rs, 1)] = Tt + Tw; | |
196 R1[0] = Tx - Ty; | |
197 } | |
198 } | |
199 } | |
200 } | |
201 | |
202 static const kr2c_desc desc = { 10, "r2cb_10", {26, 6, 8, 0}, &GENUS }; | |
203 | |
204 void X(codelet_r2cb_10) (planner *p) { | |
205 X(kr2c_register) (p, r2cb_10, &desc); | |
206 } | |
207 | |
208 #endif /* HAVE_FMA */ |