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