Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.8/dft/simd/common/t3fv_8.c @ 82:d0c2a83c1364
Add FFTW 3.3.8 source, and a Linux build
author | Chris Cannam |
---|---|
date | Tue, 19 Nov 2019 14:52:55 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
81:7029a4916348 | 82:d0c2a83c1364 |
---|---|
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:05: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_twiddle_c.native -fma -simd -compact -variables 4 -pipeline-latency 8 -twiddle-log3 -precompute-twiddles -no-generate-bytw -n 8 -name t3fv_8 -include dft/simd/t3f.h */ | |
29 | |
30 /* | |
31 * This function contains 37 FP additions, 32 FP multiplications, | |
32 * (or, 27 additions, 22 multiplications, 10 fused multiply/add), | |
33 * 31 stack variables, 1 constants, and 16 memory accesses | |
34 */ | |
35 #include "dft/simd/t3f.h" | |
36 | |
37 static void t3fv_8(R *ri, R *ii, const R *W, stride rs, INT mb, INT me, INT ms) | |
38 { | |
39 DVK(KP707106781, +0.707106781186547524400844362104849039284835938); | |
40 { | |
41 INT m; | |
42 R *x; | |
43 x = ri; | |
44 for (m = mb, W = W + (mb * ((TWVL / VL) * 6)); m < me; m = m + VL, x = x + (VL * ms), W = W + (TWVL * 6), MAKE_VOLATILE_STRIDE(8, rs)) { | |
45 V T2, T3, Ta, T4, Tb, Tc, Tp; | |
46 T2 = LDW(&(W[0])); | |
47 T3 = LDW(&(W[TWVL * 2])); | |
48 Ta = VZMULJ(T2, T3); | |
49 T4 = VZMUL(T2, T3); | |
50 Tb = LDW(&(W[TWVL * 4])); | |
51 Tc = VZMULJ(Ta, Tb); | |
52 Tp = VZMULJ(T2, Tb); | |
53 { | |
54 V T7, Tx, Ts, Ty, Tf, TA, Tk, TB, T1, T6, T5; | |
55 T1 = LD(&(x[0]), ms, &(x[0])); | |
56 T5 = LD(&(x[WS(rs, 4)]), ms, &(x[0])); | |
57 T6 = VZMULJ(T4, T5); | |
58 T7 = VSUB(T1, T6); | |
59 Tx = VADD(T1, T6); | |
60 { | |
61 V To, Tr, Tn, Tq; | |
62 Tn = LD(&(x[WS(rs, 2)]), ms, &(x[0])); | |
63 To = VZMULJ(Ta, Tn); | |
64 Tq = LD(&(x[WS(rs, 6)]), ms, &(x[0])); | |
65 Tr = VZMULJ(Tp, Tq); | |
66 Ts = VSUB(To, Tr); | |
67 Ty = VADD(To, Tr); | |
68 } | |
69 { | |
70 V T9, Te, T8, Td; | |
71 T8 = LD(&(x[WS(rs, 1)]), ms, &(x[WS(rs, 1)])); | |
72 T9 = VZMULJ(T2, T8); | |
73 Td = LD(&(x[WS(rs, 5)]), ms, &(x[WS(rs, 1)])); | |
74 Te = VZMULJ(Tc, Td); | |
75 Tf = VSUB(T9, Te); | |
76 TA = VADD(T9, Te); | |
77 } | |
78 { | |
79 V Th, Tj, Tg, Ti; | |
80 Tg = LD(&(x[WS(rs, 7)]), ms, &(x[WS(rs, 1)])); | |
81 Th = VZMULJ(Tb, Tg); | |
82 Ti = LD(&(x[WS(rs, 3)]), ms, &(x[WS(rs, 1)])); | |
83 Tj = VZMULJ(T3, Ti); | |
84 Tk = VSUB(Th, Tj); | |
85 TB = VADD(Th, Tj); | |
86 } | |
87 { | |
88 V Tz, TC, TD, TE; | |
89 Tz = VADD(Tx, Ty); | |
90 TC = VADD(TA, TB); | |
91 ST(&(x[WS(rs, 4)]), VSUB(Tz, TC), ms, &(x[0])); | |
92 ST(&(x[0]), VADD(Tz, TC), ms, &(x[0])); | |
93 TD = VSUB(Tx, Ty); | |
94 TE = VSUB(TB, TA); | |
95 ST(&(x[WS(rs, 6)]), VFNMSI(TE, TD), ms, &(x[0])); | |
96 ST(&(x[WS(rs, 2)]), VFMAI(TE, TD), ms, &(x[0])); | |
97 { | |
98 V Tm, Tv, Tu, Tw, Tl, Tt; | |
99 Tl = VADD(Tf, Tk); | |
100 Tm = VFMA(LDK(KP707106781), Tl, T7); | |
101 Tv = VFNMS(LDK(KP707106781), Tl, T7); | |
102 Tt = VSUB(Tk, Tf); | |
103 Tu = VFNMS(LDK(KP707106781), Tt, Ts); | |
104 Tw = VFMA(LDK(KP707106781), Tt, Ts); | |
105 ST(&(x[WS(rs, 1)]), VFNMSI(Tu, Tm), ms, &(x[WS(rs, 1)])); | |
106 ST(&(x[WS(rs, 3)]), VFMAI(Tw, Tv), ms, &(x[WS(rs, 1)])); | |
107 ST(&(x[WS(rs, 7)]), VFMAI(Tu, Tm), ms, &(x[WS(rs, 1)])); | |
108 ST(&(x[WS(rs, 5)]), VFNMSI(Tw, Tv), ms, &(x[WS(rs, 1)])); | |
109 } | |
110 } | |
111 } | |
112 } | |
113 } | |
114 VLEAVE(); | |
115 } | |
116 | |
117 static const tw_instr twinstr[] = { | |
118 VTW(0, 1), | |
119 VTW(0, 3), | |
120 VTW(0, 7), | |
121 {TW_NEXT, VL, 0} | |
122 }; | |
123 | |
124 static const ct_desc desc = { 8, XSIMD_STRING("t3fv_8"), twinstr, &GENUS, {27, 22, 10, 0}, 0, 0, 0 }; | |
125 | |
126 void XSIMD(codelet_t3fv_8) (planner *p) { | |
127 X(kdft_dit_register) (p, t3fv_8, &desc); | |
128 } | |
129 #else | |
130 | |
131 /* Generated by: ../../../genfft/gen_twiddle_c.native -simd -compact -variables 4 -pipeline-latency 8 -twiddle-log3 -precompute-twiddles -no-generate-bytw -n 8 -name t3fv_8 -include dft/simd/t3f.h */ | |
132 | |
133 /* | |
134 * This function contains 37 FP additions, 24 FP multiplications, | |
135 * (or, 37 additions, 24 multiplications, 0 fused multiply/add), | |
136 * 31 stack variables, 1 constants, and 16 memory accesses | |
137 */ | |
138 #include "dft/simd/t3f.h" | |
139 | |
140 static void t3fv_8(R *ri, R *ii, const R *W, stride rs, INT mb, INT me, INT ms) | |
141 { | |
142 DVK(KP707106781, +0.707106781186547524400844362104849039284835938); | |
143 { | |
144 INT m; | |
145 R *x; | |
146 x = ri; | |
147 for (m = mb, W = W + (mb * ((TWVL / VL) * 6)); m < me; m = m + VL, x = x + (VL * ms), W = W + (TWVL * 6), MAKE_VOLATILE_STRIDE(8, rs)) { | |
148 V T2, T3, Ta, T4, Tb, Tc, Tq; | |
149 T2 = LDW(&(W[0])); | |
150 T3 = LDW(&(W[TWVL * 2])); | |
151 Ta = VZMULJ(T2, T3); | |
152 T4 = VZMUL(T2, T3); | |
153 Tb = LDW(&(W[TWVL * 4])); | |
154 Tc = VZMULJ(Ta, Tb); | |
155 Tq = VZMULJ(T2, Tb); | |
156 { | |
157 V T7, Tx, Tt, Ty, Tf, TA, Tk, TB, T1, T6, T5; | |
158 T1 = LD(&(x[0]), ms, &(x[0])); | |
159 T5 = LD(&(x[WS(rs, 4)]), ms, &(x[0])); | |
160 T6 = VZMULJ(T4, T5); | |
161 T7 = VSUB(T1, T6); | |
162 Tx = VADD(T1, T6); | |
163 { | |
164 V Tp, Ts, To, Tr; | |
165 To = LD(&(x[WS(rs, 2)]), ms, &(x[0])); | |
166 Tp = VZMULJ(Ta, To); | |
167 Tr = LD(&(x[WS(rs, 6)]), ms, &(x[0])); | |
168 Ts = VZMULJ(Tq, Tr); | |
169 Tt = VSUB(Tp, Ts); | |
170 Ty = VADD(Tp, Ts); | |
171 } | |
172 { | |
173 V T9, Te, T8, Td; | |
174 T8 = LD(&(x[WS(rs, 1)]), ms, &(x[WS(rs, 1)])); | |
175 T9 = VZMULJ(T2, T8); | |
176 Td = LD(&(x[WS(rs, 5)]), ms, &(x[WS(rs, 1)])); | |
177 Te = VZMULJ(Tc, Td); | |
178 Tf = VSUB(T9, Te); | |
179 TA = VADD(T9, Te); | |
180 } | |
181 { | |
182 V Th, Tj, Tg, Ti; | |
183 Tg = LD(&(x[WS(rs, 7)]), ms, &(x[WS(rs, 1)])); | |
184 Th = VZMULJ(Tb, Tg); | |
185 Ti = LD(&(x[WS(rs, 3)]), ms, &(x[WS(rs, 1)])); | |
186 Tj = VZMULJ(T3, Ti); | |
187 Tk = VSUB(Th, Tj); | |
188 TB = VADD(Th, Tj); | |
189 } | |
190 { | |
191 V Tz, TC, TD, TE; | |
192 Tz = VADD(Tx, Ty); | |
193 TC = VADD(TA, TB); | |
194 ST(&(x[WS(rs, 4)]), VSUB(Tz, TC), ms, &(x[0])); | |
195 ST(&(x[0]), VADD(Tz, TC), ms, &(x[0])); | |
196 TD = VSUB(Tx, Ty); | |
197 TE = VBYI(VSUB(TB, TA)); | |
198 ST(&(x[WS(rs, 6)]), VSUB(TD, TE), ms, &(x[0])); | |
199 ST(&(x[WS(rs, 2)]), VADD(TD, TE), ms, &(x[0])); | |
200 { | |
201 V Tm, Tv, Tu, Tw, Tl, Tn; | |
202 Tl = VMUL(LDK(KP707106781), VADD(Tf, Tk)); | |
203 Tm = VADD(T7, Tl); | |
204 Tv = VSUB(T7, Tl); | |
205 Tn = VMUL(LDK(KP707106781), VSUB(Tk, Tf)); | |
206 Tu = VBYI(VSUB(Tn, Tt)); | |
207 Tw = VBYI(VADD(Tt, Tn)); | |
208 ST(&(x[WS(rs, 7)]), VSUB(Tm, Tu), ms, &(x[WS(rs, 1)])); | |
209 ST(&(x[WS(rs, 3)]), VADD(Tv, Tw), ms, &(x[WS(rs, 1)])); | |
210 ST(&(x[WS(rs, 1)]), VADD(Tm, Tu), ms, &(x[WS(rs, 1)])); | |
211 ST(&(x[WS(rs, 5)]), VSUB(Tv, Tw), ms, &(x[WS(rs, 1)])); | |
212 } | |
213 } | |
214 } | |
215 } | |
216 } | |
217 VLEAVE(); | |
218 } | |
219 | |
220 static const tw_instr twinstr[] = { | |
221 VTW(0, 1), | |
222 VTW(0, 3), | |
223 VTW(0, 7), | |
224 {TW_NEXT, VL, 0} | |
225 }; | |
226 | |
227 static const ct_desc desc = { 8, XSIMD_STRING("t3fv_8"), twinstr, &GENUS, {37, 24, 0, 0}, 0, 0, 0 }; | |
228 | |
229 void XSIMD(codelet_t3fv_8) (planner *p) { | |
230 X(kdft_dit_register) (p, t3fv_8, &desc); | |
231 } | |
232 #endif |