mirror of
https://github.com/tildearrow/furnace.git
synced 2024-12-02 17:27:25 +00:00
54e93db207
not reliable yet
303 lines
10 KiB
C
303 lines
10 KiB
C
/*
|
|
* Copyright (c) 2003, 2007-14 Matteo Frigo
|
|
* Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*
|
|
*/
|
|
|
|
/* This file was automatically generated --- DO NOT EDIT */
|
|
/* Generated on Tue Sep 14 10:47:00 EDT 2021 */
|
|
|
|
#include "rdft/codelet-rdft.h"
|
|
|
|
#if defined(ARCH_PREFERS_FMA) || defined(ISA_EXTENSION_PREFERS_FMA)
|
|
|
|
/* Generated by: ../../../genfft/gen_r2cb.native -fma -compact -variables 4 -pipeline-latency 4 -sign 1 -n 15 -name r2cbIII_15 -dft-III -include rdft/scalar/r2cbIII.h */
|
|
|
|
/*
|
|
* This function contains 64 FP additions, 43 FP multiplications,
|
|
* (or, 21 additions, 0 multiplications, 43 fused multiply/add),
|
|
* 42 stack variables, 9 constants, and 30 memory accesses
|
|
*/
|
|
#include "rdft/scalar/r2cbIII.h"
|
|
|
|
static void r2cbIII_15(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs)
|
|
{
|
|
DK(KP951056516, +0.951056516295153572116439333379382143405698634);
|
|
DK(KP559016994, +0.559016994374947424102293417182819058860154590);
|
|
DK(KP1_902113032, +1.902113032590307144232878666758764286811397268);
|
|
DK(KP1_732050807, +1.732050807568877293527446341505872366942805254);
|
|
DK(KP250000000, +0.250000000000000000000000000000000000000000000);
|
|
DK(KP1_118033988, +1.118033988749894848204586834365638117720309180);
|
|
DK(KP500000000, +0.500000000000000000000000000000000000000000000);
|
|
DK(KP2_000000000, +2.000000000000000000000000000000000000000000000);
|
|
DK(KP618033988, +0.618033988749894848204586834365638117720309180);
|
|
{
|
|
INT i;
|
|
for (i = v; i > 0; i = i - 1, R0 = R0 + ovs, R1 = R1 + ovs, Cr = Cr + ivs, Ci = Ci + ivs, MAKE_VOLATILE_STRIDE(60, rs), MAKE_VOLATILE_STRIDE(60, csr), MAKE_VOLATILE_STRIDE(60, csi)) {
|
|
E Tk, TA, T5, Th, Tz, T6, Tn, TX, TR, Td, Tm, TI, Tv, TN, TD;
|
|
E TL, TM, Ti, Tj, T12, Te, T11;
|
|
Ti = Ci[WS(csi, 4)];
|
|
Tj = Ci[WS(csi, 1)];
|
|
Tk = FMA(KP618033988, Tj, Ti);
|
|
TA = FNMS(KP618033988, Ti, Tj);
|
|
{
|
|
E T1, T4, Tg, T2, T3, Tf;
|
|
T1 = Cr[WS(csr, 7)];
|
|
T2 = Cr[WS(csr, 4)];
|
|
T3 = Cr[WS(csr, 1)];
|
|
T4 = T2 + T3;
|
|
Tg = T2 - T3;
|
|
T5 = FMA(KP2_000000000, T4, T1);
|
|
Tf = FNMS(KP500000000, T4, T1);
|
|
Th = FMA(KP1_118033988, Tg, Tf);
|
|
Tz = FNMS(KP1_118033988, Tg, Tf);
|
|
}
|
|
{
|
|
E Tc, TP, T9, TQ;
|
|
T6 = Cr[WS(csr, 2)];
|
|
{
|
|
E Ta, Tb, T7, T8;
|
|
Ta = Cr[WS(csr, 3)];
|
|
Tb = Cr[WS(csr, 6)];
|
|
Tc = Ta + Tb;
|
|
TP = Ta - Tb;
|
|
T7 = Cr[0];
|
|
T8 = Cr[WS(csr, 5)];
|
|
T9 = T7 + T8;
|
|
TQ = T7 - T8;
|
|
}
|
|
Tn = T9 - Tc;
|
|
TX = FMA(KP618033988, TP, TQ);
|
|
TR = FNMS(KP618033988, TQ, TP);
|
|
Td = T9 + Tc;
|
|
Tm = FNMS(KP250000000, Td, T6);
|
|
}
|
|
{
|
|
E Tu, TK, Tr, TJ;
|
|
TI = Ci[WS(csi, 2)];
|
|
{
|
|
E Ts, Tt, Tp, Tq;
|
|
Ts = Ci[WS(csi, 3)];
|
|
Tt = Ci[WS(csi, 6)];
|
|
Tu = Ts - Tt;
|
|
TK = Ts + Tt;
|
|
Tp = Ci[0];
|
|
Tq = Ci[WS(csi, 5)];
|
|
Tr = Tp + Tq;
|
|
TJ = Tq - Tp;
|
|
}
|
|
Tv = FMA(KP618033988, Tu, Tr);
|
|
TN = TJ + TK;
|
|
TD = FNMS(KP618033988, Tr, Tu);
|
|
TL = TJ - TK;
|
|
TM = FNMS(KP250000000, TL, TI);
|
|
}
|
|
T12 = TL + TI;
|
|
Te = T6 + Td;
|
|
T11 = Te - T5;
|
|
R0[0] = FMA(KP2_000000000, Te, T5);
|
|
R0[WS(rs, 5)] = FMS(KP1_732050807, T12, T11);
|
|
R1[WS(rs, 2)] = FMA(KP1_732050807, T12, T11);
|
|
{
|
|
E TB, TF, TE, TG, TS, TU, TC, TO, TH, TT;
|
|
TB = FNMS(KP1_902113032, TA, Tz);
|
|
TF = FMA(KP1_902113032, TA, Tz);
|
|
TC = FNMS(KP559016994, Tn, Tm);
|
|
TE = FMA(KP951056516, TD, TC);
|
|
TG = FNMS(KP951056516, TD, TC);
|
|
TO = FNMS(KP559016994, TN, TM);
|
|
TS = FMA(KP951056516, TR, TO);
|
|
TU = FNMS(KP951056516, TR, TO);
|
|
R0[WS(rs, 6)] = FMA(KP2_000000000, TE, TB);
|
|
R1[WS(rs, 1)] = -(FMA(KP2_000000000, TG, TF));
|
|
TH = TB - TE;
|
|
R0[WS(rs, 1)] = FNMS(KP1_732050807, TS, TH);
|
|
R1[WS(rs, 3)] = -(FMA(KP1_732050807, TS, TH));
|
|
TT = TF - TG;
|
|
R0[WS(rs, 4)] = FNMS(KP1_732050807, TU, TT);
|
|
R1[WS(rs, 6)] = -(FMA(KP1_732050807, TU, TT));
|
|
}
|
|
{
|
|
E Tl, Tx, Tw, Ty, TY, T10, To, TW, TV, TZ;
|
|
Tl = FNMS(KP1_902113032, Tk, Th);
|
|
Tx = FMA(KP1_902113032, Tk, Th);
|
|
To = FMA(KP559016994, Tn, Tm);
|
|
Tw = FMA(KP951056516, Tv, To);
|
|
Ty = FNMS(KP951056516, Tv, To);
|
|
TW = FMA(KP559016994, TN, TM);
|
|
TY = FNMS(KP951056516, TX, TW);
|
|
T10 = FMA(KP951056516, TX, TW);
|
|
R1[WS(rs, 4)] = -(FMA(KP2_000000000, Tw, Tl));
|
|
R0[WS(rs, 3)] = FMA(KP2_000000000, Ty, Tx);
|
|
TV = Ty - Tx;
|
|
R1[0] = FNMS(KP1_732050807, TY, TV);
|
|
R1[WS(rs, 5)] = FMA(KP1_732050807, TY, TV);
|
|
TZ = Tl - Tw;
|
|
R0[WS(rs, 7)] = FNMS(KP1_732050807, T10, TZ);
|
|
R0[WS(rs, 2)] = FMA(KP1_732050807, T10, TZ);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
static const kr2c_desc desc = { 15, "r2cbIII_15", { 21, 0, 43, 0 }, &GENUS };
|
|
|
|
void X(codelet_r2cbIII_15) (planner *p) { X(kr2c_register) (p, r2cbIII_15, &desc);
|
|
}
|
|
|
|
#else
|
|
|
|
/* Generated by: ../../../genfft/gen_r2cb.native -compact -variables 4 -pipeline-latency 4 -sign 1 -n 15 -name r2cbIII_15 -dft-III -include rdft/scalar/r2cbIII.h */
|
|
|
|
/*
|
|
* This function contains 64 FP additions, 26 FP multiplications,
|
|
* (or, 49 additions, 11 multiplications, 15 fused multiply/add),
|
|
* 47 stack variables, 14 constants, and 30 memory accesses
|
|
*/
|
|
#include "rdft/scalar/r2cbIII.h"
|
|
|
|
static void r2cbIII_15(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs)
|
|
{
|
|
DK(KP1_732050807, +1.732050807568877293527446341505872366942805254);
|
|
DK(KP433012701, +0.433012701892219323381861585376468091735701313);
|
|
DK(KP968245836, +0.968245836551854221294816349945599902708230426);
|
|
DK(KP587785252, +0.587785252292473129168705954639072768597652438);
|
|
DK(KP951056516, +0.951056516295153572116439333379382143405698634);
|
|
DK(KP250000000, +0.250000000000000000000000000000000000000000000);
|
|
DK(KP1_647278207, +1.647278207092663851754840078556380006059321028);
|
|
DK(KP1_018073920, +1.018073920910254366901961726787815297021466329);
|
|
DK(KP559016994, +0.559016994374947424102293417182819058860154590);
|
|
DK(KP500000000, +0.500000000000000000000000000000000000000000000);
|
|
DK(KP2_000000000, +2.000000000000000000000000000000000000000000000);
|
|
DK(KP1_118033988, +1.118033988749894848204586834365638117720309180);
|
|
DK(KP1_175570504, +1.175570504584946258337411909278145537195304875);
|
|
DK(KP1_902113032, +1.902113032590307144232878666758764286811397268);
|
|
{
|
|
INT i;
|
|
for (i = v; i > 0; i = i - 1, R0 = R0 + ovs, R1 = R1 + ovs, Cr = Cr + ivs, Ci = Ci + ivs, MAKE_VOLATILE_STRIDE(60, rs), MAKE_VOLATILE_STRIDE(60, csr), MAKE_VOLATILE_STRIDE(60, csi)) {
|
|
E Tv, TD, T5, Ts, TC, T6, Tf, TW, TK, Td, Tg, TP, To, TN, TA;
|
|
E TO, TQ, Tt, Tu, T12, Te, T11;
|
|
Tt = Ci[WS(csi, 4)];
|
|
Tu = Ci[WS(csi, 1)];
|
|
Tv = FMA(KP1_902113032, Tt, KP1_175570504 * Tu);
|
|
TD = FNMS(KP1_175570504, Tt, KP1_902113032 * Tu);
|
|
{
|
|
E T1, T4, Tq, T2, T3, Tr;
|
|
T1 = Cr[WS(csr, 7)];
|
|
T2 = Cr[WS(csr, 4)];
|
|
T3 = Cr[WS(csr, 1)];
|
|
T4 = T2 + T3;
|
|
Tq = KP1_118033988 * (T2 - T3);
|
|
T5 = FMA(KP2_000000000, T4, T1);
|
|
Tr = FNMS(KP500000000, T4, T1);
|
|
Ts = Tq + Tr;
|
|
TC = Tr - Tq;
|
|
}
|
|
{
|
|
E Tc, TJ, T9, TI;
|
|
T6 = Cr[WS(csr, 2)];
|
|
{
|
|
E Ta, Tb, T7, T8;
|
|
Ta = Cr[WS(csr, 3)];
|
|
Tb = Cr[WS(csr, 6)];
|
|
Tc = Ta + Tb;
|
|
TJ = Ta - Tb;
|
|
T7 = Cr[0];
|
|
T8 = Cr[WS(csr, 5)];
|
|
T9 = T7 + T8;
|
|
TI = T7 - T8;
|
|
}
|
|
Tf = KP559016994 * (T9 - Tc);
|
|
TW = FNMS(KP1_647278207, TJ, KP1_018073920 * TI);
|
|
TK = FMA(KP1_647278207, TI, KP1_018073920 * TJ);
|
|
Td = T9 + Tc;
|
|
Tg = FNMS(KP250000000, Td, T6);
|
|
}
|
|
{
|
|
E Tn, TM, Tk, TL;
|
|
TP = Ci[WS(csi, 2)];
|
|
{
|
|
E Tl, Tm, Ti, Tj;
|
|
Tl = Ci[WS(csi, 3)];
|
|
Tm = Ci[WS(csi, 6)];
|
|
Tn = Tl - Tm;
|
|
TM = Tl + Tm;
|
|
Ti = Ci[0];
|
|
Tj = Ci[WS(csi, 5)];
|
|
Tk = Ti + Tj;
|
|
TL = Ti - Tj;
|
|
}
|
|
To = FMA(KP951056516, Tk, KP587785252 * Tn);
|
|
TN = KP968245836 * (TL - TM);
|
|
TA = FNMS(KP587785252, Tk, KP951056516 * Tn);
|
|
TO = TL + TM;
|
|
TQ = FMA(KP433012701, TO, KP1_732050807 * TP);
|
|
}
|
|
T12 = KP1_732050807 * (TP - TO);
|
|
Te = T6 + Td;
|
|
T11 = Te - T5;
|
|
R0[0] = FMA(KP2_000000000, Te, T5);
|
|
R0[WS(rs, 5)] = T12 - T11;
|
|
R1[WS(rs, 2)] = T11 + T12;
|
|
{
|
|
E TE, TG, TB, TF, TY, T10, Tz, TX, TV, TZ;
|
|
TE = TC - TD;
|
|
TG = TC + TD;
|
|
Tz = Tg - Tf;
|
|
TB = Tz + TA;
|
|
TF = TA - Tz;
|
|
TX = TN + TQ;
|
|
TY = TW - TX;
|
|
T10 = TW + TX;
|
|
R0[WS(rs, 6)] = FMA(KP2_000000000, TB, TE);
|
|
R1[WS(rs, 1)] = FMS(KP2_000000000, TF, TG);
|
|
TV = TE - TB;
|
|
R0[WS(rs, 1)] = TV + TY;
|
|
R1[WS(rs, 3)] = TY - TV;
|
|
TZ = TF + TG;
|
|
R0[WS(rs, 4)] = TZ - T10;
|
|
R1[WS(rs, 6)] = -(TZ + T10);
|
|
}
|
|
{
|
|
E Tw, Ty, Tp, Tx, TS, TU, Th, TR, TH, TT;
|
|
Tw = Ts - Tv;
|
|
Ty = Ts + Tv;
|
|
Th = Tf + Tg;
|
|
Tp = Th + To;
|
|
Tx = Th - To;
|
|
TR = TN - TQ;
|
|
TS = TK + TR;
|
|
TU = TR - TK;
|
|
R1[WS(rs, 4)] = -(FMA(KP2_000000000, Tp, Tw));
|
|
R0[WS(rs, 3)] = FMA(KP2_000000000, Tx, Ty);
|
|
TH = Tx - Ty;
|
|
R1[WS(rs, 5)] = TH - TS;
|
|
R1[0] = TH + TS;
|
|
TT = Tw - Tp;
|
|
R0[WS(rs, 2)] = TT - TU;
|
|
R0[WS(rs, 7)] = TT + TU;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
static const kr2c_desc desc = { 15, "r2cbIII_15", { 49, 11, 15, 0 }, &GENUS };
|
|
|
|
void X(codelet_r2cbIII_15) (planner *p) { X(kr2c_register) (p, r2cbIII_15, &desc);
|
|
}
|
|
|
|
#endif
|