Chris@42: /* Chris@42: * Copyright (c) 2003, 2007-14 Matteo Frigo Chris@42: * Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology Chris@42: * Chris@42: * This program is free software; you can redistribute it and/or modify Chris@42: * it under the terms of the GNU General Public License as published by Chris@42: * the Free Software Foundation; either version 2 of the License, or Chris@42: * (at your option) any later version. Chris@42: * Chris@42: * This program is distributed in the hope that it will be useful, Chris@42: * but WITHOUT ANY WARRANTY; without even the implied warranty of Chris@42: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Chris@42: * GNU General Public License for more details. Chris@42: * Chris@42: * You should have received a copy of the GNU General Public License Chris@42: * along with this program; if not, write to the Free Software Chris@42: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Chris@42: * Chris@42: */ Chris@42: Chris@42: /* This file was automatically generated --- DO NOT EDIT */ Chris@42: /* Generated on Sat Jul 30 16:51:55 EDT 2016 */ Chris@42: Chris@42: #include "codelet-rdft.h" Chris@42: Chris@42: #ifdef HAVE_FMA Chris@42: Chris@42: /* Generated by: ../../../genfft/gen_hc2cdft.native -fma -reorder-insns -schedule-for-pipeline -compact -variables 4 -pipeline-latency 4 -sign 1 -n 8 -dif -name hc2cbdft_8 -include hc2cb.h */ Chris@42: Chris@42: /* Chris@42: * This function contains 82 FP additions, 36 FP multiplications, Chris@42: * (or, 60 additions, 14 multiplications, 22 fused multiply/add), Chris@42: * 55 stack variables, 1 constants, and 32 memory accesses Chris@42: */ Chris@42: #include "hc2cb.h" Chris@42: Chris@42: static void hc2cbdft_8(R *Rp, R *Ip, R *Rm, R *Im, const R *W, stride rs, INT mb, INT me, INT ms) Chris@42: { Chris@42: DK(KP707106781, +0.707106781186547524400844362104849039284835938); Chris@42: { Chris@42: INT m; Chris@42: for (m = mb, W = W + ((mb - 1) * 14); m < me; m = m + 1, Rp = Rp + ms, Ip = Ip + ms, Rm = Rm - ms, Im = Im - ms, W = W + 14, MAKE_VOLATILE_STRIDE(32, rs)) { Chris@42: E T1m, T1r, T1i, T1u, T1o, T1v, T1n, T1w, T1s; Chris@42: { Chris@42: E T1k, Tl, T1p, TE, TP, T1g, TM, T1b, T1f, T1a, TU, Tf, T1l, TH, Tw; Chris@42: E T1q; Chris@42: { Chris@42: E TA, T3, TN, Tk, Th, T6, TO, TD, Tb, Tm, Ta, TK, Tp, Tc, Ts; Chris@42: E Tt; Chris@42: { Chris@42: E T4, T5, TB, TC; Chris@42: { Chris@42: E T1, T2, Ti, Tj; Chris@42: T1 = Rp[0]; Chris@42: T2 = Rm[WS(rs, 3)]; Chris@42: Ti = Ip[0]; Chris@42: Tj = Im[WS(rs, 3)]; Chris@42: T4 = Rp[WS(rs, 2)]; Chris@42: TA = T1 - T2; Chris@42: T3 = T1 + T2; Chris@42: TN = Ti - Tj; Chris@42: Tk = Ti + Tj; Chris@42: T5 = Rm[WS(rs, 1)]; Chris@42: TB = Ip[WS(rs, 2)]; Chris@42: TC = Im[WS(rs, 1)]; Chris@42: } Chris@42: { Chris@42: E T8, T9, Tn, To; Chris@42: T8 = Rp[WS(rs, 1)]; Chris@42: Th = T4 - T5; Chris@42: T6 = T4 + T5; Chris@42: TO = TB - TC; Chris@42: TD = TB + TC; Chris@42: T9 = Rm[WS(rs, 2)]; Chris@42: Tn = Ip[WS(rs, 1)]; Chris@42: To = Im[WS(rs, 2)]; Chris@42: Tb = Rm[0]; Chris@42: Tm = T8 - T9; Chris@42: Ta = T8 + T9; Chris@42: TK = Tn - To; Chris@42: Tp = Tn + To; Chris@42: Tc = Rp[WS(rs, 3)]; Chris@42: Ts = Im[0]; Chris@42: Tt = Ip[WS(rs, 3)]; Chris@42: } Chris@42: } Chris@42: { Chris@42: E Tr, Td, Tu, TL, Te, T7; Chris@42: T1k = Tk - Th; Chris@42: Tl = Th + Tk; Chris@42: Tr = Tb - Tc; Chris@42: Td = Tb + Tc; Chris@42: TL = Tt - Ts; Chris@42: Tu = Ts + Tt; Chris@42: T1p = TA + TD; Chris@42: TE = TA - TD; Chris@42: TP = TN + TO; Chris@42: T1g = TN - TO; Chris@42: TM = TK + TL; Chris@42: T1b = TL - TK; Chris@42: T1f = Ta - Td; Chris@42: Te = Ta + Td; Chris@42: T1a = T3 - T6; Chris@42: T7 = T3 + T6; Chris@42: { Chris@42: E Tq, TF, TG, Tv; Chris@42: Tq = Tm + Tp; Chris@42: TF = Tm - Tp; Chris@42: TG = Tr - Tu; Chris@42: Tv = Tr + Tu; Chris@42: TU = T7 - Te; Chris@42: Tf = T7 + Te; Chris@42: T1l = TF - TG; Chris@42: TH = TF + TG; Chris@42: Tw = Tq - Tv; Chris@42: T1q = Tq + Tv; Chris@42: } Chris@42: } Chris@42: } Chris@42: { Chris@42: E TX, T10, T1c, T13, T1h, T1E, T1H, T1C, T1K, T1G, T1L, T1F; Chris@42: { Chris@42: E TQ, Tx, T1y, TI, Tg, Tz; Chris@42: TX = TP - TM; Chris@42: TQ = TM + TP; Chris@42: Tx = FMA(KP707106781, Tw, Tl); Chris@42: T10 = FNMS(KP707106781, Tw, Tl); Chris@42: T1c = T1a + T1b; Chris@42: T1y = T1a - T1b; Chris@42: T13 = FNMS(KP707106781, TH, TE); Chris@42: TI = FMA(KP707106781, TH, TE); Chris@42: Tg = W[0]; Chris@42: Tz = W[1]; Chris@42: { Chris@42: E T1B, T1A, T1x, T1J, T1z, T1D; Chris@42: { Chris@42: E TR, Ty, TS, TJ; Chris@42: T1B = T1g - T1f; Chris@42: T1h = T1f + T1g; Chris@42: T1A = W[11]; Chris@42: TR = Tg * TI; Chris@42: Ty = Tg * Tx; Chris@42: T1x = W[10]; Chris@42: T1J = T1A * T1y; Chris@42: TS = FNMS(Tz, Tx, TR); Chris@42: TJ = FMA(Tz, TI, Ty); Chris@42: T1z = T1x * T1y; Chris@42: T1m = FMA(KP707106781, T1l, T1k); Chris@42: T1E = FNMS(KP707106781, T1l, T1k); Chris@42: Im[0] = TS - TQ; Chris@42: Ip[0] = TQ + TS; Chris@42: Rm[0] = Tf + TJ; Chris@42: Rp[0] = Tf - TJ; Chris@42: T1H = FMA(KP707106781, T1q, T1p); Chris@42: T1r = FNMS(KP707106781, T1q, T1p); Chris@42: T1D = W[12]; Chris@42: } Chris@42: T1C = FNMS(T1A, T1B, T1z); Chris@42: T1K = FMA(T1x, T1B, T1J); Chris@42: T1G = W[13]; Chris@42: T1L = T1D * T1H; Chris@42: T1F = T1D * T1E; Chris@42: } Chris@42: } Chris@42: { Chris@42: E TY, T16, T12, T17, T11; Chris@42: { Chris@42: E TW, TT, T15, TV, TZ, T1M, T1I; Chris@42: TW = W[7]; Chris@42: T1M = FNMS(T1G, T1E, T1L); Chris@42: T1I = FMA(T1G, T1H, T1F); Chris@42: TT = W[6]; Chris@42: T15 = TW * TU; Chris@42: Im[WS(rs, 3)] = T1M - T1K; Chris@42: Ip[WS(rs, 3)] = T1K + T1M; Chris@42: Rm[WS(rs, 3)] = T1C + T1I; Chris@42: Rp[WS(rs, 3)] = T1C - T1I; Chris@42: TV = TT * TU; Chris@42: TZ = W[8]; Chris@42: TY = FNMS(TW, TX, TV); Chris@42: T16 = FMA(TT, TX, T15); Chris@42: T12 = W[9]; Chris@42: T17 = TZ * T13; Chris@42: T11 = TZ * T10; Chris@42: } Chris@42: { Chris@42: E T1e, T19, T1t, T1d, T1j, T18, T14; Chris@42: T1e = W[3]; Chris@42: T18 = FNMS(T12, T10, T17); Chris@42: T14 = FMA(T12, T13, T11); Chris@42: T19 = W[2]; Chris@42: T1t = T1e * T1c; Chris@42: Im[WS(rs, 2)] = T18 - T16; Chris@42: Ip[WS(rs, 2)] = T16 + T18; Chris@42: Rm[WS(rs, 2)] = TY + T14; Chris@42: Rp[WS(rs, 2)] = TY - T14; Chris@42: T1d = T19 * T1c; Chris@42: T1j = W[4]; Chris@42: T1i = FNMS(T1e, T1h, T1d); Chris@42: T1u = FMA(T19, T1h, T1t); Chris@42: T1o = W[5]; Chris@42: T1v = T1j * T1r; Chris@42: T1n = T1j * T1m; Chris@42: } Chris@42: } Chris@42: } Chris@42: } Chris@42: T1w = FNMS(T1o, T1m, T1v); Chris@42: T1s = FMA(T1o, T1r, T1n); Chris@42: Im[WS(rs, 1)] = T1w - T1u; Chris@42: Ip[WS(rs, 1)] = T1u + T1w; Chris@42: Rm[WS(rs, 1)] = T1i + T1s; Chris@42: Rp[WS(rs, 1)] = T1i - T1s; Chris@42: } Chris@42: } Chris@42: } Chris@42: Chris@42: static const tw_instr twinstr[] = { Chris@42: {TW_FULL, 1, 8}, Chris@42: {TW_NEXT, 1, 0} Chris@42: }; Chris@42: Chris@42: static const hc2c_desc desc = { 8, "hc2cbdft_8", twinstr, &GENUS, {60, 14, 22, 0} }; Chris@42: Chris@42: void X(codelet_hc2cbdft_8) (planner *p) { Chris@42: X(khc2c_register) (p, hc2cbdft_8, &desc, HC2C_VIA_DFT); Chris@42: } Chris@42: #else /* HAVE_FMA */ Chris@42: Chris@42: /* Generated by: ../../../genfft/gen_hc2cdft.native -compact -variables 4 -pipeline-latency 4 -sign 1 -n 8 -dif -name hc2cbdft_8 -include hc2cb.h */ Chris@42: Chris@42: /* Chris@42: * This function contains 82 FP additions, 32 FP multiplications, Chris@42: * (or, 68 additions, 18 multiplications, 14 fused multiply/add), Chris@42: * 30 stack variables, 1 constants, and 32 memory accesses Chris@42: */ Chris@42: #include "hc2cb.h" Chris@42: Chris@42: static void hc2cbdft_8(R *Rp, R *Ip, R *Rm, R *Im, const R *W, stride rs, INT mb, INT me, INT ms) Chris@42: { Chris@42: DK(KP707106781, +0.707106781186547524400844362104849039284835938); Chris@42: { Chris@42: INT m; Chris@42: for (m = mb, W = W + ((mb - 1) * 14); m < me; m = m + 1, Rp = Rp + ms, Ip = Ip + ms, Rm = Rm - ms, Im = Im - ms, W = W + 14, MAKE_VOLATILE_STRIDE(32, rs)) { Chris@42: E T7, T1d, T1h, Tl, TG, T14, T19, TO, Te, TL, T18, T15, TB, T1e, Tw; Chris@42: E T1i; Chris@42: { Chris@42: E T3, TC, Tk, TM, T6, Th, TF, TN; Chris@42: { Chris@42: E T1, T2, Ti, Tj; Chris@42: T1 = Rp[0]; Chris@42: T2 = Rm[WS(rs, 3)]; Chris@42: T3 = T1 + T2; Chris@42: TC = T1 - T2; Chris@42: Ti = Ip[0]; Chris@42: Tj = Im[WS(rs, 3)]; Chris@42: Tk = Ti + Tj; Chris@42: TM = Ti - Tj; Chris@42: } Chris@42: { Chris@42: E T4, T5, TD, TE; Chris@42: T4 = Rp[WS(rs, 2)]; Chris@42: T5 = Rm[WS(rs, 1)]; Chris@42: T6 = T4 + T5; Chris@42: Th = T4 - T5; Chris@42: TD = Ip[WS(rs, 2)]; Chris@42: TE = Im[WS(rs, 1)]; Chris@42: TF = TD + TE; Chris@42: TN = TD - TE; Chris@42: } Chris@42: T7 = T3 + T6; Chris@42: T1d = Tk - Th; Chris@42: T1h = TC + TF; Chris@42: Tl = Th + Tk; Chris@42: TG = TC - TF; Chris@42: T14 = T3 - T6; Chris@42: T19 = TM - TN; Chris@42: TO = TM + TN; Chris@42: } Chris@42: { Chris@42: E Ta, Tm, Tp, TJ, Td, Tr, Tu, TK; Chris@42: { Chris@42: E T8, T9, Tn, To; Chris@42: T8 = Rp[WS(rs, 1)]; Chris@42: T9 = Rm[WS(rs, 2)]; Chris@42: Ta = T8 + T9; Chris@42: Tm = T8 - T9; Chris@42: Tn = Ip[WS(rs, 1)]; Chris@42: To = Im[WS(rs, 2)]; Chris@42: Tp = Tn + To; Chris@42: TJ = Tn - To; Chris@42: } Chris@42: { Chris@42: E Tb, Tc, Ts, Tt; Chris@42: Tb = Rm[0]; Chris@42: Tc = Rp[WS(rs, 3)]; Chris@42: Td = Tb + Tc; Chris@42: Tr = Tb - Tc; Chris@42: Ts = Im[0]; Chris@42: Tt = Ip[WS(rs, 3)]; Chris@42: Tu = Ts + Tt; Chris@42: TK = Tt - Ts; Chris@42: } Chris@42: Te = Ta + Td; Chris@42: TL = TJ + TK; Chris@42: T18 = Ta - Td; Chris@42: T15 = TK - TJ; Chris@42: { Chris@42: E Tz, TA, Tq, Tv; Chris@42: Tz = Tm - Tp; Chris@42: TA = Tr - Tu; Chris@42: TB = KP707106781 * (Tz + TA); Chris@42: T1e = KP707106781 * (Tz - TA); Chris@42: Tq = Tm + Tp; Chris@42: Tv = Tr + Tu; Chris@42: Tw = KP707106781 * (Tq - Tv); Chris@42: T1i = KP707106781 * (Tq + Tv); Chris@42: } Chris@42: } Chris@42: { Chris@42: E Tf, TP, TI, TQ; Chris@42: Tf = T7 + Te; Chris@42: TP = TL + TO; Chris@42: { Chris@42: E Tx, TH, Tg, Ty; Chris@42: Tx = Tl + Tw; Chris@42: TH = TB + TG; Chris@42: Tg = W[0]; Chris@42: Ty = W[1]; Chris@42: TI = FMA(Tg, Tx, Ty * TH); Chris@42: TQ = FNMS(Ty, Tx, Tg * TH); Chris@42: } Chris@42: Rp[0] = Tf - TI; Chris@42: Ip[0] = TP + TQ; Chris@42: Rm[0] = Tf + TI; Chris@42: Im[0] = TQ - TP; Chris@42: } Chris@42: { Chris@42: E T1r, T1x, T1w, T1y; Chris@42: { Chris@42: E T1o, T1q, T1n, T1p; Chris@42: T1o = T14 - T15; Chris@42: T1q = T19 - T18; Chris@42: T1n = W[10]; Chris@42: T1p = W[11]; Chris@42: T1r = FNMS(T1p, T1q, T1n * T1o); Chris@42: T1x = FMA(T1p, T1o, T1n * T1q); Chris@42: } Chris@42: { Chris@42: E T1t, T1v, T1s, T1u; Chris@42: T1t = T1d - T1e; Chris@42: T1v = T1i + T1h; Chris@42: T1s = W[12]; Chris@42: T1u = W[13]; Chris@42: T1w = FMA(T1s, T1t, T1u * T1v); Chris@42: T1y = FNMS(T1u, T1t, T1s * T1v); Chris@42: } Chris@42: Rp[WS(rs, 3)] = T1r - T1w; Chris@42: Ip[WS(rs, 3)] = T1x + T1y; Chris@42: Rm[WS(rs, 3)] = T1r + T1w; Chris@42: Im[WS(rs, 3)] = T1y - T1x; Chris@42: } Chris@42: { Chris@42: E TV, T11, T10, T12; Chris@42: { Chris@42: E TS, TU, TR, TT; Chris@42: TS = T7 - Te; Chris@42: TU = TO - TL; Chris@42: TR = W[6]; Chris@42: TT = W[7]; Chris@42: TV = FNMS(TT, TU, TR * TS); Chris@42: T11 = FMA(TT, TS, TR * TU); Chris@42: } Chris@42: { Chris@42: E TX, TZ, TW, TY; Chris@42: TX = Tl - Tw; Chris@42: TZ = TG - TB; Chris@42: TW = W[8]; Chris@42: TY = W[9]; Chris@42: T10 = FMA(TW, TX, TY * TZ); Chris@42: T12 = FNMS(TY, TX, TW * TZ); Chris@42: } Chris@42: Rp[WS(rs, 2)] = TV - T10; Chris@42: Ip[WS(rs, 2)] = T11 + T12; Chris@42: Rm[WS(rs, 2)] = TV + T10; Chris@42: Im[WS(rs, 2)] = T12 - T11; Chris@42: } Chris@42: { Chris@42: E T1b, T1l, T1k, T1m; Chris@42: { Chris@42: E T16, T1a, T13, T17; Chris@42: T16 = T14 + T15; Chris@42: T1a = T18 + T19; Chris@42: T13 = W[2]; Chris@42: T17 = W[3]; Chris@42: T1b = FNMS(T17, T1a, T13 * T16); Chris@42: T1l = FMA(T17, T16, T13 * T1a); Chris@42: } Chris@42: { Chris@42: E T1f, T1j, T1c, T1g; Chris@42: T1f = T1d + T1e; Chris@42: T1j = T1h - T1i; Chris@42: T1c = W[4]; Chris@42: T1g = W[5]; Chris@42: T1k = FMA(T1c, T1f, T1g * T1j); Chris@42: T1m = FNMS(T1g, T1f, T1c * T1j); Chris@42: } Chris@42: Rp[WS(rs, 1)] = T1b - T1k; Chris@42: Ip[WS(rs, 1)] = T1l + T1m; Chris@42: Rm[WS(rs, 1)] = T1b + T1k; Chris@42: Im[WS(rs, 1)] = T1m - T1l; Chris@42: } Chris@42: } Chris@42: } Chris@42: } Chris@42: Chris@42: static const tw_instr twinstr[] = { Chris@42: {TW_FULL, 1, 8}, Chris@42: {TW_NEXT, 1, 0} Chris@42: }; Chris@42: Chris@42: static const hc2c_desc desc = { 8, "hc2cbdft_8", twinstr, &GENUS, {68, 18, 14, 0} }; Chris@42: Chris@42: void X(codelet_hc2cbdft_8) (planner *p) { Chris@42: X(khc2c_register) (p, hc2cbdft_8, &desc, HC2C_VIA_DFT); Chris@42: } Chris@42: #endif /* HAVE_FMA */