Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.3/dft/simd/common/t1fv_6.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:38:01 EST 2012 */ | |
23 | |
24 #include "codelet-dft.h" | |
25 | |
26 #ifdef HAVE_FMA | |
27 | |
28 /* Generated by: ../../../genfft/gen_twiddle_c.native -fma -reorder-insns -schedule-for-pipeline -simd -compact -variables 4 -pipeline-latency 8 -n 6 -name t1fv_6 -include t1f.h */ | |
29 | |
30 /* | |
31 * This function contains 23 FP additions, 18 FP multiplications, | |
32 * (or, 17 additions, 12 multiplications, 6 fused multiply/add), | |
33 * 27 stack variables, 2 constants, and 12 memory accesses | |
34 */ | |
35 #include "t1f.h" | |
36 | |
37 static void t1fv_6(R *ri, R *ii, const R *W, stride rs, INT mb, INT me, INT ms) | |
38 { | |
39 DVK(KP500000000, +0.500000000000000000000000000000000000000000000); | |
40 DVK(KP866025403, +0.866025403784438646763723170752936183471402627); | |
41 { | |
42 INT m; | |
43 R *x; | |
44 x = ri; | |
45 for (m = mb, W = W + (mb * ((TWVL / VL) * 10)); m < me; m = m + VL, x = x + (VL * ms), W = W + (TWVL * 10), MAKE_VOLATILE_STRIDE(6, rs)) { | |
46 V T1, T2, Ta, Tc, T5, T7; | |
47 T1 = LD(&(x[0]), ms, &(x[0])); | |
48 T2 = LD(&(x[WS(rs, 3)]), ms, &(x[WS(rs, 1)])); | |
49 Ta = LD(&(x[WS(rs, 4)]), ms, &(x[0])); | |
50 Tc = LD(&(x[WS(rs, 1)]), ms, &(x[WS(rs, 1)])); | |
51 T5 = LD(&(x[WS(rs, 2)]), ms, &(x[0])); | |
52 T7 = LD(&(x[WS(rs, 5)]), ms, &(x[WS(rs, 1)])); | |
53 { | |
54 V T3, Tb, Td, T6, T8; | |
55 T3 = BYTWJ(&(W[TWVL * 4]), T2); | |
56 Tb = BYTWJ(&(W[TWVL * 6]), Ta); | |
57 Td = BYTWJ(&(W[0]), Tc); | |
58 T6 = BYTWJ(&(W[TWVL * 2]), T5); | |
59 T8 = BYTWJ(&(W[TWVL * 8]), T7); | |
60 { | |
61 V Ti, T4, Tk, Te, Tj, T9; | |
62 Ti = VADD(T1, T3); | |
63 T4 = VSUB(T1, T3); | |
64 Tk = VADD(Tb, Td); | |
65 Te = VSUB(Tb, Td); | |
66 Tj = VADD(T6, T8); | |
67 T9 = VSUB(T6, T8); | |
68 { | |
69 V Tl, Tn, Tf, Th, Tm, Tg; | |
70 Tl = VADD(Tj, Tk); | |
71 Tn = VMUL(LDK(KP866025403), VSUB(Tk, Tj)); | |
72 Tf = VADD(T9, Te); | |
73 Th = VMUL(LDK(KP866025403), VSUB(Te, T9)); | |
74 ST(&(x[0]), VADD(Ti, Tl), ms, &(x[0])); | |
75 Tm = VFNMS(LDK(KP500000000), Tl, Ti); | |
76 ST(&(x[WS(rs, 3)]), VADD(T4, Tf), ms, &(x[WS(rs, 1)])); | |
77 Tg = VFNMS(LDK(KP500000000), Tf, T4); | |
78 ST(&(x[WS(rs, 2)]), VFNMSI(Tn, Tm), ms, &(x[0])); | |
79 ST(&(x[WS(rs, 4)]), VFMAI(Tn, Tm), ms, &(x[0])); | |
80 ST(&(x[WS(rs, 5)]), VFNMSI(Th, Tg), ms, &(x[WS(rs, 1)])); | |
81 ST(&(x[WS(rs, 1)]), VFMAI(Th, Tg), ms, &(x[WS(rs, 1)])); | |
82 } | |
83 } | |
84 } | |
85 } | |
86 } | |
87 VLEAVE(); | |
88 } | |
89 | |
90 static const tw_instr twinstr[] = { | |
91 VTW(0, 1), | |
92 VTW(0, 2), | |
93 VTW(0, 3), | |
94 VTW(0, 4), | |
95 VTW(0, 5), | |
96 {TW_NEXT, VL, 0} | |
97 }; | |
98 | |
99 static const ct_desc desc = { 6, XSIMD_STRING("t1fv_6"), twinstr, &GENUS, {17, 12, 6, 0}, 0, 0, 0 }; | |
100 | |
101 void XSIMD(codelet_t1fv_6) (planner *p) { | |
102 X(kdft_dit_register) (p, t1fv_6, &desc); | |
103 } | |
104 #else /* HAVE_FMA */ | |
105 | |
106 /* Generated by: ../../../genfft/gen_twiddle_c.native -simd -compact -variables 4 -pipeline-latency 8 -n 6 -name t1fv_6 -include t1f.h */ | |
107 | |
108 /* | |
109 * This function contains 23 FP additions, 14 FP multiplications, | |
110 * (or, 21 additions, 12 multiplications, 2 fused multiply/add), | |
111 * 19 stack variables, 2 constants, and 12 memory accesses | |
112 */ | |
113 #include "t1f.h" | |
114 | |
115 static void t1fv_6(R *ri, R *ii, const R *W, stride rs, INT mb, INT me, INT ms) | |
116 { | |
117 DVK(KP500000000, +0.500000000000000000000000000000000000000000000); | |
118 DVK(KP866025403, +0.866025403784438646763723170752936183471402627); | |
119 { | |
120 INT m; | |
121 R *x; | |
122 x = ri; | |
123 for (m = mb, W = W + (mb * ((TWVL / VL) * 10)); m < me; m = m + VL, x = x + (VL * ms), W = W + (TWVL * 10), MAKE_VOLATILE_STRIDE(6, rs)) { | |
124 V T4, Ti, Te, Tk, T9, Tj, T1, T3, T2; | |
125 T1 = LD(&(x[0]), ms, &(x[0])); | |
126 T2 = LD(&(x[WS(rs, 3)]), ms, &(x[WS(rs, 1)])); | |
127 T3 = BYTWJ(&(W[TWVL * 4]), T2); | |
128 T4 = VSUB(T1, T3); | |
129 Ti = VADD(T1, T3); | |
130 { | |
131 V Tb, Td, Ta, Tc; | |
132 Ta = LD(&(x[WS(rs, 4)]), ms, &(x[0])); | |
133 Tb = BYTWJ(&(W[TWVL * 6]), Ta); | |
134 Tc = LD(&(x[WS(rs, 1)]), ms, &(x[WS(rs, 1)])); | |
135 Td = BYTWJ(&(W[0]), Tc); | |
136 Te = VSUB(Tb, Td); | |
137 Tk = VADD(Tb, Td); | |
138 } | |
139 { | |
140 V T6, T8, T5, T7; | |
141 T5 = LD(&(x[WS(rs, 2)]), ms, &(x[0])); | |
142 T6 = BYTWJ(&(W[TWVL * 2]), T5); | |
143 T7 = LD(&(x[WS(rs, 5)]), ms, &(x[WS(rs, 1)])); | |
144 T8 = BYTWJ(&(W[TWVL * 8]), T7); | |
145 T9 = VSUB(T6, T8); | |
146 Tj = VADD(T6, T8); | |
147 } | |
148 { | |
149 V Th, Tf, Tg, Tn, Tl, Tm; | |
150 Th = VBYI(VMUL(LDK(KP866025403), VSUB(Te, T9))); | |
151 Tf = VADD(T9, Te); | |
152 Tg = VFNMS(LDK(KP500000000), Tf, T4); | |
153 ST(&(x[WS(rs, 3)]), VADD(T4, Tf), ms, &(x[WS(rs, 1)])); | |
154 ST(&(x[WS(rs, 1)]), VADD(Tg, Th), ms, &(x[WS(rs, 1)])); | |
155 ST(&(x[WS(rs, 5)]), VSUB(Tg, Th), ms, &(x[WS(rs, 1)])); | |
156 Tn = VBYI(VMUL(LDK(KP866025403), VSUB(Tk, Tj))); | |
157 Tl = VADD(Tj, Tk); | |
158 Tm = VFNMS(LDK(KP500000000), Tl, Ti); | |
159 ST(&(x[0]), VADD(Ti, Tl), ms, &(x[0])); | |
160 ST(&(x[WS(rs, 4)]), VADD(Tm, Tn), ms, &(x[0])); | |
161 ST(&(x[WS(rs, 2)]), VSUB(Tm, Tn), ms, &(x[0])); | |
162 } | |
163 } | |
164 } | |
165 VLEAVE(); | |
166 } | |
167 | |
168 static const tw_instr twinstr[] = { | |
169 VTW(0, 1), | |
170 VTW(0, 2), | |
171 VTW(0, 3), | |
172 VTW(0, 4), | |
173 VTW(0, 5), | |
174 {TW_NEXT, VL, 0} | |
175 }; | |
176 | |
177 static const ct_desc desc = { 6, XSIMD_STRING("t1fv_6"), twinstr, &GENUS, {21, 12, 2, 0}, 0, 0, 0 }; | |
178 | |
179 void XSIMD(codelet_t1fv_6) (planner *p) { | |
180 X(kdft_dit_register) (p, t1fv_6, &desc); | |
181 } | |
182 #endif /* HAVE_FMA */ |