Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.5/rdft/scalar/r2cf/r2cfII_6.c @ 127:7867fa7e1b6b
Current fftw source
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Tue, 18 Oct 2016 13:40:26 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
126:4a7071416412 | 127:7867fa7e1b6b |
---|---|
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 Sat Jul 30 16:47:22 EDT 2016 */ | |
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 r2cfII_6 -dft-II -include r2cfII.h */ | |
29 | |
30 /* | |
31 * This function contains 13 FP additions, 6 FP multiplications, | |
32 * (or, 7 additions, 0 multiplications, 6 fused multiply/add), | |
33 * 15 stack variables, 2 constants, and 12 memory accesses | |
34 */ | |
35 #include "r2cfII.h" | |
36 | |
37 static void r2cfII_6(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs) | |
38 { | |
39 DK(KP866025403, +0.866025403784438646763723170752936183471402627); | |
40 DK(KP500000000, +0.500000000000000000000000000000000000000000000); | |
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 T1, T9, T2, T3, T6, T7; | |
45 T1 = R0[0]; | |
46 T9 = R1[WS(rs, 1)]; | |
47 T2 = R0[WS(rs, 2)]; | |
48 T3 = R0[WS(rs, 1)]; | |
49 T6 = R1[WS(rs, 2)]; | |
50 T7 = R1[0]; | |
51 { | |
52 E Tc, T4, Ta, T8, T5, Tb; | |
53 Cr[WS(csr, 1)] = T1 + T2 - T3; | |
54 Tc = T2 + T3; | |
55 T4 = T3 - T2; | |
56 Ta = T6 + T7; | |
57 T8 = T6 - T7; | |
58 T5 = FMA(KP500000000, T4, T1); | |
59 Tb = FMA(KP500000000, Ta, T9); | |
60 Ci[WS(csi, 1)] = T9 - Ta; | |
61 Cr[WS(csr, 2)] = FMA(KP866025403, T8, T5); | |
62 Cr[0] = FNMS(KP866025403, T8, T5); | |
63 Ci[WS(csi, 2)] = FMS(KP866025403, Tc, Tb); | |
64 Ci[0] = -(FMA(KP866025403, Tc, Tb)); | |
65 } | |
66 } | |
67 } | |
68 } | |
69 | |
70 static const kr2c_desc desc = { 6, "r2cfII_6", {7, 0, 6, 0}, &GENUS }; | |
71 | |
72 void X(codelet_r2cfII_6) (planner *p) { | |
73 X(kr2c_register) (p, r2cfII_6, &desc); | |
74 } | |
75 | |
76 #else /* HAVE_FMA */ | |
77 | |
78 /* Generated by: ../../../genfft/gen_r2cf.native -compact -variables 4 -pipeline-latency 4 -n 6 -name r2cfII_6 -dft-II -include r2cfII.h */ | |
79 | |
80 /* | |
81 * This function contains 13 FP additions, 4 FP multiplications, | |
82 * (or, 11 additions, 2 multiplications, 2 fused multiply/add), | |
83 * 14 stack variables, 2 constants, and 12 memory accesses | |
84 */ | |
85 #include "r2cfII.h" | |
86 | |
87 static void r2cfII_6(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs) | |
88 { | |
89 DK(KP500000000, +0.500000000000000000000000000000000000000000000); | |
90 DK(KP866025403, +0.866025403784438646763723170752936183471402627); | |
91 { | |
92 INT i; | |
93 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)) { | |
94 E Ta, T7, T9, T1, T3, T2, T8, T4, T5, T6, Tb; | |
95 Ta = R1[WS(rs, 1)]; | |
96 T5 = R1[WS(rs, 2)]; | |
97 T6 = R1[0]; | |
98 T7 = KP866025403 * (T5 - T6); | |
99 T9 = T5 + T6; | |
100 T1 = R0[0]; | |
101 T3 = R0[WS(rs, 1)]; | |
102 T2 = R0[WS(rs, 2)]; | |
103 T8 = KP866025403 * (T2 + T3); | |
104 T4 = FMA(KP500000000, T3 - T2, T1); | |
105 Cr[0] = T4 - T7; | |
106 Cr[WS(csr, 2)] = T4 + T7; | |
107 Ci[WS(csi, 1)] = Ta - T9; | |
108 Cr[WS(csr, 1)] = T1 + T2 - T3; | |
109 Tb = FMA(KP500000000, T9, Ta); | |
110 Ci[0] = -(T8 + Tb); | |
111 Ci[WS(csi, 2)] = T8 - Tb; | |
112 } | |
113 } | |
114 } | |
115 | |
116 static const kr2c_desc desc = { 6, "r2cfII_6", {11, 2, 2, 0}, &GENUS }; | |
117 | |
118 void X(codelet_r2cfII_6) (planner *p) { | |
119 X(kr2c_register) (p, r2cfII_6, &desc); | |
120 } | |
121 | |
122 #endif /* HAVE_FMA */ |