Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.8/rdft/scalar/r2cf/r2cfII_6.c @ 82:d0c2a83c1364
Add FFTW 3.3.8 source, and a Linux build
author | Chris Cannam |
---|---|
date | Tue, 19 Nov 2019 14:52:55 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
81:7029a4916348 | 82:d0c2a83c1364 |
---|---|
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 Thu May 24 08:06:42 EDT 2018 */ | |
23 | |
24 #include "rdft/codelet-rdft.h" | |
25 | |
26 #if defined(ARCH_PREFERS_FMA) || defined(ISA_EXTENSION_PREFERS_FMA) | |
27 | |
28 /* Generated by: ../../../genfft/gen_r2cf.native -fma -compact -variables 4 -pipeline-latency 4 -n 6 -name r2cfII_6 -dft-II -include rdft/scalar/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 "rdft/scalar/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, T4, Tc, T8, Ta, T6, T7, T5, Tb; | |
45 T1 = R0[0]; | |
46 T9 = R1[WS(rs, 1)]; | |
47 T2 = R0[WS(rs, 2)]; | |
48 T3 = R0[WS(rs, 1)]; | |
49 T4 = T3 - T2; | |
50 Tc = T2 + T3; | |
51 T6 = R1[WS(rs, 2)]; | |
52 T7 = R1[0]; | |
53 T8 = T6 - T7; | |
54 Ta = T6 + T7; | |
55 Ci[WS(csi, 1)] = T9 - Ta; | |
56 Cr[WS(csr, 1)] = T1 + T2 - T3; | |
57 T5 = FMA(KP500000000, T4, T1); | |
58 Cr[0] = FNMS(KP866025403, T8, T5); | |
59 Cr[WS(csr, 2)] = FMA(KP866025403, T8, T5); | |
60 Tb = FMA(KP500000000, Ta, T9); | |
61 Ci[0] = -(FMA(KP866025403, Tc, Tb)); | |
62 Ci[WS(csi, 2)] = FMS(KP866025403, Tc, Tb); | |
63 } | |
64 } | |
65 } | |
66 | |
67 static const kr2c_desc desc = { 6, "r2cfII_6", {7, 0, 6, 0}, &GENUS }; | |
68 | |
69 void X(codelet_r2cfII_6) (planner *p) { | |
70 X(kr2c_register) (p, r2cfII_6, &desc); | |
71 } | |
72 | |
73 #else | |
74 | |
75 /* Generated by: ../../../genfft/gen_r2cf.native -compact -variables 4 -pipeline-latency 4 -n 6 -name r2cfII_6 -dft-II -include rdft/scalar/r2cfII.h */ | |
76 | |
77 /* | |
78 * This function contains 13 FP additions, 4 FP multiplications, | |
79 * (or, 11 additions, 2 multiplications, 2 fused multiply/add), | |
80 * 14 stack variables, 2 constants, and 12 memory accesses | |
81 */ | |
82 #include "rdft/scalar/r2cfII.h" | |
83 | |
84 static void r2cfII_6(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs) | |
85 { | |
86 DK(KP500000000, +0.500000000000000000000000000000000000000000000); | |
87 DK(KP866025403, +0.866025403784438646763723170752936183471402627); | |
88 { | |
89 INT i; | |
90 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)) { | |
91 E Ta, T7, T9, T1, T3, T2, T8, T4, T5, T6, Tb; | |
92 Ta = R1[WS(rs, 1)]; | |
93 T5 = R1[WS(rs, 2)]; | |
94 T6 = R1[0]; | |
95 T7 = KP866025403 * (T5 - T6); | |
96 T9 = T5 + T6; | |
97 T1 = R0[0]; | |
98 T3 = R0[WS(rs, 1)]; | |
99 T2 = R0[WS(rs, 2)]; | |
100 T8 = KP866025403 * (T2 + T3); | |
101 T4 = FMA(KP500000000, T3 - T2, T1); | |
102 Cr[0] = T4 - T7; | |
103 Cr[WS(csr, 2)] = T4 + T7; | |
104 Ci[WS(csi, 1)] = Ta - T9; | |
105 Cr[WS(csr, 1)] = T1 + T2 - T3; | |
106 Tb = FMA(KP500000000, T9, Ta); | |
107 Ci[0] = -(T8 + Tb); | |
108 Ci[WS(csi, 2)] = T8 - Tb; | |
109 } | |
110 } | |
111 } | |
112 | |
113 static const kr2c_desc desc = { 6, "r2cfII_6", {11, 2, 2, 0}, &GENUS }; | |
114 | |
115 void X(codelet_r2cfII_6) (planner *p) { | |
116 X(kr2c_register) (p, r2cfII_6, &desc); | |
117 } | |
118 | |
119 #endif |