Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.8/dft/simd/common/t1fuv_6.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:05:25 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 -n 6 -name t1fuv_6 -include dft/simd/t1fu.h */ | |
29 | |
30 /* | |
31 * This function contains 23 FP additions, 18 FP multiplications, | |
32 * (or, 17 additions, 12 multiplications, 6 fused multiply/add), | |
33 * 19 stack variables, 2 constants, and 12 memory accesses | |
34 */ | |
35 #include "dft/simd/t1fu.h" | |
36 | |
37 static void t1fuv_6(R *ri, R *ii, const R *W, stride rs, INT mb, INT me, INT ms) | |
38 { | |
39 DVK(KP500000000, +0.500000000000000000000000000000000000000000000); | |
40 DVK(KP866025403, +0.866025403784438646763723170752936183471402627); | |
41 { | |
42 INT m; | |
43 R *x; | |
44 x = ri; | |
45 for (m = mb, W = W + (mb * ((TWVL / VL) * 10)); m < me; m = m + VL, x = x + (VL * ms), W = W + (TWVL * 10), MAKE_VOLATILE_STRIDE(6, rs)) { | |
46 V T4, Ti, Te, Tk, T9, Tj, T1, T3, T2; | |
47 T1 = LD(&(x[0]), ms, &(x[0])); | |
48 T2 = LD(&(x[WS(rs, 3)]), ms, &(x[WS(rs, 1)])); | |
49 T3 = BYTWJ(&(W[TWVL * 4]), T2); | |
50 T4 = VSUB(T1, T3); | |
51 Ti = VADD(T1, T3); | |
52 { | |
53 V Tb, Td, Ta, Tc; | |
54 Ta = LD(&(x[WS(rs, 4)]), ms, &(x[0])); | |
55 Tb = BYTWJ(&(W[TWVL * 6]), Ta); | |
56 Tc = LD(&(x[WS(rs, 1)]), ms, &(x[WS(rs, 1)])); | |
57 Td = BYTWJ(&(W[0]), Tc); | |
58 Te = VSUB(Tb, Td); | |
59 Tk = VADD(Tb, Td); | |
60 } | |
61 { | |
62 V T6, T8, T5, T7; | |
63 T5 = LD(&(x[WS(rs, 2)]), ms, &(x[0])); | |
64 T6 = BYTWJ(&(W[TWVL * 2]), T5); | |
65 T7 = LD(&(x[WS(rs, 5)]), ms, &(x[WS(rs, 1)])); | |
66 T8 = BYTWJ(&(W[TWVL * 8]), T7); | |
67 T9 = VSUB(T6, T8); | |
68 Tj = VADD(T6, T8); | |
69 } | |
70 { | |
71 V Th, Tf, Tg, Tn, Tl, Tm; | |
72 Th = VMUL(LDK(KP866025403), VSUB(Te, T9)); | |
73 Tf = VADD(T9, Te); | |
74 Tg = VFNMS(LDK(KP500000000), Tf, T4); | |
75 ST(&(x[WS(rs, 3)]), VADD(T4, Tf), ms, &(x[WS(rs, 1)])); | |
76 ST(&(x[WS(rs, 1)]), VFMAI(Th, Tg), ms, &(x[WS(rs, 1)])); | |
77 ST(&(x[WS(rs, 5)]), VFNMSI(Th, Tg), ms, &(x[WS(rs, 1)])); | |
78 Tn = VMUL(LDK(KP866025403), VSUB(Tk, Tj)); | |
79 Tl = VADD(Tj, Tk); | |
80 Tm = VFNMS(LDK(KP500000000), Tl, Ti); | |
81 ST(&(x[0]), VADD(Ti, Tl), ms, &(x[0])); | |
82 ST(&(x[WS(rs, 4)]), VFMAI(Tn, Tm), ms, &(x[0])); | |
83 ST(&(x[WS(rs, 2)]), VFNMSI(Tn, Tm), ms, &(x[0])); | |
84 } | |
85 } | |
86 } | |
87 VLEAVE(); | |
88 } | |
89 | |
90 static const tw_instr twinstr[] = { | |
91 VTW(0, 1), | |
92 VTW(0, 2), | |
93 VTW(0, 3), | |
94 VTW(0, 4), | |
95 VTW(0, 5), | |
96 {TW_NEXT, VL, 0} | |
97 }; | |
98 | |
99 static const ct_desc desc = { 6, XSIMD_STRING("t1fuv_6"), twinstr, &GENUS, {17, 12, 6, 0}, 0, 0, 0 }; | |
100 | |
101 void XSIMD(codelet_t1fuv_6) (planner *p) { | |
102 X(kdft_dit_register) (p, t1fuv_6, &desc); | |
103 } | |
104 #else | |
105 | |
106 /* Generated by: ../../../genfft/gen_twiddle_c.native -simd -compact -variables 4 -pipeline-latency 8 -n 6 -name t1fuv_6 -include dft/simd/t1fu.h */ | |
107 | |
108 /* | |
109 * This function contains 23 FP additions, 14 FP multiplications, | |
110 * (or, 21 additions, 12 multiplications, 2 fused multiply/add), | |
111 * 19 stack variables, 2 constants, and 12 memory accesses | |
112 */ | |
113 #include "dft/simd/t1fu.h" | |
114 | |
115 static void t1fuv_6(R *ri, R *ii, const R *W, stride rs, INT mb, INT me, INT ms) | |
116 { | |
117 DVK(KP500000000, +0.500000000000000000000000000000000000000000000); | |
118 DVK(KP866025403, +0.866025403784438646763723170752936183471402627); | |
119 { | |
120 INT m; | |
121 R *x; | |
122 x = ri; | |
123 for (m = mb, W = W + (mb * ((TWVL / VL) * 10)); m < me; m = m + VL, x = x + (VL * ms), W = W + (TWVL * 10), MAKE_VOLATILE_STRIDE(6, rs)) { | |
124 V T4, Ti, Te, Tk, T9, Tj, T1, T3, T2; | |
125 T1 = LD(&(x[0]), ms, &(x[0])); | |
126 T2 = LD(&(x[WS(rs, 3)]), ms, &(x[WS(rs, 1)])); | |
127 T3 = BYTWJ(&(W[TWVL * 4]), T2); | |
128 T4 = VSUB(T1, T3); | |
129 Ti = VADD(T1, T3); | |
130 { | |
131 V Tb, Td, Ta, Tc; | |
132 Ta = LD(&(x[WS(rs, 4)]), ms, &(x[0])); | |
133 Tb = BYTWJ(&(W[TWVL * 6]), Ta); | |
134 Tc = LD(&(x[WS(rs, 1)]), ms, &(x[WS(rs, 1)])); | |
135 Td = BYTWJ(&(W[0]), Tc); | |
136 Te = VSUB(Tb, Td); | |
137 Tk = VADD(Tb, Td); | |
138 } | |
139 { | |
140 V T6, T8, T5, T7; | |
141 T5 = LD(&(x[WS(rs, 2)]), ms, &(x[0])); | |
142 T6 = BYTWJ(&(W[TWVL * 2]), T5); | |
143 T7 = LD(&(x[WS(rs, 5)]), ms, &(x[WS(rs, 1)])); | |
144 T8 = BYTWJ(&(W[TWVL * 8]), T7); | |
145 T9 = VSUB(T6, T8); | |
146 Tj = VADD(T6, T8); | |
147 } | |
148 { | |
149 V Th, Tf, Tg, Tn, Tl, Tm; | |
150 Th = VBYI(VMUL(LDK(KP866025403), VSUB(Te, T9))); | |
151 Tf = VADD(T9, Te); | |
152 Tg = VFNMS(LDK(KP500000000), Tf, T4); | |
153 ST(&(x[WS(rs, 3)]), VADD(T4, Tf), ms, &(x[WS(rs, 1)])); | |
154 ST(&(x[WS(rs, 1)]), VADD(Tg, Th), ms, &(x[WS(rs, 1)])); | |
155 ST(&(x[WS(rs, 5)]), VSUB(Tg, Th), ms, &(x[WS(rs, 1)])); | |
156 Tn = VBYI(VMUL(LDK(KP866025403), VSUB(Tk, Tj))); | |
157 Tl = VADD(Tj, Tk); | |
158 Tm = VFNMS(LDK(KP500000000), Tl, Ti); | |
159 ST(&(x[0]), VADD(Ti, Tl), ms, &(x[0])); | |
160 ST(&(x[WS(rs, 4)]), VADD(Tm, Tn), ms, &(x[0])); | |
161 ST(&(x[WS(rs, 2)]), VSUB(Tm, Tn), ms, &(x[0])); | |
162 } | |
163 } | |
164 } | |
165 VLEAVE(); | |
166 } | |
167 | |
168 static const tw_instr twinstr[] = { | |
169 VTW(0, 1), | |
170 VTW(0, 2), | |
171 VTW(0, 3), | |
172 VTW(0, 4), | |
173 VTW(0, 5), | |
174 {TW_NEXT, VL, 0} | |
175 }; | |
176 | |
177 static const ct_desc desc = { 6, XSIMD_STRING("t1fuv_6"), twinstr, &GENUS, {21, 12, 2, 0}, 0, 0, 0 }; | |
178 | |
179 void XSIMD(codelet_t1fuv_6) (planner *p) { | |
180 X(kdft_dit_register) (p, t1fuv_6, &desc); | |
181 } | |
182 #endif |