Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.8/dft/simd/common/n1bv_7.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:55 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 -sign 1 -n 7 -name n1bv_7 -include dft/simd/n1b.h */ | |
29 | |
30 /* | |
31 * This function contains 30 FP additions, 24 FP multiplications, | |
32 * (or, 9 additions, 3 multiplications, 21 fused multiply/add), | |
33 * 33 stack variables, 6 constants, and 14 memory accesses | |
34 */ | |
35 #include "dft/simd/n1b.h" | |
36 | |
37 static void n1bv_7(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs) | |
38 { | |
39 DVK(KP900968867, +0.900968867902419126236102319507445051165919162); | |
40 DVK(KP692021471, +0.692021471630095869627814897002069140197260599); | |
41 DVK(KP801937735, +0.801937735804838252472204639014890102331838324); | |
42 DVK(KP974927912, +0.974927912181823607018131682993931217232785801); | |
43 DVK(KP554958132, +0.554958132087371191422194871006410481067288862); | |
44 DVK(KP356895867, +0.356895867892209443894399510021300583399127187); | |
45 { | |
46 INT i; | |
47 const R *xi; | |
48 R *xo; | |
49 xi = ii; | |
50 xo = io; | |
51 for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(14, is), MAKE_VOLATILE_STRIDE(14, os)) { | |
52 V T1, T4, Tg, Ta, Te, T7, Tf, Tb, Th, Tr, To, Tm, Tj, T2, T3; | |
53 V Ts, Tq, Tp; | |
54 T1 = LD(&(xi[0]), ivs, &(xi[0])); | |
55 T2 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)])); | |
56 T3 = LD(&(xi[WS(is, 6)]), ivs, &(xi[0])); | |
57 T4 = VADD(T2, T3); | |
58 Tg = VSUB(T2, T3); | |
59 { | |
60 V T8, T9, T5, T6; | |
61 T8 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)])); | |
62 T9 = LD(&(xi[WS(is, 4)]), ivs, &(xi[0])); | |
63 Ta = VADD(T8, T9); | |
64 Te = VSUB(T8, T9); | |
65 T5 = LD(&(xi[WS(is, 2)]), ivs, &(xi[0])); | |
66 T6 = LD(&(xi[WS(is, 5)]), ivs, &(xi[WS(is, 1)])); | |
67 T7 = VADD(T5, T6); | |
68 Tf = VSUB(T5, T6); | |
69 } | |
70 Tb = VFNMS(LDK(KP356895867), Ta, T7); | |
71 Th = VFNMS(LDK(KP554958132), Tg, Tf); | |
72 Tr = VFMA(LDK(KP554958132), Te, Tg); | |
73 To = VFNMS(LDK(KP356895867), T7, T4); | |
74 Tm = VFMA(LDK(KP554958132), Tf, Te); | |
75 Tj = VFNMS(LDK(KP356895867), T4, Ta); | |
76 ST(&(xo[0]), VADD(T1, VADD(T4, VADD(T7, Ta))), ovs, &(xo[0])); | |
77 Ts = VMUL(LDK(KP974927912), VFMA(LDK(KP801937735), Tr, Tf)); | |
78 Tp = VFNMS(LDK(KP692021471), To, Ta); | |
79 Tq = VFNMS(LDK(KP900968867), Tp, T1); | |
80 ST(&(xo[WS(os, 1)]), VFMAI(Ts, Tq), ovs, &(xo[WS(os, 1)])); | |
81 ST(&(xo[WS(os, 6)]), VFNMSI(Ts, Tq), ovs, &(xo[0])); | |
82 { | |
83 V Ti, Td, Tc, Tn, Tl, Tk; | |
84 Ti = VMUL(LDK(KP974927912), VFNMS(LDK(KP801937735), Th, Te)); | |
85 Tc = VFNMS(LDK(KP692021471), Tb, T4); | |
86 Td = VFNMS(LDK(KP900968867), Tc, T1); | |
87 ST(&(xo[WS(os, 3)]), VFMAI(Ti, Td), ovs, &(xo[WS(os, 1)])); | |
88 ST(&(xo[WS(os, 4)]), VFNMSI(Ti, Td), ovs, &(xo[0])); | |
89 Tn = VMUL(LDK(KP974927912), VFNMS(LDK(KP801937735), Tm, Tg)); | |
90 Tk = VFNMS(LDK(KP692021471), Tj, T7); | |
91 Tl = VFNMS(LDK(KP900968867), Tk, T1); | |
92 ST(&(xo[WS(os, 2)]), VFMAI(Tn, Tl), ovs, &(xo[0])); | |
93 ST(&(xo[WS(os, 5)]), VFNMSI(Tn, Tl), ovs, &(xo[WS(os, 1)])); | |
94 } | |
95 } | |
96 } | |
97 VLEAVE(); | |
98 } | |
99 | |
100 static const kdft_desc desc = { 7, XSIMD_STRING("n1bv_7"), {9, 3, 21, 0}, &GENUS, 0, 0, 0, 0 }; | |
101 | |
102 void XSIMD(codelet_n1bv_7) (planner *p) { | |
103 X(kdft_register) (p, n1bv_7, &desc); | |
104 } | |
105 | |
106 #else | |
107 | |
108 /* Generated by: ../../../genfft/gen_notw_c.native -simd -compact -variables 4 -pipeline-latency 8 -sign 1 -n 7 -name n1bv_7 -include dft/simd/n1b.h */ | |
109 | |
110 /* | |
111 * This function contains 30 FP additions, 18 FP multiplications, | |
112 * (or, 18 additions, 6 multiplications, 12 fused multiply/add), | |
113 * 24 stack variables, 6 constants, and 14 memory accesses | |
114 */ | |
115 #include "dft/simd/n1b.h" | |
116 | |
117 static void n1bv_7(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs) | |
118 { | |
119 DVK(KP222520933, +0.222520933956314404288902564496794759466355569); | |
120 DVK(KP900968867, +0.900968867902419126236102319507445051165919162); | |
121 DVK(KP623489801, +0.623489801858733530525004884004239810632274731); | |
122 DVK(KP433883739, +0.433883739117558120475768332848358754609990728); | |
123 DVK(KP781831482, +0.781831482468029808708444526674057750232334519); | |
124 DVK(KP974927912, +0.974927912181823607018131682993931217232785801); | |
125 { | |
126 INT i; | |
127 const R *xi; | |
128 R *xo; | |
129 xi = ii; | |
130 xo = io; | |
131 for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(14, is), MAKE_VOLATILE_STRIDE(14, os)) { | |
132 V Tb, T9, Tc, T3, Te, T6, Td, T7, T8, Ti, Tj; | |
133 Tb = LD(&(xi[0]), ivs, &(xi[0])); | |
134 T7 = LD(&(xi[WS(is, 2)]), ivs, &(xi[0])); | |
135 T8 = LD(&(xi[WS(is, 5)]), ivs, &(xi[WS(is, 1)])); | |
136 T9 = VSUB(T7, T8); | |
137 Tc = VADD(T7, T8); | |
138 { | |
139 V T1, T2, T4, T5; | |
140 T1 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)])); | |
141 T2 = LD(&(xi[WS(is, 6)]), ivs, &(xi[0])); | |
142 T3 = VSUB(T1, T2); | |
143 Te = VADD(T1, T2); | |
144 T4 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)])); | |
145 T5 = LD(&(xi[WS(is, 4)]), ivs, &(xi[0])); | |
146 T6 = VSUB(T4, T5); | |
147 Td = VADD(T4, T5); | |
148 } | |
149 ST(&(xo[0]), VADD(Tb, VADD(Te, VADD(Tc, Td))), ovs, &(xo[0])); | |
150 Ti = VBYI(VFNMS(LDK(KP781831482), T6, VFNMS(LDK(KP433883739), T9, VMUL(LDK(KP974927912), T3)))); | |
151 Tj = VFMA(LDK(KP623489801), Td, VFNMS(LDK(KP900968867), Tc, VFNMS(LDK(KP222520933), Te, Tb))); | |
152 ST(&(xo[WS(os, 2)]), VADD(Ti, Tj), ovs, &(xo[0])); | |
153 ST(&(xo[WS(os, 5)]), VSUB(Tj, Ti), ovs, &(xo[WS(os, 1)])); | |
154 { | |
155 V Ta, Tf, Tg, Th; | |
156 Ta = VBYI(VFMA(LDK(KP433883739), T3, VFNMS(LDK(KP781831482), T9, VMUL(LDK(KP974927912), T6)))); | |
157 Tf = VFMA(LDK(KP623489801), Tc, VFNMS(LDK(KP222520933), Td, VFNMS(LDK(KP900968867), Te, Tb))); | |
158 ST(&(xo[WS(os, 3)]), VADD(Ta, Tf), ovs, &(xo[WS(os, 1)])); | |
159 ST(&(xo[WS(os, 4)]), VSUB(Tf, Ta), ovs, &(xo[0])); | |
160 Tg = VBYI(VFMA(LDK(KP781831482), T3, VFMA(LDK(KP974927912), T9, VMUL(LDK(KP433883739), T6)))); | |
161 Th = VFMA(LDK(KP623489801), Te, VFNMS(LDK(KP900968867), Td, VFNMS(LDK(KP222520933), Tc, Tb))); | |
162 ST(&(xo[WS(os, 1)]), VADD(Tg, Th), ovs, &(xo[WS(os, 1)])); | |
163 ST(&(xo[WS(os, 6)]), VSUB(Th, Tg), ovs, &(xo[0])); | |
164 } | |
165 } | |
166 } | |
167 VLEAVE(); | |
168 } | |
169 | |
170 static const kdft_desc desc = { 7, XSIMD_STRING("n1bv_7"), {18, 6, 12, 0}, &GENUS, 0, 0, 0, 0 }; | |
171 | |
172 void XSIMD(codelet_n1bv_7) (planner *p) { | |
173 X(kdft_register) (p, n1bv_7, &desc); | |
174 } | |
175 | |
176 #endif |