/src/fftw3/rdft/scalar/r2cf/hc2cfdft_4.c
Line | Count | Source |
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 Aug 13 06:09:38 UTC 2026 */ |
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_hc2cdft.native -fma -compact -variables 4 -pipeline-latency 4 -n 4 -dit -name hc2cfdft_4 -include rdft/scalar/hc2cf.h */ |
29 | | |
30 | | /* |
31 | | * This function contains 30 FP additions, 20 FP multiplications, |
32 | | * (or, 24 additions, 14 multiplications, 6 fused multiply/add), |
33 | | * 31 stack variables, 1 constants, and 16 memory accesses |
34 | | */ |
35 | | #include "rdft/scalar/hc2cf.h" |
36 | | |
37 | | static void hc2cfdft_4(R *Rp, R *Ip, R *Rm, R *Im, const R *W, stride rs, INT mb, INT me, INT ms) |
38 | | { |
39 | | DK(KP500000000, +0.500000000000000000000000000000000000000000000); |
40 | | { |
41 | | INT m; |
42 | | for (m = mb, W = W + ((mb - 1) * 6); m < me; m = m + 1, Rp = Rp + ms, Ip = Ip + ms, Rm = Rm - ms, Im = Im - ms, W = W + 6, MAKE_VOLATILE_STRIDE(16, rs)) { |
43 | | E Td, Tl, Tu, Tk, TC, Tf, Tj, T4, Tr, T9, To, T5, Tv, Tp, TA; |
44 | | E Tb, Tc; |
45 | | Tb = Ip[0]; |
46 | | Tc = Im[0]; |
47 | | Td = Tb - Tc; |
48 | | Tl = Tb + Tc; |
49 | | { |
50 | | E Tg, Th, Ti, T1, Tn; |
51 | | Tg = Rm[0]; |
52 | | Th = Rp[0]; |
53 | | Ti = Tg - Th; |
54 | | Tu = Th + Tg; |
55 | | Tk = W[1]; |
56 | | TC = Tk * Ti; |
57 | | Tf = W[0]; |
58 | | Tj = Tf * Ti; |
59 | | { |
60 | | E T2, T3, T7, T8; |
61 | | T2 = Ip[WS(rs, 1)]; |
62 | | T3 = Im[WS(rs, 1)]; |
63 | | T4 = T2 - T3; |
64 | | Tr = T2 + T3; |
65 | | T7 = Rp[WS(rs, 1)]; |
66 | | T8 = Rm[WS(rs, 1)]; |
67 | | T9 = T7 + T8; |
68 | | To = T7 - T8; |
69 | | } |
70 | | T1 = W[2]; |
71 | | T5 = T1 * T4; |
72 | | Tv = T1 * T9; |
73 | | Tn = W[4]; |
74 | | Tp = Tn * To; |
75 | | TA = Tn * Tr; |
76 | | } |
77 | | { |
78 | | E Tm, TD, Ta, Tw, Ts, TB, T6, Tq; |
79 | | Tm = FNMS(Tk, Tl, Tj); |
80 | | TD = FMA(Tf, Tl, TC); |
81 | | T6 = W[3]; |
82 | | Ta = FNMS(T6, T9, T5); |
83 | | Tw = FMA(T6, T4, Tv); |
84 | | Tq = W[5]; |
85 | | Ts = FMA(Tq, Tr, Tp); |
86 | | TB = FNMS(Tq, To, TA); |
87 | | { |
88 | | E Te, Tt, TF, TG; |
89 | | Te = Ta + Td; |
90 | | Tt = Tm - Ts; |
91 | | Ip[0] = KP500000000 * (Te + Tt); |
92 | | Im[WS(rs, 1)] = KP500000000 * (Tt - Te); |
93 | | TF = Tu + Tw; |
94 | | TG = TB + TD; |
95 | | Rm[WS(rs, 1)] = KP500000000 * (TF - TG); |
96 | | Rp[0] = KP500000000 * (TF + TG); |
97 | | } |
98 | | { |
99 | | E Tx, Ty, Tz, TE; |
100 | | Tx = Tu - Tw; |
101 | | Ty = Ts + Tm; |
102 | | Rm[0] = KP500000000 * (Tx - Ty); |
103 | | Rp[WS(rs, 1)] = KP500000000 * (Tx + Ty); |
104 | | Tz = Td - Ta; |
105 | | TE = TB - TD; |
106 | | Ip[WS(rs, 1)] = KP500000000 * (Tz + TE); |
107 | | Im[0] = KP500000000 * (TE - Tz); |
108 | | } |
109 | | } |
110 | | } |
111 | | } |
112 | | } |
113 | | |
114 | | static const tw_instr twinstr[] = { |
115 | | { TW_FULL, 1, 4 }, |
116 | | { TW_NEXT, 1, 0 } |
117 | | }; |
118 | | |
119 | | static const hc2c_desc desc = { 4, "hc2cfdft_4", twinstr, &GENUS, { 24, 14, 6, 0 } }; |
120 | | |
121 | | void X(codelet_hc2cfdft_4) (planner *p) { |
122 | | X(khc2c_register) (p, hc2cfdft_4, &desc, HC2C_VIA_DFT); |
123 | | } |
124 | | #else |
125 | | |
126 | | /* Generated by: ../../../genfft/gen_hc2cdft.native -compact -variables 4 -pipeline-latency 4 -n 4 -dit -name hc2cfdft_4 -include rdft/scalar/hc2cf.h */ |
127 | | |
128 | | /* |
129 | | * This function contains 30 FP additions, 20 FP multiplications, |
130 | | * (or, 24 additions, 14 multiplications, 6 fused multiply/add), |
131 | | * 18 stack variables, 1 constants, and 16 memory accesses |
132 | | */ |
133 | | #include "rdft/scalar/hc2cf.h" |
134 | | |
135 | | static void hc2cfdft_4(R *Rp, R *Ip, R *Rm, R *Im, const R *W, stride rs, INT mb, INT me, INT ms) |
136 | 0 | { |
137 | 0 | DK(KP500000000, +0.500000000000000000000000000000000000000000000); |
138 | 0 | { |
139 | 0 | INT m; |
140 | 0 | for (m = mb, W = W + ((mb - 1) * 6); m < me; m = m + 1, Rp = Rp + ms, Ip = Ip + ms, Rm = Rm - ms, Im = Im - ms, W = W + 6, MAKE_VOLATILE_STRIDE(16, rs)) { |
141 | 0 | E Tc, Tr, Tk, Tx, T9, Ts, Tp, Tw; |
142 | 0 | { |
143 | 0 | E Ta, Tb, Tj, Tf, Tg, Th, Te, Ti; |
144 | 0 | Ta = Ip[0]; |
145 | 0 | Tb = Im[0]; |
146 | 0 | Tj = Ta + Tb; |
147 | 0 | Tf = Rm[0]; |
148 | 0 | Tg = Rp[0]; |
149 | 0 | Th = Tf - Tg; |
150 | 0 | Tc = Ta - Tb; |
151 | 0 | Tr = Tg + Tf; |
152 | 0 | Te = W[0]; |
153 | 0 | Ti = W[1]; |
154 | 0 | Tk = FNMS(Ti, Tj, Te * Th); |
155 | 0 | Tx = FMA(Ti, Th, Te * Tj); |
156 | 0 | } |
157 | 0 | { |
158 | 0 | E T4, To, T8, Tm; |
159 | 0 | { |
160 | 0 | E T2, T3, T6, T7; |
161 | 0 | T2 = Ip[WS(rs, 1)]; |
162 | 0 | T3 = Im[WS(rs, 1)]; |
163 | 0 | T4 = T2 - T3; |
164 | 0 | To = T2 + T3; |
165 | 0 | T6 = Rp[WS(rs, 1)]; |
166 | 0 | T7 = Rm[WS(rs, 1)]; |
167 | 0 | T8 = T6 + T7; |
168 | 0 | Tm = T6 - T7; |
169 | 0 | } |
170 | 0 | { |
171 | 0 | E T1, T5, Tl, Tn; |
172 | 0 | T1 = W[2]; |
173 | 0 | T5 = W[3]; |
174 | 0 | T9 = FNMS(T5, T8, T1 * T4); |
175 | 0 | Ts = FMA(T1, T8, T5 * T4); |
176 | 0 | Tl = W[4]; |
177 | 0 | Tn = W[5]; |
178 | 0 | Tp = FMA(Tl, Tm, Tn * To); |
179 | 0 | Tw = FNMS(Tn, Tm, Tl * To); |
180 | 0 | } |
181 | 0 | } |
182 | 0 | { |
183 | 0 | E Td, Tq, Tz, TA; |
184 | 0 | Td = T9 + Tc; |
185 | 0 | Tq = Tk - Tp; |
186 | 0 | Ip[0] = KP500000000 * (Td + Tq); |
187 | 0 | Im[WS(rs, 1)] = KP500000000 * (Tq - Td); |
188 | 0 | Tz = Tr + Ts; |
189 | 0 | TA = Tw + Tx; |
190 | 0 | Rm[WS(rs, 1)] = KP500000000 * (Tz - TA); |
191 | 0 | Rp[0] = KP500000000 * (Tz + TA); |
192 | 0 | } |
193 | 0 | { |
194 | 0 | E Tt, Tu, Tv, Ty; |
195 | 0 | Tt = Tr - Ts; |
196 | 0 | Tu = Tp + Tk; |
197 | 0 | Rm[0] = KP500000000 * (Tt - Tu); |
198 | 0 | Rp[WS(rs, 1)] = KP500000000 * (Tt + Tu); |
199 | 0 | Tv = Tc - T9; |
200 | 0 | Ty = Tw - Tx; |
201 | 0 | Ip[WS(rs, 1)] = KP500000000 * (Tv + Ty); |
202 | 0 | Im[0] = KP500000000 * (Ty - Tv); |
203 | 0 | } |
204 | 0 | } |
205 | 0 | } |
206 | 0 | } |
207 | | |
208 | | static const tw_instr twinstr[] = { |
209 | | { TW_FULL, 1, 4 }, |
210 | | { TW_NEXT, 1, 0 } |
211 | | }; |
212 | | |
213 | | static const hc2c_desc desc = { 4, "hc2cfdft_4", twinstr, &GENUS, { 24, 14, 6, 0 } }; |
214 | | |
215 | 1 | void X(codelet_hc2cfdft_4) (planner *p) { |
216 | 1 | X(khc2c_register) (p, hc2cfdft_4, &desc, HC2C_VIA_DFT); |
217 | 1 | } |
218 | | #endif |