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

« back to all changes in this revision

Viewing changes to dft/simd/codelets/t3fv_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
/*
 
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:18:43 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 -twiddle-log3 -precompute-twiddles -no-generate-bytw -n 4 -name t3fv_4 -include t3f.h */
 
29
 
 
30
/*
 
31
 * This function contains 12 FP additions, 10 FP multiplications,
 
32
 * (or, 10 additions, 8 multiplications, 2 fused multiply/add),
 
33
 * 16 stack variables, and 8 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 "t3f.h"
 
43
 
 
44
static const R *t3fv_4(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 * 4), MAKE_VOLATILE_STRIDE(ios)) {
 
50
          V T2, T3, T1, Ta, T5, T8;
 
51
          T2 = LDW(&(W[0]));
 
52
          T3 = LDW(&(W[TWVL * 2]));
 
53
          T1 = LD(&(x[0]), dist, &(x[0]));
 
54
          Ta = LD(&(x[WS(ios, 3)]), dist, &(x[WS(ios, 1)]));
 
55
          T5 = LD(&(x[WS(ios, 2)]), dist, &(x[0]));
 
56
          T8 = LD(&(x[WS(ios, 1)]), dist, &(x[WS(ios, 1)]));
 
57
          {
 
58
               V T4, Tb, T9, T6;
 
59
               T4 = VZMULJ(T2, T3);
 
60
               Tb = VZMULJ(T3, Ta);
 
61
               T9 = VZMULJ(T2, T8);
 
62
               T6 = VZMULJ(T4, T5);
 
63
               {
 
64
                    V Tc, Te, T7, Td;
 
65
                    Tc = VSUB(T9, Tb);
 
66
                    Te = VADD(T9, Tb);
 
67
                    T7 = VSUB(T1, T6);
 
68
                    Td = VADD(T1, T6);
 
69
                    ST(&(x[0]), VADD(Td, Te), dist, &(x[0]));
 
70
                    ST(&(x[WS(ios, 2)]), VSUB(Td, Te), dist, &(x[0]));
 
71
                    ST(&(x[WS(ios, 3)]), VFMAI(Tc, T7), dist, &(x[WS(ios, 1)]));
 
72
                    ST(&(x[WS(ios, 1)]), VFNMSI(Tc, T7), dist, &(x[WS(ios, 1)]));
 
73
               }
 
74
          }
 
75
     }
 
76
     return W;
 
77
}
 
78
 
 
79
static const tw_instr twinstr[] = {
 
80
     VTW(1),
 
81
     VTW(3),
 
82
     {TW_NEXT, VL, 0}
 
83
};
 
84
 
 
85
static const ct_desc desc = { 4, "t3fv_4", twinstr, &GENUS, {10, 8, 2, 0}, 0, 0, 0 };
 
86
 
 
87
void X(codelet_t3fv_4) (planner *p) {
 
88
     X(kdft_dit_register) (p, t3fv_4, &desc);
 
89
}
 
90
#else                           /* HAVE_FMA */
 
91
 
 
92
/* Generated by: ../../../genfft/gen_twiddle_c -simd -compact -variables 4 -pipeline-latency 8 -twiddle-log3 -precompute-twiddles -no-generate-bytw -n 4 -name t3fv_4 -include t3f.h */
 
93
 
 
94
/*
 
95
 * This function contains 12 FP additions, 8 FP multiplications,
 
96
 * (or, 12 additions, 8 multiplications, 0 fused multiply/add),
 
97
 * 16 stack variables, and 8 memory accesses
 
98
 */
 
99
/*
 
100
 * Generator Id's : 
 
101
 * $Id: algsimp.ml,v 1.9 2006-02-12 23:34:12 athena Exp $
 
102
 * $Id: fft.ml,v 1.4 2006-01-05 03:04:27 stevenj Exp $
 
103
 * $Id: gen_twiddle_c.ml,v 1.14 2006-02-12 23:34:12 athena Exp $
 
104
 */
 
105
 
 
106
#include "t3f.h"
 
107
 
 
108
static const R *t3fv_4(R *ri, R *ii, const R *W, stride ios, INT m, INT dist)
 
109
{
 
110
     INT i;
 
111
     R *x;
 
112
     x = ri;
 
113
     for (i = m; i > 0; i = i - VL, x = x + (VL * dist), W = W + (TWVL * 4), MAKE_VOLATILE_STRIDE(ios)) {
 
114
          V T2, T3, T4;
 
115
          T2 = LDW(&(W[0]));
 
116
          T3 = LDW(&(W[TWVL * 2]));
 
117
          T4 = VZMULJ(T2, T3);
 
118
          {
 
119
               V T1, Tb, T6, T9, Ta, T5, T8;
 
120
               T1 = LD(&(x[0]), dist, &(x[0]));
 
121
               Ta = LD(&(x[WS(ios, 3)]), dist, &(x[WS(ios, 1)]));
 
122
               Tb = VZMULJ(T3, Ta);
 
123
               T5 = LD(&(x[WS(ios, 2)]), dist, &(x[0]));
 
124
               T6 = VZMULJ(T4, T5);
 
125
               T8 = LD(&(x[WS(ios, 1)]), dist, &(x[WS(ios, 1)]));
 
126
               T9 = VZMULJ(T2, T8);
 
127
               {
 
128
                    V T7, Tc, Td, Te;
 
129
                    T7 = VSUB(T1, T6);
 
130
                    Tc = VBYI(VSUB(T9, Tb));
 
131
                    ST(&(x[WS(ios, 1)]), VSUB(T7, Tc), dist, &(x[WS(ios, 1)]));
 
132
                    ST(&(x[WS(ios, 3)]), VADD(T7, Tc), dist, &(x[WS(ios, 1)]));
 
133
                    Td = VADD(T1, T6);
 
134
                    Te = VADD(T9, Tb);
 
135
                    ST(&(x[WS(ios, 2)]), VSUB(Td, Te), dist, &(x[0]));
 
136
                    ST(&(x[0]), VADD(Td, Te), dist, &(x[0]));
 
137
               }
 
138
          }
 
139
     }
 
140
     return W;
 
141
}
 
142
 
 
143
static const tw_instr twinstr[] = {
 
144
     VTW(1),
 
145
     VTW(3),
 
146
     {TW_NEXT, VL, 0}
 
147
};
 
148
 
 
149
static const ct_desc desc = { 4, "t3fv_4", twinstr, &GENUS, {12, 8, 0, 0}, 0, 0, 0 };
 
150
 
 
151
void X(codelet_t3fv_4) (planner *p) {
 
152
     X(kdft_dit_register) (p, t3fv_4, &desc);
 
153
}
 
154
#endif                          /* HAVE_FMA */