Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.8/dft/simd/common/n1fv_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: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 6 -name n1fv_6 -include dft/simd/n1f.h */ | |
29 | |
30 /* | |
31 * This function contains 18 FP additions, 8 FP multiplications, | |
32 * (or, 12 additions, 2 multiplications, 6 fused multiply/add), | |
33 * 19 stack variables, 2 constants, and 12 memory accesses | |
34 */ | |
35 #include "dft/simd/n1f.h" | |
36 | |
37 static void n1fv_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; | |
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 ST(&(xo[WS(os, 3)]), VADD(T3, Ta), ovs, &(xo[WS(os, 1)])); | |
67 ST(&(xo[0]), VADD(Td, Tg), ovs, &(xo[0])); | |
68 { | |
69 V Tb, Tc, Th, Ti; | |
70 Tb = VFNMS(LDK(KP500000000), Ta, T3); | |
71 Tc = VMUL(LDK(KP866025403), VSUB(T9, T6)); | |
72 ST(&(xo[WS(os, 5)]), VFNMSI(Tc, Tb), ovs, &(xo[WS(os, 1)])); | |
73 ST(&(xo[WS(os, 1)]), VFMAI(Tc, Tb), ovs, &(xo[WS(os, 1)])); | |
74 Th = VFNMS(LDK(KP500000000), Tg, Td); | |
75 Ti = VMUL(LDK(KP866025403), VSUB(Tf, Te)); | |
76 ST(&(xo[WS(os, 2)]), VFNMSI(Ti, Th), ovs, &(xo[0])); | |
77 ST(&(xo[WS(os, 4)]), VFMAI(Ti, Th), ovs, &(xo[0])); | |
78 } | |
79 } | |
80 } | |
81 VLEAVE(); | |
82 } | |
83 | |
84 static const kdft_desc desc = { 6, XSIMD_STRING("n1fv_6"), {12, 2, 6, 0}, &GENUS, 0, 0, 0, 0 }; | |
85 | |
86 void XSIMD(codelet_n1fv_6) (planner *p) { | |
87 X(kdft_register) (p, n1fv_6, &desc); | |
88 } | |
89 | |
90 #else | |
91 | |
92 /* Generated by: ../../../genfft/gen_notw_c.native -simd -compact -variables 4 -pipeline-latency 8 -n 6 -name n1fv_6 -include dft/simd/n1f.h */ | |
93 | |
94 /* | |
95 * This function contains 18 FP additions, 4 FP multiplications, | |
96 * (or, 16 additions, 2 multiplications, 2 fused multiply/add), | |
97 * 19 stack variables, 2 constants, and 12 memory accesses | |
98 */ | |
99 #include "dft/simd/n1f.h" | |
100 | |
101 static void n1fv_6(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs) | |
102 { | |
103 DVK(KP866025403, +0.866025403784438646763723170752936183471402627); | |
104 DVK(KP500000000, +0.500000000000000000000000000000000000000000000); | |
105 { | |
106 INT i; | |
107 const R *xi; | |
108 R *xo; | |
109 xi = ri; | |
110 xo = ro; | |
111 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)) { | |
112 V T3, Td, T6, Te, T9, Tf, Ta, Tg, T1, T2; | |
113 T1 = LD(&(xi[0]), ivs, &(xi[0])); | |
114 T2 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)])); | |
115 T3 = VSUB(T1, T2); | |
116 Td = VADD(T1, T2); | |
117 { | |
118 V T4, T5, T7, T8; | |
119 T4 = LD(&(xi[WS(is, 2)]), ivs, &(xi[0])); | |
120 T5 = LD(&(xi[WS(is, 5)]), ivs, &(xi[WS(is, 1)])); | |
121 T6 = VSUB(T4, T5); | |
122 Te = VADD(T4, T5); | |
123 T7 = LD(&(xi[WS(is, 4)]), ivs, &(xi[0])); | |
124 T8 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)])); | |
125 T9 = VSUB(T7, T8); | |
126 Tf = VADD(T7, T8); | |
127 } | |
128 Ta = VADD(T6, T9); | |
129 Tg = VADD(Te, Tf); | |
130 ST(&(xo[WS(os, 3)]), VADD(T3, Ta), ovs, &(xo[WS(os, 1)])); | |
131 ST(&(xo[0]), VADD(Td, Tg), ovs, &(xo[0])); | |
132 { | |
133 V Tb, Tc, Th, Ti; | |
134 Tb = VFNMS(LDK(KP500000000), Ta, T3); | |
135 Tc = VBYI(VMUL(LDK(KP866025403), VSUB(T9, T6))); | |
136 ST(&(xo[WS(os, 5)]), VSUB(Tb, Tc), ovs, &(xo[WS(os, 1)])); | |
137 ST(&(xo[WS(os, 1)]), VADD(Tb, Tc), ovs, &(xo[WS(os, 1)])); | |
138 Th = VFNMS(LDK(KP500000000), Tg, Td); | |
139 Ti = VBYI(VMUL(LDK(KP866025403), VSUB(Tf, Te))); | |
140 ST(&(xo[WS(os, 2)]), VSUB(Th, Ti), ovs, &(xo[0])); | |
141 ST(&(xo[WS(os, 4)]), VADD(Th, Ti), ovs, &(xo[0])); | |
142 } | |
143 } | |
144 } | |
145 VLEAVE(); | |
146 } | |
147 | |
148 static const kdft_desc desc = { 6, XSIMD_STRING("n1fv_6"), {16, 2, 2, 0}, &GENUS, 0, 0, 0, 0 }; | |
149 | |
150 void XSIMD(codelet_n1fv_6) (planner *p) { | |
151 X(kdft_register) (p, n1fv_6, &desc); | |
152 } | |
153 | |
154 #endif |