Mercurial > hg > js-dsp-test
comparison fft/fftw/fftw-3.3.4/rdft/scalar/r2cf/r2cfII_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:49:16 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 4 -name r2cfII_4 -dft-II -include r2cfII.h */ | |
29 | |
30 /* | |
31 * This function contains 6 FP additions, 4 FP multiplications, | |
32 * (or, 2 additions, 0 multiplications, 4 fused multiply/add), | |
33 * 8 stack variables, 1 constants, and 8 memory accesses | |
34 */ | |
35 #include "r2cfII.h" | |
36 | |
37 static void r2cfII_4(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs) | |
38 { | |
39 DK(KP707106781, +0.707106781186547524400844362104849039284835938); | |
40 { | |
41 INT i; | |
42 for (i = v; i > 0; i = i - 1, R0 = R0 + ivs, R1 = R1 + ivs, Cr = Cr + ovs, Ci = Ci + ovs, MAKE_VOLATILE_STRIDE(16, rs), MAKE_VOLATILE_STRIDE(16, csr), MAKE_VOLATILE_STRIDE(16, csi)) { | |
43 E T1, T5, T2, T3, T4, T6; | |
44 T1 = R0[0]; | |
45 T5 = R0[WS(rs, 1)]; | |
46 T2 = R1[0]; | |
47 T3 = R1[WS(rs, 1)]; | |
48 T4 = T2 - T3; | |
49 T6 = T2 + T3; | |
50 Ci[0] = -(FMA(KP707106781, T6, T5)); | |
51 Ci[WS(csi, 1)] = FNMS(KP707106781, T6, T5); | |
52 Cr[0] = FMA(KP707106781, T4, T1); | |
53 Cr[WS(csr, 1)] = FNMS(KP707106781, T4, T1); | |
54 } | |
55 } | |
56 } | |
57 | |
58 static const kr2c_desc desc = { 4, "r2cfII_4", {2, 0, 4, 0}, &GENUS }; | |
59 | |
60 void X(codelet_r2cfII_4) (planner *p) { | |
61 X(kr2c_register) (p, r2cfII_4, &desc); | |
62 } | |
63 | |
64 #else /* HAVE_FMA */ | |
65 | |
66 /* Generated by: ../../../genfft/gen_r2cf.native -compact -variables 4 -pipeline-latency 4 -n 4 -name r2cfII_4 -dft-II -include r2cfII.h */ | |
67 | |
68 /* | |
69 * This function contains 6 FP additions, 2 FP multiplications, | |
70 * (or, 6 additions, 2 multiplications, 0 fused multiply/add), | |
71 * 8 stack variables, 1 constants, and 8 memory accesses | |
72 */ | |
73 #include "r2cfII.h" | |
74 | |
75 static void r2cfII_4(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs) | |
76 { | |
77 DK(KP707106781, +0.707106781186547524400844362104849039284835938); | |
78 { | |
79 INT i; | |
80 for (i = v; i > 0; i = i - 1, R0 = R0 + ivs, R1 = R1 + ivs, Cr = Cr + ovs, Ci = Ci + ovs, MAKE_VOLATILE_STRIDE(16, rs), MAKE_VOLATILE_STRIDE(16, csr), MAKE_VOLATILE_STRIDE(16, csi)) { | |
81 E T1, T6, T4, T5, T2, T3; | |
82 T1 = R0[0]; | |
83 T6 = R0[WS(rs, 1)]; | |
84 T2 = R1[0]; | |
85 T3 = R1[WS(rs, 1)]; | |
86 T4 = KP707106781 * (T2 - T3); | |
87 T5 = KP707106781 * (T2 + T3); | |
88 Cr[WS(csr, 1)] = T1 - T4; | |
89 Ci[WS(csi, 1)] = T6 - T5; | |
90 Cr[0] = T1 + T4; | |
91 Ci[0] = -(T5 + T6); | |
92 } | |
93 } | |
94 } | |
95 | |
96 static const kr2c_desc desc = { 4, "r2cfII_4", {6, 2, 0, 0}, &GENUS }; | |
97 | |
98 void X(codelet_r2cfII_4) (planner *p) { | |
99 X(kr2c_register) (p, r2cfII_4, &desc); | |
100 } | |
101 | |
102 #endif /* HAVE_FMA */ |