~ubuntu-branches/ubuntu/raring/fftw3/raring-proposed

« back to all changes in this revision

Viewing changes to dft/simd/codelets/n2bv_5.c

  • Committer: Bazaar Package Importer
  • Author(s): Paul Brossier
  • Date: 2006-05-31 13:44:05 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060531134405-ol9hrbg6bh81sg0c
Tags: 3.1.1-1
* New upstream release (closes: #350327, #338487, #338501)
* Add --enable-portable-binary to use -mtune instead of -march
* Use --with-gcc-arch=G5 / pentium4 on powerpc / i386
* Updated Standards-Version

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (c) 2003 Matteo Frigo
3
 
 * Copyright (c) 2003 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
 
 
21
 
/* This file was automatically generated --- DO NOT EDIT */
22
 
/* Generated on Sat Jul  5 21:40:41 EDT 2003 */
23
 
 
24
 
#include "codelet-dft.h"
25
 
 
26
 
/* Generated by: /homee/stevenj/cvs/fftw3.0.1/genfft/gen_notw_c -simd -compact -variables 4 -sign 1 -n 5 -name n2bv_5 -with-ostride 2 -include n2b.h */
27
 
 
28
 
/*
29
 
 * This function contains 16 FP additions, 6 FP multiplications,
30
 
 * (or, 13 additions, 3 multiplications, 3 fused multiply/add),
31
 
 * 18 stack variables, and 10 memory accesses
32
 
 */
33
 
/*
34
 
 * Generator Id's : 
35
 
 * $Id: algsimp.ml,v 1.7 2003/03/15 20:29:42 stevenj Exp $
36
 
 * $Id: fft.ml,v 1.2 2003/03/15 20:29:42 stevenj Exp $
37
 
 * $Id: gen_notw_c.ml,v 1.9 2003/04/16 21:21:53 athena Exp $
38
 
 */
39
 
 
40
 
#include "n2b.h"
41
 
 
42
 
static void n2bv_5(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, int v, int ivs, int ovs)
43
 
{
44
 
     DVK(KP250000000, +0.250000000000000000000000000000000000000000000);
45
 
     DVK(KP587785252, +0.587785252292473129168705954639072768597652438);
46
 
     DVK(KP951056516, +0.951056516295153572116439333379382143405698634);
47
 
     DVK(KP559016994, +0.559016994374947424102293417182819058860154590);
48
 
     int i;
49
 
     const R *xi;
50
 
     R *xo;
51
 
     xi = ii;
52
 
     xo = io;
53
 
     BEGIN_SIMD();
54
 
     for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs)) {
55
 
          V Tb, T3, Tc, T6, Ta;
56
 
          Tb = LD(&(xi[0]), ivs, &(xi[0]));
57
 
          {
58
 
               V T1, T2, T8, T4, T5, T9;
59
 
               T1 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)]));
60
 
               T2 = LD(&(xi[WS(is, 4)]), ivs, &(xi[0]));
61
 
               T8 = VADD(T1, T2);
62
 
               T4 = LD(&(xi[WS(is, 2)]), ivs, &(xi[0]));
63
 
               T5 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)]));
64
 
               T9 = VADD(T4, T5);
65
 
               T3 = VSUB(T1, T2);
66
 
               Tc = VADD(T8, T9);
67
 
               T6 = VSUB(T4, T5);
68
 
               Ta = VMUL(LDK(KP559016994), VSUB(T8, T9));
69
 
          }
70
 
          ST(&(xo[0]), VADD(Tb, Tc), ovs, &(xo[0]));
71
 
          {
72
 
               V T7, Tf, Te, Tg, Td;
73
 
               T7 = VBYI(VFMA(LDK(KP951056516), T3, VMUL(LDK(KP587785252), T6)));
74
 
               Tf = VBYI(VFNMS(LDK(KP951056516), T6, VMUL(LDK(KP587785252), T3)));
75
 
               Td = VFNMS(LDK(KP250000000), Tc, Tb);
76
 
               Te = VADD(Ta, Td);
77
 
               Tg = VSUB(Td, Ta);
78
 
               ST(&(xo[2]), VADD(T7, Te), ovs, &(xo[2]));
79
 
               ST(&(xo[6]), VSUB(Tg, Tf), ovs, &(xo[2]));
80
 
               ST(&(xo[8]), VSUB(Te, T7), ovs, &(xo[0]));
81
 
               ST(&(xo[4]), VADD(Tf, Tg), ovs, &(xo[0]));
82
 
          }
83
 
     }
84
 
     END_SIMD();
85
 
}
86
 
 
87
 
static const kdft_desc desc = { 5, "n2bv_5", {13, 3, 3, 0}, &GENUS, 0, 2, 0, 0 };
88
 
void X(codelet_n2bv_5) (planner *p) {
89
 
     X(kdft_register) (p, n2bv_5, &desc);
90
 
}