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

« back to all changes in this revision

Viewing changes to dft/simd/codelets/t1fv_7.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:43:17 EDT 2003 */
 
22
/* Generated on Tue Mar  7 10:08:07 EST 2006 */
23
23
 
24
24
#include "codelet-dft.h"
25
25
 
26
 
/* Generated by: /homee/stevenj/cvs/fftw3.0.1/genfft/gen_twiddle_c -simd -compact -variables 4 -n 7 -name t1fv_7 -include t1f.h */
 
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 7 -name t1fv_7 -include t1f.h */
 
29
 
 
30
/*
 
31
 * This function contains 36 FP additions, 36 FP multiplications,
 
32
 * (or, 15 additions, 15 multiplications, 21 fused multiply/add),
 
33
 * 42 stack variables, and 14 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 "t1f.h"
 
43
 
 
44
static const R *t1fv_7(R *ri, R *ii, const R *W, stride ios, INT m, INT dist)
 
45
{
 
46
     DVK(KP900968867, +0.900968867902419126236102319507445051165919162);
 
47
     DVK(KP801937735, +0.801937735804838252472204639014890102331838324);
 
48
     DVK(KP974927912, +0.974927912181823607018131682993931217232785801);
 
49
     DVK(KP692021471, +0.692021471630095869627814897002069140197260599);
 
50
     DVK(KP554958132, +0.554958132087371191422194871006410481067288862);
 
51
     DVK(KP356895867, +0.356895867892209443894399510021300583399127187);
 
52
     INT i;
 
53
     R *x;
 
54
     x = ri;
 
55
     for (i = m; i > 0; i = i - VL, x = x + (VL * dist), W = W + (TWVL * 12), MAKE_VOLATILE_STRIDE(ios)) {
 
56
          V T1, T2, T4, Te, Tc, T9, T7;
 
57
          T1 = LD(&(x[0]), dist, &(x[0]));
 
58
          T2 = LD(&(x[WS(ios, 1)]), dist, &(x[WS(ios, 1)]));
 
59
          T4 = LD(&(x[WS(ios, 6)]), dist, &(x[0]));
 
60
          Te = LD(&(x[WS(ios, 4)]), dist, &(x[0]));
 
61
          Tc = LD(&(x[WS(ios, 3)]), dist, &(x[WS(ios, 1)]));
 
62
          T9 = LD(&(x[WS(ios, 5)]), dist, &(x[WS(ios, 1)]));
 
63
          T7 = LD(&(x[WS(ios, 2)]), dist, &(x[0]));
 
64
          {
 
65
               V T3, T5, Tf, Td, Ta, T8;
 
66
               T3 = BYTWJ(&(W[0]), T2);
 
67
               T5 = BYTWJ(&(W[TWVL * 10]), T4);
 
68
               Tf = BYTWJ(&(W[TWVL * 6]), Te);
 
69
               Td = BYTWJ(&(W[TWVL * 4]), Tc);
 
70
               Ta = BYTWJ(&(W[TWVL * 8]), T9);
 
71
               T8 = BYTWJ(&(W[TWVL * 2]), T7);
 
72
               {
 
73
                    V T6, Tk, Tg, Tl, Tb, Tm;
 
74
                    T6 = VADD(T3, T5);
 
75
                    Tk = VSUB(T5, T3);
 
76
                    Tg = VADD(Td, Tf);
 
77
                    Tl = VSUB(Tf, Td);
 
78
                    Tb = VADD(T8, Ta);
 
79
                    Tm = VSUB(Ta, T8);
 
80
                    {
 
81
                         V Th, Ts, Tp, Tu, Tn, Tx, Ti, Tt;
 
82
                         Th = VFNMS(LDK(KP356895867), T6, Tg);
 
83
                         Ts = VFMA(LDK(KP554958132), Tl, Tk);
 
84
                         ST(&(x[0]), VADD(T1, VADD(T6, VADD(Tb, Tg))), dist, &(x[0]));
 
85
                         Tp = VFNMS(LDK(KP356895867), Tb, T6);
 
86
                         Tu = VFNMS(LDK(KP356895867), Tg, Tb);
 
87
                         Tn = VFMA(LDK(KP554958132), Tm, Tl);
 
88
                         Tx = VFNMS(LDK(KP554958132), Tk, Tm);
 
89
                         Ti = VFNMS(LDK(KP692021471), Th, Tb);
 
90
                         Tt = VMUL(LDK(KP974927912), VFMA(LDK(KP801937735), Ts, Tm));
 
91
                         {
 
92
                              V Tq, Tv, To, Ty, Tj, Tr, Tw;
 
93
                              Tq = VFNMS(LDK(KP692021471), Tp, Tg);
 
94
                              Tv = VFNMS(LDK(KP692021471), Tu, T6);
 
95
                              To = VMUL(LDK(KP974927912), VFNMS(LDK(KP801937735), Tn, Tk));
 
96
                              Ty = VMUL(LDK(KP974927912), VFNMS(LDK(KP801937735), Tx, Tl));
 
97
                              Tj = VFNMS(LDK(KP900968867), Ti, T1);
 
98
                              Tr = VFNMS(LDK(KP900968867), Tq, T1);
 
99
                              Tw = VFNMS(LDK(KP900968867), Tv, T1);
 
100
                              ST(&(x[WS(ios, 2)]), VFMAI(To, Tj), dist, &(x[0]));
 
101
                              ST(&(x[WS(ios, 5)]), VFNMSI(To, Tj), dist, &(x[WS(ios, 1)]));
 
102
                              ST(&(x[WS(ios, 1)]), VFMAI(Tt, Tr), dist, &(x[WS(ios, 1)]));
 
103
                              ST(&(x[WS(ios, 6)]), VFNMSI(Tt, Tr), dist, &(x[0]));
 
104
                              ST(&(x[WS(ios, 3)]), VFMAI(Ty, Tw), dist, &(x[WS(ios, 1)]));
 
105
                              ST(&(x[WS(ios, 4)]), VFNMSI(Ty, Tw), dist, &(x[0]));
 
106
                         }
 
107
                    }
 
108
               }
 
109
          }
 
110
     }
 
111
     return W;
 
112
}
 
113
 
 
114
static const tw_instr twinstr[] = {
 
115
     VTW(1),
 
116
     VTW(2),
 
117
     VTW(3),
 
118
     VTW(4),
 
119
     VTW(5),
 
120
     VTW(6),
 
121
     {TW_NEXT, VL, 0}
 
122
};
 
123
 
 
124
static const ct_desc desc = { 7, "t1fv_7", twinstr, &GENUS, {15, 15, 21, 0}, 0, 0, 0 };
 
125
 
 
126
void X(codelet_t1fv_7) (planner *p) {
 
127
     X(kdft_dit_register) (p, t1fv_7, &desc);
 
128
}
 
129
#else                           /* HAVE_FMA */
 
