Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.8/rdft/scalar/r2cb/r2cb_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:07:28 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_r2cb.native -fma -compact -variables 4 -pipeline-latency 4 -sign 1 -n 7 -name r2cb_7 -include rdft/scalar/r2cb.h */ | |
29 | |
30 /* | |
31 * This function contains 24 FP additions, 22 FP multiplications, | |
32 * (or, 2 additions, 0 multiplications, 22 fused multiply/add), | |
33 * 27 stack variables, 7 constants, and 14 memory accesses | |
34 */ | |
35 #include "rdft/scalar/r2cb.h" | |
36 | |
37 static void r2cb_7(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs) | |
38 { | |
39 DK(KP1_949855824, +1.949855824363647214036263365987862434465571601); | |
40 DK(KP801937735, +0.801937735804838252472204639014890102331838324); | |
41 DK(KP1_801937735, +1.801937735804838252472204639014890102331838324); | |
42 DK(KP2_000000000, +2.000000000000000000000000000000000000000000000); | |
43 DK(KP692021471, +0.692021471630095869627814897002069140197260599); | |
44 DK(KP356895867, +0.356895867892209443894399510021300583399127187); | |
45 DK(KP554958132, +0.554958132087371191422194871006410481067288862); | |
46 { | |
47 INT i; | |
48 for (i = v; i > 0; i = i - 1, R0 = R0 + ovs, R1 = R1 + ovs, Cr = Cr + ivs, Ci = Ci + ivs, MAKE_VOLATILE_STRIDE(28, rs), MAKE_VOLATILE_STRIDE(28, csr), MAKE_VOLATILE_STRIDE(28, csi)) { | |
49 E T1, T9, Tb, Ta, Tc, Tm, Th, T7, Tk, Tf, T5, Tl, Tn; | |
50 T1 = Cr[0]; | |
51 T9 = Ci[WS(csi, 2)]; | |
52 Tb = Ci[WS(csi, 3)]; | |
53 Ta = Ci[WS(csi, 1)]; | |
54 Tc = FMA(KP554958132, Tb, Ta); | |
55 Tm = FMS(KP554958132, Ta, T9); | |
56 Th = FMA(KP554958132, T9, Tb); | |
57 { | |
58 E T2, T4, T3, T6, Tj, Te; | |
59 T2 = Cr[WS(csr, 1)]; | |
60 T4 = Cr[WS(csr, 3)]; | |
61 T3 = Cr[WS(csr, 2)]; | |
62 T6 = FNMS(KP356895867, T3, T2); | |
63 Tj = FNMS(KP356895867, T4, T3); | |
64 Te = FNMS(KP356895867, T2, T4); | |
65 T7 = FNMS(KP692021471, T6, T4); | |
66 Tk = FNMS(KP692021471, Tj, T2); | |
67 Tf = FNMS(KP692021471, Te, T3); | |
68 T5 = T2 + T3 + T4; | |
69 } | |
70 R0[0] = FMA(KP2_000000000, T5, T1); | |
71 Tl = FNMS(KP1_801937735, Tk, T1); | |
72 Tn = FMA(KP801937735, Tm, Tb); | |
73 R1[WS(rs, 1)] = FNMS(KP1_949855824, Tn, Tl); | |
74 R0[WS(rs, 2)] = FMA(KP1_949855824, Tn, Tl); | |
75 { | |
76 E T8, Td, Tg, Ti; | |
77 T8 = FNMS(KP1_801937735, T7, T1); | |
78 Td = FMA(KP801937735, Tc, T9); | |
79 R1[0] = FNMS(KP1_949855824, Td, T8); | |
80 R0[WS(rs, 3)] = FMA(KP1_949855824, Td, T8); | |
81 Tg = FNMS(KP1_801937735, Tf, T1); | |
82 Ti = FNMS(KP801937735, Th, Ta); | |
83 R0[WS(rs, 1)] = FNMS(KP1_949855824, Ti, Tg); | |
84 R1[WS(rs, 2)] = FMA(KP1_949855824, Ti, Tg); | |
85 } | |
86 } | |
87 } | |
88 } | |
89 | |
90 static const kr2c_desc desc = { 7, "r2cb_7", {2, 0, 22, 0}, &GENUS }; | |
91 | |
92 void X(codelet_r2cb_7) (planner *p) { | |
93 X(kr2c_register) (p, r2cb_7, &desc); | |
94 } | |
95 | |
96 #else | |
97 | |
98 /* Generated by: ../../../genfft/gen_r2cb.native -compact -variables 4 -pipeline-latency 4 -sign 1 -n 7 -name r2cb_7 -include rdft/scalar/r2cb.h */ | |
99 | |
100 /* | |
101 * This function contains 24 FP additions, 19 FP multiplications, | |
102 * (or, 11 additions, 6 multiplications, 13 fused multiply/add), | |
103 * 21 stack variables, 7 constants, and 14 memory accesses | |
104 */ | |
105 #include "rdft/scalar/r2cb.h" | |
106 | |
107 static void r2cb_7(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs) | |
108 { | |
109 DK(KP2_000000000, +2.000000000000000000000000000000000000000000000); | |
110 DK(KP1_801937735, +1.801937735804838252472204639014890102331838324); | |
111 DK(KP445041867, +0.445041867912628808577805128993589518932711138); | |
112 DK(KP1_246979603, +1.246979603717467061050009768008479621264549462); | |
113 DK(KP867767478, +0.867767478235116240951536665696717509219981456); | |
114 DK(KP1_949855824, +1.949855824363647214036263365987862434465571601); | |
115 DK(KP1_563662964, +1.563662964936059617416889053348115500464669037); | |
116 { | |
117 INT i; | |
118 for (i = v; i > 0; i = i - 1, R0 = R0 + ovs, R1 = R1 + ovs, Cr = Cr + ivs, Ci = Ci + ivs, MAKE_VOLATILE_STRIDE(28, rs), MAKE_VOLATILE_STRIDE(28, csr), MAKE_VOLATILE_STRIDE(28, csi)) { | |
119 E T9, Td, Tb, T1, T4, T2, T3, T5, Tc, Ta, T6, T8, T7; | |
120 T6 = Ci[WS(csi, 2)]; | |
121 T8 = Ci[WS(csi, 1)]; | |
122 T7 = Ci[WS(csi, 3)]; | |
123 T9 = FNMS(KP1_949855824, T7, KP1_563662964 * T6) - (KP867767478 * T8); | |
124 Td = FMA(KP867767478, T6, KP1_563662964 * T7) - (KP1_949855824 * T8); | |
125 Tb = FMA(KP1_563662964, T8, KP1_949855824 * T6) + (KP867767478 * T7); | |
126 T1 = Cr[0]; | |
127 T4 = Cr[WS(csr, 3)]; | |
128 T2 = Cr[WS(csr, 1)]; | |
129 T3 = Cr[WS(csr, 2)]; | |
130 T5 = FMA(KP1_246979603, T3, T1) + FNMA(KP445041867, T4, KP1_801937735 * T2); | |
131 Tc = FMA(KP1_246979603, T4, T1) + FNMA(KP1_801937735, T3, KP445041867 * T2); | |
132 Ta = FMA(KP1_246979603, T2, T1) + FNMA(KP1_801937735, T4, KP445041867 * T3); | |
133 R0[WS(rs, 2)] = T5 - T9; | |
134 R1[WS(rs, 1)] = T5 + T9; | |
135 R0[WS(rs, 1)] = Tc + Td; | |
136 R1[WS(rs, 2)] = Tc - Td; | |
137 R0[WS(rs, 3)] = Ta + Tb; | |
138 R1[0] = Ta - Tb; | |
139 R0[0] = FMA(KP2_000000000, T2 + T3 + T4, T1); | |
140 } | |
141 } | |
142 } | |
143 | |
144 static const kr2c_desc desc = { 7, "r2cb_7", {11, 6, 13, 0}, &GENUS }; | |
145 | |
146 void X(codelet_r2cb_7) (planner *p) { | |
147 X(kr2c_register) (p, r2cb_7, &desc); | |
148 } | |
149 | |
150 #endif |