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

« back to all changes in this revision

Viewing changes to dft/simd/codelets/n2bv_4.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
1
/*
2
 
 * Copyright (c) 2003 Matteo Frigo
3
 
 * Copyright (c) 2003 Massachusetts Institute of Technology
 
2
 * Copyright (c) 2003, 2006 Matteo Frigo
 
3
 * Copyright (c) 2003, 2006 Massachusetts Institute of Technology
4
4
 *
5
5
 * This program is free software; you can redistribute it and/or modify
6
6
 * it under the terms of the GNU General Public License as published by
19
19
 */
20
20
 
21
21
/* This file was automatically generated --- DO NOT EDIT */
22
 
/* Generated on Sat Jul  5 21:40:41 EDT 2003 */
 
22
/* Generated on Tue Mar  7 09:59:31 EST 2006 */
23
23
 
24
24
#include "codelet-dft.h"
25
25
 
26
 
/* Generated by: /homee/stevenj/cvs/fftw3.0.1/genfft/gen_notw_c -simd -compact -variables 4 -sign 1 -n 4 -name n2bv_4 -with-ostride 2 -include n2b.h */
 
26
#ifdef HAVE_FMA
 
27
 
 
28
/* Generated by: ../../../genfft/gen_notw_c -fma -reorder-insns -schedule-for-pipeline -simd -compact -variables 4 -pipeline-latency 8 -sign 1 -n 4 -name n2bv_4 -with-ostride 2 -include n2b.h -store-multiple 2 */
 
29
 
 
30
/*
 
31
 * This function contains 8 FP additions, 2 FP multiplications,
 
32
 * (or, 6 additions, 0 multiplications, 2 fused multiply/add),
 
33
 * 15 stack variables, and 10 memory accesses
 
34
 */
 
35
/*
 
36
 * Generator Id's : 
 
37
 * $Id: algsimp.ml,v 1.9 2006-02-12 23:34:12 athena Exp $
 
38
 * $Id: fft.ml,v 1.4 2006-01-05 03:04:27 stevenj Exp $
 
39
 * $Id: gen_notw_c.ml,v 1.17 2006-02-12 23:34:12 athena Exp $
 
40
 */
 
41
 
 
42
#include "n2b.h"
 
43
 
 
44
static void n2bv_4(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs)
 
45
{
 
46
     INT i;
 
47
     const R *xi;
 
48
     R *xo;
 
49
     xi = ii;
 
50
     xo = io;
 
51
     for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(is), MAKE_VOLATILE_STRIDE(os)) {
 
52
          V T1, T2, T4, T5;
 
53
          T1 = LD(&(xi[0]), ivs, &(xi[0]));
 
54
          T2 = LD(&(xi[WS(is, 2)]), ivs, &(xi[0]));
 
55
          T4 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)]));
 
56
          T5 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)]));
 
57
          {
 
58
               V T3, T7, T6, T8;
 
59
               T3 = VSUB(T1, T2);
 
60
               T7 = VADD(T1, T2);
 
61
               T6 = VSUB(T4, T5);
 
62
               T8 = VADD(T4, T5);
 
63
               {
 
64
                    V T9, Ta, Tb, Tc;
 
65
                    T9 = VSUB(T7, T8);
 
66
                    STM2(&(xo[4]), T9, ovs, &(xo[0]));
 
67
                    Ta = VADD(T7, T8);
 
68
                    STM2(&(xo[0]), Ta, ovs, &(xo[0]));
 
69
                    Tb = VFMAI(T6, T3);
 
70
                    STM2(&(xo[2]), Tb, ovs, &(xo[2]));
 
71
                    STN2(&(xo[0]), Ta, Tb, ovs);
 
72
                    Tc = VFNMSI(T6, T3);
 
73
                    STM2(&(xo[6]), Tc, ovs, &(xo[2]));
 
74
                    STN2(&(xo[4]), T9, Tc, ovs);
 
75
               }
 
76
          }
 
