Mercurial > hg > js-dsp-test
comparison fft/fftw/fftw-3.3.4/rdft/scalar/r2cf/r2cf_7.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 7 -name r2cf_7 -include r2cf.h */ | |
29 | |
30 /* | |
31 * This function contains 24 FP additions, 18 FP multiplications, | |
32 * (or, 9 additions, 3 multiplications, 15 fused multiply/add), | |
33 * 25 stack variables, 6 constants, and 14 memory accesses | |
34 */ | |
35 #include "r2cf.h" | |
36 | |
37 static void r2cf_7(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs) | |
38 { | |
39 DK(KP900968867, +0.900968867902419126236102319507445051165919162); | |
40 DK(KP801937735, +0.801937735804838252472204639014890102331838324); | |
41 DK(KP974927912, +0.974927912181823607018131682993931217232785801); | |
42 DK(KP692021471, +0.692021471630095869627814897002069140197260599); | |
43 DK(KP554958132, +0.554958132087371191422194871006410481067288862); | |
44 DK(KP356895867, +0.356895867892209443894399510021300583399127187); | |
45 { | |
46 INT i; | |
47 for (i = v; i > 0; i = i - 1, R0 = R0 + ivs, R1 = R1 + ivs, Cr = Cr + ovs, Ci = Ci + ovs, MAKE_VOLATILE_STRIDE(28, rs), MAKE_VOLATILE_STRIDE(28, csr), MAKE_VOLATILE_STRIDE(28, csi)) { | |
48 E T1, Tg, Tc; | |
49 { | |
50 E Th, T4, Ti, Ta, Tj, T7, Td, T5, T6, Tl, Tk; | |
51 T1 = R0[0]; | |
52 { | |
53 E T2, T3, T8, T9; | |
54 T2 = R1[0]; | |
55 T3 = R0[WS(rs, 3)]; | |
56 T8 = R1[WS(rs, 1)]; | |
57 T9 = R0[WS(rs, 2)]; | |
58 T5 = R0[WS(rs, 1)]; | |
59 Th = T3 - T2; | |
60 T4 = T2 + T3; | |
61 T6 = R1[WS(rs, 2)]; | |
62 Ti = T9 - T8; | |
63 Ta = T8 + T9; | |
64 } | |
65 Tj = T6 - T5; | |
66 T7 = T5 + T6; | |
67 Td = FNMS(KP356895867, T4, Ta); | |
68 Tl = FMA(KP554958132, Ti, Th); | |
69 Tk = FMA(KP554958132, Tj, Ti); | |
70 { | |
71 E Tm, Tf, Tb, Te; | |
72 Tm = FNMS(KP554958132, Th, Tj); | |
73 Cr[0] = T1 + T4 + T7 + Ta; | |
74 Tf = FNMS(KP356895867, T7, T4); | |
75 Tb = FNMS(KP356895867, Ta, T7); | |
76 Te = FNMS(KP692021471, Td, T7); | |
77 Ci[WS(csi, 2)] = KP974927912 * (FNMS(KP801937735, Tk, Th)); | |
78 Ci[WS(csi, 3)] = KP974927912 * (FNMS(KP801937735, Tm, Ti)); | |
79 Tg = FNMS(KP692021471, Tf, Ta); | |
80 Tc = FNMS(KP692021471, Tb, T4); | |
81 Cr[WS(csr, 2)] = FNMS(KP900968867, Te, T1); | |
82 Ci[WS(csi, 1)] = KP974927912 * (FMA(KP801937735, Tl, Tj)); | |
83 } | |
84 } | |
85 Cr[WS(csr, 1)] = FNMS(KP900968867, Tg, T1); | |
86 Cr[WS(csr, 3)] = FNMS(KP900968867, Tc, T1); | |
87 } | |
88 } | |
89 } | |
90 | |
91 static const kr2c_desc desc = { 7, "r2cf_7", {9, 3, 15, 0}, &GENUS }; | |
92 | |
93 void X(codelet_r2cf_7) (planner *p) { | |
94 X(kr2c_register) (p, r2cf_7, &desc); | |
95 } | |
96 | |
97 #else /* HAVE_FMA */ | |
98 | |
99 /* Generated by: ../../../genfft/gen_r2cf.native -compact -variables 4 -pipeline-latency 4 -n 7 -name r2cf_7 -include r2cf.h */ | |
100 | |
101 /* | |
102 * This function contains 24 FP additions, 18 FP multiplications, | |
103 * (or, 12 additions, 6 multiplications, 12 fused multiply/add), | |
104 * 20 stack variables, 6 constants, and 14 memory accesses | |
105 */ | |
106 #include "r2cf.h" | |
107 | |
108 static void r2cf_7(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs) | |
109 { | |
110 DK(KP222520933, +0.222520933956314404288902564496794759466355569); | |
111 DK(KP900968867, +0.900968867902419126236102319507445051165919162); | |
112 DK(KP623489801, +0.623489801858733530525004884004239810632274731); | |
113 DK(KP433883739, +0.433883739117558120475768332848358754609990728); | |
114 DK(KP781831482, +0.781831482468029808708444526674057750232334519); | |
115 DK(KP974927912, +0.974927912181823607018131682993931217232785801); | |
116 { | |
117 INT i; | |
118 for (i = v; i > 0; i = i - 1, R0 = R0 + ivs, R1 = R1 + ivs, Cr = Cr + ovs, Ci = Ci + ovs, MAKE_VOLATILE_STRIDE(28, rs), MAKE_VOLATILE_STRIDE(28, csr), MAKE_VOLATILE_STRIDE(28, csi)) { | |
119 E T1, Ta, Tb, T4, Td, T7, Tc, T8, T9; | |
120 T1 = R0[0]; | |
121 T8 = R1[0]; | |
122 T9 = R0[WS(rs, 3)]; | |
123 Ta = T8 + T9; | |
124 Tb = T9 - T8; | |
125 { | |
126 E T2, T3, T5, T6; | |
127 T2 = R0[WS(rs, 1)]; | |
128 T3 = R1[WS(rs, 2)]; | |
129 T4 = T2 + T3; | |
130 Td = T3 - T2; | |
131 T5 = R1[WS(rs, 1)]; | |
132 T6 = R0[WS(rs, 2)]; | |
133 T7 = T5 + T6; | |
134 Tc = T6 - T5; | |
135 } | |
136 Ci[WS(csi, 2)] = FNMS(KP781831482, Tc, KP974927912 * Tb) - (KP433883739 * Td); | |
137 Ci[WS(csi, 1)] = FMA(KP781831482, Tb, KP974927912 * Td) + (KP433883739 * Tc); | |
138 Cr[WS(csr, 2)] = FMA(KP623489801, T7, T1) + FNMA(KP900968867, T4, KP222520933 * Ta); | |
139 Ci[WS(csi, 3)] = FMA(KP433883739, Tb, KP974927912 * Tc) - (KP781831482 * Td); | |
140 Cr[WS(csr, 3)] = FMA(KP623489801, T4, T1) + FNMA(KP222520933, T7, KP900968867 * Ta); | |
141 Cr[WS(csr, 1)] = FMA(KP623489801, Ta, T1) + FNMA(KP900968867, T7, KP222520933 * T4); | |
142 Cr[0] = T1 + Ta + T4 + T7; | |
143 } | |
144 } | |
145 } | |
146 | |
147 static const kr2c_desc desc = { 7, "r2cf_7", {12, 6, 12, 0}, &GENUS }; | |
148 | |
149 void X(codelet_r2cf_7) (planner *p) { | |
150 X(kr2c_register) (p, r2cf_7, &desc); | |
151 } | |
152 | |
153 #endif /* HAVE_FMA */ |