130
 
 
131
/* Generated by: ../../../genfft/gen_twiddle_c -simd -compact -variables 4 -pipeline-latency 8 -n 7 -name t1fv_7 -include t1f.h */
27
132
 
28
133
/*
29
134
 * This function contains 36 FP additions, 30 FP multiplications,
32
137
 */
33
138
/*
34
139
 * 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_twiddle_c.ml,v 1.7 2003/04/16 19:51:27 athena Exp $
 
140
 * $Id: algsimp.ml,v 1.9 2006-02-12 23:34:12 athena Exp $
 
141
 * $Id: fft.ml,v 1.4 2006-01-05 03:04:27 stevenj Exp $
 
142
 * $Id: gen_twiddle_c.ml,v 1.14 2006-02-12 23:34:12 athena Exp $
38
143
 */
39
144
 
40
145
#include "t1f.h"
41
146
 
42
 
static const R *t1fv_7(R *ri, R *ii, const R *W, stride ios, int m, int dist)
 
147
static const R *t1fv_7(R *ri, R *ii, const R *W, stride ios, INT m, INT dist)
43
148
{
44
149
     DVK(KP900968867, +0.900968867902419126236102319507445051165919162);
45
150
     DVK(KP222520933, +0.222520933956314404288902564496794759466355569);
47
152
     DVK(KP781831482, +0.781831482468029808708444526674057750232334519);
48
153
     DVK(KP974927912, +0.974927912181823607018131682993931217232785801);
49
154
     DVK(KP433883739, +0.433883739117558120475768332848358754609990728);
50
 
     int i;
 
155
     INT i;
51
156
     R *x;
52
157
     x = ri;
53
 
     BEGIN_SIMD();
54
 
     for (i = m; i > 0; i = i - VL, x = x + (VL * dist), W = W + (TWVL * 12)) {
 
158
     for (i = m; i > 0; i = i - VL, x = x + (VL * dist), W = W + (TWVL * 12), MAKE_VOLATILE_STRIDE(ios)) {
55
159
          V T1, Tg, Tj, T6, Ti, Tb, Tk, Tp, To;
56
160
          T1 = LD(&(x[0]), dist, &(x[0]));
57
161
          {
98
202
               ST(&(x[WS(ios, 1)]), VADD(Tm, Tn), dist, &(x[WS(ios, 1)]));
99
203
          }
100
204
     }
101
 
     END_SIMD();
102
205
     return W;
103
206
}
104
207
 
112
215
     {TW_NEXT, VL, 0}
113
216
};
114
217
 
115
 
static const ct_desc desc = { 7, "t1fv_7", twinstr, {24, 18, 12, 0}, &GENUS, 0, 0, 0 };
 
218
static const ct_desc desc = { 7, "t1fv_7", twinstr, &GENUS, {24, 18, 12, 0}, 0, 0, 0 };
116
219
 
117
220
void X(codelet_t1fv_7) (planner *p) {
118
221
     X(kdft_dit_register) (p, t1fv_7, &desc);
119
222
}
 
223
#endif                          /* HAVE_FMA */