comparison fft/fftw/fftw-3.3.4/rdft/scalar/r2cb/r2cb_11.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 11 -name r2cb_11 -include r2cb.h */
29
30 /*
31 * This function contains 60 FP additions, 56 FP multiplications,
32 * (or, 4 additions, 0 multiplications, 56 fused multiply/add),
33 * 53 stack variables, 11 constants, and 22 memory accesses
34 */
35 #include "r2cb.h"
36
37 static void r2cb_11(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs)
38 {
39 DK(KP1_979642883, +1.979642883761865464752184075553437574753038744);
40 DK(KP1_918985947, +1.918985947228994779780736114132655398124909697);
41 DK(KP876768831, +0.876768831002589333891339807079336796764054852);
42 DK(KP918985947, +0.918985947228994779780736114132655398124909697);
43 DK(KP778434453, +0.778434453334651800608337670740821884709317477);
44 DK(KP2_000000000, +2.000000000000000000000000000000000000000000000);
45 DK(KP634356270, +0.634356270682424498893150776899916060542806975);
46 DK(KP342584725, +0.342584725681637509502641509861112333758894680);
47 DK(KP830830026, +0.830830026003772851058548298459246407048009821);
48 DK(KP715370323, +0.715370323453429719112414662767260662417897278);
49 DK(KP521108558, +0.521108558113202722944698153526659300680427422);
50 {
51 INT i;
52 for (i = v; i > 0; i = i - 1, R0 = R0 + ovs, R1 = R1 + ovs, Cr = Cr + ivs, Ci = Ci + ivs, MAKE_VOLATILE_STRIDE(44, rs), MAKE_VOLATILE_STRIDE(44, csr), MAKE_VOLATILE_STRIDE(44, csi)) {
53 E Tf, Tq, Tt, Tu;
54 {
55 E T1, Td, Th, Te, Tg, T2, Ts, TK, TB, TT, Tj, T6, T3, T4, T5;
56 E Tr;
57 T1 = Cr[0];
58 Td = Ci[WS(csi, 3)];
59 Th = Ci[WS(csi, 5)];
60 Te = Ci[WS(csi, 2)];
61 Tf = Ci[WS(csi, 4)];
62 Tg = Ci[WS(csi, 1)];
63 Tr = FMA(KP521108558, Td, Th);
64 T2 = Cr[WS(csr, 1)];
65 {
66 E TJ, TA, TS, Ti;
67 TJ = FMA(KP521108558, Tf, Td);
68 TA = FNMS(KP521108558, Te, Tf);
69 TS = FMS(KP521108558, Tg, Te);
70 Ti = FMA(KP521108558, Th, Tg);
71 Ts = FNMS(KP715370323, Tr, Te);
72 TK = FMA(KP715370323, TJ, Tg);
73 TB = FMA(KP715370323, TA, Th);
74 TT = FMA(KP715370323, TS, Td);
75 Tj = FMA(KP715370323, Ti, Tf);
76 T6 = Cr[WS(csr, 5)];
77 }
78 T3 = Cr[WS(csr, 2)];
79 T4 = Cr[WS(csr, 3)];
80 T5 = Cr[WS(csr, 4)];
81 {
82 E TG, Tx, To, Tl, Tb, TU, TQ, TP, Ta;
83 {
84 E Tk, TE, Tv, T8;
85 Tk = FMA(KP830830026, Tj, Te);
86 TE = FNMS(KP342584725, T3, T6);
87 Tv = FNMS(KP342584725, T2, T4);
88 T8 = FNMS(KP342584725, T4, T3);
89 {
90 E T7, Tm, TN, TF;
91 T7 = T2 + T3 + T4 + T5 + T6;
92 Tm = FNMS(KP342584725, T5, T2);
93 TN = FNMS(KP342584725, T6, T5);
94 TF = FNMS(KP634356270, TE, T2);
95 {
96 E Tw, T9, Tn, TO;
97 Tw = FNMS(KP634356270, Tv, T6);
98 T9 = FNMS(KP634356270, T8, T5);
99 R0[0] = FMA(KP2_000000000, T7, T1);
100 Tn = FNMS(KP634356270, Tm, T3);
101 TO = FNMS(KP634356270, TN, T4);
102 TG = FNMS(KP778434453, TF, T4);
103 Tx = FNMS(KP778434453, Tw, T5);
104 Ta = FNMS(KP778434453, T9, T2);
105 To = FNMS(KP778434453, Tn, T6);
106 TP = FNMS(KP778434453, TO, T3);
107 Tl = FMA(KP918985947, Tk, Td);
108 }
109 }
110 }
111 Tb = FNMS(KP876768831, Ta, T6);
112 TU = FNMS(KP830830026, TT, Tf);
113 TQ = FNMS(KP876768831, TP, T2);
114 {
115 E TI, TL, Ty, TC;
116 {
117 E Tc, TV, TR, TH;
118 TH = FNMS(KP876768831, TG, T5);
119 Tc = FNMS(KP1_918985947, Tb, T1);
120 TV = FNMS(KP918985947, TU, Th);
121 TR = FNMS(KP1_918985947, TQ, T1);
122 TI = FNMS(KP1_918985947, TH, T1);
123 R0[WS(rs, 5)] = FMA(KP1_979642883, Tl, Tc);
124 R1[0] = FNMS(KP1_979642883, Tl, Tc);
125 R0[WS(rs, 3)] = FMA(KP1_979642883, TV, TR);
126 R1[WS(rs, 2)] = FNMS(KP1_979642883, TV, TR);
127 TL = FNMS(KP830830026, TK, Th);
128 }
129 Ty = FNMS(KP876768831, Tx, T3);
130 TC = FNMS(KP830830026, TB, Td);
131 {
132 E TM, Tz, TD, Tp;
133 Tp = FNMS(KP876768831, To, T4);
134 TM = FMA(KP918985947, TL, Te);
135 Tz = FNMS(KP1_918985947, Ty, T1);
136 TD = FNMS(KP918985947, TC, Tg);
137 Tq = FNMS(KP1_918985947, Tp, T1);
138 R0[WS(rs, 2)] = FMA(KP1_979642883, TM, TI);
139 R1[WS(rs, 3)] = FNMS(KP1_979642883, TM, TI);
140 R0[WS(rs, 4)] = FMA(KP1_979642883, TD, Tz);
141 R1[WS(rs, 1)] = FNMS(KP1_979642883, TD, Tz);
142 Tt = FMA(KP830830026, Ts, Tg);
143 }
144 }
145 }
146 }
147 Tu = FNMS(KP918985947, Tt, Tf);
148 R0[WS(rs, 1)] = FMA(KP1_979642883, Tu, Tq);
149 R1[WS(rs, 4)] = FNMS(KP1_979642883, Tu, Tq);
150 }
151 }
152 }
153
154 static const kr2c_desc desc = { 11, "r2cb_11", {4, 0, 56, 0}, &GENUS };
155
156 void X(codelet_r2cb_11) (planner *p) {
157 X(kr2c_register) (p, r2cb_11, &desc);
158 }
159
160 #else /* HAVE_FMA */
161
162 /* Generated by: ../../../genfft/gen_r2cb.native -compact -variables 4 -pipeline-latency 4 -sign 1 -n 11 -name r2cb_11 -include r2cb.h */
163
164 /*
165 * This function contains 60 FP additions, 51 FP multiplications,
166 * (or, 19 additions, 10 multiplications, 41 fused multiply/add),
167 * 33 stack variables, 11 constants, and 22 memory accesses
168 */
169 #include "r2cb.h"
170
171 static void r2cb_11(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs)
172 {
173 DK(KP2_000000000, +2.000000000000000000000000000000000000000000000);
174 DK(KP1_918985947, +1.918985947228994779780736114132655398124909697);
175 DK(KP1_309721467, +1.309721467890570128113850144932587106367582399);
176 DK(KP284629676, +0.284629676546570280887585337232739337582102722);
177 DK(KP830830026, +0.830830026003772851058548298459246407048009821);
178 DK(KP1_682507065, +1.682507065662362337723623297838735435026584997);
179 DK(KP563465113, +0.563465113682859395422835830693233798071555798);
180 DK(KP1_511499148, +1.511499148708516567548071687944688840359434890);
181 DK(KP1_979642883, +1.979642883761865464752184075553437574753038744);
182 DK(KP1_819263990, +1.819263990709036742823430766158056920120482102);
183 DK(KP1_081281634, +1.081281634911195164215271908637383390863541216);
184 {
185 INT i;
186 for (i = v; i > 0; i = i - 1, R0 = R0 + ovs, R1 = R1 + ovs, Cr = Cr + ivs, Ci = Ci + ivs, MAKE_VOLATILE_STRIDE(44, rs), MAKE_VOLATILE_STRIDE(44, csr), MAKE_VOLATILE_STRIDE(44, csi)) {
187 E Td, Tl, Tf, Th, Tj, T1, T2, T6, T5, T4, T3, T7, Tk, Te, Tg;
188 E Ti;
189 {
190 E T8, Tc, T9, Ta, Tb;
191 T8 = Ci[WS(csi, 2)];
192 Tc = Ci[WS(csi, 1)];
193 T9 = Ci[WS(csi, 4)];
194 Ta = Ci[WS(csi, 5)];
195 Tb = Ci[WS(csi, 3)];
196 Td = FMA(KP1_081281634, T8, KP1_819263990 * T9) + FNMA(KP1_979642883, Ta, KP1_511499148 * Tb) - (KP563465113 * Tc);
197 Tl = FMA(KP1_979642883, T8, KP1_819263990 * Ta) + FNMA(KP563465113, T9, KP1_081281634 * Tb) - (KP1_511499148 * Tc);
198 Tf = FMA(KP563465113, T8, KP1_819263990 * Tb) + FNMA(KP1_511499148, Ta, KP1_081281634 * T9) - (KP1_979642883 * Tc);
199 Th = FMA(KP1_081281634, Tc, KP1_819263990 * T8) + FMA(KP1_979642883, Tb, KP1_511499148 * T9) + (KP563465113 * Ta);
200 Tj = FMA(KP563465113, Tb, KP1_979642883 * T9) + FNMS(KP1_511499148, T8, KP1_081281634 * Ta) - (KP1_819263990 * Tc);
201 }
202 T1 = Cr[0];
203 T2 = Cr[WS(csr, 1)];
204 T6 = Cr[WS(csr, 5)];
205 T5 = Cr[WS(csr, 4)];
206 T4 = Cr[WS(csr, 3)];
207 T3 = Cr[WS(csr, 2)];
208 T7 = FMA(KP1_682507065, T3, T1) + FNMS(KP284629676, T6, KP830830026 * T5) + FNMA(KP1_309721467, T4, KP1_918985947 * T2);
209 Tk = FMA(KP1_682507065, T4, T1) + FNMS(KP1_918985947, T5, KP830830026 * T6) + FNMA(KP284629676, T3, KP1_309721467 * T2);
210 Te = FMA(KP830830026, T4, T1) + FNMS(KP1_309721467, T6, KP1_682507065 * T5) + FNMA(KP1_918985947, T3, KP284629676 * T2);
211 Tg = FMA(KP1_682507065, T2, T1) + FNMS(KP1_918985947, T6, KP830830026 * T3) + FNMA(KP1_309721467, T5, KP284629676 * T4);
212 Ti = FMA(KP830830026, T2, T1) + FNMS(KP284629676, T5, KP1_682507065 * T6) + FNMA(KP1_918985947, T4, KP1_309721467 * T3);
213 R0[WS(rs, 3)] = T7 - Td;
214 R0[WS(rs, 4)] = Te - Tf;
215 R0[WS(rs, 2)] = Tk + Tl;
216 R1[WS(rs, 2)] = T7 + Td;
217 R1[WS(rs, 3)] = Tk - Tl;
218 R0[WS(rs, 1)] = Ti + Tj;
219 R1[WS(rs, 1)] = Te + Tf;
220 R0[WS(rs, 5)] = Tg + Th;
221 R1[0] = Tg - Th;
222 R1[WS(rs, 4)] = Ti - Tj;
223 R0[0] = FMA(KP2_000000000, T2 + T3 + T4 + T5 + T6, T1);
224 }
225 }
226 }
227
228 static const kr2c_desc desc = { 11, "r2cb_11", {19, 10, 41, 0}, &GENUS };
229
230 void X(codelet_r2cb_11) (planner *p) {
231 X(kr2c_register) (p, r2cb_11, &desc);
232 }
233
234 #endif /* HAVE_FMA */