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