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