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:43:52 EDT 2016 */ Chris@42: Chris@42: #include "codelet-dft.h" Chris@42: Chris@42: #ifdef HAVE_FMA Chris@42: Chris@42: /* Generated by: ../../../genfft/gen_twiddle_c.native -fma -reorder-insns -schedule-for-pipeline -simd -compact -variables 4 -pipeline-latency 8 -twiddle-log3 -precompute-twiddles -no-generate-bytw -n 8 -name t3fv_8 -include t3f.h */ Chris@42: Chris@42: /* Chris@42: * This function contains 37 FP additions, 32 FP multiplications, Chris@42: * (or, 27 additions, 22 multiplications, 10 fused multiply/add), Chris@42: * 43 stack variables, 1 constants, and 16 memory accesses Chris@42: */ Chris@42: #include "t3f.h" Chris@42: Chris@42: static void t3fv_8(R *ri, R *ii, const R *W, stride rs, INT mb, INT me, INT ms) Chris@42: { Chris@42: DVK(KP707106781, +0.707106781186547524400844362104849039284835938); Chris@42: { Chris@42: INT m; Chris@42: R *x; Chris@42: x = ri; Chris@42: for (m = mb, W = W + (mb * ((TWVL / VL) * 6)); m < me; m = m + VL, x = x + (VL * ms), W = W + (TWVL * 6), MAKE_VOLATILE_STRIDE(8, rs)) { Chris@42: V T2, T3, Tb, T1, T5, Tn, Tq, T8, Td, T4, Ta, Tp, Tg, Ti, T9; Chris@42: T2 = LDW(&(W[0])); Chris@42: T3 = LDW(&(W[TWVL * 2])); Chris@42: Tb = LDW(&(W[TWVL * 4])); Chris@42: T1 = LD(&(x[0]), ms, &(x[0])); Chris@42: T5 = LD(&(x[WS(rs, 4)]), ms, &(x[0])); Chris@42: Tn = LD(&(x[WS(rs, 2)]), ms, &(x[0])); Chris@42: Tq = LD(&(x[WS(rs, 6)]), ms, &(x[0])); Chris@42: T8 = LD(&(x[WS(rs, 1)]), ms, &(x[WS(rs, 1)])); Chris@42: Td = LD(&(x[WS(rs, 5)]), ms, &(x[WS(rs, 1)])); Chris@42: T4 = VZMUL(T2, T3); Chris@42: Ta = VZMULJ(T2, T3); Chris@42: Tp = VZMULJ(T2, Tb); Chris@42: Tg = LD(&(x[WS(rs, 7)]), ms, &(x[WS(rs, 1)])); Chris@42: Ti = LD(&(x[WS(rs, 3)]), ms, &(x[WS(rs, 1)])); Chris@42: T9 = VZMULJ(T2, T8); Chris@42: { Chris@42: V T6, To, Tc, Tr, Th, Tj; Chris@42: T6 = VZMULJ(T4, T5); Chris@42: To = VZMULJ(Ta, Tn); Chris@42: Tc = VZMULJ(Ta, Tb); Chris@42: Tr = VZMULJ(Tp, Tq); Chris@42: Th = VZMULJ(Tb, Tg); Chris@42: Tj = VZMULJ(T3, Ti); Chris@42: { Chris@42: V Tx, T7, Te, Ts, Ty, Tk, TB; Chris@42: Tx = VADD(T1, T6); Chris@42: T7 = VSUB(T1, T6); Chris@42: Te = VZMULJ(Tc, Td); Chris@42: Ts = VSUB(To, Tr); Chris@42: Ty = VADD(To, Tr); Chris@42: Tk = VSUB(Th, Tj); Chris@42: TB = VADD(Th, Tj); Chris@42: { Chris@42: V Tf, TA, Tz, TD; Chris@42: Tf = VSUB(T9, Te); Chris@42: TA = VADD(T9, Te); Chris@42: Tz = VADD(Tx, Ty); Chris@42: TD = VSUB(Tx, Ty); Chris@42: { Chris@42: V TC, TE, Tl, Tt; Chris@42: TC = VADD(TA, TB); Chris@42: TE = VSUB(TB, TA); Chris@42: Tl = VADD(Tf, Tk); Chris@42: Tt = VSUB(Tk, Tf); Chris@42: { Chris@42: V Tu, Tw, Tm, Tv; Chris@42: ST(&(x[WS(rs, 2)]), VFMAI(TE, TD), ms, &(x[0])); Chris@42: ST(&(x[WS(rs, 6)]), VFNMSI(TE, TD), ms, &(x[0])); Chris@42: ST(&(x[0]), VADD(Tz, TC), ms, &(x[0])); Chris@42: ST(&(x[WS(rs, 4)]), VSUB(Tz, TC), ms, &(x[0])); Chris@42: Tu = VFNMS(LDK(KP707106781), Tt, Ts); Chris@42: Tw = VFMA(LDK(KP707106781), Tt, Ts); Chris@42: Tm = VFMA(LDK(KP707106781), Tl, T7); Chris@42: Tv = VFNMS(LDK(KP707106781), Tl, T7); Chris@42: ST(&(x[WS(rs, 5)]), VFNMSI(Tw, Tv), ms, &(x[WS(rs, 1)])); Chris@42: ST(&(x[WS(rs, 3)]), VFMAI(Tw, Tv), ms, &(x[WS(rs, 1)])); Chris@42: ST(&(x[WS(rs, 7)]), VFMAI(Tu, Tm), ms, &(x[WS(rs, 1)])); Chris@42: ST(&(x[WS(rs, 1)]), VFNMSI(Tu, Tm), ms, &(x[WS(rs, 1)])); Chris@42: } Chris@42: } Chris@42: } Chris@42: } Chris@42: } Chris@42: } Chris@42: } Chris@42: VLEAVE(); Chris@42: } Chris@42: Chris@42: static const tw_instr twinstr[] = { Chris@42: VTW(0, 1), Chris@42: VTW(0, 3), Chris@42: VTW(0, 7), Chris@42: {TW_NEXT, VL, 0} Chris@42: }; Chris@42: Chris@42: static const ct_desc desc = { 8, XSIMD_STRING("t3fv_8"), twinstr, &GENUS, {27, 22, 10, 0}, 0, 0, 0 }; Chris@42: Chris@42: void XSIMD(codelet_t3fv_8) (planner *p) { Chris@42: X(kdft_dit_register) (p, t3fv_8, &desc); Chris@42: } Chris@42: #else /* HAVE_FMA */ Chris@42: Chris@42: /* Generated by: ../../../genfft/gen_twiddle_c.native -simd -compact -variables 4 -pipeline-latency 8 -twiddle-log3 -precompute-twiddles -no-generate-bytw -n 8 -name t3fv_8 -include t3f.h */ Chris@42: Chris@42: /* Chris@42: * This function contains 37 FP additions, 24 FP multiplications, Chris@42: * (or, 37 additions, 24 multiplications, 0 fused multiply/add), Chris@42: * 31 stack variables, 1 constants, and 16 memory accesses Chris@42: */ Chris@42: #include "t3f.h" Chris@42: Chris@42: static void t3fv_8(R *ri, R *ii, const R *W, stride rs, INT mb, INT me, INT ms) Chris@42: { Chris@42: DVK(KP707106781, +0.707106781186547524400844362104849039284835938); Chris@42: { Chris@42: INT m; Chris@42: R *x; Chris@42: x = ri; Chris@42: for (m = mb, W = W + (mb * ((TWVL / VL) * 6)); m < me; m = m + VL, x = x + (VL * ms), W = W + (TWVL * 6), MAKE_VOLATILE_STRIDE(8, rs)) { Chris@42: V T2, T3, Ta, T4, Tb, Tc, Tq; Chris@42: T2 = LDW(&(W[0])); Chris@42: T3 = LDW(&(W[TWVL * 2])); Chris@42: Ta = VZMULJ(T2, T3); Chris@42: T4 = VZMUL(T2, T3); Chris@42: Tb = LDW(&(W[TWVL * 4])); Chris@42: Tc = VZMULJ(Ta, Tb); Chris@42: Tq = VZMULJ(T2, Tb); Chris@42: { Chris@42: V T7, Tx, Tt, Ty, Tf, TA, Tk, TB, T1, T6, T5; Chris@42: T1 = LD(&(x[0]), ms, &(x[0])); Chris@42: T5 = LD(&(x[WS(rs, 4)]), ms, &(x[0])); Chris@42: T6 = VZMULJ(T4, T5); Chris@42: T7 = VSUB(T1, T6); Chris@42: Tx = VADD(T1, T6); Chris@42: { Chris@42: V Tp, Ts, To, Tr; Chris@42: To = LD(&(x[WS(rs, 2)]), ms, &(x[0])); Chris@42: Tp = VZMULJ(Ta, To); Chris@42: Tr = LD(&(x[WS(rs, 6)]), ms, &(x[0])); Chris@42: Ts = VZMULJ(Tq, Tr); Chris@42: Tt = VSUB(Tp, Ts); Chris@42: Ty = VADD(Tp, Ts); Chris@42: } Chris@42: { Chris@42: V T9, Te, T8, Td; Chris@42: T8 = LD(&(x[WS(rs, 1)]), ms, &(x[WS(rs, 1)])); Chris@42: T9 = VZMULJ(T2, T8); Chris@42: Td = LD(&(x[WS(rs, 5)]), ms, &(x[WS(rs, 1)])); Chris@42: Te = VZMULJ(Tc, Td); Chris@42: Tf = VSUB(T9, Te); Chris@42: TA = VADD(T9, Te); Chris@42: } Chris@42: { Chris@42: V Th, Tj, Tg, Ti; Chris@42: Tg = LD(&(x[WS(rs, 7)]), ms, &(x[WS(rs, 1)])); Chris@42: Th = VZMULJ(Tb, Tg); Chris@42: Ti = LD(&(x[WS(rs, 3)]), ms, &(x[WS(rs, 1)])); Chris@42: Tj = VZMULJ(T3, Ti); Chris@42: Tk = VSUB(Th, Tj); Chris@42: TB = VADD(Th, Tj); Chris@42: } Chris@42: { Chris@42: V Tz, TC, TD, TE; Chris@42: Tz = VADD(Tx, Ty); Chris@42: TC = VADD(TA, TB); Chris@42: ST(&(x[WS(rs, 4)]), VSUB(Tz, TC), ms, &(x[0])); Chris@42: ST(&(x[0]), VADD(Tz, TC), ms, &(x[0])); Chris@42: TD = VSUB(Tx, Ty); Chris@42: TE = VBYI(VSUB(TB, TA)); Chris@42: ST(&(x[WS(rs, 6)]), VSUB(TD, TE), ms, &(x[0])); Chris@42: ST(&(x[WS(rs, 2)]), VADD(TD, TE), ms, &(x[0])); Chris@42: { Chris@42: V Tm, Tv, Tu, Tw, Tl, Tn; Chris@42: Tl = VMUL(LDK(KP707106781), VADD(Tf, Tk)); Chris@42: Tm = VADD(T7, Tl); Chris@42: Tv = VSUB(T7, Tl); Chris@42: Tn = VMUL(LDK(KP707106781), VSUB(Tk, Tf)); Chris@42: Tu = VBYI(VSUB(Tn, Tt)); Chris@42: Tw = VBYI(VADD(Tt, Tn)); Chris@42: ST(&(x[WS(rs, 7)]), VSUB(Tm, Tu), ms, &(x[WS(rs, 1)])); Chris@42: ST(&(x[WS(rs, 3)]), VADD(Tv, Tw), ms, &(x[WS(rs, 1)])); Chris@42: ST(&(x[WS(rs, 1)]), VADD(Tm, Tu), ms, &(x[WS(rs, 1)])); Chris@42: ST(&(x[WS(rs, 5)]), VSUB(Tv, Tw), ms, &(x[WS(rs, 1)])); Chris@42: } Chris@42: } Chris@42: } Chris@42: } Chris@42: } Chris@42: VLEAVE(); Chris@42: } Chris@42: Chris@42: static const tw_instr twinstr[] = { Chris@42: VTW(0, 1), Chris@42: VTW(0, 3), Chris@42: VTW(0, 7), Chris@42: {TW_NEXT, VL, 0} Chris@42: }; Chris@42: Chris@42: static const ct_desc desc = { 8, XSIMD_STRING("t3fv_8"), twinstr, &GENUS, {37, 24, 0, 0}, 0, 0, 0 }; Chris@42: Chris@42: void XSIMD(codelet_t3fv_8) (planner *p) { Chris@42: X(kdft_dit_register) (p, t3fv_8, &desc); Chris@42: } Chris@42: #endif /* HAVE_FMA */