comparison src/fftw-3.3.8/rdft/scalar/r2cf/r2cf_7.c @ 167:bd3cc4d1df30

Add FFTW 3.3.8 source, and a Linux build
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 19 Nov 2019 14:52:55 +0000
parents
children
comparison
equal deleted inserted replaced
166:cbd6d7e562c7 167:bd3cc4d1df30
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:26 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 7 -name r2cf_7 -include rdft/scalar/r2cf.h */
29
30 /*
31 * This function contains 24 FP additions, 18 FP multiplications,
32 * (or, 9 additions, 3 multiplications, 15 fused multiply/add),
33 * 23 stack variables, 6 constants, and 14 memory accesses
34 */
35 #include "rdft/scalar/r2cf.h"
36
37 static void r2cf_7(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs)
38 {
39 DK(KP801937735, +0.801937735804838252472204639014890102331838324);
40 DK(KP974927912, +0.974927912181823607018131682993931217232785801);
41 DK(KP554958132, +0.554958132087371191422194871006410481067288862);
42 DK(KP900968867, +0.900968867902419126236102319507445051165919162);
43 DK(KP692021471, +0.692021471630095869627814897002069140197260599);
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 T1, T4, Ta, T7, Tb, Td, Tj, Ti, Th, Tf;
49 T1 = R0[0];
50 {
51 E T2, T3, T8, T9, T5, T6;
52 T2 = R1[0];
53 T3 = R0[WS(rs, 3)];
54 T4 = T2 + T3;
55 T8 = R1[WS(rs, 1)];
56 T9 = R0[WS(rs, 2)];
57 Ta = T8 + T9;
58 T5 = R0[WS(rs, 1)];
59 T6 = R1[WS(rs, 2)];
60 T7 = T5 + T6;
61 Tb = FNMS(KP356895867, Ta, T7);
62 Td = FNMS(KP356895867, T4, Ta);
63 Tj = T6 - T5;
64 Ti = T9 - T8;
65 Th = T3 - T2;
66 Tf = FNMS(KP356895867, T7, T4);
67 }
68 {
69 E Tc, Tm, Te, Tk, Tg, Tl;
70 Tc = FNMS(KP692021471, Tb, T4);
71 Cr[WS(csr, 3)] = FNMS(KP900968867, Tc, T1);
72 Tm = FNMS(KP554958132, Th, Tj);
73 Ci[WS(csi, 3)] = KP974927912 * (FNMS(KP801937735, Tm, Ti));
74 Te = FNMS(KP692021471, Td, T7);
75 Cr[WS(csr, 2)] = FNMS(KP900968867, Te, T1);
76 Tk = FMA(KP554958132, Tj, Ti);
77 Ci[WS(csi, 2)] = KP974927912 * (FNMS(KP801937735, Tk, Th));
78 Cr[0] = T1 + T4 + T7 + Ta;
79 Tg = FNMS(KP692021471, Tf, Ta);
80 Cr[WS(csr, 1)] = FNMS(KP900968867, Tg, T1);
81 Tl = FMA(KP554958132, Ti, Th);
82 Ci[WS(csi, 1)] = KP974927912 * (FMA(KP801937735, Tl, Tj));
83 }
84 }
85 }
86 }
87
88 static const kr2c_desc desc = { 7, "r2cf_7", {9, 3, 15, 0}, &GENUS };
89
90 void X(codelet_r2cf_7) (planner *p) {
91 X(kr2c_register) (p, r2cf_7, &desc);
92 }
93
94 #else
95
96 /* Generated by: ../../../genfft/gen_r2cf.native -compact -variables 4 -pipeline-latency 4 -n 7 -name r2cf_7 -include rdft/scalar/r2cf.h */
97
98 /*
99 * This function contains 24 FP additions, 18 FP multiplications,
100 * (or, 12 additions, 6 multiplications, 12 fused multiply/add),
101 * 20 stack variables, 6 constants, and 14 memory accesses
102 */
103 #include "rdft/scalar/r2cf.h"
104
105 static void r2cf_7(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs)
106 {
107 DK(KP222520933, +0.222520933956314404288902564496794759466355569);
108 DK(KP900968867, +0.900968867902419126236102319507445051165919162);
109 DK(KP623489801, +0.623489801858733530525004884004239810632274731);
110 DK(KP433883739, +0.433883739117558120475768332848358754609990728);
111 DK(KP781831482, +0.781831482468029808708444526674057750232334519);
112 DK(KP974927912, +0.974927912181823607018131682993931217232785801);
113 {
114 INT i;
115 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)) {
116 E T1, Ta, Tb, T4, Td, T7, Tc, T8, T9;
117 T1 = R0[0];
118 T8 = R1[0];
119 T9 = R0[WS(rs, 3)];
120 Ta = T8 + T9;
121 Tb = T9 - T8;
122 {
123 E T2, T3, T5, T6;
124 T2 = R0[WS(rs, 1)];
125 T3 = R1[WS(rs, 2)];
126 T4 = T2 + T3;
127 Td = T3 - T2;
128 T5 = R1[WS(rs, 1)];
129 T6 = R0[WS(rs, 2)];
130 T7 = T5 + T6;
131 Tc = T6 - T5;
132 }
133 Ci[WS(csi, 2)] = FNMS(KP781831482, Tc, KP974927912 * Tb) - (KP433883739 * Td);
134 Ci[WS(csi, 1)] = FMA(KP781831482, Tb, KP974927912 * Td) + (KP433883739 * Tc);
135 Cr[WS(csr, 2)] = FMA(KP623489801, T7, T1) + FNMA(KP900968867, T4, KP222520933 * Ta);
136 Ci[WS(csi, 3)] = FMA(KP433883739, Tb, KP974927912 * Tc) - (KP781831482 * Td);
137 Cr[WS(csr, 3)] = FMA(KP623489801, T4, T1) + FNMA(KP222520933, T7, KP900968867 * Ta);
138 Cr[WS(csr, 1)] = FMA(KP623489801, Ta, T1) + FNMA(KP900968867, T7, KP222520933 * T4);
139 Cr[0] = T1 + Ta + T4 + T7;
140 }
141 }
142 }
143
144 static const kr2c_desc desc = { 7, "r2cf_7", {12, 6, 12, 0}, &GENUS };
145
146 void X(codelet_r2cf_7) (planner *p) {
147 X(kr2c_register) (p, r2cf_7, &desc);
148 }
149
150 #endif