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