Mercurial > hg > batch-feature-extraction-tool
diff Lib/fftw-3.2.1/cell/spu/spu_n2fv_10.spuc @ 0:25bf17994ef1
First commit. VS2013, Codeblocks and Mac OSX configuration
author | Geogaddi\David <d.m.ronan@qmul.ac.uk> |
---|---|
date | Thu, 09 Jul 2015 01:12:16 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Lib/fftw-3.2.1/cell/spu/spu_n2fv_10.spuc Thu Jul 09 01:12:16 2015 +0100 @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2003, 2007-8 Matteo Frigo + * Copyright (c) 2003, 2007-8 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +/* Generated by: ../../genfft/gen_notw_c -standalone -fma -reorder-insns -simd -compact -variables 100000 -with-ostride 2 -include fftw-spu.h -store-multiple 2 -n 10 -name X(spu_n2fv_10) */ + +/* + * This function contains 42 FP additions, 22 FP multiplications, + * (or, 24 additions, 4 multiplications, 18 fused multiply/add), + * 59 stack variables, 4 constants, and 25 memory accesses + */ +#include "fftw-spu.h" + +void X(spu_n2fv_10) (const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs) { + DVK(KP559016994, +0.559016994374947424102293417182819058860154590); + DVK(KP250000000, +0.250000000000000000000000000000000000000000000); + DVK(KP618033988, +0.618033988749894848204586834365638117720309180); + DVK(KP951056516, +0.951056516295153572116439333379382143405698634); + 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(is), MAKE_VOLATILE_STRIDE(os)) { + V Tr, T3, Tm, Tn, TD, TC, TA, Ty, Ti, Tk, T1, T2, Ts, T6, Tw; + V Tg, Tt, T9, Tv, Td, T4, T5, Te, Tf, T7, T8, Tb, Tc, Ta, Th; + V Tu, Tx, TH, TI, TK, TL, TM, Tq, To, Tp, Tl, Tj, TJ, TG, TE; + V TF, TB, Tz, TN, TO, TP, TQ; + T1 = LD(&(xi[0]), ivs, &(xi[0])); + T2 = LD(&(xi[WS(is, 5)]), ivs, &(xi[WS(is, 1)])); + Tr = VADD(T1, T2); + T3 = VSUB(T1, T2); + T4 = LD(&(xi[WS(is, 2)]), ivs, &(xi[0])); + T5 = LD(&(xi[WS(is, 7)]), ivs, &(xi[WS(is, 1)])); + Ts = VADD(T4, T5); + T6 = VSUB(T4, T5); + Te = LD(&(xi[WS(is, 6)]), ivs, &(xi[0])); + Tf = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)])); + Tw = VADD(Te, Tf); + Tg = VSUB(Te, Tf); + T7 = LD(&(xi[WS(is, 8)]), ivs, &(xi[0])); + T8 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)])); + Tt = VADD(T7, T8); + T9 = VSUB(T7, T8); + Tb = LD(&(xi[WS(is, 4)]), ivs, &(xi[0])); + Tc = LD(&(xi[WS(is, 9)]), ivs, &(xi[WS(is, 1)])); + Tv = VADD(Tb, Tc); + Td = VSUB(Tb, Tc); + Ta = VADD(T6, T9); + Tm = VSUB(T6, T9); + Tn = VSUB(Td, Tg); + Th = VADD(Td, Tg); + Tu = VADD(Ts, Tt); + TD = VSUB(Ts, Tt); + TC = VSUB(Tv, Tw); + Tx = VADD(Tv, Tw); + TA = VSUB(Tu, Tx); + Ty = VADD(Tu, Tx); + Ti = VADD(Ta, Th); + Tk = VSUB(Ta, Th); + TH = VADD(T3, Ti); + STM2(&(xo[10]), TH, ovs, &(xo[2])); + TI = VADD(Tr, Ty); + STM2(&(xo[0]), TI, ovs, &(xo[0])); + Tq = VMUL(LDK(KP951056516), VFNMS(LDK(KP618033988), Tm, Tn)); + To = VMUL(LDK(KP951056516), VFMA(LDK(KP618033988), Tn, Tm)); + Tj = VFNMS(LDK(KP250000000), Ti, T3); + Tp = VFNMS(LDK(KP559016994), Tk, Tj); + Tl = VFMA(LDK(KP559016994), Tk, Tj); + TJ = VFNMSI(To, Tl); + STM2(&(xo[2]), TJ, ovs, &(xo[2])); + STN2(&(xo[0]), TI, TJ, ovs); + TK = VFMAI(Tq, Tp); + STM2(&(xo[14]), TK, ovs, &(xo[2])); + TL = VFMAI(To, Tl); + STM2(&(xo[18]), TL, ovs, &(xo[2])); + TM = VFNMSI(Tq, Tp); + STM2(&(xo[6]), TM, ovs, &(xo[2])); + TG = VMUL(LDK(KP951056516), VFMA(LDK(KP618033988), TC, TD)); + TE = VMUL(LDK(KP951056516), VFNMS(LDK(KP618033988), TD, TC)); + Tz = VFNMS(LDK(KP250000000), Ty, Tr); + TF = VFMA(LDK(KP559016994), TA, Tz); + TB = VFNMS(LDK(KP559016994), TA, Tz); + TN = VFMAI(TE, TB); + STM2(&(xo[4]), TN, ovs, &(xo[0])); + STN2(&(xo[4]), TN, TM, ovs); + TO = VFNMSI(TG, TF); + STM2(&(xo[12]), TO, ovs, &(xo[0])); + STN2(&(xo[12]), TO, TK, ovs); + TP = VFNMSI(TE, TB); + STM2(&(xo[16]), TP, ovs, &(xo[0])); + STN2(&(xo[16]), TP, TL, ovs); + TQ = VFMAI(TG, TF); + STM2(&(xo[8]), TQ, ovs, &(xo[0])); + STN2(&(xo[8]), TQ, TH, ovs); + } +}