Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.8/rdft/scalar/r2cf/r2cf_12.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 12 -name r2cf_12 -include rdft/scalar/r2cf.h */ | |
29 | |
30 /* | |
31 * This function contains 38 FP additions, 10 FP multiplications, | |
32 * (or, 30 additions, 2 multiplications, 8 fused multiply/add), | |
33 * 21 stack variables, 2 constants, and 24 memory accesses | |
34 */ | |
35 #include "rdft/scalar/r2cf.h" | |
36 | |
37 static void r2cf_12(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(48, rs), MAKE_VOLATILE_STRIDE(48, csr), MAKE_VOLATILE_STRIDE(48, csi)) { | |
44 E T5, Tp, Tm, Tk, Ty, Tt, Ta, Tq, Tn, Tf, Tz, Tu, Tl, To; | |
45 { | |
46 E T1, T2, T3, T4; | |
47 T1 = R0[0]; | |
48 T2 = R0[WS(rs, 2)]; | |
49 T3 = R0[WS(rs, 4)]; | |
50 T4 = T2 + T3; | |
51 T5 = T1 + T4; | |
52 Tp = FNMS(KP500000000, T4, T1); | |
53 Tm = T3 - T2; | |
54 } | |
55 { | |
56 E Tg, Th, Ti, Tj; | |
57 Tg = R1[WS(rs, 1)]; | |
58 Th = R1[WS(rs, 3)]; | |
59 Ti = R1[WS(rs, 5)]; | |
60 Tj = Th + Ti; | |
61 Tk = FNMS(KP500000000, Tj, Tg); | |
62 Ty = Ti - Th; | |
63 Tt = Tg + Tj; | |
64 } | |
65 { | |
66 E T6, T7, T8, T9; | |
67 T6 = R0[WS(rs, 3)]; | |
68 T7 = R0[WS(rs, 5)]; | |
69 T8 = R0[WS(rs, 1)]; | |
70 T9 = T7 + T8; | |
71 Ta = T6 + T9; | |
72 Tq = FNMS(KP500000000, T9, T6); | |
73 Tn = T8 - T7; | |
74 } | |
75 { | |
76 E Tb, Tc, Td, Te; | |
77 Tb = R1[WS(rs, 4)]; | |
78 Tc = R1[0]; | |
79 Td = R1[WS(rs, 2)]; | |
80 Te = Tc + Td; | |
81 Tf = FNMS(KP500000000, Te, Tb); | |
82 Tz = Td - Tc; | |
83 Tu = Tb + Te; | |
84 } | |
85 Cr[WS(csr, 3)] = T5 - Ta; | |
86 Ci[WS(csi, 3)] = Tt - Tu; | |
87 Tl = Tf - Tk; | |
88 To = Tm - Tn; | |
89 Ci[WS(csi, 1)] = FMA(KP866025403, To, Tl); | |
90 Ci[WS(csi, 5)] = FNMS(KP866025403, To, Tl); | |
91 { | |
92 E Tx, TA, Tv, Tw; | |
93 Tx = Tp - Tq; | |
94 TA = Ty - Tz; | |
95 Cr[WS(csr, 5)] = FNMS(KP866025403, TA, Tx); | |
96 Cr[WS(csr, 1)] = FMA(KP866025403, TA, Tx); | |
97 Tv = T5 + Ta; | |
98 Tw = Tt + Tu; | |
99 Cr[WS(csr, 6)] = Tv - Tw; | |
100 Cr[0] = Tv + Tw; | |
101 } | |
102 { | |
103 E Tr, Ts, TB, TC; | |
104 Tr = Tp + Tq; | |
105 Ts = Tk + Tf; | |
106 Cr[WS(csr, 2)] = Tr - Ts; | |
107 Cr[WS(csr, 4)] = Tr + Ts; | |
108 TB = Ty + Tz; | |
109 TC = Tm + Tn; | |
110 Ci[WS(csi, 2)] = KP866025403 * (TB - TC); | |
111 Ci[WS(csi, 4)] = KP866025403 * (TC + TB); | |
112 } | |
113 } | |
114 } | |
115 } | |
116 | |
117 static const kr2c_desc desc = { 12, "r2cf_12", {30, 2, 8, 0}, &GENUS }; | |
118 | |
119 void X(codelet_r2cf_12) (planner *p) { | |
120 X(kr2c_register) (p, r2cf_12, &desc); | |
121 } | |
122 | |
123 #else | |
124 | |
125 /* Generated by: ../../../genfft/gen_r2cf.native -compact -variables 4 -pipeline-latency 4 -n 12 -name r2cf_12 -include rdft/scalar/r2cf.h */ | |
126 | |
127 /* | |
128 * This function contains 38 FP additions, 8 FP multiplications, | |
129 * (or, 34 additions, 4 multiplications, 4 fused multiply/add), | |
130 * 21 stack variables, 2 constants, and 24 memory accesses | |
131 */ | |
132 #include "rdft/scalar/r2cf.h" | |
133 | |
134 static void r2cf_12(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs) | |
135 { | |
136 DK(KP866025403, +0.866025403784438646763723170752936183471402627); | |
137 DK(KP500000000, +0.500000000000000000000000000000000000000000000); | |
138 { | |
139 INT i; | |
140 for (i = v; i > 0; i = i - 1, R0 = R0 + ivs, R1 = R1 + ivs, Cr = Cr + ovs, Ci = Ci + ovs, MAKE_VOLATILE_STRIDE(48, rs), MAKE_VOLATILE_STRIDE(48, csr), MAKE_VOLATILE_STRIDE(48, csi)) { | |
141 E T5, Tp, Tb, Tn, Ty, Tt, Ta, Tq, Tc, Ti, Tz, Tu, Td, To; | |
142 { | |
143 E T1, T2, T3, T4; | |
144 T1 = R0[0]; | |
145 T2 = R0[WS(rs, 2)]; | |
146 T3 = R0[WS(rs, 4)]; | |
147 T4 = T2 + T3; | |
148 T5 = T1 + T4; | |
149 Tp = FNMS(KP500000000, T4, T1); | |
150 Tb = T3 - T2; | |
151 } | |
152 { | |
153 E Tj, Tk, Tl, Tm; | |
154 Tj = R1[WS(rs, 1)]; | |
155 Tk = R1[WS(rs, 3)]; | |
156 Tl = R1[WS(rs, 5)]; | |
157 Tm = Tk + Tl; | |
158 Tn = FNMS(KP500000000, Tm, Tj); | |
159 Ty = Tl - Tk; | |
160 Tt = Tj + Tm; | |
161 } | |
162 { | |
163 E T6, T7, T8, T9; | |
164 T6 = R0[WS(rs, 3)]; | |
165 T7 = R0[WS(rs, 5)]; | |
166 T8 = R0[WS(rs, 1)]; | |
167 T9 = T7 + T8; | |
168 Ta = T6 + T9; | |
169 Tq = FNMS(KP500000000, T9, T6); | |
170 Tc = T8 - T7; | |
171 } | |
172 { | |
173 E Te, Tf, Tg, Th; | |
174 Te = R1[WS(rs, 4)]; | |
175 Tf = R1[0]; | |
176 Tg = R1[WS(rs, 2)]; | |
177 Th = Tf + Tg; | |
178 Ti = FNMS(KP500000000, Th, Te); | |
179 Tz = Tg - Tf; | |
180 Tu = Te + Th; | |
181 } | |
182 Cr[WS(csr, 3)] = T5 - Ta; | |
183 Ci[WS(csi, 3)] = Tt - Tu; | |
184 Td = KP866025403 * (Tb - Tc); | |
185 To = Ti - Tn; | |
186 Ci[WS(csi, 1)] = Td + To; | |
187 Ci[WS(csi, 5)] = To - Td; | |
188 { | |
189 E Tx, TA, Tv, Tw; | |
190 Tx = Tp - Tq; | |
191 TA = KP866025403 * (Ty - Tz); | |
192 Cr[WS(csr, 5)] = Tx - TA; | |
193 Cr[WS(csr, 1)] = Tx + TA; | |
194 Tv = T5 + Ta; | |
195 Tw = Tt + Tu; | |
196 Cr[WS(csr, 6)] = Tv - Tw; | |
197 Cr[0] = Tv + Tw; | |
198 } | |
199 { | |
200 E Tr, Ts, TB, TC; | |
201 Tr = Tp + Tq; | |
202 Ts = Tn + Ti; | |
203 Cr[WS(csr, 2)] = Tr - Ts; | |
204 Cr[WS(csr, 4)] = Tr + Ts; | |
205 TB = Ty + Tz; | |
206 TC = Tb + Tc; | |
207 Ci[WS(csi, 2)] = KP866025403 * (TB - TC); | |
208 Ci[WS(csi, 4)] = KP866025403 * (TC + TB); | |
209 } | |
210 } | |
211 } | |
212 } | |
213 | |
214 static const kr2c_desc desc = { 12, "r2cf_12", {34, 4, 4, 0}, &GENUS }; | |
215 | |
216 void X(codelet_r2cf_12) (planner *p) { | |
217 X(kr2c_register) (p, r2cf_12, &desc); | |
218 } | |
219 | |
220 #endif |