Mercurial > hg > js-dsp-test
comparison fft/fftw/fftw-3.3.4/rdft/scalar/r2cf/r2cf_6.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 6 -name r2cf_6 -include r2cf.h */ | |
29 | |
30 /* | |
31 * This function contains 14 FP additions, 4 FP multiplications, | |
32 * (or, 12 additions, 2 multiplications, 2 fused multiply/add), | |
33 * 13 stack variables, 2 constants, and 12 memory accesses | |
34 */ | |
35 #include "r2cf.h" | |
36 | |
37 static void r2cf_6(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs) | |
38 { | |
39 DK(KP500000000, +0.500000000000000000000000000000000000000000000); | |
40 DK(KP866025403, +0.866025403784438646763723170752936183471402627); | |
41 { | |
42 INT i; | |
43 for (i = v; i > 0; i = i - 1, R0 = R0 + ivs, R1 = R1 + ivs, Cr = Cr + ovs, Ci = Ci + ovs, MAKE_VOLATILE_STRIDE(24, rs), MAKE_VOLATILE_STRIDE(24, csr), MAKE_VOLATILE_STRIDE(24, csi)) { | |
44 E T4, Td, T3, Tc, T9, T5; | |
45 { | |
46 E T1, T2, T7, T8; | |
47 T1 = R0[0]; | |
48 T2 = R1[WS(rs, 1)]; | |
49 T7 = R0[WS(rs, 2)]; | |
50 T8 = R1[0]; | |
51 T4 = R0[WS(rs, 1)]; | |
52 Td = T1 + T2; | |
53 T3 = T1 - T2; | |
54 Tc = T7 + T8; | |
55 T9 = T7 - T8; | |
56 T5 = R1[WS(rs, 2)]; | |
57 } | |
58 { | |
59 E T6, Tb, Te, Ta; | |
60 T6 = T4 - T5; | |
61 Tb = T4 + T5; | |
62 Te = Tb + Tc; | |
63 Ci[WS(csi, 2)] = KP866025403 * (Tb - Tc); | |
64 Ta = T6 + T9; | |
65 Ci[WS(csi, 1)] = KP866025403 * (T9 - T6); | |
66 Cr[0] = Td + Te; | |
67 Cr[WS(csr, 2)] = FNMS(KP500000000, Te, Td); | |
68 Cr[WS(csr, 3)] = T3 + Ta; | |
69 Cr[WS(csr, 1)] = FNMS(KP500000000, Ta, T3); | |
70 } | |
71 } | |
72 } | |
73 } | |
74 | |
75 static const kr2c_desc desc = { 6, "r2cf_6", {12, 2, 2, 0}, &GENUS }; | |
76 | |
77 void X(codelet_r2cf_6) (planner *p) { | |
78 X(kr2c_register) (p, r2cf_6, &desc); | |
79 } | |
80 | |
81 #else /* HAVE_FMA */ | |
82 | |
83 /* Generated by: ../../../genfft/gen_r2cf.native -compact -variables 4 -pipeline-latency 4 -n 6 -name r2cf_6 -include r2cf.h */ | |
84 | |
85 /* | |
86 * This function contains 14 FP additions, 4 FP multiplications, | |
87 * (or, 12 additions, 2 multiplications, 2 fused multiply/add), | |
88 * 17 stack variables, 2 constants, and 12 memory accesses | |
89 */ | |
90 #include "r2cf.h" | |
91 | |
92 static void r2cf_6(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs) | |
93 { | |
94 DK(KP500000000, +0.500000000000000000000000000000000000000000000); | |
95 DK(KP866025403, +0.866025403784438646763723170752936183471402627); | |
96 { | |
97 INT i; | |
98 for (i = v; i > 0; i = i - 1, R0 = R0 + ivs, R1 = R1 + ivs, Cr = Cr + ovs, Ci = Ci + ovs, MAKE_VOLATILE_STRIDE(24, rs), MAKE_VOLATILE_STRIDE(24, csr), MAKE_VOLATILE_STRIDE(24, csi)) { | |
99 E T3, Td, T9, Tc, T6, Tb, T1, T2, Ta, Te; | |
100 T1 = R0[0]; | |
101 T2 = R1[WS(rs, 1)]; | |
102 T3 = T1 - T2; | |
103 Td = T1 + T2; | |
104 { | |
105 E T7, T8, T4, T5; | |
106 T7 = R0[WS(rs, 2)]; | |
107 T8 = R1[0]; | |
108 T9 = T7 - T8; | |
109 Tc = T7 + T8; | |
110 T4 = R0[WS(rs, 1)]; | |
111 T5 = R1[WS(rs, 2)]; | |
112 T6 = T4 - T5; | |
113 Tb = T4 + T5; | |
114 } | |
115 Ci[WS(csi, 1)] = KP866025403 * (T9 - T6); | |
116 Ta = T6 + T9; | |
117 Cr[WS(csr, 1)] = FNMS(KP500000000, Ta, T3); | |
118 Cr[WS(csr, 3)] = T3 + Ta; | |
119 Ci[WS(csi, 2)] = KP866025403 * (Tb - Tc); | |
120 Te = Tb + Tc; | |
121 Cr[WS(csr, 2)] = FNMS(KP500000000, Te, Td); | |
122 Cr[0] = Td + Te; | |
123 } | |
124 } | |
125 } | |
126 | |
127 static const kr2c_desc desc = { 6, "r2cf_6", {12, 2, 2, 0}, &GENUS }; | |
128 | |
129 void X(codelet_r2cf_6) (planner *p) { | |
130 X(kr2c_register) (p, r2cf_6, &desc); | |
131 } | |
132 | |
133 #endif /* HAVE_FMA */ |