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

« back to all changes in this revision

Viewing changes to dft/simd/codelets/t2fv_2.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, 2006 Matteo Frigo
 
3
 * Copyright (c) 2003, 2006 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 Tue Mar  7 10:17:13 EST 2006 */
 
23
 
 
24
#include "codelet-dft.h"
 
25
 
 
26
#ifdef HAVE_FMA
 
27
 
 
28
/* Generated by: ../../../genfft/gen_twiddle_c -fma -reorder-insns -schedule-for-pipeline -simd -compact -variables 4 -pipeline-latency 8 -n 2 -name t2fv_2 -include t2f.h */
 
29
 
 
30
/*
 
31
 * This function contains 3 FP additions, 2 FP multiplications,
 
32
 * (or, 3 additions, 2 multiplications, 0 fused multiply/add),
 
33
 * 5 stack variables, and 4 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_twiddle_c.ml,v 1.14 2006-02-12 23:34:12 athena Exp $
 
40
 */
 
41
 
 
42
#include "t2f.h"
 
43
 
 
44
static const R *t2fv_2(R *ri, R *ii, const R *W, stride ios, INT m, INT dist)
 
45
{
 
46
     INT i;
 
47
     R *x;
 
48
     x = ri;
 
49
     for (i = m; i > 0; i = i - VL, x = x + (VL * dist), W = W + (TWVL * 2), MAKE_VOLATILE_STRIDE(ios)) {
 
50
          V T1, T2, T3;
 
51
          T1 = LD(&(x[0]), dist, &(x[0]));
 
52
          T2 = LD(&(x[WS(ios, 1)]), dist, &(x[WS(ios, 1)]));
 
53
          T3 = BYTWJ(&(W[0]), T2);
 
54
          ST(&(x[0]), VADD(T1, T3), dist, &(x[0]));
 
55
          ST(&(x[WS(ios, 1)]), VSUB(T1, T3), dist, &(x[WS(ios, 1)]));
 
56
     }
 
57
     return W;
 
58
}
 
59
 
 
60
static const tw_instr twinstr[] = {
 
61
     VTW(1),
 
62
     {TW_NEXT, VL, 0}
 
63
};
 
64
 
 
65
static const ct_desc desc = { 2, "t2fv_2", twinstr, &GENUS, {3, 2, 0, 0}, 0, 0, 0 };
 
66
 
 
67
void X(codelet_t2fv_2) (planner *p) {
 
68
     X(kdft_dit_register) (p, t2fv_2, &desc);
 
69
}
 
70
#else                           /* HAVE_FMA */
 
71
 
 
72
/* Generated by: ../../../genfft/gen_twiddle_c -simd -compact -variables 4 -pipeline-latency 8 -n 2 -name t2fv_2 -include t2f.h */
 
73
 
 
74
/*
 
75
 * This function contains 3 FP additions, 2 FP multiplications,
 
76
 * (or, 3 additions, 2 multiplications, 0 fused multiply/add),
 
77
 * 5 stack variables, and 4 memory accesses
 
78
 */
 
79
/*
 
80
 * Generator Id's : 
 
81
 * $Id: algsimp.ml,v 1.9 2006-02-12 23:34:12 athena Exp $
 
82
 * $Id: fft.ml,v 1.4 2006-01-05 03:04:27 stevenj Exp $
 
83
 * $Id: gen_twiddle_c.ml,v 1.14 2006-02-12 23:34:12 athena Exp $
 
84
 */
 
85
 
 
86
#include "t2f.h"
 
87
 
 
88
static const R *t2fv_2(R *ri, R *ii, const R *W, stride ios, INT m, INT dist)
 
89
{
 
90
     INT i;
 
91
     R *x;
 
92
     x = ri;
 
93
     for (i = m; i > 0; i = i - VL, x = x + (VL * dist), W = W + (TWVL * 2), MAKE_VOLATILE_STRIDE(ios)) {
 
94
          V T1, T3, T2;
 
95
          T1 = LD(&(x[0]), dist, &(x[0]));
 
96
          T2 = LD(&(x[WS(ios, 1)]), dist, &(x[WS(ios, 1)]));
 
97
          T3 = BYTWJ(&(W[0]), T2);
 
98
          ST(&(x[WS(ios, 1)]), VSUB(T1, T3), dist, &(x[WS(ios, 1)]));
 
99
          ST(&(x[0]), VADD(T1, T3), dist, &(x[0]));
 
100
     }
 
101
     return W;
 
102
}
 
103
 
 
104
static const tw_instr twinstr[] = {
 
105
     VTW(1),
 
106
     {TW_NEXT, VL, 0}
 
107
};
 
108
 
 
109
static const ct_desc desc = { 2, "t2fv_2", twinstr, &GENUS, {3, 2, 0, 0}, 0, 0, 0 };
 
110
 
 
111
void X(codelet_t2fv_2) (planner *p) {
 
112
     X(kdft_dit_register) (p, t2fv_2, &desc);
 
113
}
 
114
#endif                          /* HAVE_FMA */