comparison Lib/fftw-3.2.1/cell/spu/spu_n1fv_5.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
comparison
equal deleted inserted replaced
-1:000000000000 0:25bf17994ef1
1 /*
2 * Copyright (c) 2003, 2007-8 Matteo Frigo
3 * Copyright (c) 2003, 2007-8 Massachusetts Institute of Technology
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 */
20 /* Generated by: ../../genfft/gen_notw_c -standalone -fma -reorder-insns -simd -compact -variables 100000 -with-ostride 2 -include fftw-spu.h -n 5 -name X(spu_n2fv_5) */
21
22 /*
23 * This function contains 16 FP additions, 11 FP multiplications,
24 * (or, 7 additions, 2 multiplications, 9 fused multiply/add),
25 * 23 stack variables, 4 constants, and 10 memory accesses
26 */
27 #include "fftw-spu.h"
28
29 void X(spu_n2fv_5) (const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs) {
30 DVK(KP559016994, +0.559016994374947424102293417182819058860154590);
31 DVK(KP250000000, +0.250000000000000000000000000000000000000000000);
32 DVK(KP618033988, +0.618033988749894848204586834365638117720309180);
33 DVK(KP951056516, +0.951056516295153572116439333379382143405698634);
34 INT i;
35 const R *xi;
36 R *xo;
37 xi = ri;
38 xo = ro;
39 for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(is), MAKE_VOLATILE_STRIDE(os)) {
40 V T1, Tc, Td, T8, Ta, T4, T7, T2, T3, T5, T6, Tg, Te, Tb, Tf;
41 V T9;
42 T1 = LD(&(xi[0]), ivs, &(xi[0]));
43 T2 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)]));
44 T3 = LD(&(xi[WS(is, 4)]), ivs, &(xi[0]));
45 T4 = VADD(T2, T3);
46 Tc = VSUB(T2, T3);
47 T5 = LD(&(xi[WS(is, 2)]), ivs, &(xi[0]));
48 T6 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)]));
49 Td = VSUB(T5, T6);
50 T7 = VADD(T5, T6);
51 T8 = VADD(T4, T7);
52 Ta = VSUB(T4, T7);
53 ST(&(xo[0]), VADD(T1, T8), ovs, &(xo[0]));
54 Tg = VMUL(LDK(KP951056516), VFNMS(LDK(KP618033988), Tc, Td));
55 Te = VMUL(LDK(KP951056516), VFMA(LDK(KP618033988), Td, Tc));
56 T9 = VFNMS(LDK(KP250000000), T8, T1);
57 Tb = VFMA(LDK(KP559016994), Ta, T9);
58 Tf = VFNMS(LDK(KP559016994), Ta, T9);
59 ST(&(xo[2]), VFNMSI(Te, Tb), ovs, &(xo[2]));
60 ST(&(xo[6]), VFNMSI(Tg, Tf), ovs, &(xo[2]));
61 ST(&(xo[8]), VFMAI(Te, Tb), ovs, &(xo[0]));
62 ST(&(xo[4]), VFMAI(Tg, Tf), ovs, &(xo[0]));
63 }
64 }