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