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