comparison fft/fftw/fftw-3.3.4/rdft/scalar/r2cf/r2cfII_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:17 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 r2cfII_7 -dft-II -include r2cfII.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 "r2cfII.h"
36
37 static void r2cfII_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(KP692021471, +0.692021471630095869627814897002069140197260599);
41 DK(KP801937735, +0.801937735804838252472204639014890102331838324);
42 DK(KP974927912, +0.974927912181823607018131682993931217232785801);
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 Td, Tk;
49 {
50 E T4, T3, Te, T5, T9, Tf, T6, Tg, Tj;
51 Td = R0[0];
52 {
53 E T1, T2, T7, T8;
54 T1 = R0[WS(rs, 1)];
55 T2 = R1[WS(rs, 2)];
56 T7 = R1[WS(rs, 1)];
57 T8 = R0[WS(rs, 2)];
58 T4 = R1[0];
59 T3 = T1 + T2;
60 Te = T1 - T2;
61 T5 = R0[WS(rs, 3)];
62 T9 = T7 + T8;
63 Tf = T8 - T7;
64 }
65 T6 = T4 + T5;
66 Tg = T5 - T4;
67 Tj = FNMS(KP356895867, Tf, Te);
68 {
69 E Ta, Th, Tl, Tb, Ti, Tm, Tc;
70 Tb = FNMS(KP554958132, T3, T9);
71 Ta = FMA(KP554958132, T9, T6);
72 Th = FNMS(KP356895867, Tg, Tf);
73 Tl = FNMS(KP356895867, Te, Tg);
74 Ci[WS(csi, 1)] = -(KP974927912 * (FNMS(KP801937735, Tb, T6)));
75 Ci[WS(csi, 2)] = KP974927912 * (FNMS(KP801937735, Ta, T3));
76 Ti = FNMS(KP692021471, Th, Te);
77 Tm = FNMS(KP692021471, Tl, Tf);
78 Cr[WS(csr, 3)] = Te + Tg + Tf + Td;
79 Tc = FMA(KP554958132, T6, T3);
80 Cr[WS(csr, 1)] = FNMS(KP900968867, Ti, Td);
81 Cr[WS(csr, 2)] = FNMS(KP900968867, Tm, Td);
82 Tk = FNMS(KP692021471, Tj, Tg);
83 Ci[0] = -(KP974927912 * (FMA(KP801937735, Tc, T9)));
84 }
85 }
86 Cr[0] = FNMS(KP900968867, Tk, Td);
87 }
88 }
89 }
90
91 static const kr2c_desc desc = { 7, "r2cfII_7", {9, 3, 15, 0}, &GENUS };
92
93 void X(codelet_r2cfII_7) (planner *p) {
94 X(kr2c_register) (p, r2cfII_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 r2cfII_7 -dft-II -include r2cfII.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 "r2cfII.h"
107
108 static void r2cfII_7(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs)
109 {
110 DK(KP900968867, +0.900968867902419126236102319507445051165919162);
111 DK(KP222520933, +0.222520933956314404288902564496794759466355569);
112 DK(KP623489801, +0.623489801858733530525004884004239810632274731);
113 DK(KP433883739, +0.433883739117558120475768332848358754609990728);
114 DK(KP974927912, +0.974927912181823607018131682993931217232785801);
115 DK(KP781831482, +0.781831482468029808708444526674057750232334519);
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, Td, T4, Tb, T7, Tc, T8, T9;
120 T1 = R0[0];
121 T8 = R1[0];
122 T9 = R0[WS(rs, 3)];
123 Ta = T8 - T9;
124 Td = T8 + T9;
125 {
126 E T2, T3, T5, T6;
127 T2 = R0[WS(rs, 1)];
128 T3 = R1[WS(rs, 2)];
129 T4 = T2 - T3;
130 Tb = T2 + T3;
131 T5 = R1[WS(rs, 1)];
132 T6 = R0[WS(rs, 2)];
133 T7 = T5 - T6;
134 Tc = T5 + T6;
135 }
136 Ci[0] = -(FMA(KP781831482, Tb, KP974927912 * Tc) + (KP433883739 * Td));
137 Ci[WS(csi, 1)] = FNMS(KP974927912, Td, KP781831482 * Tc) - (KP433883739 * Tb);
138 Cr[0] = FMA(KP623489801, T4, T1) + FMA(KP222520933, T7, KP900968867 * Ta);
139 Ci[WS(csi, 2)] = FNMS(KP781831482, Td, KP974927912 * Tb) - (KP433883739 * Tc);
140 Cr[WS(csr, 2)] = FMA(KP900968867, T7, T1) + FNMA(KP623489801, Ta, KP222520933 * T4);
141 Cr[WS(csr, 1)] = FMA(KP222520933, Ta, T1) + FNMA(KP623489801, T7, KP900968867 * T4);
142 Cr[WS(csr, 3)] = T1 + T4 - (T7 + Ta);
143 }
144 }
145 }
146
147 static const kr2c_desc desc = { 7, "r2cfII_7", {12, 6, 12, 0}, &GENUS };
148
149 void X(codelet_r2cfII_7) (planner *p) {
150 X(kr2c_register) (p, r2cfII_7, &desc);
151 }
152
153 #endif /* HAVE_FMA */