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 Dec 10 07:06:25 EST 2020 */
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 14 -name r2cb_14 -include rdft/scalar/r2cb.h */
29 
30 /*
31  * This function contains 62 FP additions, 44 FP multiplications,
32  * (or, 18 additions, 0 multiplications, 44 fused multiply/add),
33  * 46 stack variables, 7 constants, and 28 memory accesses
34  */
35 #include "rdft/scalar/r2cb.h"
36 
r2cb_14(R * R0,R * R1,R * Cr,R * Ci,stride rs,stride csr,stride csi,INT v,INT ivs,INT ovs)37 static void r2cb_14(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(KP1_801937735, +1.801937735804838252472204639014890102331838324);
41      DK(KP692021471, +0.692021471630095869627814897002069140197260599);
42      DK(KP801937735, +0.801937735804838252472204639014890102331838324);
43      DK(KP2_000000000, +2.000000000000000000000000000000000000000000000);
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(56, rs), MAKE_VOLATILE_STRIDE(56, csr), MAKE_VOLATILE_STRIDE(56, csi)) {
49 	       E T3, Te, To, TK, Tu, TM, Tr, TL, Tv, TA, TX, TS, TN, TF, T6;
50 	       E Tf, Tc, Th, T9, Tg, Tj, Tx, TU, TP, TH, TC, T1, T2, Td, Ti;
51 	       T1 = Cr[0];
52 	       T2 = Cr[WS(csr, 7)];
53 	       T3 = T1 - T2;
54 	       Te = T1 + T2;
55 	       {
56 		    E Tm, Tn, T4, T5;
57 		    Tm = Ci[WS(csi, 4)];
58 		    Tn = Ci[WS(csi, 3)];
59 		    To = Tm - Tn;
60 		    TK = Tm + Tn;
61 		    {
62 			 E Ts, Tt, Tp, Tq;
63 			 Ts = Ci[WS(csi, 6)];
64 			 Tt = Ci[WS(csi, 1)];
65 			 Tu = Ts - Tt;
66 			 TM = Ts + Tt;
67 			 Tp = Ci[WS(csi, 2)];
68 			 Tq = Ci[WS(csi, 5)];
69 			 Tr = Tp - Tq;
70 			 TL = Tp + Tq;
71 		    }
72 		    Tv = FMA(KP554958132, Tu, Tr);
73 		    TA = FMA(KP554958132, To, Tu);
74 		    TX = FNMS(KP554958132, TL, TK);
75 		    TS = FMA(KP554958132, TK, TM);
76 		    TN = FMA(KP554958132, TM, TL);
77 		    TF = FNMS(KP554958132, Tr, To);
78 		    T4 = Cr[WS(csr, 2)];
79 		    T5 = Cr[WS(csr, 5)];
80 		    T6 = T4 - T5;
81 		    Tf = T4 + T5;
82 		    {
83 			 E Ta, Tb, T7, T8;
84 			 Ta = Cr[WS(csr, 6)];
85 			 Tb = Cr[WS(csr, 1)];
86 			 Tc = Ta - Tb;
87 			 Th = Ta + Tb;
88 			 T7 = Cr[WS(csr, 4)];
89 			 T8 = Cr[WS(csr, 3)];
90 			 T9 = T7 - T8;
91 			 Tg = T7 + T8;
92 		    }
93 		    Tj = FNMS(KP356895867, Tg, Tf);
94 		    Tx = FNMS(KP356895867, Tf, Th);
95 		    TU = FNMS(KP356895867, Tc, T9);
96 		    TP = FNMS(KP356895867, T6, Tc);
97 		    TH = FNMS(KP356895867, T9, T6);
98 		    TC = FNMS(KP356895867, Th, Tg);
99 	       }
100 	       Td = T6 + T9 + Tc;
101 	       R1[WS(rs, 3)] = FMA(KP2_000000000, Td, T3);
102 	       Ti = Tf + Tg + Th;
103 	       R0[0] = FMA(KP2_000000000, Ti, Te);
104 	       {
105 		    E Tw, Tl, Tk, TY, TW, TV;
106 		    Tw = FMA(KP801937735, Tv, To);
107 		    Tk = FNMS(KP692021471, Tj, Th);
108 		    Tl = FNMS(KP1_801937735, Tk, Te);
109 		    R0[WS(rs, 4)] = FNMS(KP1_949855824, Tw, Tl);
110 		    R0[WS(rs, 3)] = FMA(KP1_949855824, Tw, Tl);
111 		    TY = FNMS(KP801937735, TX, TM);
112 		    TV = FNMS(KP692021471, TU, T6);
113 		    TW = FNMS(KP1_801937735, TV, T3);
114 		    R1[WS(rs, 1)] = FNMS(KP1_949855824, TY, TW);
115 		    R1[WS(rs, 5)] = FMA(KP1_949855824, TY, TW);
116 	       }
117 	       {
118 		    E TB, Tz, Ty, TO, TJ, TI;
119 		    TB = FNMS(KP801937735, TA, Tr);
120 		    Ty = FNMS(KP692021471, Tx, Tg);
121 		    Tz = FNMS(KP1_801937735, Ty, Te);
122 		    R0[WS(rs, 1)] = FNMS(KP1_949855824, TB, Tz);
123 		    R0[WS(rs, 6)] = FMA(KP1_949855824, TB, Tz);
124 		    TO = FMA(KP801937735, TN, TK);
125 		    TI = FNMS(KP692021471, TH, Tc);
126 		    TJ = FNMS(KP1_801937735, TI, T3);
127 		    R1[0] = FNMS(KP1_949855824, TO, TJ);
128 		    R1[WS(rs, 6)] = FMA(KP1_949855824, TO, TJ);
129 	       }
130 	       {
131 		    E TT, TR, TQ, TG, TE, TD;
132 		    TT = FNMS(KP801937735, TS, TL);
133 		    TQ = FNMS(KP692021471, TP, T9);
134 		    TR = FNMS(KP1_801937735, TQ, T3);
135 		    R1[WS(rs, 4)] = FNMS(KP1_949855824, TT, TR);
136 		    R1[WS(rs, 2)] = FMA(KP1_949855824, TT, TR);
137 		    TG = FNMS(KP801937735, TF, Tu);
138 		    TD = FNMS(KP692021471, TC, Tf);
139 		    TE = FNMS(KP1_801937735, TD, Te);
140 		    R0[WS(rs, 5)] = FNMS(KP1_949855824, TG, TE);
141 		    R0[WS(rs, 2)] = FMA(KP1_949855824, TG, TE);
142 	       }
143 	  }
144      }
145 }
146 
147 static const kr2c_desc desc = { 14, "r2cb_14", { 18, 0, 44, 0 }, &GENUS };
148 
X(codelet_r2cb_14)149 void X(codelet_r2cb_14) (planner *p) { X(kr2c_register) (p, r2cb_14, &desc);
150 }
151 
152 #else
153 
154 /* Generated by: ../../../genfft/gen_r2cb.native -compact -variables 4 -pipeline-latency 4 -sign 1 -n 14 -name r2cb_14 -include rdft/scalar/r2cb.h */
155 
156 /*
157  * This function contains 62 FP additions, 38 FP multiplications,
158  * (or, 36 additions, 12 multiplications, 26 fused multiply/add),
159  * 28 stack variables, 7 constants, and 28 memory accesses
160  */
161 #include "rdft/scalar/r2cb.h"
162 
r2cb_14(R * R0,R * R1,R * Cr,R * Ci,stride rs,stride csr,stride csi,INT v,INT ivs,INT ovs)163 static void r2cb_14(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs)
164 {
165      DK(KP1_801937735, +1.801937735804838252472204639014890102331838324);
166      DK(KP445041867, +0.445041867912628808577805128993589518932711138);
167      DK(KP1_246979603, +1.246979603717467061050009768008479621264549462);
168      DK(KP867767478, +0.867767478235116240951536665696717509219981456);
169      DK(KP1_949855824, +1.949855824363647214036263365987862434465571601);
170      DK(KP1_563662964, +1.563662964936059617416889053348115500464669037);
171      DK(KP2_000000000, +2.000000000000000000000000000000000000000000000);
172      {
173 	  INT i;
174 	  for (i = v; i > 0; i = i - 1, R0 = R0 + ovs, R1 = R1 + ovs, Cr = Cr + ivs, Ci = Ci + ivs, MAKE_VOLATILE_STRIDE(56, rs), MAKE_VOLATILE_STRIDE(56, csr), MAKE_VOLATILE_STRIDE(56, csi)) {
175 	       E T3, Td, T6, Te, Tq, Tz, Tn, Ty, Tc, Tg, Tk, Tx, T9, Tf, T1;
176 	       E T2;
177 	       T1 = Cr[0];
178 	       T2 = Cr[WS(csr, 7)];
179 	       T3 = T1 - T2;
180 	       Td = T1 + T2;
181 	       {
182 		    E T4, T5, To, Tp;
183 		    T4 = Cr[WS(csr, 2)];
184 		    T5 = Cr[WS(csr, 5)];
185 		    T6 = T4 - T5;
186 		    Te = T4 + T5;
187 		    To = Ci[WS(csi, 2)];
188 		    Tp = Ci[WS(csi, 5)];
189 		    Tq = To - Tp;
190 		    Tz = To + Tp;
191 	       }
192 	       {
193 		    E Tl, Tm, Ta, Tb;
194 		    Tl = Ci[WS(csi, 6)];
195 		    Tm = Ci[WS(csi, 1)];
196 		    Tn = Tl - Tm;
197 		    Ty = Tl + Tm;
198 		    Ta = Cr[WS(csr, 6)];
199 		    Tb = Cr[WS(csr, 1)];
200 		    Tc = Ta - Tb;
201 		    Tg = Ta + Tb;
202 	       }
203 	       {
204 		    E Ti, Tj, T7, T8;
205 		    Ti = Ci[WS(csi, 4)];
206 		    Tj = Ci[WS(csi, 3)];
207 		    Tk = Ti - Tj;
208 		    Tx = Ti + Tj;
209 		    T7 = Cr[WS(csr, 4)];
210 		    T8 = Cr[WS(csr, 3)];
211 		    T9 = T7 - T8;
212 		    Tf = T7 + T8;
213 	       }
214 	       R1[WS(rs, 3)] = FMA(KP2_000000000, T6 + T9 + Tc, T3);
215 	       R0[0] = FMA(KP2_000000000, Te + Tf + Tg, Td);
216 	       {
217 		    E Tr, Th, TE, TD;
218 		    Tr = FNMS(KP1_949855824, Tn, KP1_563662964 * Tk) - (KP867767478 * Tq);
219 		    Th = FMA(KP1_246979603, Tf, Td) + FNMA(KP445041867, Tg, KP1_801937735 * Te);
220 		    R0[WS(rs, 2)] = Th - Tr;
221 		    R0[WS(rs, 5)] = Th + Tr;
222 		    TE = FMA(KP867767478, Tx, KP1_563662964 * Ty) - (KP1_949855824 * Tz);
223 		    TD = FMA(KP1_246979603, Tc, T3) + FNMA(KP1_801937735, T9, KP445041867 * T6);
224 		    R1[WS(rs, 2)] = TD - TE;
225 		    R1[WS(rs, 4)] = TD + TE;
226 	       }
227 	       {
228 		    E Tt, Ts, TA, Tw;
229 		    Tt = FMA(KP867767478, Tk, KP1_563662964 * Tn) - (KP1_949855824 * Tq);
230 		    Ts = FMA(KP1_246979603, Tg, Td) + FNMA(KP1_801937735, Tf, KP445041867 * Te);
231 		    R0[WS(rs, 6)] = Ts - Tt;
232 		    R0[WS(rs, 1)] = Ts + Tt;
233 		    TA = FNMS(KP1_949855824, Ty, KP1_563662964 * Tx) - (KP867767478 * Tz);
234 		    Tw = FMA(KP1_246979603, T9, T3) + FNMA(KP445041867, Tc, KP1_801937735 * T6);
235 		    R1[WS(rs, 5)] = Tw - TA;
236 		    R1[WS(rs, 1)] = Tw + TA;
237 	       }
238 	       {
239 		    E TC, TB, Tv, Tu;
240 		    TC = FMA(KP1_563662964, Tz, KP1_949855824 * Tx) + (KP867767478 * Ty);
241 		    TB = FMA(KP1_246979603, T6, T3) + FNMA(KP1_801937735, Tc, KP445041867 * T9);
242 		    R1[0] = TB - TC;
243 		    R1[WS(rs, 6)] = TB + TC;
244 		    Tv = FMA(KP1_563662964, Tq, KP1_949855824 * Tk) + (KP867767478 * Tn);
245 		    Tu = FMA(KP1_246979603, Te, Td) + FNMA(KP1_801937735, Tg, KP445041867 * Tf);
246 		    R0[WS(rs, 4)] = Tu - Tv;
247 		    R0[WS(rs, 3)] = Tu + Tv;
248 	       }
249 	  }
250      }
251 }
252 
253 static const kr2c_desc desc = { 14, "r2cb_14", { 36, 12, 26, 0 }, &GENUS };
254 
X(codelet_r2cb_14)255 void X(codelet_r2cb_14) (planner *p) { X(kr2c_register) (p, r2cb_14, &desc);
256 }
257 
258 #endif
259