comparison src/fftw-3.3.8/dft/simd/common/n2bv_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:11 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 -sign 1 -n 6 -name n2bv_6 -with-ostride 2 -include dft/simd/n2b.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/n2b.h"
36
37 static void n2bv_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 = ii;
46 xo = io;
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 Tm, Tb, Tc, Tl;
72 Tb = VFNMS(LDK(KP500000000), Ta, T3);
73 Tc = VMUL(LDK(KP866025403), VSUB(T6, T9));
74 Tl = VFMAI(Tc, Tb);
75 STM2(&(xo[2]), Tl, ovs, &(xo[2]));
76 STN2(&(xo[0]), Tk, Tl, ovs);
77 Tm = VFNMSI(Tc, Tb);
78 STM2(&(xo[10]), Tm, ovs, &(xo[2]));
79 {
80 V Th, Ti, Tn, To;
81 Th = VFNMS(LDK(KP500000000), Tg, Td);
82 Ti = VMUL(LDK(KP866025403), VSUB(Te, Tf));
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, Tm, ovs);
89 }
90 }
91 }
92 }
93 VLEAVE();
94 }
95
96 static const kdft_desc desc = { 6, XSIMD_STRING("n2bv_6"), {12, 2, 6, 0}, &GENUS, 0, 2, 0, 0 };
97
98 void XSIMD(codelet_n2bv_6) (planner *p) {
99 X(kdft_register) (p, n2bv_6, &desc);
100 }
101
102 #else
103
104 /* Generated by: ../../../genfft/gen_notw_c.native -simd -compact -variables 4 -pipeline-latency 8 -sign 1 -n 6 -name n2bv_6 -with-ostride 2 -include dft/simd/n2b.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/n2b.h"
112
113 static void n2bv_6(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs)
114 {
115 DVK(KP500000000, +0.500000000000000000000000000000000000000000000);
116 DVK(KP866025403, +0.866025403784438646763723170752936183471402627);
117 {
118 INT i;
119 const R *xi;
120 R *xo;
121 xi = ii;
122 xo = io;
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 Ta, Td, T3, Te, T6, Tf, Tb, Tg, T8, T9, Tj, Tk;
125 T8 = LD(&(xi[0]), ivs, &(xi[0]));
126 T9 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)]));
127 Ta = VSUB(T8, T9);
128 Td = VADD(T8, T9);
129 {
130 V T1, T2, T4, T5;
131 T1 = LD(&(xi[WS(is, 2)]), ivs, &(xi[0]));
132 T2 = LD(&(xi[WS(is, 5)]), ivs, &(xi[WS(is, 1)]));
133 T3 = VSUB(T1, T2);
134 Te = VADD(T1, T2);
135 T4 = LD(&(xi[WS(is, 4)]), ivs, &(xi[0]));
136 T5 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)]));
137 T6 = VSUB(T4, T5);
138 Tf = VADD(T4, T5);
139 }
140 Tb = VADD(T3, T6);
141 Tg = VADD(Te, Tf);
142 Tj = VADD(Ta, Tb);
143 STM2(&(xo[6]), Tj, ovs, &(xo[2]));
144 Tk = VADD(Td, Tg);
145 STM2(&(xo[0]), Tk, ovs, &(xo[0]));
146 {
147 V Tm, T7, Tc, Tl;
148 T7 = VBYI(VMUL(LDK(KP866025403), VSUB(T3, T6)));
149 Tc = VFNMS(LDK(KP500000000), Tb, Ta);
150 Tl = VADD(T7, Tc);
151 STM2(&(xo[2]), Tl, ovs, &(xo[2]));
152 STN2(&(xo[0]), Tk, Tl, ovs);
153 Tm = VSUB(Tc, T7);
154 STM2(&(xo[10]), Tm, ovs, &(xo[2]));
155 {
156 V Th, Ti, Tn, To;
157 Th = VFNMS(LDK(KP500000000), Tg, Td);
158 Ti = VBYI(VMUL(LDK(KP866025403), VSUB(Te, Tf)));
159 Tn = VSUB(Th, Ti);
160 STM2(&(xo[4]), Tn, ovs, &(xo[0]));
161 STN2(&(xo[4]), Tn, Tj, ovs);
162 To = VADD(Ti, Th);
163 STM2(&(xo[8]), To, ovs, &(xo[0]));
164 STN2(&(xo[8]), To, Tm, ovs);
165 }
166 }
167 }
168 }
169 VLEAVE();
170 }
171
172 static const kdft_desc desc = { 6, XSIMD_STRING("n2bv_6"), {16, 2, 2, 0}, &GENUS, 0, 2, 0, 0 };
173
174 void XSIMD(codelet_n2bv_6) (planner *p) {
175 X(kdft_register) (p, n2bv_6, &desc);
176 }
177
178 #endif