view Lib/fftw-3.2.1/cell/spu/.svn/text-base/spu_n1fv_15.spuc.svn-base @ 7:c6f38cba266d

Cleaned up redundant code
author Geogaddi\David <d.m.ronan@qmul.ac.uk>
date Wed, 22 Jul 2015 15:14:58 +0100
parents 25bf17994ef1
children
line wrap: on
line source
/*
 * 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 -n 15 -name X(spu_n2fv_15) */

/*
 * This function contains 78 FP additions, 49 FP multiplications,
 * (or, 36 additions, 7 multiplications, 42 fused multiply/add),
 * 89 stack variables, 8 constants, and 30 memory accesses
 */
#include "fftw-spu.h"

void X(spu_n2fv_15) (const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs) {
     DVK(KP910592997, +0.910592997310029334643087372129977886038870291);
     DVK(KP823639103, +0.823639103546331925877420039278190003029660514);
     DVK(KP559016994, +0.559016994374947424102293417182819058860154590);
     DVK(KP618033988, +0.618033988749894848204586834365638117720309180);
     DVK(KP951056516, +0.951056516295153572116439333379382143405698634);
     DVK(KP866025403, +0.866025403784438646763723170752936183471402627);
     DVK(KP250000000, +0.250000000000000000000000000000000000000000000);
     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(is), MAKE_VOLATILE_STRIDE(os)) {
	  V TX, TB, T5, TO, TU, TV, TR, Tg, Tx, Tw, Tr, TI, TK, T12, T10;
	  V T1, T4, T2, T3, TM, TC, Ta, TQ, TG, Tq, TN, TD, Tf, TP, TF;
	  V Tl, T6, T9, T7, T8, Tm, Tp, Tn, To, Tb, Te, Tc, Td, Th, Tk;
	  V Ti, Tj, TY, TE, TH, TZ, TJ, T11, T1f, T1g, Ts, Tu, Tt, Ty, TA;
	  V Tv, Tz, T18, TS, TW, T1a, T13, T1b, TL, T17, T15, T16, T19, T1c, TT;
	  V T14, T1d, T1e;
	  T1 = LD(&(xi[0]), ivs, &(xi[0]));
	  T2 = LD(&(xi[WS(is, 5)]), ivs, &(xi[WS(is, 1)]));
	  T3 = LD(&(xi[WS(is, 10)]), ivs, &(xi[0]));
	  T4 = VADD(T2, T3);
	  TX = VSUB(T3, T2);
	  TB = VFNMS(LDK(KP500000000), T4, T1);
	  T5 = VADD(T1, T4);
	  T6 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)]));
	  T7 = LD(&(xi[WS(is, 8)]), ivs, &(xi[0]));
	  T8 = LD(&(xi[WS(is, 13)]), ivs, &(xi[WS(is, 1)]));
	  TM = VSUB(T8, T7);
	  T9 = VADD(T7, T8);
	  TC = VFNMS(LDK(KP500000000), T9, T6);
	  Ta = VADD(T6, T9);
	  Tm = LD(&(xi[WS(is, 9)]), ivs, &(xi[WS(is, 1)]));
	  Tn = LD(&(xi[WS(is, 14)]), ivs, &(xi[0]));
	  To = LD(&(xi[WS(is, 4)]), ivs, &(xi[0]));
	  TQ = VSUB(To, Tn);
	  Tp = VADD(Tn, To);
	  TG = VFNMS(LDK(KP500000000), Tp, Tm);
	  Tq = VADD(Tm, Tp);
	  Tb = LD(&(xi[WS(is, 12)]), ivs, &(xi[0]));
	  Tc = LD(&(xi[WS(is, 2)]), ivs, &(xi[0]));
	  Td = LD(&(xi[WS(is, 7)]), ivs, &(xi[WS(is, 1)]));
	  TN = VSUB(Td, Tc);
	  Te = VADD(Tc, Td);
	  TD = VFNMS(LDK(KP500000000), Te, Tb);
	  Tf = VADD(Tb, Te);
	  Th = LD(&(xi[WS(is, 6)]), ivs, &(xi[0]));
	  Ti = LD(&(xi[WS(is, 11)]), ivs, &(xi[WS(is, 1)]));
	  Tj = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)]));
	  TP = VSUB(Tj, Ti);
	  Tk = VADD(Ti, Tj);
	  TF = VFNMS(LDK(KP500000000), Tk, Th);
	  Tl = VADD(Th, Tk);
	  TO = VSUB(TM, TN);
	  TY = VADD(TM, TN);
	  TE = VADD(TC, TD);
	  TU = VSUB(TC, TD);
	  TV = VSUB(TF, TG);
	  TH = VADD(TF, TG);
	  TZ = VADD(TP, TQ);
	  TR = VSUB(TP, TQ);
	  Tg = VADD(Ta, Tf);
	  Tx = VSUB(Ta, Tf);
	  Tw = VSUB(Tl, Tq);
	  Tr = VADD(Tl, Tq);
	  TI = VADD(TE, TH);
	  TK = VSUB(TE, TH);
	  T12 = VSUB(TY, TZ);
	  T10 = VADD(TY, TZ);
	  TJ = VFNMS(LDK(KP250000000), TI, TB);
	  T1f = VADD(TB, TI);
	  T1g = VMUL(LDK(KP866025403), VADD(TX, T10));
	  T11 = VFNMS(LDK(KP250000000), T10, TX);
	  ST(&(xo[10]), VFNMSI(T1g, T1f), ovs, &(xo[2]));
	  ST(&(xo[20]), VFMAI(T1g, T1f), ovs, &(xo[0]));
	  Ts = VADD(Tg, Tr);
	  Tu = VSUB(Tg, Tr);
	  Tt = VFNMS(LDK(KP250000000), Ts, T5);
	  Ty = VMUL(LDK(KP951056516), VFNMS(LDK(KP618033988), Tx, Tw));
	  TA = VMUL(LDK(KP951056516), VFMA(LDK(KP618033988), Tw, Tx));
	  ST(&(xo[0]), VADD(T5, Ts), ovs, &(xo[0]));
	  Tv = VFNMS(LDK(KP559016994), Tu, Tt);
	  Tz = VFMA(LDK(KP559016994), Tu, Tt);
	  ST(&(xo[12]), VFNMSI(TA, Tz), ovs, &(xo[0]));
	  ST(&(xo[18]), VFMAI(TA, Tz), ovs, &(xo[2]));
	  ST(&(xo[6]), VFNMSI(Ty, Tv), ovs, &(xo[2]));
	  ST(&(xo[24]), VFMAI(Ty, Tv), ovs, &(xo[0]));
	  T18 = VFNMS(LDK(KP618033988), TO, TR);
	  TS = VFMA(LDK(KP618033988), TR, TO);
	  TW = VFMA(LDK(KP618033988), TV, TU);
	  T1a = VFNMS(LDK(KP618033988), TU, TV);
	  T13 = VFMA(LDK(KP559016994), T12, T11);
	  T1b = VFNMS(LDK(KP559016994), T12, T11);
	  TL = VFMA(LDK(KP559016994), TK, TJ);
	  T17 = VFNMS(LDK(KP559016994), TK, TJ);
	  TT = VFMA(LDK(KP823639103), TS, TL);
	  T15 = VFNMS(LDK(KP823639103), TS, TL);
	  T16 = VMUL(LDK(KP951056516), VFMA(LDK(KP910592997), T13, TW));
	  T14 = VMUL(LDK(KP951056516), VFNMS(LDK(KP910592997), T13, TW));
	  ST(&(xo[2]), VFNMSI(T14, TT), ovs, &(xo[2]));
	  ST(&(xo[28]), VFMAI(T14, TT), ovs, &(xo[0]));
	  T1d = VFNMS(LDK(KP823639103), T18, T17);
	  T19 = VFMA(LDK(KP823639103), T18, T17);
	  T1c = VMUL(LDK(KP951056516), VFNMS(LDK(KP910592997), T1b, T1a));
	  T1e = VMUL(LDK(KP951056516), VFMA(LDK(KP910592997), T1b, T1a));
	  ST(&(xo[16]), VFNMSI(T1e, T1d), ovs, &(xo[0]));
	  ST(&(xo[14]), VFMAI(T1e, T1d), ovs, &(xo[2]));
	  ST(&(xo[22]), VFNMSI(T16, T15), ovs, &(xo[2]));
	  ST(&(xo[8]), VFMAI(T16, T15), ovs, &(xo[0]));
	  ST(&(xo[26]), VFNMSI(T1c, T19), ovs, &(xo[2]));
	  ST(&(xo[4]), VFMAI(T1c, T19), ovs, &(xo[0]));
     }
}