Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.3/dft/simd/common/n1fv_7.c @ 10:37bf6b4a2645
Add FFTW3
author | Chris Cannam |
---|---|
date | Wed, 20 Mar 2013 15:35:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
9:c0fb53affa76 | 10:37bf6b4a2645 |
---|---|
1 /* | |
2 * Copyright (c) 2003, 2007-11 Matteo Frigo | |
3 * Copyright (c) 2003, 2007-11 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 Sun Nov 25 07:36:52 EST 2012 */ | |
23 | |
24 #include "codelet-dft.h" | |
25 | |
26 #ifdef HAVE_FMA | |
27 | |
28 /* Generated by: ../../../genfft/gen_notw_c.native -fma -reorder-insns -schedule-for-pipeline -simd -compact -variables 4 -pipeline-latency 8 -n 7 -name n1fv_7 -include n1f.h */ | |
29 | |
30 /* | |
31 * This function contains 30 FP additions, 24 FP multiplications, | |
32 * (or, 9 additions, 3 multiplications, 21 fused multiply/add), | |
33 * 37 stack variables, 6 constants, and 14 memory accesses | |
34 */ | |
35 #include "n1f.h" | |
36 | |
37 static void n1fv_7(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs) | |
38 { | |
39 DVK(KP900968867, +0.900968867902419126236102319507445051165919162); | |
40 DVK(KP692021471, +0.692021471630095869627814897002069140197260599); | |
41 DVK(KP801937735, +0.801937735804838252472204639014890102331838324); | |
42 DVK(KP974927912, +0.974927912181823607018131682993931217232785801); | |
43 DVK(KP356895867, +0.356895867892209443894399510021300583399127187); | |
44 DVK(KP554958132, +0.554958132087371191422194871006410481067288862); | |
45 { | |
46 INT i; | |
47 const R *xi; | |
48 R *xo; | |
49 xi = ri; | |
50 xo = ro; | |
51 for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(14, is), MAKE_VOLATILE_STRIDE(14, os)) { | |
52 V T1, T2, T3, T8, T9, T5, T6; | |
53 T1 = LD(&(xi[0]), ivs, &(xi[0])); | |
54 T2 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)])); | |
55 T3 = LD(&(xi[WS(is, 6)]), ivs, &(xi[0])); | |
56 T8 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)])); | |
57 T9 = LD(&(xi[WS(is, 4)]), ivs, &(xi[0])); | |
58 T5 = LD(&(xi[WS(is, 2)]), ivs, &(xi[0])); | |
59 T6 = LD(&(xi[WS(is, 5)]), ivs, &(xi[WS(is, 1)])); | |
60 { | |
61 V Te, T4, Tf, Ta, Tg, T7; | |
62 Te = VSUB(T3, T2); | |
63 T4 = VADD(T2, T3); | |
64 Tf = VSUB(T9, T8); | |
65 Ta = VADD(T8, T9); | |
66 Tg = VSUB(T6, T5); | |
67 T7 = VADD(T5, T6); | |
68 { | |
69 V Tm, Tb, Tr, Th, Tj, To; | |
70 Tm = VFMA(LDK(KP554958132), Tf, Te); | |
71 Tb = VFNMS(LDK(KP356895867), T4, Ta); | |
72 Tr = VFNMS(LDK(KP554958132), Te, Tg); | |
73 Th = VFMA(LDK(KP554958132), Tg, Tf); | |
74 ST(&(xo[0]), VADD(T1, VADD(T4, VADD(T7, Ta))), ovs, &(xo[0])); | |
75 Tj = VFNMS(LDK(KP356895867), T7, T4); | |
76 To = VFNMS(LDK(KP356895867), Ta, T7); | |
77 { | |
78 V Tn, Tc, Ts, Ti; | |
79 Tn = VMUL(LDK(KP974927912), VFMA(LDK(KP801937735), Tm, Tg)); | |
80 Tc = VFNMS(LDK(KP692021471), Tb, T7); | |
81 Ts = VMUL(LDK(KP974927912), VFNMS(LDK(KP801937735), Tr, Tf)); | |
82 Ti = VMUL(LDK(KP974927912), VFNMS(LDK(KP801937735), Th, Te)); | |
83 { | |
84 V Tk, Tp, Td, Tl, Tq; | |
85 Tk = VFNMS(LDK(KP692021471), Tj, Ta); | |
86 Tp = VFNMS(LDK(KP692021471), To, T4); | |
87 Td = VFNMS(LDK(KP900968867), Tc, T1); | |
88 Tl = VFNMS(LDK(KP900968867), Tk, T1); | |
89 Tq = VFNMS(LDK(KP900968867), Tp, T1); | |
90 ST(&(xo[WS(os, 2)]), VFMAI(Ti, Td), ovs, &(xo[0])); | |
91 ST(&(xo[WS(os, 5)]), VFNMSI(Ti, Td), ovs, &(xo[WS(os, 1)])); | |
92 ST(&(xo[WS(os, 1)]), VFMAI(Tn, Tl), ovs, &(xo[WS(os, 1)])); | |
93 ST(&(xo[WS(os, 6)]), VFNMSI(Tn, Tl), ovs, &(xo[0])); | |
94 ST(&(xo[WS(os, 3)]), VFMAI(Ts, Tq), ovs, &(xo[WS(os, 1)])); | |
95 ST(&(xo[WS(os, 4)]), VFNMSI(Ts, Tq), ovs, &(xo[0])); | |
96 } | |
97 } | |
98 } | |
99 } | |
100 } | |
101 } | |
102 VLEAVE(); | |
103 } | |
104 | |
105 static const kdft_desc desc = { 7, XSIMD_STRING("n1fv_7"), {9, 3, 21, 0}, &GENUS, 0, 0, 0, 0 }; | |
106 | |
107 void XSIMD(codelet_n1fv_7) (planner *p) { | |
108 X(kdft_register) (p, n1fv_7, &desc); | |
109 } | |
110 | |
111 #else /* HAVE_FMA */ | |
112 | |
113 /* Generated by: ../../../genfft/gen_notw_c.native -simd -compact -variables 4 -pipeline-latency 8 -n 7 -name n1fv_7 -include n1f.h */ | |
114 | |
115 /* | |
116 * This function contains 30 FP additions, 18 FP multiplications, | |
117 * (or, 18 additions, 6 multiplications, 12 fused multiply/add), | |
118 * 24 stack variables, 6 constants, and 14 memory accesses | |
119 */ | |
120 #include "n1f.h" | |
121 | |
122 static void n1fv_7(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs) | |
123 { | |
124 DVK(KP900968867, +0.900968867902419126236102319507445051165919162); | |
125 DVK(KP222520933, +0.222520933956314404288902564496794759466355569); | |
126 DVK(KP623489801, +0.623489801858733530525004884004239810632274731); | |
127 DVK(KP781831482, +0.781831482468029808708444526674057750232334519); | |
128 DVK(KP974927912, +0.974927912181823607018131682993931217232785801); | |
129 DVK(KP433883739, +0.433883739117558120475768332848358754609990728); | |
130 { | |
131 INT i; | |
132 const R *xi; | |
133 R *xo; | |
134 xi = ri; | |
135 xo = ro; | |
136 for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(14, is), MAKE_VOLATILE_STRIDE(14, os)) { | |
137 V T1, Ta, Td, T4, Tc, T7, Te, T8, T9, Tj, Ti; | |
138 T1 = LD(&(xi[0]), ivs, &(xi[0])); | |
139 T8 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)])); | |
140 T9 = LD(&(xi[WS(is, 4)]), ivs, &(xi[0])); | |
141 Ta = VADD(T8, T9); | |
142 Td = VSUB(T9, T8); | |
143 { | |
144 V T2, T3, T5, T6; | |
145 T2 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)])); | |
146 T3 = LD(&(xi[WS(is, 6)]), ivs, &(xi[0])); | |
147 T4 = VADD(T2, T3); | |
148 Tc = VSUB(T3, T2); | |
149 T5 = LD(&(xi[WS(is, 2)]), ivs, &(xi[0])); | |
150 T6 = LD(&(xi[WS(is, 5)]), ivs, &(xi[WS(is, 1)])); | |
151 T7 = VADD(T5, T6); | |
152 Te = VSUB(T6, T5); | |
153 } | |
154 ST(&(xo[0]), VADD(T1, VADD(T4, VADD(T7, Ta))), ovs, &(xo[0])); | |
155 Tj = VBYI(VFMA(LDK(KP433883739), Tc, VFNMS(LDK(KP781831482), Te, VMUL(LDK(KP974927912), Td)))); | |
156 Ti = VFMA(LDK(KP623489801), T7, VFNMS(LDK(KP222520933), Ta, VFNMS(LDK(KP900968867), T4, T1))); | |
157 ST(&(xo[WS(os, 4)]), VSUB(Ti, Tj), ovs, &(xo[0])); | |
158 ST(&(xo[WS(os, 3)]), VADD(Ti, Tj), ovs, &(xo[WS(os, 1)])); | |
159 { | |
160 V Tf, Tb, Th, Tg; | |
161 Tf = VBYI(VFNMS(LDK(KP781831482), Td, VFNMS(LDK(KP433883739), Te, VMUL(LDK(KP974927912), Tc)))); | |
162 Tb = VFMA(LDK(KP623489801), Ta, VFNMS(LDK(KP900968867), T7, VFNMS(LDK(KP222520933), T4, T1))); | |
163 ST(&(xo[WS(os, 5)]), VSUB(Tb, Tf), ovs, &(xo[WS(os, 1)])); | |
164 ST(&(xo[WS(os, 2)]), VADD(Tb, Tf), ovs, &(xo[0])); | |
165 Th = VBYI(VFMA(LDK(KP781831482), Tc, VFMA(LDK(KP974927912), Te, VMUL(LDK(KP433883739), Td)))); | |
166 Tg = VFMA(LDK(KP623489801), T4, VFNMS(LDK(KP900968867), Ta, VFNMS(LDK(KP222520933), T7, T1))); | |
167 ST(&(xo[WS(os, 6)]), VSUB(Tg, Th), ovs, &(xo[0])); | |
168 ST(&(xo[WS(os, 1)]), VADD(Tg, Th), ovs, &(xo[WS(os, 1)])); | |
169 } | |
170 } | |
171 } | |
172 VLEAVE(); | |
173 } | |
174 | |
175 static const kdft_desc desc = { 7, XSIMD_STRING("n1fv_7"), {18, 6, 12, 0}, &GENUS, 0, 0, 0, 0 }; | |
176 | |
177 void XSIMD(codelet_n1fv_7) (planner *p) { | |
178 X(kdft_register) (p, n1fv_7, &desc); | |
179 } | |
180 | |
181 #endif /* HAVE_FMA */ |