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:40:07 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_notw_c.native -fma -reorder-insns -schedule-for-pipeline -simd -compact -variables 4 -pipeline-latency 8 -n 6 -name n2fv_6 -with-ostride 2 -include n2f.h -store-multiple 2 */ Chris@42: Chris@42: /* Chris@42: * This function contains 18 FP additions, 8 FP multiplications, Chris@42: * (or, 12 additions, 2 multiplications, 6 fused multiply/add), Chris@42: * 29 stack variables, 2 constants, and 15 memory accesses Chris@42: */ Chris@42: #include "n2f.h" Chris@42: Chris@42: static void n2fv_6(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs) Chris@42: { Chris@42: DVK(KP500000000, +0.500000000000000000000000000000000000000000000); Chris@42: DVK(KP866025403, +0.866025403784438646763723170752936183471402627); Chris@42: { Chris@42: INT i; Chris@42: const R *xi; Chris@42: R *xo; Chris@42: xi = ri; Chris@42: xo = ro; Chris@42: for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(12, is), MAKE_VOLATILE_STRIDE(12, os)) { Chris@42: V T1, T2, T4, T5, T7, T8; Chris@42: T1 = LD(&(xi[0]), ivs, &(xi[0])); Chris@42: T2 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)])); Chris@42: T4 = LD(&(xi[WS(is, 2)]), ivs, &(xi[0])); Chris@42: T5 = LD(&(xi[WS(is, 5)]), ivs, &(xi[WS(is, 1)])); Chris@42: T7 = LD(&(xi[WS(is, 4)]), ivs, &(xi[0])); Chris@42: T8 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)])); Chris@42: { Chris@42: V T3, Td, T6, Te, T9, Tf; Chris@42: T3 = VSUB(T1, T2); Chris@42: Td = VADD(T1, T2); Chris@42: T6 = VSUB(T4, T5); Chris@42: Te = VADD(T4, T5); Chris@42: T9 = VSUB(T7, T8); Chris@42: Tf = VADD(T7, T8); Chris@42: { Chris@42: V Tg, Ti, Ta, Tc; Chris@42: Tg = VADD(Te, Tf); Chris@42: Ti = VMUL(LDK(KP866025403), VSUB(Tf, Te)); Chris@42: Ta = VADD(T6, T9); Chris@42: Tc = VMUL(LDK(KP866025403), VSUB(T9, T6)); Chris@42: { Chris@42: V Th, Tj, Tb, Tk; Chris@42: Th = VFNMS(LDK(KP500000000), Tg, Td); Chris@42: Tj = VADD(Td, Tg); Chris@42: STM2(&(xo[0]), Tj, ovs, &(xo[0])); Chris@42: Tb = VFNMS(LDK(KP500000000), Ta, T3); Chris@42: Tk = VADD(T3, Ta); Chris@42: STM2(&(xo[6]), Tk, ovs, &(xo[2])); Chris@42: { Chris@42: V Tl, Tm, Tn, To; Chris@42: Tl = VFMAI(Ti, Th); Chris@42: STM2(&(xo[8]), Tl, ovs, &(xo[0])); Chris@42: Tm = VFNMSI(Ti, Th); Chris@42: STM2(&(xo[4]), Tm, ovs, &(xo[0])); Chris@42: STN2(&(xo[4]), Tm, Tk, ovs); Chris@42: Tn = VFMAI(Tc, Tb); Chris@42: STM2(&(xo[2]), Tn, ovs, &(xo[2])); Chris@42: STN2(&(xo[0]), Tj, Tn, ovs); Chris@42: To = VFNMSI(Tc, Tb); Chris@42: STM2(&(xo[10]), To, ovs, &(xo[2])); Chris@42: STN2(&(xo[8]), Tl, To, ovs); Chris@42: } Chris@42: } Chris@42: } Chris@42: } Chris@42: } Chris@42: } Chris@42: VLEAVE(); Chris@42: } Chris@42: Chris@42: static const kdft_desc desc = { 6, XSIMD_STRING("n2fv_6"), {12, 2, 6, 0}, &GENUS, 0, 2, 0, 0 }; Chris@42: Chris@42: void XSIMD(codelet_n2fv_6) (planner *p) { Chris@42: X(kdft_register) (p, n2fv_6, &desc); Chris@42: } Chris@42: Chris@42: #else /* HAVE_FMA */ Chris@42: Chris@42: /* Generated by: ../../../genfft/gen_notw_c.native -simd -compact -variables 4 -pipeline-latency 8 -n 6 -name n2fv_6 -with-ostride 2 -include n2f.h -store-multiple 2 */ Chris@42: Chris@42: /* Chris@42: * This function contains 18 FP additions, 4 FP multiplications, Chris@42: * (or, 16 additions, 2 multiplications, 2 fused multiply/add), Chris@42: * 25 stack variables, 2 constants, and 15 memory accesses Chris@42: */ Chris@42: #include "n2f.h" Chris@42: Chris@42: static void n2fv_6(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs) Chris@42: { Chris@42: DVK(KP866025403, +0.866025403784438646763723170752936183471402627); Chris@42: DVK(KP500000000, +0.500000000000000000000000000000000000000000000); Chris@42: { Chris@42: INT i; Chris@42: const R *xi; Chris@42: R *xo; Chris@42: xi = ri; Chris@42: xo = ro; Chris@42: for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(12, is), MAKE_VOLATILE_STRIDE(12, os)) { Chris@42: V T3, Td, T6, Te, T9, Tf, Ta, Tg, T1, T2, Tj, Tk; Chris@42: T1 = LD(&(xi[0]), ivs, &(xi[0])); Chris@42: T2 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)])); Chris@42: T3 = VSUB(T1, T2); Chris@42: Td = VADD(T1, T2); Chris@42: { Chris@42: V T4, T5, T7, T8; Chris@42: T4 = LD(&(xi[WS(is, 2)]), ivs, &(xi[0])); Chris@42: T5 = LD(&(xi[WS(is, 5)]), ivs, &(xi[WS(is, 1)])); Chris@42: T6 = VSUB(T4, T5); Chris@42: Te = VADD(T4, T5); Chris@42: T7 = LD(&(xi[WS(is, 4)]), ivs, &(xi[0])); Chris@42: T8 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)])); Chris@42: T9 = VSUB(T7, T8); Chris@42: Tf = VADD(T7, T8); Chris@42: } Chris@42: Ta = VADD(T6, T9); Chris@42: Tg = VADD(Te, Tf); Chris@42: Tj = VADD(T3, Ta); Chris@42: STM2(&(xo[6]), Tj, ovs, &(xo[2])); Chris@42: Tk = VADD(Td, Tg); Chris@42: STM2(&(xo[0]), Tk, ovs, &(xo[0])); Chris@42: { Chris@42: V Tl, Tb, Tc, Tm; Chris@42: Tb = VFNMS(LDK(KP500000000), Ta, T3); Chris@42: Tc = VBYI(VMUL(LDK(KP866025403), VSUB(T9, T6))); Chris@42: Tl = VSUB(Tb, Tc); Chris@42: STM2(&(xo[10]), Tl, ovs, &(xo[2])); Chris@42: Tm = VADD(Tb, Tc); Chris@42: STM2(&(xo[2]), Tm, ovs, &(xo[2])); Chris@42: STN2(&(xo[0]), Tk, Tm, ovs); Chris@42: { Chris@42: V Th, Ti, Tn, To; Chris@42: Th = VFNMS(LDK(KP500000000), Tg, Td); Chris@42: Ti = VBYI(VMUL(LDK(KP866025403), VSUB(Tf, Te))); Chris@42: Tn = VSUB(Th, Ti); Chris@42: STM2(&(xo[4]), Tn, ovs, &(xo[0])); Chris@42: STN2(&(xo[4]), Tn, Tj, ovs); Chris@42: To = VADD(Th, Ti); Chris@42: STM2(&(xo[8]), To, ovs, &(xo[0])); Chris@42: STN2(&(xo[8]), To, Tl, ovs); Chris@42: } Chris@42: } Chris@42: } Chris@42: } Chris@42: VLEAVE(); Chris@42: } Chris@42: Chris@42: static const kdft_desc desc = { 6, XSIMD_STRING("n2fv_6"), {16, 2, 2, 0}, &GENUS, 0, 2, 0, 0 }; Chris@42: Chris@42: void XSIMD(codelet_n2fv_6) (planner *p) { Chris@42: X(kdft_register) (p, n2fv_6, &desc); Chris@42: } Chris@42: Chris@42: #endif /* HAVE_FMA */