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