Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.3/dft/simd/common/n1fv_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: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 8 -name n1fv_8 -include n1f.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 "n1f.h" | |
36 | |
37 static void n1fv_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 = ri; | |
45 xo = ro; | |
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 = VSUB(Tj, Tk); | |
67 Tl = VADD(Tj, Tk); | |
68 { | |
69 V Tq, To, Ta, Tf; | |
70 Tq = VSUB(Tn, Tm); | |
71 To = VADD(Tm, Tn); | |
72 Ta = VADD(T6, T9); | |
73 Tf = VSUB(T9, T6); | |
74 { | |
75 V Tg, Ti, Tb, Th; | |
76 ST(&(xo[0]), VADD(Tl, To), ovs, &(xo[0])); | |
77 ST(&(xo[WS(os, 4)]), VSUB(Tl, To), ovs, &(xo[0])); | |
78 ST(&(xo[WS(os, 2)]), VFMAI(Tq, Tp), ovs, &(xo[0])); | |
79 ST(&(xo[WS(os, 6)]), VFNMSI(Tq, Tp), ovs, &(xo[0])); | |
80 Tg = VFNMS(LDK(KP707106781), Tf, Te); | |
81 Ti = VFMA(LDK(KP707106781), Tf, Te); | |
82 Tb = VFMA(LDK(KP707106781), Ta, T3); | |
83 Th = VFNMS(LDK(KP707106781), Ta, T3); | |
84 ST(&(xo[WS(os, 3)]), VFMAI(Ti, Th), ovs, &(xo[WS(os, 1)])); | |
85 ST(&(xo[WS(os, 5)]), VFNMSI(Ti, Th), ovs, &(xo[WS(os, 1)])); | |
86 ST(&(xo[WS(os, 7)]), VFMAI(Tg, Tb), ovs, &(xo[WS(os, 1)])); | |
87 ST(&(xo[WS(os, 1)]), 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("n1fv_8"), {16, 0, 10, 0}, &GENUS, 0, 0, 0, 0 }; | |
97 | |
98 void XSIMD(codelet_n1fv_8) (planner *p) { | |
99 X(kdft_register) (p, n1fv_8, &desc); | |
100 } | |
101 | |
102 #else /* HAVE_FMA */ | |
103 | |
104 /* Generated by: ../../../genfft/gen_notw_c.native -simd -compact -variables 4 -pipeline-latency 8 -n 8 -name n1fv_8 -include n1f.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 "n1f.h" | |
112 | |
113 static void n1fv_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 = ri; | |
121 xo = ro; | |
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 T3, Tj, Tf, Tk, Ta, Tn, Tc, Tm; | |
124 { | |
125 V T1, T2, Td, Te; | |
126 T1 = LD(&(xi[0]), ivs, &(xi[0])); | |
127 T2 = LD(&(xi[WS(is, 4)]), ivs, &(xi[0])); | |
128 T3 = VSUB(T1, T2); | |
129 Tj = VADD(T1, T2); | |
130 Td = LD(&(xi[WS(is, 2)]), ivs, &(xi[0])); | |
131 Te = LD(&(xi[WS(is, 6)]), ivs, &(xi[0])); | |
132 Tf = VSUB(Td, Te); | |
133 Tk = VADD(Td, Te); | |
134 { | |
135 V T4, T5, T6, T7, T8, T9; | |
136 T4 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)])); | |
137 T5 = LD(&(xi[WS(is, 5)]), ivs, &(xi[WS(is, 1)])); | |
138 T6 = VSUB(T4, T5); | |
139 T7 = LD(&(xi[WS(is, 7)]), ivs, &(xi[WS(is, 1)])); | |
140 T8 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)])); | |
141 T9 = VSUB(T7, T8); | |
142 Ta = VMUL(LDK(KP707106781), VADD(T6, T9)); | |
143 Tn = VADD(T7, T8); | |
144 Tc = VMUL(LDK(KP707106781), VSUB(T9, T6)); | |
145 Tm = VADD(T4, T5); | |
146 } | |
147 } | |
148 { | |
149 V Tb, Tg, Tp, Tq; | |
150 Tb = VADD(T3, Ta); | |
151 Tg = VBYI(VSUB(Tc, Tf)); | |
152 ST(&(xo[WS(os, 7)]), VSUB(Tb, Tg), ovs, &(xo[WS(os, 1)])); | |
153 ST(&(xo[WS(os, 1)]), VADD(Tb, Tg), ovs, &(xo[WS(os, 1)])); | |
154 Tp = VSUB(Tj, Tk); | |
155 Tq = VBYI(VSUB(Tn, Tm)); | |
156 ST(&(xo[WS(os, 6)]), VSUB(Tp, Tq), ovs, &(xo[0])); | |
157 ST(&(xo[WS(os, 2)]), VADD(Tp, Tq), ovs, &(xo[0])); | |
158 } | |
159 { | |
160 V Th, Ti, Tl, To; | |
161 Th = VSUB(T3, Ta); | |
162 Ti = VBYI(VADD(Tf, Tc)); | |
163 ST(&(xo[WS(os, 5)]), VSUB(Th, Ti), ovs, &(xo[WS(os, 1)])); | |
164 ST(&(xo[WS(os, 3)]), VADD(Th, Ti), ovs, &(xo[WS(os, 1)])); | |
165 Tl = VADD(Tj, Tk); | |
166 To = VADD(Tm, Tn); | |
167 ST(&(xo[WS(os, 4)]), VSUB(Tl, To), ovs, &(xo[0])); | |
168 ST(&(xo[0]), VADD(Tl, To), ovs, &(xo[0])); | |
169 } | |
170 } | |
171 } | |
172 VLEAVE(); | |
173 } | |
174 | |
175 static const kdft_desc desc = { 8, XSIMD_STRING("n1fv_8"), {26, 2, 0, 0}, &GENUS, 0, 0, 0, 0 }; | |
176 | |
177 void XSIMD(codelet_n1fv_8) (planner *p) { | |
178 X(kdft_register) (p, n1fv_8, &desc); | |
179 } | |
180 | |
181 #endif /* HAVE_FMA */ |