mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-18 18:45:10 +00:00
210 lines
7.6 KiB
C
210 lines
7.6 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 9 -name r2cbIII_9 -dft-III -include rdft/scalar/r2cbIII.h */
|
||
|
|
||
|
/*
|
||
|
* This function contains 32 FP additions, 24 FP multiplications,
|
||
|
* (or, 8 additions, 0 multiplications, 24 fused multiply/add),
|
||
|
* 35 stack variables, 12 constants, and 18 memory accesses
|
||
|
*/
|
||
|
#include "rdft/scalar/r2cbIII.h"
|
||
|
|
||
|
static void r2cbIII_9(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs)
|
||
|
{
|
||
|
DK(KP1_705737063, +1.705737063904886419256501927880148143872040591);
|
||
|
DK(KP1_969615506, +1.969615506024416118733486049179046027341286503);
|
||
|
DK(KP984807753, +0.984807753012208059366743024589523013670643252);
|
||
|
DK(KP176326980, +0.176326980708464973471090386868618986121633062);
|
||
|
DK(KP1_326827896, +1.326827896337876792410842639271782594433726619);
|
||
|
DK(KP1_532088886, +1.532088886237956070404785301110833347871664914);
|
||
|
DK(KP766044443, +0.766044443118978035202392650555416673935832457);
|
||
|
DK(KP839099631, +0.839099631177280011763127298123181364687434283);
|
||
|
DK(KP866025403, +0.866025403784438646763723170752936183471402627);
|
||
|
DK(KP500000000, +0.500000000000000000000000000000000000000000000);
|
||
|
DK(KP1_732050807, +1.732050807568877293527446341505872366942805254);
|
||
|
DK(KP2_000000000, +2.000000000000000000000000000000000000000000000);
|
||
|
{
|
||
|
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(36, rs), MAKE_VOLATILE_STRIDE(36, csr), MAKE_VOLATILE_STRIDE(36, csi)) {
|
||
|
E T3, Tr, Th, Td, Tc, T8, Tn, Ts, Tk, Tt, T9, Te;
|
||
|
{
|
||
|
E Tg, T1, T2, Tf;
|
||
|
Tg = Ci[WS(csi, 1)];
|
||
|
T1 = Cr[WS(csr, 4)];
|
||
|
T2 = Cr[WS(csr, 1)];
|
||
|
Tf = T2 - T1;
|
||
|
T3 = FMA(KP2_000000000, T2, T1);
|
||
|
Tr = FMA(KP1_732050807, Tg, Tf);
|
||
|
Th = FNMS(KP1_732050807, Tg, Tf);
|
||
|
}
|
||
|
{
|
||
|
E T4, T7, Tm, Tj, Tl, Ti;
|
||
|
T4 = Cr[WS(csr, 3)];
|
||
|
Td = Ci[WS(csi, 3)];
|
||
|
{
|
||
|
E T5, T6, Ta, Tb;
|
||
|
T5 = Cr[0];
|
||
|
T6 = Cr[WS(csr, 2)];
|
||
|
T7 = T5 + T6;
|
||
|
Tm = T5 - T6;
|
||
|
Ta = Ci[WS(csi, 2)];
|
||
|
Tb = Ci[0];
|
||
|
Tc = Ta - Tb;
|
||
|
Tj = Tb + Ta;
|
||
|
}
|
||
|
T8 = T4 + T7;
|
||
|
Tl = FMA(KP500000000, Tc, Td);
|
||
|
Tn = FNMS(KP866025403, Tm, Tl);
|
||
|
Ts = FMA(KP866025403, Tm, Tl);
|
||
|
Ti = FNMS(KP500000000, T7, T4);
|
||
|
Tk = FMA(KP866025403, Tj, Ti);
|
||
|
Tt = FNMS(KP866025403, Tj, Ti);
|
||
|
}
|
||
|
R0[0] = FMA(KP2_000000000, T8, T3);
|
||
|
T9 = T8 - T3;
|
||
|
Te = Tc - Td;
|
||
|
R1[WS(rs, 1)] = FMA(KP1_732050807, Te, T9);
|
||
|
R0[WS(rs, 3)] = FMS(KP1_732050807, Te, T9);
|
||
|
{
|
||
|
E Tq, To, Tp, Tw, Tu, Tv;
|
||
|
Tq = FNMS(KP839099631, Tk, Tn);
|
||
|
To = FMA(KP839099631, Tn, Tk);
|
||
|
Tp = FMA(KP766044443, To, Th);
|
||
|
R1[0] = FNMS(KP1_532088886, To, Th);
|
||
|
R1[WS(rs, 3)] = FMA(KP1_326827896, Tq, Tp);
|
||
|
R0[WS(rs, 2)] = FMS(KP1_326827896, Tq, Tp);
|
||
|
Tw = FNMS(KP176326980, Ts, Tt);
|
||
|
Tu = FMA(KP176326980, Tt, Ts);
|
||
|
Tv = FMA(KP984807753, Tu, Tr);
|
||
|
R0[WS(rs, 1)] = FMS(KP1_969615506, Tu, Tr);
|
||
|
R1[WS(rs, 2)] = FMA(KP1_705737063, Tw, Tv);
|
||
|
R0[WS(rs, 4)] = FMS(KP1_705737063, Tw, Tv);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static const kr2c_desc desc = { 9, "r2cbIII_9", { 8, 0, 24, 0 }, &GENUS };
|
||
|
|
||
|
void X(codelet_r2cbIII_9) (planner *p) { X(kr2c_register) (p, r2cbIII_9, &desc);
|
||
|
}
|
||
|
|
||
|
#else
|
||
|
|
||
|
/* Generated by: ../../../genfft/gen_r2cb.native -compact -variables 4 -pipeline-latency 4 -sign 1 -n 9 -name r2cbIII_9 -dft-III -include rdft/scalar/r2cbIII.h */
|
||
|
|
||
|
/*
|
||
|
* This function contains 32 FP additions, 18 FP multiplications,
|
||
|
* (or, 22 additions, 8 multiplications, 10 fused multiply/add),
|
||
|
* 35 stack variables, 12 constants, and 18 memory accesses
|
||
|
*/
|
||
|
#include "rdft/scalar/r2cbIII.h"
|
||
|
|
||
|
static void r2cbIII_9(R *R0, R *R1, R *Cr, R *Ci, stride rs, stride csr, stride csi, INT v, INT ivs, INT ovs)
|
||
|
{
|
||
|
DK(KP642787609, +0.642787609686539326322643409907263432907559884);
|
||
|
DK(KP766044443, +0.766044443118978035202392650555416673935832457);
|
||
|
DK(KP1_326827896, +1.326827896337876792410842639271782594433726619);
|
||
|
DK(KP1_113340798, +1.113340798452838732905825904094046265936583811);
|
||
|
DK(KP984807753, +0.984807753012208059366743024589523013670643252);
|
||
|
DK(KP173648177, +0.173648177666930348851716626769314796000375677);
|
||
|
DK(KP1_705737063, +1.705737063904886419256501927880148143872040591);
|
||
|
DK(KP300767466, +0.300767466360870593278543795225003852144476517);
|
||
|
DK(KP500000000, +0.500000000000000000000000000000000000000000000);
|
||
|
DK(KP866025403, +0.866025403784438646763723170752936183471402627);
|
||
|
DK(KP2_000000000, +2.000000000000000000000000000000000000000000000);
|
||
|
DK(KP1_732050807, +1.732050807568877293527446341505872366942805254);
|
||
|
{
|
||
|
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(36, rs), MAKE_VOLATILE_STRIDE(36, csr), MAKE_VOLATILE_STRIDE(36, csi)) {
|
||
|
E T3, Ts, Ti, Td, Tc, T8, To, Tu, Tl, Tt, T9, Te;
|
||
|
{
|
||
|
E Th, T1, T2, Tf, Tg;
|
||
|
Tg = Ci[WS(csi, 1)];
|
||
|
Th = KP1_732050807 * Tg;
|
||
|
T1 = Cr[WS(csr, 4)];
|
||
|
T2 = Cr[WS(csr, 1)];
|
||
|
Tf = T2 - T1;
|
||
|
T3 = FMA(KP2_000000000, T2, T1);
|
||
|
Ts = Tf - Th;
|
||
|
Ti = Tf + Th;
|
||
|
}
|
||
|
{
|
||
|
E T4, T7, Tm, Tk, Tn, Tj;
|
||
|
T4 = Cr[WS(csr, 3)];
|
||
|
Td = Ci[WS(csi, 3)];
|
||
|
{
|
||
|
E T5, T6, Ta, Tb;
|
||
|
T5 = Cr[0];
|
||
|
T6 = Cr[WS(csr, 2)];
|
||
|
T7 = T5 + T6;
|
||
|
Tm = KP866025403 * (T6 - T5);
|
||
|
Ta = Ci[WS(csi, 2)];
|
||
|
Tb = Ci[0];
|
||
|
Tc = Ta - Tb;
|
||
|
Tk = KP866025403 * (Tb + Ta);
|
||
|
}
|
||
|
T8 = T4 + T7;
|
||
|
Tn = FMA(KP500000000, Tc, Td);
|
||
|
To = Tm - Tn;
|
||
|
Tu = Tm + Tn;
|
||
|
Tj = FMS(KP500000000, T7, T4);
|
||
|
Tl = Tj + Tk;
|
||
|
Tt = Tj - Tk;
|
||
|
}
|
||
|
R0[0] = FMA(KP2_000000000, T8, T3);
|
||
|
T9 = T8 - T3;
|
||
|
Te = KP1_732050807 * (Tc - Td);
|
||
|
R1[WS(rs, 1)] = T9 + Te;
|
||
|
R0[WS(rs, 3)] = Te - T9;
|
||
|
{
|
||
|
E Tr, Tp, Tq, Tx, Tv, Tw;
|
||
|
Tr = FNMS(KP1_705737063, Tl, KP300767466 * To);
|
||
|
Tp = FMA(KP173648177, Tl, KP984807753 * To);
|
||
|
Tq = Ti - Tp;
|
||
|
R0[WS(rs, 1)] = -(FMA(KP2_000000000, Tp, Ti));
|
||
|
R0[WS(rs, 4)] = Tr - Tq;
|
||
|
R1[WS(rs, 2)] = Tq + Tr;
|
||
|
Tx = FMA(KP1_113340798, Tt, KP1_326827896 * Tu);
|
||
|
Tv = FNMS(KP642787609, Tu, KP766044443 * Tt);
|
||
|
Tw = Tv - Ts;
|
||
|
R1[0] = FMA(KP2_000000000, Tv, Ts);
|
||
|
R1[WS(rs, 3)] = Tx - Tw;
|
||
|
R0[WS(rs, 2)] = Tw + Tx;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static const kr2c_desc desc = { 9, "r2cbIII_9", { 22, 8, 10, 0 }, &GENUS };
|
||
|
|
||
|
void X(codelet_r2cbIII_9) (planner *p) { X(kr2c_register) (p, r2cbIII_9, &desc);
|
||
|
}
|
||
|
|
||
|
#endif
|