77
     }
 
78
}
 
79
 
 
80
static const kdft_desc desc = { 4, "n2bv_4", {6, 0, 2, 0}, &GENUS, 0, 2, 0, 0 };
 
81
void X(codelet_n2bv_4) (planner *p) {
 
82
     X(kdft_register) (p, n2bv_4, &desc);
 
83
}
 
84
 
 
85
#else                           /* HAVE_FMA */
 
86
 
 
87
/* Generated by: ../../../genfft/gen_notw_c -simd -compact -variables 4 -pipeline-latency 8 -sign 1 -n 4 -name n2bv_4 -with-ostride 2 -include n2b.h -store-multiple 2 */
27
88
 
28
89
/*
29
90
 * This function contains 8 FP additions, 0 FP multiplications,
30
91
 * (or, 8 additions, 0 multiplications, 0 fused multiply/add),
31
 
 * 11 stack variables, and 8 memory accesses
 
92
 * 11 stack variables, and 10 memory accesses
32
93
 */
33
94
/*
34
95
 * 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 $
 
96
 * $Id: algsimp.ml,v 1.9 2006-02-12 23:34:12 athena Exp $
 
97
 * $Id: fft.ml,v 1.4 2006-01-05 03:04:27 stevenj Exp $
 
98
 * $Id: gen_notw_c.ml,v 1.17 2006-02-12 23:34:12 athena Exp $
38
99
 */
39
100
 
40
101
#include "n2b.h"
41
102
 
42
 
static void n2bv_4(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, int v, int ivs, int ovs)
 
103
static void n2bv_4(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs)
43
104
{
44
 
     int i;
 
105
     INT i;
45
106
     const R *xi;
46
107
     R *xo;
47
108
     xi = ii;
48
109
     xo = io;
49
 
     BEGIN_SIMD();
50
 
     for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs)) {
 
110
     for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(is), MAKE_VOLATILE_STRIDE(os)) {
51
111
          V T3, T7, T6, T8;
52
112
          {
53
113
               V T1, T2, T4, T5;
60
120
               T6 = VBYI(VSUB(T4, T5));
61
121
               T8 = VADD(T4, T5);
62
122
          }
63
 
          ST(&(xo[6]), VSUB(T3, T6), ovs, &(xo[2]));
64
 
          ST(&(xo[0]), VADD(T7, T8), ovs, &(xo[0]));
65
 
          ST(&(xo[2]), VADD(T3, T6), ovs, &(xo[2]));
66
 
          ST(&(xo[4]), VSUB(T7, T8), ovs, &(xo[0]));
 
123
          {
 
124
               V T9, Ta, Tb, Tc;
 
125
               T9 = VSUB(T3, T6);
 
126
               STM2(&(xo[6]), T9, ovs, &(xo[2]));
 
127
               Ta = VADD(T7, T8);
 
128
               STM2(&(xo[0]), Ta, ovs, &(xo[0]));
 
129
               Tb = VADD(T3, T6);
 
130
               STM2(&(xo[2]), Tb, ovs, &(xo[2]));
 
131
               STN2(&(xo[0]), Ta, Tb, ovs);
 
132
               Tc = VSUB(T7, T8);
 
133
               STM2(&(xo[4]), Tc, ovs, &(xo[0]));
 
134
               STN2(&(xo[4]), Tc, T9, ovs);
 
135
          }
67
136
     }
68
 
     END_SIMD();
69
137
}
70
138
 
71
139
static const kdft_desc desc = { 4, "n2bv_4", {8, 0, 0, 0}, &GENUS, 0, 2, 0, 0 };
72
140
void X(codelet_n2bv_4) (planner *p) {
73
141
     X(kdft_register) (p, n2bv_4, &desc);
74
142
}
 
143
 
 
144
#endif                          /* HAVE_FMA */