Mercurial > hg > sv-dependency-builds
comparison src/fftw-3.3.8/rdft/scalar/r2r/e10_8.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:08:10 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_r2r.native -fma -compact -variables 4 -pipeline-latency 4 -redft10 -n 8 -name e10_8 -include rdft/scalar/r2r.h */ | |
29 | |
30 /* | |
31 * This function contains 26 FP additions, 18 FP multiplications, | |
32 * (or, 16 additions, 8 multiplications, 10 fused multiply/add), | |
33 * 28 stack variables, 9 constants, and 16 memory accesses | |
34 */ | |
35 #include "rdft/scalar/r2r.h" | |
36 | |
37 static void e10_8(const R *I, R *O, stride is, stride os, INT v, INT ivs, INT ovs) | |
38 { | |
39 DK(KP414213562, +0.414213562373095048801688724209698078569671875); | |
40 DK(KP1_847759065, +1.847759065022573512256366378793576573644833252); | |
41 DK(KP198912367, +0.198912367379658006911597622644676228597850501); | |
42 DK(KP1_961570560, +1.961570560806460898252364472268478073947867462); | |
43 DK(KP2_000000000, +2.000000000000000000000000000000000000000000000); | |
44 DK(KP1_414213562, +1.414213562373095048801688724209698078569671875); | |
45 DK(KP668178637, +0.668178637919298919997757686523080761552472251); | |
46 DK(KP1_662939224, +1.662939224605090474157576755235811513477121624); | |
47 DK(KP707106781, +0.707106781186547524400844362104849039284835938); | |
48 { | |
49 INT i; | |
50 for (i = v; i > 0; i = i - 1, I = I + ivs, O = O + ovs, MAKE_VOLATILE_STRIDE(16, is), MAKE_VOLATILE_STRIDE(16, os)) { | |
51 E T3, Tj, Te, Tk, Ta, Tn, Tf, Tm; | |
52 { | |
53 E T1, T2, Tc, Td; | |
54 T1 = I[0]; | |
55 T2 = I[WS(is, 7)]; | |
56 T3 = T1 - T2; | |
57 Tj = T1 + T2; | |
58 Tc = I[WS(is, 4)]; | |
59 Td = I[WS(is, 3)]; | |
60 Te = Tc - Td; | |
61 Tk = Tc + Td; | |
62 { | |
63 E T4, T5, T6, T7, T8, T9; | |
64 T4 = I[WS(is, 2)]; | |
65 T5 = I[WS(is, 5)]; | |
66 T6 = T4 - T5; | |
67 T7 = I[WS(is, 1)]; | |
68 T8 = I[WS(is, 6)]; | |
69 T9 = T7 - T8; | |
70 Ta = T6 + T9; | |
71 Tn = T7 + T8; | |
72 Tf = T6 - T9; | |
73 Tm = T4 + T5; | |
74 } | |
75 } | |
76 { | |
77 E Tb, Tg, Tp, Tq; | |
78 Tb = FNMS(KP707106781, Ta, T3); | |
79 Tg = FNMS(KP707106781, Tf, Te); | |
80 O[WS(os, 3)] = KP1_662939224 * (FMA(KP668178637, Tg, Tb)); | |
81 O[WS(os, 5)] = -(KP1_662939224 * (FNMS(KP668178637, Tb, Tg))); | |
82 Tp = Tj + Tk; | |
83 Tq = Tm + Tn; | |
84 O[WS(os, 4)] = KP1_414213562 * (Tp - Tq); | |
85 O[0] = KP2_000000000 * (Tp + Tq); | |
86 } | |
87 { | |
88 E Th, Ti, Tl, To; | |
89 Th = FMA(KP707106781, Ta, T3); | |
90 Ti = FMA(KP707106781, Tf, Te); | |
91 O[WS(os, 1)] = KP1_961570560 * (FNMS(KP198912367, Ti, Th)); | |
92 O[WS(os, 7)] = KP1_961570560 * (FMA(KP198912367, Th, Ti)); | |
93 Tl = Tj - Tk; | |
94 To = Tm - Tn; | |
95 O[WS(os, 2)] = KP1_847759065 * (FNMS(KP414213562, To, Tl)); | |
96 O[WS(os, 6)] = KP1_847759065 * (FMA(KP414213562, Tl, To)); | |
97 } | |
98 } | |
99 } | |
100 } | |
101 | |
102 static const kr2r_desc desc = { 8, "e10_8", {16, 8, 10, 0}, &GENUS, REDFT10 }; | |
103 | |
104 void X(codelet_e10_8) (planner *p) { | |
105 X(kr2r_register) (p, e10_8, &desc); | |
106 } | |
107 | |
108 #else | |
109 | |
110 /* Generated by: ../../../genfft/gen_r2r.native -compact -variables 4 -pipeline-latency 4 -redft10 -n 8 -name e10_8 -include rdft/scalar/r2r.h */ | |
111 | |
112 /* | |
113 * This function contains 26 FP additions, 16 FP multiplications, | |
114 * (or, 20 additions, 10 multiplications, 6 fused multiply/add), | |
115 * 28 stack variables, 9 constants, and 16 memory accesses | |
116 */ | |
117 #include "rdft/scalar/r2r.h" | |
118 | |
119 static void e10_8(const R *I, R *O, stride is, stride os, INT v, INT ivs, INT ovs) | |
120 { | |
121 DK(KP765366864, +0.765366864730179543456919968060797733522689125); | |
122 DK(KP1_847759065, +1.847759065022573512256366378793576573644833252); | |
123 DK(KP390180644, +0.390180644032256535696569736954044481855383236); | |
124 DK(KP1_961570560, +1.961570560806460898252364472268478073947867462); | |
125 DK(KP2_000000000, +2.000000000000000000000000000000000000000000000); | |
126 DK(KP1_414213562, +1.414213562373095048801688724209698078569671875); | |
127 DK(KP1_111140466, +1.111140466039204449485661627897065748749874382); | |
128 DK(KP1_662939224, +1.662939224605090474157576755235811513477121624); | |
129 DK(KP707106781, +0.707106781186547524400844362104849039284835938); | |
130 { | |
131 INT i; | |
132 for (i = v; i > 0; i = i - 1, I = I + ivs, O = O + ovs, MAKE_VOLATILE_STRIDE(16, is), MAKE_VOLATILE_STRIDE(16, os)) { | |
133 E T3, Tj, Tf, Tk, Ta, Tn, Tc, Tm; | |
134 { | |
135 E T1, T2, Td, Te; | |
136 T1 = I[0]; | |
137 T2 = I[WS(is, 7)]; | |
138 T3 = T1 - T2; | |
139 Tj = T1 + T2; | |
140 Td = I[WS(is, 4)]; | |
141 Te = I[WS(is, 3)]; | |
142 Tf = Td - Te; | |
143 Tk = Td + Te; | |
144 { | |
145 E T4, T5, T6, T7, T8, T9; | |
146 T4 = I[WS(is, 2)]; | |
147 T5 = I[WS(is, 5)]; | |
148 T6 = T4 - T5; | |
149 T7 = I[WS(is, 1)]; | |
150 T8 = I[WS(is, 6)]; | |
151 T9 = T7 - T8; | |
152 Ta = KP707106781 * (T6 + T9); | |
153 Tn = T7 + T8; | |
154 Tc = KP707106781 * (T6 - T9); | |
155 Tm = T4 + T5; | |
156 } | |
157 } | |
158 { | |
159 E Tb, Tg, Tp, Tq; | |
160 Tb = T3 - Ta; | |
161 Tg = Tc - Tf; | |
162 O[WS(os, 3)] = FNMS(KP1_111140466, Tg, KP1_662939224 * Tb); | |
163 O[WS(os, 5)] = FMA(KP1_662939224, Tg, KP1_111140466 * Tb); | |
164 Tp = Tj + Tk; | |
165 Tq = Tm + Tn; | |
166 O[WS(os, 4)] = KP1_414213562 * (Tp - Tq); | |
167 O[0] = KP2_000000000 * (Tp + Tq); | |
168 } | |
169 { | |
170 E Th, Ti, Tl, To; | |
171 Th = T3 + Ta; | |
172 Ti = Tf + Tc; | |
173 O[WS(os, 1)] = FNMS(KP390180644, Ti, KP1_961570560 * Th); | |
174 O[WS(os, 7)] = FMA(KP1_961570560, Ti, KP390180644 * Th); | |
175 Tl = Tj - Tk; | |
176 To = Tm - Tn; | |
177 O[WS(os, 2)] = FNMS(KP765366864, To, KP1_847759065 * Tl); | |
178 O[WS(os, 6)] = FMA(KP765366864, Tl, KP1_847759065 * To); | |
179 } | |
180 } | |
181 } | |
182 } | |
183 | |
184 static const kr2r_desc desc = { 8, "e10_8", {20, 10, 6, 0}, &GENUS, REDFT10 }; | |
185 | |
186 void X(codelet_e10_8) (planner *p) { | |
187 X(kr2r_register) (p, e10_8, &desc); | |
188 } | |
189 | |
190 #endif |