/* * 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 Thu May 24 08:04:51 EDT 2018 */ #include "dft/codelet-dft.h" #if defined(ARCH_PREFERS_FMA) || defined(ISA_EXTENSION_PREFERS_FMA) /* Generated by: ../../../genfft/gen_notw_c.native -fma -simd -compact -variables 4 -pipeline-latency 8 -n 13 -name n1fv_13 -include dft/simd/n1f.h */ /* * This function contains 88 FP additions, 63 FP multiplications, * (or, 31 additions, 6 multiplications, 57 fused multiply/add), * 63 stack variables, 23 constants, and 26 memory accesses */ #include "dft/simd/n1f.h" static void n1fv_13(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs) { DVK(KP904176221, +0.904176221990848204433795481776887926501523162); DVK(KP575140729, +0.575140729474003121368385547455453388461001608); DVK(KP957805992, +0.957805992594665126462521754605754580515587217); DVK(KP600477271, +0.600477271932665282925769253334763009352012849); DVK(KP516520780, +0.516520780623489722840901288569017135705033622); DVK(KP581704778, +0.581704778510515730456870384989698884939833902); DVK(KP300462606, +0.300462606288665774426601772289207995520941381); DVK(KP503537032, +0.503537032863766627246873853868466977093348562); DVK(KP251768516, +0.251768516431883313623436926934233488546674281); DVK(KP301479260, +0.301479260047709873958013540496673347309208464); DVK(KP083333333, +0.083333333333333333333333333333333333333333333); DVK(KP859542535, +0.859542535098774820163672132761689612766401925); DVK(KP514918778, +0.514918778086315755491789696138117261566051239); DVK(KP522026385, +0.522026385161275033714027226654165028300441940); DVK(KP853480001, +0.853480001859823990758994934970528322872359049); DVK(KP612264650, +0.612264650376756543746494474777125408779395514); DVK(KP038632954, +0.038632954644348171955506895830342264440241080); DVK(KP302775637, +0.302775637731994646559610633735247973125648287); DVK(KP769338817, +0.769338817572980603471413688209101117038278899); DVK(KP686558370, +0.686558370781754340655719594850823015421401653); DVK(KP226109445, +0.226109445035782405468510155372505010481906348); DVK(KP866025403, +0.866025403784438646763723170752936183471402627); DVK(KP500000000, +0.500000000000000000000000000000000000000000000); { INT i; const R *xi; R *xo; xi = ri; xo = ro; for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(26, is), MAKE_VOLATILE_STRIDE(26, os)) { V T1, TX, TY, To, TH, TR, TU, TB, TE, Tw, TF, TM, TT; T1 = LD(&(xi[0]), ivs, &(xi[0])); { V Tf, TN, Tb, Ty, Tq, T6, Tx, Tr, Ti, Tt, Tl, Tu, Tm, TO, Td; V Te, Tc, Tn; Td = LD(&(xi[WS(is, 8)]), ivs, &(xi[0])); Te = LD(&(xi[WS(is, 5)]), ivs, &(xi[WS(is, 1)])); Tf = VADD(Td, Te); TN = VSUB(Td, Te); { V T7, T8, T9, Ta; T7 = LD(&(xi[WS(is, 12)]), ivs, &(xi[0])); T8 = LD(&(xi[WS(is, 10)]), ivs, &(xi[0])); T9 = LD(&(xi[WS(is, 4)]), ivs, &(xi[0])); Ta = VADD(T8, T9); Tb = VADD(T7, Ta); Ty = VFMS(LDK(KP500000000), Ta, T7); Tq = VSUB(T8, T9); } { V T2, T3, T4, T5; T2 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)])); T3 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)])); T4 = LD(&(xi[WS(is, 9)]), ivs, &(xi[WS(is, 1)])); T5 = VADD(T3, T4); T6 = VADD(T2, T5); Tx = VFNMS(LDK(KP500000000), T5, T2); Tr = VSUB(T4, T3); } { V Tg, Th, Tj, Tk; Tg = LD(&(xi[WS(is, 11)]), ivs, &(xi[WS(is, 1)])); Th = LD(&(xi[WS(is, 6)]), ivs, &(xi[0])); Ti = VADD(Tg, Th); Tt = VSUB(Tg, Th); Tj = LD(&(xi[WS(is, 7)]), ivs, &(xi[WS(is, 1)])); Tk = LD(&(xi[WS(is, 2)]), ivs, &(xi[0])); Tl = VADD(Tj, Tk); Tu = VSUB(Tj, Tk); } Tm = VADD(Ti, Tl); TO = VADD(Tt, Tu); TX = VSUB(T6, Tb); TY = VADD(TN, TO); Tc = VADD(T6, Tb); Tn = VADD(Tf, Tm); To = VADD(Tc, Tn); TH = VSUB(Tc, Tn); { V TP, TQ, Tz, TA; TP = VFNMS(LDK(KP500000000), TO, TN); TQ = VADD(Tr, Tq); TR = VFMA(LDK(KP866025403), TQ, TP); TU = VFNMS(LDK(KP866025403), TQ, TP); Tz = VSUB(Tx, Ty); TA = VFNMS(LDK(KP500000000), Tm, Tf); TB = VADD(Tz, TA); TE = VSUB(Tz, TA); } { V Ts, Tv, TK, TL; Ts = VSUB(Tq, Tr); Tv = VSUB(Tt, Tu); Tw = VADD(Ts, Tv); TF = VSUB(Ts, Tv); TK = VADD(Tx, Ty); TL = VSUB(Ti, Tl); TM = VFMA(LDK(KP866025403), TL, TK); TT = VFNMS(LDK(KP866025403), TL, TK); } } ST(&(xo[0]), VADD(T1, To), ovs, &(xo[0])); { V T1c, T1k, T15, T14, T1e, T1n, TZ, TW, T1f, T1m, TD, T1j, TI, T19, TS; V TV; { V T1a, T1b, T12, T13; T1a = VFNMS(LDK(KP226109445), Tw, TB); T1b = VFMA(LDK(KP686558370), TE, TF); T1c = VFNMS(LDK(KP769338817), T1b, T1a); T1k = VFMA(LDK(KP769338817), T1b, T1a); T15 = VFNMS(LDK(KP302775637), TX, TY); T12 = VFMA(LDK(KP038632954), TM, TR); T13 = VFMA(LDK(KP612264650), TT, TU); T14 = VFNMS(LDK(KP853480001), T13, T12); T1e = VFNMS(LDK(KP522026385), T14, T15); T1n = VFMA(LDK(KP853480001), T13, T12); } TZ = VFMA(LDK(KP302775637), TY, TX); TS = VFNMS(LDK(KP038632954), TR, TM); TV = VFNMS(LDK(KP612264650), TU, TT); TW = VFNMS(LDK(KP853480001), TV, TS); T1f = VFMA(LDK(KP853480001), TV, TS); T1m = VFNMS(LDK(KP522026385), TW, TZ); { V TG, T18, Tp, TC, T17; TG = VFNMS(LDK(KP514918778), TF, TE); T18 = VFNMS(LDK(KP859542535), TG, TH); Tp = VFNMS(LDK(KP083333333), To, T1); TC = VFMA(LDK(KP301479260), TB, Tw); T17 = VFNMS(LDK(KP251768516), TC, Tp); TD = VFMA(LDK(KP503537032), TC, Tp); T1j = VFNMS(LDK(KP300462606), T18, T17); TI = VFMA(LDK(KP581704778), TH, TG); T19 = VFMA(LDK(KP300462606), T18, T17); } { V TJ, T10, T1l, T1o; TJ = VFNMS(LDK(KP516520780), TI, TD); T10 = VMUL(LDK(KP600477271), VFMA(LDK(KP957805992), TZ, TW)); ST(&(xo[WS(os, 5)]), VFNMSI(T10, TJ), ovs, &(xo[WS(os, 1)])); ST(&(xo[WS(os, 8)]), VFMAI(T10, TJ), ovs, &(xo[0])); { V T11, T16, T1p, T1q; T11 = VFMA(LDK(KP516520780), TI, TD); T16 = VMUL(LDK(KP600477271), VFMA(LDK(KP957805992), T15, T14)); ST(&(xo[WS(os, 1)]), VFMAI(T16, T11), ovs, &(xo[WS(os, 1)])); ST(&(xo[WS(os, 12)]), VFNMSI(T16, T11), ovs, &(xo[0])); T1p = VFMA(LDK(KP503537032), T1k, T1j); T1q = VMUL(LDK(KP575140729), VFMA(LDK(KP904176221), T1n, T1m)); ST(&(xo[WS(os, 2)]), VFNMSI(T1q, T1p), ovs, &(xo[0])); ST(&(xo[WS(os, 11)]), VFMAI(T1q, T1p), ovs, &(xo[WS(os, 1)])); } T1l = VFNMS(LDK(KP503537032), T1k, T1j); T1o = VMUL(LDK(KP575140729), VFNMS(LDK(KP904176221), T1n, T1m)); ST(&(xo[WS(os, 6)]), VFNMSI(T1o, T1l), ovs, &(xo[0])); ST(&(xo[WS(os, 7)]), VFMAI(T1o, T1l), ovs, &(xo[WS(os, 1)])); { V T1h, T1i, T1d, T1g; T1h = VFMA(LDK(KP503537032), T1c, T19); T1i = VMUL(LDK(KP575140729), VFNMS(LDK(KP904176221), T1f, T1e)); ST(&(xo[WS(os, 3)]), VFMAI(T1i, T1h), ovs, &(xo[WS(os, 1)])); ST(&(xo[WS(os, 10)]), VFNMSI(T1i, T1h), ovs, &(xo[0])); T1d = VFNMS(LDK(KP503537032), T1c, T19); T1g = VMUL(LDK(KP575140729), VFMA(LDK(KP904176221), T1f, T1e)); ST(&(xo[WS(os, 4)]), VFNMSI(T1g, T1d), ovs, &(xo[0])); ST(&(xo[WS(os, 9)]), VFMAI(T1g, T1d), ovs, &(xo[WS(os, 1)])); } } } } } VLEAVE(); } static const kdft_desc desc = { 13, XSIMD_STRING("n1fv_13"), {31, 6, 57, 0}, &GENUS, 0, 0, 0, 0 }; void XSIMD(codelet_n1fv_13) (planner *p) { X(kdft_register) (p, n1fv_13, &desc); } #else /* Generated by: ../../../genfft/gen_notw_c.native -simd -compact -variables 4 -pipeline-latency 8 -n 13 -name n1fv_13 -include dft/simd/n1f.h */ /* * This function contains 88 FP additions, 34 FP multiplications, * (or, 69 additions, 15 multiplications, 19 fused multiply/add), * 60 stack variables, 20 constants, and 26 memory accesses */ #include "dft/simd/n1f.h" static void n1fv_13(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs) { DVK(KP2_000000000, +2.000000000000000000000000000000000000000000000); DVK(KP083333333, +0.083333333333333333333333333333333333333333333); DVK(KP075902986, +0.075902986037193865983102897245103540356428373); DVK(KP251768516, +0.251768516431883313623436926934233488546674281); DVK(KP132983124, +0.132983124607418643793760531921092974399165133); DVK(KP258260390, +0.258260390311744861420450644284508567852516811); DVK(KP1_732050807, +1.732050807568877293527446341505872366942805254); DVK(KP300238635, +0.300238635966332641462884626667381504676006424); DVK(KP011599105, +0.011599105605768290721655456654083252189827041); DVK(KP156891391, +0.156891391051584611046832726756003269660212636); DVK(KP256247671, +0.256247671582936600958684654061725059144125175); DVK(KP174138601, +0.174138601152135905005660794929264742616964676); DVK(KP575140729, +0.575140729474003121368385547455453388461001608); DVK(KP503537032, +0.503537032863766627246873853868466977093348562); DVK(KP113854479, +0.113854479055790798974654345867655310534642560); DVK(KP265966249, +0.265966249214837287587521063842185948798330267); DVK(KP387390585, +0.387390585467617292130675966426762851778775217); DVK(KP300462606, +0.300462606288665774426601772289207995520941381); DVK(KP866025403, +0.866025403784438646763723170752936183471402627); DVK(KP500000000, +0.500000000000000000000000000000000000000000000); { INT i; const R *xi; R *xo; xi = ri; xo = ro; for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(26, is), MAKE_VOLATILE_STRIDE(26, os)) { V TW, Tb, Tm, Tu, TC, TR, TX, TK, TU, Tz, TB, TN, TT; TW = LD(&(xi[0]), ivs, &(xi[0])); { V T3, TH, Tl, Tw, Tp, Tg, Tv, To, T6, Tr, T9, Ts, Ta, TI, T1; V T2, Tq, Tt; T1 = LD(&(xi[WS(is, 8)]), ivs, &(xi[0])); T2 = LD(&(xi[WS(is, 5)]), ivs, &(xi[WS(is, 1)])); T3 = VSUB(T1, T2); TH = VADD(T1, T2); { V Th, Ti, Tj, Tk; Th = LD(&(xi[WS(is, 12)]), ivs, &(xi[0])); Ti = LD(&(xi[WS(is, 10)]), ivs, &(xi[0])); Tj = LD(&(xi[WS(is, 4)]), ivs, &(xi[0])); Tk = VADD(Ti, Tj); Tl = VADD(Th, Tk); Tw = VSUB(Ti, Tj); Tp = VFNMS(LDK(KP500000000), Tk, Th); } { V Tc, Td, Te, Tf; Tc = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)])); Td = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)])); Te = LD(&(xi[WS(is, 9)]), ivs, &(xi[WS(is, 1)])); Tf = VADD(Td, Te); Tg = VADD(Tc, Tf); Tv = VSUB(Td, Te); To = VFNMS(LDK(KP500000000), Tf, Tc); } { V T4, T5, T7, T8; T4 = LD(&(xi[WS(is, 11)]), ivs, &(xi[WS(is, 1)])); T5 = LD(&(xi[WS(is, 6)]), ivs, &(xi[0])); T6 = VSUB(T4, T5); Tr = VADD(T4, T5); T7 = LD(&(xi[WS(is, 7)]), ivs, &(xi[WS(is, 1)])); T8 = LD(&(xi[WS(is, 2)]), ivs, &(xi[0])); T9 = VSUB(T7, T8); Ts = VADD(T7, T8); } Ta = VADD(T6, T9); TI = VADD(Tr, Ts); Tb = VADD(T3, Ta); Tm = VSUB(Tg, Tl); Tq = VSUB(To, Tp); Tt = VMUL(LDK(KP866025403), VSUB(Tr, Ts)); Tu = VADD(Tq, Tt); TC = VSUB(Tq, Tt); { V TP, TQ, TG, TJ; TP = VADD(Tg, Tl); TQ = VADD(TH, TI); TR = VMUL(LDK(KP300462606), VSUB(TP, TQ)); TX = VADD(TP, TQ); TG = VADD(To, Tp); TJ = VFNMS(LDK(KP500000000), TI, TH); TK = VSUB(TG, TJ); TU = VADD(TG, TJ); } { V Tx, Ty, TL, TM; Tx = VMUL(LDK(KP866025403), VSUB(Tv, Tw)); Ty = VFNMS(LDK(KP500000000), Ta, T3); Tz = VSUB(Tx, Ty); TB = VADD(Tx, Ty); TL = VADD(Tv, Tw); TM = VSUB(T6, T9); TN = VSUB(TL, TM); TT = VADD(TL, TM); } } ST(&(xo[0]), VADD(TW, TX), ovs, &(xo[0])); { V T19, T1n, T14, T13, T1f, T1k, Tn, TE, T1e, T1j, TS, T1m, TZ, T1c, TA; V TD; { V T17, T18, T11, T12; T17 = VFMA(LDK(KP387390585), TN, VMUL(LDK(KP265966249), TK)); T18 = VFNMS(LDK(KP503537032), TU, VMUL(LDK(KP113854479), TT)); T19 = VSUB(T17, T18); T1n = VADD(T17, T18); T14 = VFMA(LDK(KP575140729), Tm, VMUL(LDK(KP174138601), Tb)); T11 = VFNMS(LDK(KP156891391), TB, VMUL(LDK(KP256247671), TC)); T12 = VFMA(LDK(KP011599105), Tz, VMUL(LDK(KP300238635), Tu)); T13 = VSUB(T11, T12); T1f = VADD(T14, T13); T1k = VMUL(LDK(KP1_732050807), VADD(T11, T12)); } Tn = VFNMS(LDK(KP174138601), Tm, VMUL(LDK(KP575140729), Tb)); TA = VFNMS(LDK(KP300238635), Tz, VMUL(LDK(KP011599105), Tu)); TD = VFMA(LDK(KP256247671), TB, VMUL(LDK(KP156891391), TC)); TE = VSUB(TA, TD); T1e = VMUL(LDK(KP1_732050807), VADD(TD, TA)); T1j = VSUB(Tn, TE); { V TO, T1b, TV, TY, T1a; TO = VFNMS(LDK(KP132983124), TN, VMUL(LDK(KP258260390), TK)); T1b = VSUB(TR, TO); TV = VFMA(LDK(KP251768516), TT, VMUL(LDK(KP075902986), TU)); TY = VFNMS(LDK(KP083333333), TX, TW); T1a = VSUB(TY, TV); TS = VFMA(LDK(KP2_000000000), TO, TR); T1m = VADD(T1b, T1a); TZ = VFMA(LDK(KP2_000000000), TV, TY); T1c = VSUB(T1a, T1b); } { V TF, T10, T1l, T1o; TF = VBYI(VFMA(LDK(KP2_000000000), TE, Tn)); T10 = VADD(TS, TZ); ST(&(xo[WS(os, 1)]), VADD(TF, T10), ovs, &(xo[WS(os, 1)])); ST(&(xo[WS(os, 12)]), VSUB(T10, TF), ovs, &(xo[0])); { V T15, T16, T1p, T1q; T15 = VBYI(VFMS(LDK(KP2_000000000), T13, T14)); T16 = VSUB(TZ, TS); ST(&(xo[WS(os, 5)]), VADD(T15, T16), ovs, &(xo[WS(os, 1)])); ST(&(xo[WS(os, 8)]), VSUB(T16, T15), ovs, &(xo[0])); T1p = VADD(T1n, T1m); T1q = VBYI(VADD(T1j, T1k)); ST(&(xo[WS(os, 4)]), VSUB(T1p, T1q), ovs, &(xo[0])); ST(&(xo[WS(os, 9)]), VADD(T1q, T1p), ovs, &(xo[WS(os, 1)])); } T1l = VBYI(VSUB(T1j, T1k)); T1o = VSUB(T1m, T1n); ST(&(xo[WS(os, 3)]), VADD(T1l, T1o), ovs, &(xo[WS(os, 1)])); ST(&(xo[WS(os, 10)]), VSUB(T1o, T1l), ovs, &(xo[0])); { V T1h, T1i, T1d, T1g; T1h = VBYI(VSUB(T1e, T1f)); T1i = VSUB(T1c, T19); ST(&(xo[WS(os, 6)]), VADD(T1h, T1i), ovs, &(xo[0])); ST(&(xo[WS(os, 7)]), VSUB(T1i, T1h), ovs, &(xo[WS(os, 1)])); T1d = VADD(T19, T1c); T1g = VBYI(VADD(T1e, T1f)); ST(&(xo[WS(os, 2)]), VSUB(T1d, T1g), ovs, &(xo[0])); ST(&(xo[WS(os, 11)]), VADD(T1g, T1d), ovs, &(xo[WS(os, 1)])); } } } } } VLEAVE(); } static const kdft_desc desc = { 13, XSIMD_STRING("n1fv_13"), {69, 15, 19, 0}, &GENUS, 0, 0, 0, 0 }; void XSIMD(codelet_n1fv_13) (planner *p) { X(kdft_register) (p, n1fv_13, &desc); } #endif