comparison src/fftw-3.3.8/dft/simd/common/n1fv_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:04:51 EDT 2018 */
23
24 #include "dft/codelet-dft.h"
25
26 #if defined(ARCH_PREFERS_FMA) || defined(ISA_EXTENSION_PREFERS_FMA)
27
28 /* Generated by: ../../../genfft/gen_notw_c.native -fma -simd -compact -variables 4 -pipeline-latency 8 -n 11 -name n1fv_11 -include dft/simd/n1f.h */
29
30 /*
31 * This function contains 70 FP additions, 60 FP multiplications,
32 * (or, 15 additions, 5 multiplications, 55 fused multiply/add),
33 * 42 stack variables, 11 constants, and 22 memory accesses
34 */
35 #include "dft/simd/n1f.h"
36
37 static void n1fv_11(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs)
38 {
39 DVK(KP959492973, +0.959492973614497389890368057066327699062454848);
40 DVK(KP918985947, +0.918985947228994779780736114132655398124909697);
41 DVK(KP989821441, +0.989821441880932732376092037776718787376519372);
42 DVK(KP830830026, +0.830830026003772851058548298459246407048009821);
43 DVK(KP876768831, +0.876768831002589333891339807079336796764054852);
44 DVK(KP778434453, +0.778434453334651800608337670740821884709317477);
45 DVK(KP372785597, +0.372785597771792209609773152906148328659002598);
46 DVK(KP715370323, +0.715370323453429719112414662767260662417897278);
47 DVK(KP521108558, +0.521108558113202722944698153526659300680427422);
48 DVK(KP634356270, +0.634356270682424498893150776899916060542806975);
49 DVK(KP342584725, +0.342584725681637509502641509861112333758894680);
50 {
51 INT i;
52 const R *xi;
53 R *xo;
54 xi = ri;
55 xo = ro;
56 for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(22, is), MAKE_VOLATILE_STRIDE(22, os)) {
57 V T1, T4, Tp, Tg, Tq, T7, Tn, Ta, Tm, Td, To, Ti, Tw, T12, Ts;
58 V TX, TT, TK, TB, TO, TF, T5, T6;
59 T1 = LD(&(xi[0]), ivs, &(xi[0]));
60 {
61 V T2, T3, Te, Tf;
62 T2 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)]));
63 T3 = LD(&(xi[WS(is, 10)]), ivs, &(xi[0]));
64 T4 = VADD(T2, T3);
65 Tp = VSUB(T3, T2);
66 Te = LD(&(xi[WS(is, 5)]), ivs, &(xi[WS(is, 1)]));
67 Tf = LD(&(xi[WS(is, 6)]), ivs, &(xi[0]));
68 Tg = VADD(Te, Tf);
69 Tq = VSUB(Tf, Te);
70 }
71 T5 = LD(&(xi[WS(is, 2)]), ivs, &(xi[0]));
72 T6 = LD(&(xi[WS(is, 9)]), ivs, &(xi[WS(is, 1)]));
73 T7 = VADD(T5, T6);
74 Tn = VSUB(T6, T5);
75 {
76 V T8, T9, Tb, Tc;
77 T8 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)]));
78 T9 = LD(&(xi[WS(is, 8)]), ivs, &(xi[0]));
79 Ta = VADD(T8, T9);
80 Tm = VSUB(T9, T8);
81 Tb = LD(&(xi[WS(is, 4)]), ivs, &(xi[0]));
82 Tc = LD(&(xi[WS(is, 7)]), ivs, &(xi[WS(is, 1)]));
83 Td = VADD(Tb, Tc);
84 To = VSUB(Tc, Tb);
85 }
86 {
87 V Th, Tv, T11, Tr, TW;
88 Th = VFNMS(LDK(KP342584725), Ta, T7);
89 Ti = VFNMS(LDK(KP634356270), Th, Td);
90 Tv = VFNMS(LDK(KP342584725), Td, T4);
91 Tw = VFNMS(LDK(KP634356270), Tv, T7);
92 T11 = VFNMS(LDK(KP521108558), Tp, Tn);
93 T12 = VFNMS(LDK(KP715370323), T11, Tm);
94 Tr = VFMA(LDK(KP521108558), Tq, Tp);
95 Ts = VFMA(LDK(KP715370323), Tr, To);
96 TW = VFNMS(LDK(KP342584725), Tg, Td);
97 TX = VFNMS(LDK(KP634356270), TW, Ta);
98 }
99 {
100 V TS, TJ, TA, TN, TE;
101 TS = VFMA(LDK(KP715370323), Tm, Tp);
102 TT = VFMA(LDK(KP372785597), To, TS);
103 TJ = VFNMS(LDK(KP521108558), Tn, To);
104 TK = VFMA(LDK(KP715370323), TJ, Tq);
105 TA = VFMA(LDK(KP521108558), Tm, Tq);
106 TB = VFNMS(LDK(KP715370323), TA, Tn);
107 TN = VFNMS(LDK(KP342584725), T7, Tg);
108 TO = VFNMS(LDK(KP634356270), TN, T4);
109 TE = VFNMS(LDK(KP342584725), T4, Ta);
110 TF = VFNMS(LDK(KP634356270), TE, Tg);
111 }
112 ST(&(xo[0]), VADD(T1, VADD(T4, VADD(T7, VADD(Ta, VADD(Td, Tg))))), ovs, &(xo[0]));
113 {
114 V Tk, Tu, Tj, Tt, Tl;
115 Tj = VFNMS(LDK(KP778434453), Ti, T4);
116 Tk = VFNMS(LDK(KP876768831), Tj, Tg);
117 Tt = VFMA(LDK(KP830830026), Ts, Tn);
118 Tu = VMUL(LDK(KP989821441), VFMA(LDK(KP918985947), Tt, Tm));
119 Tl = VFNMS(LDK(KP959492973), Tk, T1);
120 ST(&(xo[WS(os, 10)]), VFNMSI(Tu, Tl), ovs, &(xo[0]));
121 ST(&(xo[WS(os, 1)]), VFMAI(Tu, Tl), ovs, &(xo[WS(os, 1)]));
122 }
123 {
124 V TZ, T14, TY, T13, T10;
125 TY = VFNMS(LDK(KP778434453), TX, T7);
126 TZ = VFNMS(LDK(KP876768831), TY, T4);
127 T13 = VFNMS(LDK(KP830830026), T12, To);
128 T14 = VMUL(LDK(KP989821441), VFNMS(LDK(KP918985947), T13, Tq));
129 T10 = VFNMS(LDK(KP959492973), TZ, T1);
130 ST(&(xo[WS(os, 6)]), VFNMSI(T14, T10), ovs, &(xo[0]));
131 ST(&(xo[WS(os, 5)]), VFMAI(T14, T10), ovs, &(xo[WS(os, 1)]));
132 }
133 {
134 V TQ, TV, TP, TU, TR;
135 TP = VFNMS(LDK(KP778434453), TO, Ta);
136 TQ = VFNMS(LDK(KP876768831), TP, Td);
137 TU = VFNMS(LDK(KP830830026), TT, Tq);
138 TV = VMUL(LDK(KP989821441), VFMA(LDK(KP918985947), TU, Tn));
139 TR = VFNMS(LDK(KP959492973), TQ, T1);
140 ST(&(xo[WS(os, 4)]), VFNMSI(TV, TR), ovs, &(xo[0]));
141 ST(&(xo[WS(os, 7)]), VFMAI(TV, TR), ovs, &(xo[WS(os, 1)]));
142 }
143 {
144 V TH, TM, TG, TL, TI;
145 TG = VFNMS(LDK(KP778434453), TF, Td);
146 TH = VFNMS(LDK(KP876768831), TG, T7);
147 TL = VFNMS(LDK(KP830830026), TK, Tm);
148 TM = VMUL(LDK(KP989821441), VFNMS(LDK(KP918985947), TL, Tp));
149 TI = VFNMS(LDK(KP959492973), TH, T1);
150 ST(&(xo[WS(os, 8)]), VFNMSI(TM, TI), ovs, &(xo[0]));
151 ST(&(xo[WS(os, 3)]), VFMAI(TM, TI), ovs, &(xo[WS(os, 1)]));
152 }
153 {
154 V Ty, TD, Tx, TC, Tz;
155 Tx = VFNMS(LDK(KP778434453), Tw, Tg);
156 Ty = VFNMS(LDK(KP876768831), Tx, Ta);
157 TC = VFMA(LDK(KP830830026), TB, Tp);
158 TD = VMUL(LDK(KP989821441), VFNMS(LDK(KP918985947), TC, To));
159 Tz = VFNMS(LDK(KP959492973), Ty, T1);
160 ST(&(xo[WS(os, 2)]), VFNMSI(TD, Tz), ovs, &(xo[0]));
161 ST(&(xo[WS(os, 9)]), VFMAI(TD, Tz), ovs, &(xo[WS(os, 1)]));
162 }
163 }
164 }
165 VLEAVE();
166 }
167
168 static const kdft_desc desc = { 11, XSIMD_STRING("n1fv_11"), {15, 5, 55, 0}, &GENUS, 0, 0, 0, 0 };
169
170 void XSIMD(codelet_n1fv_11) (planner *p) {
171 X(kdft_register) (p, n1fv_11, &desc);
172 }
173
174 #else
175
176 /* Generated by: ../../../genfft/gen_notw_c.native -simd -compact -variables 4 -pipeline-latency 8 -n 11 -name n1fv_11 -include dft/simd/n1f.h */
177
178 /*
179 * This function contains 70 FP additions, 50 FP multiplications,
180 * (or, 30 additions, 10 multiplications, 40 fused multiply/add),
181 * 32 stack variables, 10 constants, and 22 memory accesses
182 */
183 #include "dft/simd/n1f.h"
184
185 static void n1fv_11(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs)
186 {
187 DVK(KP654860733, +0.654860733945285064056925072466293553183791199);
188 DVK(KP142314838, +0.142314838273285140443792668616369668791051361);
189 DVK(KP959492973, +0.959492973614497389890368057066327699062454848);
190 DVK(KP415415013, +0.415415013001886425529274149229623203524004910);
191 DVK(KP841253532, +0.841253532831181168861811648919367717513292498);
192 DVK(KP989821441, +0.989821441880932732376092037776718787376519372);
193 DVK(KP909631995, +0.909631995354518371411715383079028460060241051);
194 DVK(KP281732556, +0.281732556841429697711417915346616899035777899);
195 DVK(KP540640817, +0.540640817455597582107635954318691695431770608);
196 DVK(KP755749574, +0.755749574354258283774035843972344420179717445);
197 {
198 INT i;
199 const R *xi;
200 R *xo;
201 xi = ri;
202 xo = ro;
203 for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(22, is), MAKE_VOLATILE_STRIDE(22, os)) {
204 V T1, T4, Ti, Tg, Tl, Td, Tk, Ta, Tj, T7, Tm, Tb, Tc, Tt, Ts;
205 T1 = LD(&(xi[0]), ivs, &(xi[0]));
206 {
207 V T2, T3, Te, Tf;
208 T2 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)]));
209 T3 = LD(&(xi[WS(is, 10)]), ivs, &(xi[0]));
210 T4 = VADD(T2, T3);
211 Ti = VSUB(T3, T2);
212 Te = LD(&(xi[WS(is, 5)]), ivs, &(xi[WS(is, 1)]));
213 Tf = LD(&(xi[WS(is, 6)]), ivs, &(xi[0]));
214 Tg = VADD(Te, Tf);
215 Tl = VSUB(Tf, Te);
216 }
217 Tb = LD(&(xi[WS(is, 4)]), ivs, &(xi[0]));
218 Tc = LD(&(xi[WS(is, 7)]), ivs, &(xi[WS(is, 1)]));
219 Td = VADD(Tb, Tc);
220 Tk = VSUB(Tc, Tb);
221 {
222 V T8, T9, T5, T6;
223 T8 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)]));
224 T9 = LD(&(xi[WS(is, 8)]), ivs, &(xi[0]));
225 Ta = VADD(T8, T9);
226 Tj = VSUB(T9, T8);
227 T5 = LD(&(xi[WS(is, 2)]), ivs, &(xi[0]));
228 T6 = LD(&(xi[WS(is, 9)]), ivs, &(xi[WS(is, 1)]));
229 T7 = VADD(T5, T6);
230 Tm = VSUB(T6, T5);
231 }
232 ST(&(xo[0]), VADD(T1, VADD(T4, VADD(T7, VADD(Ta, VADD(Td, Tg))))), ovs, &(xo[0]));
233 {
234 V Tn, Th, Tv, Tu;
235 Tn = VBYI(VFMA(LDK(KP755749574), Ti, VFMA(LDK(KP540640817), Tj, VFNMS(LDK(KP909631995), Tl, VFNMS(LDK(KP989821441), Tm, VMUL(LDK(KP281732556), Tk))))));
236 Th = VFMA(LDK(KP841253532), Ta, VFMA(LDK(KP415415013), Tg, VFNMS(LDK(KP959492973), Td, VFNMS(LDK(KP142314838), T7, VFNMS(LDK(KP654860733), T4, T1)))));
237 ST(&(xo[WS(os, 7)]), VSUB(Th, Tn), ovs, &(xo[WS(os, 1)]));
238 ST(&(xo[WS(os, 4)]), VADD(Th, Tn), ovs, &(xo[0]));
239 Tv = VBYI(VFMA(LDK(KP281732556), Ti, VFMA(LDK(KP755749574), Tj, VFNMS(LDK(KP909631995), Tk, VFNMS(LDK(KP540640817), Tm, VMUL(LDK(KP989821441), Tl))))));
240 Tu = VFMA(LDK(KP841253532), T7, VFMA(LDK(KP415415013), Td, VFNMS(LDK(KP142314838), Tg, VFNMS(LDK(KP654860733), Ta, VFNMS(LDK(KP959492973), T4, T1)))));
241 ST(&(xo[WS(os, 6)]), VSUB(Tu, Tv), ovs, &(xo[0]));
242 ST(&(xo[WS(os, 5)]), VADD(Tu, Tv), ovs, &(xo[WS(os, 1)]));
243 }
244 Tt = VBYI(VFMA(LDK(KP989821441), Ti, VFMA(LDK(KP540640817), Tk, VFNMS(LDK(KP909631995), Tj, VFNMS(LDK(KP281732556), Tm, VMUL(LDK(KP755749574), Tl))))));
245 Ts = VFMA(LDK(KP415415013), Ta, VFMA(LDK(KP841253532), Td, VFNMS(LDK(KP654860733), Tg, VFNMS(LDK(KP959492973), T7, VFNMS(LDK(KP142314838), T4, T1)))));
246 ST(&(xo[WS(os, 8)]), VSUB(Ts, Tt), ovs, &(xo[0]));
247 ST(&(xo[WS(os, 3)]), VADD(Ts, Tt), ovs, &(xo[WS(os, 1)]));
248 {
249 V Tr, Tq, Tp, To;
250 Tr = VBYI(VFMA(LDK(KP540640817), Ti, VFMA(LDK(KP909631995), Tm, VFMA(LDK(KP989821441), Tj, VFMA(LDK(KP755749574), Tk, VMUL(LDK(KP281732556), Tl))))));
251 Tq = VFMA(LDK(KP841253532), T4, VFMA(LDK(KP415415013), T7, VFNMS(LDK(KP959492973), Tg, VFNMS(LDK(KP654860733), Td, VFNMS(LDK(KP142314838), Ta, T1)))));
252 ST(&(xo[WS(os, 10)]), VSUB(Tq, Tr), ovs, &(xo[0]));
253 ST(&(xo[WS(os, 1)]), VADD(Tq, Tr), ovs, &(xo[WS(os, 1)]));
254 Tp = VBYI(VFMA(LDK(KP909631995), Ti, VFNMS(LDK(KP540640817), Tl, VFNMS(LDK(KP989821441), Tk, VFNMS(LDK(KP281732556), Tj, VMUL(LDK(KP755749574), Tm))))));
255 To = VFMA(LDK(KP415415013), T4, VFMA(LDK(KP841253532), Tg, VFNMS(LDK(KP142314838), Td, VFNMS(LDK(KP959492973), Ta, VFNMS(LDK(KP654860733), T7, T1)))));
256 ST(&(xo[WS(os, 9)]), VSUB(To, Tp), ovs, &(xo[WS(os, 1)]));
257 ST(&(xo[WS(os, 2)]), VADD(To, Tp), ovs, &(xo[0]));
258 }
259 }
260 }
261 VLEAVE();
262 }
263
264 static const kdft_desc desc = { 11, XSIMD_STRING("n1fv_11"), {30, 10, 40, 0}, &GENUS, 0, 0, 0, 0 };
265
266 void XSIMD(codelet_n1fv_11) (planner *p) {
267 X(kdft_register) (p, n1fv_11, &desc);
268 }
269
270 #endif