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