Mercurial > hg > js-dsp-test
comparison fft/fftw/fftw-3.3.4/rdft/scalar/r2cb/hc2cbdft2_4.c @ 19:26056e866c29
Add FFTW to comparison table
author | Chris Cannam |
---|---|
date | Tue, 06 Oct 2015 13:08:39 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
18:8db794ca3e0b | 19:26056e866c29 |
---|---|
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 Tue Mar 4 13:50:45 EST 2014 */ | |
23 | |
24 #include "codelet-rdft.h" | |
25 | |
26 #ifdef HAVE_FMA | |
27 | |
28 /* Generated by: ../../../genfft/gen_hc2cdft.native -fma -reorder-insns -schedule-for-pipeline -compact -variables 4 -pipeline-latency 4 -sign 1 -n 4 -dif -name hc2cbdft2_4 -include hc2cb.h */ | |
29 | |
30 /* | |
31 * This function contains 30 FP additions, 12 FP multiplications, | |
32 * (or, 24 additions, 6 multiplications, 6 fused multiply/add), | |
33 * 35 stack variables, 0 constants, and 16 memory accesses | |
34 */ | |
35 #include "hc2cb.h" | |
36 | |
37 static void hc2cbdft2_4(R *Rp, R *Ip, R *Rm, R *Im, const R *W, stride rs, INT mb, INT me, INT ms) | |
38 { | |
39 { | |
40 INT m; | |
41 for (m = mb, W = W + ((mb - 1) * 6); m < me; m = m + 1, Rp = Rp + ms, Ip = Ip + ms, Rm = Rm - ms, Im = Im - ms, W = W + 6, MAKE_VOLATILE_STRIDE(16, rs)) { | |
42 E Ty, TB, Tw, TE, TA, TF, Tz, TG, TC; | |
43 { | |
44 E T4, Tg, T3, Tm, Tc, T5, Th, Ti; | |
45 { | |
46 E T1, T2, Ta, Tb; | |
47 T1 = Rp[0]; | |
48 T2 = Rm[WS(rs, 1)]; | |
49 Ta = Ip[0]; | |
50 Tb = Im[WS(rs, 1)]; | |
51 T4 = Rp[WS(rs, 1)]; | |
52 Tg = T1 - T2; | |
53 T3 = T1 + T2; | |
54 Tm = Ta - Tb; | |
55 Tc = Ta + Tb; | |
56 T5 = Rm[0]; | |
57 Th = Ip[WS(rs, 1)]; | |
58 Ti = Im[0]; | |
59 } | |
60 { | |
61 E T8, Td, T7, Ts, To, Tv, Tk, Te, Tf; | |
62 T8 = W[0]; | |
63 { | |
64 E T9, T6, Tn, Tj; | |
65 T9 = T4 - T5; | |
66 T6 = T4 + T5; | |
67 Tn = Th - Ti; | |
68 Tj = Th + Ti; | |
69 Ty = Tc - T9; | |
70 Td = T9 + Tc; | |
71 T7 = T3 + T6; | |
72 Ts = T3 - T6; | |
73 To = Tm + Tn; | |
74 Tv = Tm - Tn; | |
75 TB = Tg + Tj; | |
76 Tk = Tg - Tj; | |
77 Te = T8 * Td; | |
78 } | |
79 Tf = W[1]; | |
80 { | |
81 E Tr, Tu, Tt, TD, Tx, Tp, Tl, Tq; | |
82 Tr = W[2]; | |
83 Tp = T8 * Tk; | |
84 Tu = W[3]; | |
85 Tl = FMA(Tf, Tk, Te); | |
86 Tt = Tr * Ts; | |
87 Tq = FNMS(Tf, Td, Tp); | |
88 TD = Tu * Ts; | |
89 Rm[0] = T7 + Tl; | |
90 Rp[0] = T7 - Tl; | |
91 Im[0] = Tq - To; | |
92 Ip[0] = To + Tq; | |
93 Tx = W[4]; | |
94 Tw = FNMS(Tu, Tv, Tt); | |
95 TE = FMA(Tr, Tv, TD); | |
96 TA = W[5]; | |
97 TF = Tx * TB; | |
98 Tz = Tx * Ty; | |
99 } | |
100 } | |
101 } | |
102 TG = FNMS(TA, Ty, TF); | |
103 TC = FMA(TA, TB, Tz); | |
104 Im[WS(rs, 1)] = TG - TE; | |
105 Ip[WS(rs, 1)] = TE + TG; | |
106 Rm[WS(rs, 1)] = Tw + TC; | |
107 Rp[WS(rs, 1)] = Tw - TC; | |
108 } | |
109 } | |
110 } | |
111 | |
112 static const tw_instr twinstr[] = { | |
113 {TW_FULL, 1, 4}, | |
114 {TW_NEXT, 1, 0} | |
115 }; | |
116 | |
117 static const hc2c_desc desc = { 4, "hc2cbdft2_4", twinstr, &GENUS, {24, 6, 6, 0} }; | |
118 | |
119 void X(codelet_hc2cbdft2_4) (planner *p) { | |
120 X(khc2c_register) (p, hc2cbdft2_4, &desc, HC2C_VIA_DFT); | |
121 } | |
122 #else /* HAVE_FMA */ | |
123 | |
124 /* Generated by: ../../../genfft/gen_hc2cdft.native -compact -variables 4 -pipeline-latency 4 -sign 1 -n 4 -dif -name hc2cbdft2_4 -include hc2cb.h */ | |
125 | |
126 /* | |
127 * This function contains 30 FP additions, 12 FP multiplications, | |
128 * (or, 24 additions, 6 multiplications, 6 fused multiply/add), | |
129 * 19 stack variables, 0 constants, and 16 memory accesses | |
130 */ | |
131 #include "hc2cb.h" | |
132 | |
133 static void hc2cbdft2_4(R *Rp, R *Ip, R *Rm, R *Im, const R *W, stride rs, INT mb, INT me, INT ms) | |
134 { | |
135 { | |
136 INT m; | |
137 for (m = mb, W = W + ((mb - 1) * 6); m < me; m = m + 1, Rp = Rp + ms, Ip = Ip + ms, Rm = Rm - ms, Im = Im - ms, W = W + 6, MAKE_VOLATILE_STRIDE(16, rs)) { | |
138 E T3, Tl, T6, Tm, Td, Tj, Tx, Tv, Ts, Tq; | |
139 { | |
140 E Tf, Tc, T9, Ti; | |
141 { | |
142 E T1, T2, Ta, Tb; | |
143 T1 = Rp[0]; | |
144 T2 = Rm[WS(rs, 1)]; | |
145 T3 = T1 + T2; | |
146 Tf = T1 - T2; | |
147 Ta = Ip[0]; | |
148 Tb = Im[WS(rs, 1)]; | |
149 Tc = Ta + Tb; | |
150 Tl = Ta - Tb; | |
151 } | |
152 { | |
153 E T4, T5, Tg, Th; | |
154 T4 = Rp[WS(rs, 1)]; | |
155 T5 = Rm[0]; | |
156 T6 = T4 + T5; | |
157 T9 = T4 - T5; | |
158 Tg = Ip[WS(rs, 1)]; | |
159 Th = Im[0]; | |
160 Ti = Tg + Th; | |
161 Tm = Tg - Th; | |
162 } | |
163 Td = T9 + Tc; | |
164 Tj = Tf - Ti; | |
165 Tx = Tf + Ti; | |
166 Tv = Tc - T9; | |
167 Ts = Tl - Tm; | |
168 Tq = T3 - T6; | |
169 } | |
170 { | |
171 E T7, Tn, Tk, To, T8, Te; | |
172 T7 = T3 + T6; | |
173 Tn = Tl + Tm; | |
174 T8 = W[0]; | |
175 Te = W[1]; | |
176 Tk = FMA(T8, Td, Te * Tj); | |
177 To = FNMS(Te, Td, T8 * Tj); | |
178 Rp[0] = T7 - Tk; | |
179 Ip[0] = Tn + To; | |
180 Rm[0] = T7 + Tk; | |
181 Im[0] = To - Tn; | |
182 } | |
183 { | |
184 E Tt, Tz, Ty, TA; | |
185 { | |
186 E Tp, Tr, Tu, Tw; | |
187 Tp = W[2]; | |
188 Tr = W[3]; | |
189 Tt = FNMS(Tr, Ts, Tp * Tq); | |
190 Tz = FMA(Tr, Tq, Tp * Ts); | |
191 Tu = W[4]; | |
192 Tw = W[5]; | |
193 Ty = FMA(Tu, Tv, Tw * Tx); | |
194 TA = FNMS(Tw, Tv, Tu * Tx); | |
195 } | |
196 Rp[WS(rs, 1)] = Tt - Ty; | |
197 Ip[WS(rs, 1)] = Tz + TA; | |
198 Rm[WS(rs, 1)] = Tt + Ty; | |
199 Im[WS(rs, 1)] = TA - Tz; | |
200 } | |
201 } | |
202 } | |
203 } | |
204 | |
205 static const tw_instr twinstr[] = { | |
206 {TW_FULL, 1, 4}, | |
207 {TW_NEXT, 1, 0} | |
208 }; | |
209 | |
210 static const hc2c_desc desc = { 4, "hc2cbdft2_4", twinstr, &GENUS, {24, 6, 6, 0} }; | |
211 | |
212 void X(codelet_hc2cbdft2_4) (planner *p) { | |
213 X(khc2c_register) (p, hc2cbdft2_4, &desc, HC2C_VIA_DFT); | |
214 } | |
215 #endif /* HAVE_FMA */ |