~ubuntu-branches/ubuntu/maverick/blender/maverick

« back to all changes in this revision

Viewing changes to extern/fftw/dft/simd/codelets/t1fv_5.c

  • Committer: Bazaar Package Importer
  • Author(s): Khashayar Naderehvandi, Khashayar Naderehvandi, Alessio Treglia
  • Date: 2009-01-22 16:53:59 UTC
  • mfrom: (14.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20090122165359-v0996tn7fbit64ni
Tags: 2.48a+dfsg-1ubuntu1
[ Khashayar Naderehvandi ]
* Merge from debian experimental (LP: #320045), Ubuntu remaining changes:
  - Add patch correcting header file locations.
  - Add libvorbis-dev and libgsm1-dev to Build-Depends.
  - Use avcodec_decode_audio2() in source/blender/src/hddaudio.c

[ Alessio Treglia ]
* Add missing previous changelog entries.

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 Sat Jul  1 14:45:52 EDT 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 5 -name t1fv_5 -include t1f.h */
 
29
 
 
30
/*
 
31
 * This function contains 20 FP additions, 19 FP multiplications,
 
32
 * (or, 11 additions, 10 multiplications, 9 fused multiply/add),
 
33
 * 26 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_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_5(R *ri, R *ii, const R *W, stride ios, INT m, INT dist)
 
45
{
 
46
     DVK(KP559016994, +0.559016994374947424102293417182819058860154590);
 
47
     DVK(KP250000000, +0.250000000000000000000000000000000000000000000);
 
48
     DVK(KP618033988, +0.618033988749894848204586834365638117720309180);
 
49
     DVK(KP951056516, +0.951056516295153572116439333379382143405698634);
 
50
     INT i;
 
51
     R *x;
 
52
     x = ri;
 
53
     for (i = m; i > 0; i = i - VL, x = x + (VL * dist), W = W + (TWVL * 8), MAKE_VOLATILE_STRIDE(ios)) {
 
54
          V T1, T2, T9, T4, T7;
 
55
          T1 = LD(&(x[0]), dist, &(x[0]));
 
56
          T2 = LD(&(x[WS(ios, 1)]), dist, &(x[WS(ios, 1)]));
 
57
          T9 = LD(&(x[WS(ios, 3)]), dist, &(x[WS(ios, 1)]));
 
58
          T4 = LD(&(x[WS(ios, 4)]), dist, &(x[0]));
 
59
          T7 = LD(&(x[WS(ios, 2)]), dist, &(x[0]));
 
60
          {
 
61
               V T3, Ta, T5, T8;
 
62
               T3 = BYTWJ(&(W[0]), T2);
 
63
               Ta = BYTWJ(&(W[TWVL * 4]), T9);
 
64
               T5 = BYTWJ(&(W[TWVL * 6]), T4);
 
65
               T8 = BYTWJ(&(W[TWVL * 2]), T7);
 
66
               {
 
67
                    V T6, Tg, Tb, Th;
 
68
                    T6 = VADD(T3, T5);
 
69
                    Tg = VSUB(T3, T5);
 
70
                    Tb = VADD(T8, Ta);
 
71
                    Th = VSUB(T8, Ta);
 
72
                    {
 
73
                         V Te, Tc, Tk, Ti, Td, Tj, Tf;
 
74
                         Te = VSUB(T6, Tb);
 
75
                         Tc = VADD(T6, Tb);
 
76
                         Tk = VMUL(LDK(KP951056516), VFNMS(LDK(KP618033988), Tg, Th));
 
77
                         Ti = VMUL(LDK(KP951056516), VFMA(LDK(KP618033988), Th, Tg));
 
78
                         Td = VFNMS(LDK(KP250000000), Tc, T1);
 
79
                         ST(&(x[0]), VADD(T1, Tc), dist, &(x[0]));
 
80
                         Tj = VFNMS(LDK(KP559016994), Te, Td);
 
81
                         Tf = VFMA(LDK(KP559016994), Te, Td);
 
82
                         ST(&(x[WS(ios, 2)]), VFMAI(Tk, Tj), dist, &(x[0]));
 
83
                         ST(&(x[WS(ios, 3)]), VFNMSI(Tk, Tj), dist, &(x[WS(ios, 1)]));
 
84
                         ST(&(x[WS(ios, 4)]), VFMAI(Ti, Tf), dist, &(x[0]));
 
85
                         ST(&(x[WS(ios, 1)]), VFNMSI(Ti, Tf), dist, &(x[WS(ios, 1)]));
 
86
                    }
 
87
               }
 
88
          }
 
89
     }
 
90
     return W;
 
91
}
 
92
 
 
93
static const tw_instr twinstr[] = {
 
94
     VTW(1),
 
95
     VTW(2),
 
96
     VTW(3),
 
97
     VTW(4),
 
98
     {TW_NEXT, VL, 0}
 
99
};
 
100
 
 
101
static const ct_desc desc = { 5, "t1fv_5", twinstr, &GENUS, {11, 10, 9, 0}, 0, 0, 0 };
 
102
 
 
103
void X(codelet_t1fv_5) (planner *p) {
 
104
     X(kdft_dit_register) (p, t1fv_5, &desc);
 
105
}
 
106
#else                           /* HAVE_FMA */
 
107
 
 
108
/* Generated by: ../../../genfft/gen_twiddle_c -simd -compact -variables 4 -pipeline-latency 8 -n 5 -name t1fv_5 -include t1f.h */
 
109
 
 
110
/*
 
111
 * This function contains 20 FP additions, 14 FP multiplications,
 
112
 * (or, 17 additions, 11 multiplications, 3 fused multiply/add),
 
113
 * 20 stack variables, and 10 memory accesses
 
114
 */
 
115
/*
 
116
 * Generator Id's : 
 
117
 * $Id: algsimp.ml,v 1.9 2006-02-12 23:34:12 athena Exp $
 
118
 * $Id: fft.ml,v 1.4 2006-01-05 03:04:27 stevenj Exp $
 
119
 * $Id: gen_twiddle_c.ml,v 1.14 2006-02-12 23:34:12 athena Exp $
 
120
 */
 
121
 
 
122
#include "t1f.h"
 
123
 
 
124
static const R *t1fv_5(R *ri, R *ii, const R *W, stride ios, INT m, INT dist)
 
125
{
 
126
     DVK(KP250000000, +0.250000000000000000000000000000000000000000000);
 
127
     DVK(KP559016994, +0.559016994374947424102293417182819058860154590);
 
128
     DVK(KP587785252, +0.587785252292473129168705954639072768597652438);
 
129
     DVK(KP951056516, +0.951056516295153572116439333379382143405698634);
 
130
     INT i;
 
131
     R *x;
 
132
     x = ri;
 
133
     for (i = m; i > 0; i = i - VL, x = x + (VL * dist), W = W + (TWVL * 8), MAKE_VOLATILE_STRIDE(ios)) {
 
134
          V Tc, Tg, Th, T5, Ta, Td;
 
135
          Tc = LD(&(x[0]), dist, &(x[0]));
 
136
          {
 
137
               V T2, T9, T4, T7;
 
138
               {
 
139
                    V T1, T8, T3, T6;
 
140
                    T1 = LD(&(x[WS(ios, 1)]), dist, &(x[WS(ios, 1)]));
 
141
                    T2 = BYTWJ(&(W[0]), T1);
 
142
                    T8 = LD(&(x[WS(ios, 3)]), dist, &(x[WS(ios, 1)]));
 
143
                    T9 = BYTWJ(&(W[TWVL * 4]), T8);
 
144
                    T3 = LD(&(x[WS(ios, 4)]), dist, &(x[0]));
 
145
                    T4 = BYTWJ(&(W[TWVL * 6]), T3);
 
146
                    T6 = LD(&(x[WS(ios, 2)]), dist, &(x[0]));
 
147
                    T7 = BYTWJ(&(W[TWVL * 2]), T6);
 
148
               }
 
149
               Tg = VSUB(T2, T4);
 
150
               Th = VSUB(T7, T9);
 
151
               T5 = VADD(T2, T4);
 
152
               Ta = VADD(T7, T9);
 
153
               Td = VADD(T5, Ta);
 
154
          }
 
155
          ST(&(x[0]), VADD(Tc, Td), dist, &(x[0]));
 
156
          {
 
157
               V Ti, Tj, Tf, Tk, Tb, Te;
 
158
               Ti = VBYI(VFMA(LDK(KP951056516), Tg, VMUL(LDK(KP587785252), Th)));
 
159
               Tj = VBYI(VFNMS(LDK(KP587785252), Tg, VMUL(LDK(KP951056516), Th)));
 
160
               Tb = VMUL(LDK(KP559016994), VSUB(T5, Ta));
 
161
               Te = VFNMS(LDK(KP250000000), Td, Tc);
 
162
               Tf = VADD(Tb, Te);
 
163
               Tk = VSUB(Te, Tb);
 
164
               ST(&(x[WS(ios, 1)]), VSUB(Tf, Ti), dist, &(x[WS(ios, 1)]));
 
165
               ST(&(x[WS(ios, 3)]), VSUB(Tk, Tj), dist, &(x[WS(ios, 1)]));
 
166
               ST(&(x[WS(ios, 4)]), VADD(Ti, Tf), dist, &(x[0]));
 
167
               ST(&(x[WS(ios, 2)]), VADD(Tj, Tk), dist, &(x[0]));
 
168
          }
 
169
     }
 
170
     return W;
 
171
}
 
172
 
 
173
static const tw_instr twinstr[] = {
 
174
     VTW(1),
 
175
     VTW(2),
 
176
     VTW(3),
 
177
     VTW(4),
 
178
     {TW_NEXT, VL, 0}
 
179
};
 
180
 
 
181
static const ct_desc desc = { 5, "t1fv_5", twinstr, &GENUS, {17, 11, 3, 0}, 0, 0, 0 };
 
182
 
 
183
void X(codelet_t1fv_5) (planner *p) {
 
184
     X(kdft_dit_register) (p, t1fv_5, &desc);
 
185
}
 
186
#endif                          /* HAVE_FMA */