~ubuntu-branches/ubuntu/utopic/fftw3/utopic

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2011-12-14 13:21:22 UTC
  • mfrom: (3.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20111214132122-l4avyl2kkr7vq5aj
Tags: 3.3-1ubuntu1
* Merge with Debian; remaining changes:
  - Revert the ARM workaround.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (c) 2003, 2007-8 Matteo Frigo
3
 
 * Copyright (c) 2003, 2007-8 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 Sun Jul 12 06:42:29 EDT 2009 */
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 6 -name t1bv_6 -include t1b.h -sign 1 */
29
 
 
30
 
/*
31
 
 * This function contains 23 FP additions, 18 FP multiplications,
32
 
 * (or, 17 additions, 12 multiplications, 6 fused multiply/add),
33
 
 * 27 stack variables, 2 constants, and 12 memory accesses
34
 
 */
35
 
#include "t1b.h"
36
 
 
37
 
static void t1bv_6(R *ri, R *ii, const R *W, stride rs, INT mb, INT me, INT ms)
38
 
{
39
 
     DVK(KP500000000, +0.500000000000000000000000000000000000000000000);
40
 
     DVK(KP866025403, +0.866025403784438646763723170752936183471402627);
41
 
     INT m;
42
 
     R *x;
43
 
     x = ii;
44
 
     for (m = mb, W = W + (mb * ((TWVL / VL) * 10)); m < me; m = m + VL, x = x + (VL * ms), W = W + (TWVL * 10), MAKE_VOLATILE_STRIDE(rs)) {
45
 
          V T1, T2, Ta, Tc, T5, T7;
46
 
          T1 = LD(&(x[0]), ms, &(x[0]));
47
 
          T2 = LD(&(x[WS(rs, 3)]), ms, &(x[WS(rs, 1)]));
48
 
          Ta = LD(&(x[WS(rs, 4)]), ms, &(x[0]));
49
 
          Tc = LD(&(x[WS(rs, 1)]), ms, &(x[WS(rs, 1)]));
50
 
          T5 = LD(&(x[WS(rs, 2)]), ms, &(x[0]));
51
 
          T7 = LD(&(x[WS(rs, 5)]), ms, &(x[WS(rs, 1)]));
52
 
          {
53
 
               V T3, Tb, Td, T6, T8;
54
 
               T3 = BYTW(&(W[TWVL * 4]), T2);
55
 
               Tb = BYTW(&(W[TWVL * 6]), Ta);
56
 
               Td = BYTW(&(W[0]), Tc);
57
 
               T6 = BYTW(&(W[TWVL * 2]), T5);
58
 
               T8 = BYTW(&(W[TWVL * 8]), T7);
59
 
               {
60
 
                    V Ti, T4, Tk, Te, Tj, T9;
61
 
                    Ti = VADD(T1, T3);
62
 
                    T4 = VSUB(T1, T3);
63
 
                    Tk = VADD(Tb, Td);
64
 
                    Te = VSUB(Tb, Td);
65
 
                    Tj = VADD(T6, T8);
66
 
                    T9 = VSUB(T6, T8);
67
 
                    {
68
 
                         V Tl, Tn, Tf, Th, Tm, Tg;
69
 
                         Tl = VADD(Tj, Tk);
70
 
                         Tn = VMUL(LDK(KP866025403), VSUB(Tj, Tk));
71
 
                         Tf = VADD(T9, Te);
72
 
                         Th = VMUL(LDK(KP866025403), VSUB(T9, Te));
73
 
                         ST(&(x[0]), VADD(Ti, Tl), ms, &(x[0]));
74
 
                         Tm = VFNMS(LDK(KP500000000), Tl, Ti);
75
 
                         ST(&(x[WS(rs, 3)]), VADD(T4, Tf), ms, &(x[WS(rs, 1)]));
76
 
                         Tg = VFNMS(LDK(KP500000000), Tf, T4);
77
 
                         ST(&(x[WS(rs, 4)]), VFMAI(Tn, Tm), ms, &(x[0]));
78
 
                         ST(&(x[WS(rs, 2)]), VFNMSI(Tn, Tm), ms, &(x[0]));
79
 
                         ST(&(x[WS(rs, 5)]), VFNMSI(Th, Tg), ms, &(x[WS(rs, 1)]));
80
 
                         ST(&(x[WS(rs, 1)]), VFMAI(Th, Tg), ms, &(x[WS(rs, 1)]));
81
 
                    }
82
 
               }
83
 
          }
84
 
     }
85
 
}
86
 
 
87
 
static const tw_instr twinstr[] = {
88
 
     VTW(0, 1),
89
 
     VTW(0, 2),
90
 
     VTW(0, 3),
91
 
     VTW(0, 4),
92
 
     VTW(0, 5),
93
 
     {TW_NEXT, VL, 0}
94
 
};
95
 
 
96
 
static const ct_desc desc = { 6, "t1bv_6", twinstr, &GENUS, {17, 12, 6, 0}, 0, 0, 0 };
97
 
 
98
 
void X(codelet_t1bv_6) (planner *p) {
99
 
     X(kdft_dit_register) (p, t1bv_6, &desc);
100
 
}
101
 
#else                           /* HAVE_FMA */
102
 
 
103
 
/* Generated by: ../../../genfft/gen_twiddle_c -simd -compact -variables 4 -pipeline-latency 8 -n 6 -name t1bv_6 -include t1b.h -sign 1 */
104
 
 
105
 
/*
106
 
 * This function contains 23 FP additions, 14 FP multiplications,
107
 
 * (or, 21 additions, 12 multiplications, 2 fused multiply/add),
108
 
 * 19 stack variables, 2 constants, and 12 memory accesses
109
 
 */
110
 
#include "t1b.h"
111
 
 
112
 
static void t1bv_6(R *ri, R *ii, const R *W, stride rs, INT mb, INT me, INT ms)
113
 
{
114
 
     DVK(KP500000000, +0.500000000000000000000000000000000000000000000);
115
 
     DVK(KP866025403, +0.866025403784438646763723170752936183471402627);
116
 
     INT m;
117
 
     R *x;
118
 
     x = ii;
119
 
     for (m = mb, W = W + (mb * ((TWVL / VL) * 10)); m < me; m = m + VL, x = x + (VL * ms), W = W + (TWVL * 10), MAKE_VOLATILE_STRIDE(rs)) {
120
 
          V Tf, Ti, Ta, Tk, T5, Tj, Tc, Te, Td;
121
 
          Tc = LD(&(x[0]), ms, &(x[0]));
122
 
          Td = LD(&(x[WS(rs, 3)]), ms, &(x[WS(rs, 1)]));
123
 
          Te = BYTW(&(W[TWVL * 4]), Td);
124
 
          Tf = VSUB(Tc, Te);
125
 
          Ti = VADD(Tc, Te);
126
 
          {
127
 
               V T7, T9, T6, T8;
128
 
               T6 = LD(&(x[WS(rs, 4)]), ms, &(x[0]));
129
 
               T7 = BYTW(&(W[TWVL * 6]), T6);
130
 
               T8 = LD(&(x[WS(rs, 1)]), ms, &(x[WS(rs, 1)]));
131
 
               T9 = BYTW(&(W[0]), T8);
132
 
               Ta = VSUB(T7, T9);
133
 
               Tk = VADD(T7, T9);
134
 
          }
135
 
          {
136
 
               V T2, T4, T1, T3;
137
 
               T1 = LD(&(x[WS(rs, 2)]), ms, &(x[0]));
138
 
               T2 = BYTW(&(W[TWVL * 2]), T1);
139
 
               T3 = LD(&(x[WS(rs, 5)]), ms, &(x[WS(rs, 1)]));
140
 
               T4 = BYTW(&(W[TWVL * 8]), T3);
141
 
               T5 = VSUB(T2, T4);
142
 
               Tj = VADD(T2, T4);
143
 
          }
144
 
          {
145
 
               V Tb, Tg, Th, Tn, Tl, Tm;
146
 
               Tb = VBYI(VMUL(LDK(KP866025403), VSUB(T5, Ta)));
147
 
               Tg = VADD(T5, Ta);
148
 
               Th = VFNMS(LDK(KP500000000), Tg, Tf);
149
 
               ST(&(x[WS(rs, 1)]), VADD(Tb, Th), ms, &(x[WS(rs, 1)]));
150
 
               ST(&(x[WS(rs, 3)]), VADD(Tf, Tg), ms, &(x[WS(rs, 1)]));
151
 
               ST(&(x[WS(rs, 5)]), VSUB(Th, Tb), ms, &(x[WS(rs, 1)]));
152
 
               Tn = VBYI(VMUL(LDK(KP866025403), VSUB(Tj, Tk)));
153
 
               Tl = VADD(Tj, Tk);
154
 
               Tm = VFNMS(LDK(KP500000000), Tl, Ti);
155
 
               ST(&(x[WS(rs, 2)]), VSUB(Tm, Tn), ms, &(x[0]));
156
 
               ST(&(x[0]), VADD(Ti, Tl), ms, &(x[0]));
157
 
               ST(&(x[WS(rs, 4)]), VADD(Tn, Tm), ms, &(x[0]));
158
 
          }
159
 
     }
160
 
}
161
 
 
162
 
static const tw_instr twinstr[] = {
163
 
     VTW(0, 1),
164
 
     VTW(0, 2),
165
 
     VTW(0, 3),
166
 
     VTW(0, 4),
167
 
     VTW(0, 5),
168
 
     {TW_NEXT, VL, 0}
169
 
};
170
 
 
171
 
static const ct_desc desc = { 6, "t1bv_6", twinstr, &GENUS, {21, 12, 2, 0}, 0, 0, 0 };
172
 
 
173
 
void X(codelet_t1bv_6) (planner *p) {
174
 
     X(kdft_dit_register) (p, t1bv_6, &desc);
175
 
}
176
 
#endif                          /* HAVE_FMA */