Mercurial > hg > js-dsp-test
comparison fft/fftw/fftw-3.3.4/rdft/scalar/r2cf/r2cf_9.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:49:07 EST 2014 */ | |
23 | |
24 #include "codelet-rdft.h" | |
25 | |
26 #ifdef HAVE_FMA | |
27 | |
28 /* Generated by: ../../../genfft/gen_r2cf.native -fma -reorder-insns -schedule-for-pipeline -compact -variables 4 -pipeline-latency 4 -n 9 -name r2cf_9 -include r2cf.h */ | |
29 | |
30 /* | |
31 * This function contains 38 FP additions, 30 FP multiplications, | |
32 * (or, 12 additions, 4 multiplications, 26 fused multiply/add), | |
33 * 57 stack variables, 18 constants, and 18 memory accesses | |
34 */ | |
35 #include "r2cf.h" | |
36 | |
37 static void r2cf_9(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs) | |
38 { | |
39 DK(KP907603734, +0.907603734547952313649323976213898122064543220); | |
40 DK(KP852868531, +0.852868531952443209628250963940074071936020296); | |
41 DK(KP347296355, +0.347296355333860697703433253538629592000751354); | |
42 DK(KP666666666, +0.666666666666666666666666666666666666666666667); | |
43 DK(KP879385241, +0.879385241571816768108218554649462939872416269); | |
44 DK(KP984807753, +0.984807753012208059366743024589523013670643252); | |
45 DK(KP673648177, +0.673648177666930348851716626769314796000375677); | |
46 DK(KP898197570, +0.898197570222573798468955502359086394667167570); | |
47 DK(KP939692620, +0.939692620785908384054109277324731469936208134); | |
48 DK(KP866025403, +0.866025403784438646763723170752936183471402627); | |
49 DK(KP203604859, +0.203604859554852403062088995281827210665664861); | |
50 DK(KP152703644, +0.152703644666139302296566746461370407999248646); | |
51 DK(KP394930843, +0.394930843634698457567117349190734585290304520); | |
52 DK(KP968908795, +0.968908795874236621082202410917456709164223497); | |
53 DK(KP726681596, +0.726681596905677465811651808188092531873167623); | |
54 DK(KP586256827, +0.586256827714544512072145703099641959914944179); | |
55 DK(KP184792530, +0.184792530904095372701352047572203755870913560); | |
56 DK(KP500000000, +0.500000000000000000000000000000000000000000000); | |
57 { | |
58 INT i; | |
59 for (i = v; i > 0; i = i - 1, R0 = R0 + ivs, R1 = R1 + ivs, Cr = Cr + ovs, Ci = Ci + ovs, MAKE_VOLATILE_STRIDE(36, rs), MAKE_VOLATILE_STRIDE(36, csr), MAKE_VOLATILE_STRIDE(36, csi)) { | |
60 E Tp, Tz, Tw, Ts, TA; | |
61 { | |
62 E T1, T6, Tb, T7, T4, To, T8, Tc, Td, T2, T3; | |
63 T1 = R0[0]; | |
64 T2 = R1[WS(rs, 1)]; | |
65 T3 = R0[WS(rs, 3)]; | |
66 T6 = R1[0]; | |
67 Tb = R0[WS(rs, 1)]; | |
68 T7 = R0[WS(rs, 2)]; | |
69 T4 = T2 + T3; | |
70 To = T3 - T2; | |
71 T8 = R1[WS(rs, 3)]; | |
72 Tc = R1[WS(rs, 2)]; | |
73 Td = R0[WS(rs, 4)]; | |
74 { | |
75 E T5, T9, Tk, Te, Ti; | |
76 T5 = T1 + T4; | |
77 Tp = FNMS(KP500000000, T4, T1); | |
78 T9 = T7 + T8; | |
79 Tk = T7 - T8; | |
80 Te = Tc + Td; | |
81 Ti = Td - Tc; | |
82 { | |
83 E Tl, Ta, Tu, Tf, Th; | |
84 Tl = FMS(KP500000000, T9, T6); | |
85 Ta = T6 + T9; | |
86 Tu = FMA(KP184792530, Tk, Ti); | |
87 Tf = Tb + Te; | |
88 Th = FNMS(KP500000000, Te, Tb); | |
89 { | |
90 E Tq, Ty, Tm, Tt; | |
91 Tq = FMA(KP586256827, Tl, Ti); | |
92 Ty = FMA(KP726681596, Tk, Tl); | |
93 Tm = FNMS(KP968908795, Tl, Tk); | |
94 Tt = FMA(KP394930843, Th, To); | |
95 { | |
96 E Tj, Tx, Tg, Tv; | |
97 Tj = FNMS(KP152703644, Ti, Th); | |
98 Tx = FMA(KP203604859, Th, Ti); | |
99 Tg = Ta + Tf; | |
100 Ci[WS(csi, 3)] = KP866025403 * (Tf - Ta); | |
101 Tv = FNMS(KP939692620, Tu, Tt); | |
102 { | |
103 E TB, Tn, TC, Tr; | |
104 TB = FMA(KP898197570, Ty, Tx); | |
105 Tz = FNMS(KP898197570, Ty, Tx); | |
106 Tw = FNMS(KP673648177, Tm, Tj); | |
107 Tn = FMA(KP673648177, Tm, Tj); | |
108 Cr[0] = T5 + Tg; | |
109 Cr[WS(csr, 3)] = FNMS(KP500000000, Tg, T5); | |
110 Ci[WS(csi, 2)] = KP984807753 * (FNMS(KP879385241, Tv, Tl)); | |
111 Ci[WS(csi, 1)] = -(KP984807753 * (FNMS(KP879385241, To, Tn))); | |
112 TC = FMA(KP666666666, Tn, TB); | |
113 Tr = FNMS(KP347296355, Tq, Tk); | |
114 Ci[WS(csi, 4)] = KP866025403 * (FMA(KP852868531, TC, To)); | |
115 Ts = FNMS(KP907603734, Tr, Th); | |
116 } | |
117 } | |
118 } | |
119 } | |
120 } | |
121 } | |
122 Cr[WS(csr, 1)] = FMA(KP852868531, Tz, Tp); | |
123 TA = FNMS(KP500000000, Tz, Tw); | |
124 Cr[WS(csr, 2)] = FNMS(KP939692620, Ts, Tp); | |
125 Cr[WS(csr, 4)] = FMA(KP852868531, TA, Tp); | |
126 } | |
127 } | |
128 } | |
129 | |
130 static const kr2c_desc desc = { 9, "r2cf_9", {12, 4, 26, 0}, &GENUS }; | |
131 | |
132 void X(codelet_r2cf_9) (planner *p) { | |
133 X(kr2c_register) (p, r2cf_9, &desc); | |
134 } | |
135 | |
136 #else /* HAVE_FMA */ | |
137 | |
138 /* Generated by: ../../../genfft/gen_r2cf.native -compact -variables 4 -pipeline-latency 4 -n 9 -name r2cf_9 -include r2cf.h */ | |
139 | |
140 /* | |
141 * This function contains 38 FP additions, 26 FP multiplications, | |
142 * (or, 21 additions, 9 multiplications, 17 fused multiply/add), | |
143 * 36 stack variables, 14 constants, and 18 memory accesses | |
144 */ | |
145 #include "r2cf.h" | |
146 | |
147 static void r2cf_9(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs) | |
148 { | |
149 DK(KP939692620, +0.939692620785908384054109277324731469936208134); | |
150 DK(KP296198132, +0.296198132726023843175338011893050938967728390); | |
151 DK(KP342020143, +0.342020143325668733044099614682259580763083368); | |
152 DK(KP813797681, +0.813797681349373692844693217248393223289101568); | |
153 DK(KP984807753, +0.984807753012208059366743024589523013670643252); | |
154 DK(KP150383733, +0.150383733180435296639271897612501926072238258); | |
155 DK(KP642787609, +0.642787609686539326322643409907263432907559884); | |
156 DK(KP663413948, +0.663413948168938396205421319635891297216863310); | |
157 DK(KP852868531, +0.852868531952443209628250963940074071936020296); | |
158 DK(KP173648177, +0.173648177666930348851716626769314796000375677); | |
159 DK(KP556670399, +0.556670399226419366452912952047023132968291906); | |
160 DK(KP766044443, +0.766044443118978035202392650555416673935832457); | |
161 DK(KP866025403, +0.866025403784438646763723170752936183471402627); | |
162 DK(KP500000000, +0.500000000000000000000000000000000000000000000); | |
163 { | |
164 INT i; | |
165 for (i = v; i > 0; i = i - 1, R0 = R0 + ivs, R1 = R1 + ivs, Cr = Cr + ovs, Ci = Ci + ovs, MAKE_VOLATILE_STRIDE(36, rs), MAKE_VOLATILE_STRIDE(36, csr), MAKE_VOLATILE_STRIDE(36, csi)) { | |
166 E T1, T4, Tr, Ta, Tl, Ti, Tf, Tk, Tj, T2, T3, T5, Tg; | |
167 T1 = R0[0]; | |
168 T2 = R1[WS(rs, 1)]; | |
169 T3 = R0[WS(rs, 3)]; | |
170 T4 = T2 + T3; | |
171 Tr = T3 - T2; | |
172 { | |
173 E T6, T7, T8, T9; | |
174 T6 = R1[0]; | |
175 T7 = R0[WS(rs, 2)]; | |
176 T8 = R1[WS(rs, 3)]; | |
177 T9 = T7 + T8; | |
178 Ta = T6 + T9; | |
179 Tl = T8 - T7; | |
180 Ti = FNMS(KP500000000, T9, T6); | |
181 } | |
182 { | |
183 E Tb, Tc, Td, Te; | |
184 Tb = R0[WS(rs, 1)]; | |
185 Tc = R1[WS(rs, 2)]; | |
186 Td = R0[WS(rs, 4)]; | |
187 Te = Tc + Td; | |
188 Tf = Tb + Te; | |
189 Tk = FNMS(KP500000000, Te, Tb); | |
190 Tj = Td - Tc; | |
191 } | |
192 Ci[WS(csi, 3)] = KP866025403 * (Tf - Ta); | |
193 T5 = T1 + T4; | |
194 Tg = Ta + Tf; | |
195 Cr[WS(csr, 3)] = FNMS(KP500000000, Tg, T5); | |
196 Cr[0] = T5 + Tg; | |
197 { | |
198 E Tt, Th, Tm, Tn, To, Tp, Tq, Ts; | |
199 Tt = KP866025403 * Tr; | |
200 Th = FNMS(KP500000000, T4, T1); | |
201 Tm = FMA(KP766044443, Ti, KP556670399 * Tl); | |
202 Tn = FMA(KP173648177, Tk, KP852868531 * Tj); | |
203 To = Tm + Tn; | |
204 Tp = FNMS(KP642787609, Ti, KP663413948 * Tl); | |
205 Tq = FNMS(KP984807753, Tk, KP150383733 * Tj); | |
206 Ts = Tp + Tq; | |
207 Cr[WS(csr, 1)] = Th + To; | |
208 Ci[WS(csi, 1)] = Tt + Ts; | |
209 Cr[WS(csr, 4)] = FMA(KP866025403, Tp - Tq, Th) - (KP500000000 * To); | |
210 Ci[WS(csi, 4)] = FNMS(KP500000000, Ts, KP866025403 * (Tr + (Tn - Tm))); | |
211 Ci[WS(csi, 2)] = FNMS(KP342020143, Tk, KP813797681 * Tj) + FNMA(KP150383733, Tl, KP984807753 * Ti) - Tt; | |
212 Cr[WS(csr, 2)] = FMA(KP173648177, Ti, Th) + FNMA(KP296198132, Tj, KP939692620 * Tk) - (KP852868531 * Tl); | |
213 } | |
214 } | |
215 } | |
216 } | |
217 | |
218 static const kr2c_desc desc = { 9, "r2cf_9", {21, 9, 17, 0}, &GENUS }; | |
219 | |
220 void X(codelet_r2cf_9) (planner *p) { | |
221 X(kr2c_register) (p, r2cf_9, &desc); | |
222 } | |
223 | |
224 #endif /* HAVE_FMA */ |