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

« back to all changes in this revision

Viewing changes to extern/fftw/rdft/codelets/r2hc/hf2_4.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 Sun Jul  2 15:59:17 EDT 2006 */
 
23
 
 
24
#include "codelet-rdft.h"
 
25
 
 
26
#ifdef HAVE_FMA
 
27
 
 
28
/* Generated by: ../../../genfft/gen_hc2hc -fma -reorder-insns -schedule-for-pipeline -compact -variables 4 -pipeline-latency 4 -twiddle-log3 -precompute-twiddles -n 4 -dit -name hf2_4 -include hf.h */
 
29
 
 
30
/*
 
31
 * This function contains 24 FP additions, 16 FP multiplications,
 
32
 * (or, 16 additions, 8 multiplications, 8 fused multiply/add),
 
33
 * 29 stack variables, and 16 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_hc2hc.ml,v 1.16 2006-02-12 23:34:12 athena Exp $
 
40
 */
 
41
 
 
42
#include "hf.h"
 
43
 
 
44
static const R *hf2_4(R *rio, R *iio, const R *W, stride ios, INT m, INT dist)
 
45
{
 
46
     INT i;
 
47
     for (i = m - 2; i > 0; i = i - 2, rio = rio + dist, iio = iio - dist, W = W + 4, MAKE_VOLATILE_STRIDE(ios)) {
 
48
          E TA, Tz;
 
49
          {
 
50
               E T2, T6, T3, T5;
 
51
               T2 = W[0];
 
52
               T6 = W[3];
 
53
               T3 = W[2];
 
54
               T5 = W[1];
 
55
               {
 
56
                    E T1, Tx, Tm, Ts, Tf, Th, Td, Tg, Tp, Tw;
 
57
                    {
 
58
                         E Tj, Tl, Tb, T7, Tk, Tr, Ta, T4;
 
59
                         T1 = rio[0];
 
60
                         Ta = T2 * T6;
 
61
                         T4 = T2 * T3;
 
62
                         Tj = rio[WS(ios, 3)];
 
63
                         Tl = iio[0];
 
64
                         Tb = FNMS(T5, T3, Ta);
 
65
                         T7 = FMA(T5, T6, T4);
 
66
                         Tk = T3 * Tj;
 
67
                         Tr = T3 * Tl;
 
68
                         Tx = iio[-WS(ios, 3)];
 
69
                         {
 
70
                              E T8, Tc, T9, Tv;
 
71
                              T8 = rio[WS(ios, 2)];
 
72
                              Tm = FMA(T6, Tl, Tk);
 
73
                              Ts = FNMS(T6, Tj, Tr);
 
74
                              Tc = iio[-WS(ios, 1)];
 
75
                              T9 = T7 * T8;
 
76
                              Tf = rio[WS(ios, 1)];
 
77
                              Th = iio[-WS(ios, 2)];
 
78
                              Tv = T7 * Tc;
 
79
                              Td = FMA(Tb, Tc, T9);
 
80
                              Tg = T2 * Tf;
 
81
                              Tp = T2 * Th;
 
82
                              Tw = FNMS(Tb, T8, Tv);
 
83
                         }
 
84
                    }
 
85
                    {
 
86
                         E To, Te, Ti, Tq, Ty, Tn, Tt, Tu;
 
87
                         To = T1 - Td;
 
88
                         Te = T1 + Td;
 
89
                         Ti = FMA(T5, Th, Tg);
 
90
                         Tq = FNMS(T5, Tf, Tp);
 
91
                         Ty = Tw + Tx;
 
92
                         TA = Tx - Tw;
 
93
                         Tn = Ti + Tm;
 
94
                         Tz = Tm - Ti;
 
95
                         Tt = Tq - Ts;
 
96
                         Tu = Tq + Ts;
 
97
                         rio[0] = Te + Tn;
 
98
                         iio[-WS(ios, 2)] = Te - Tn;
 
99
                         iio[0] = Tu + Ty;
 
100
                         rio[WS(ios, 2)] = Tu - Ty;
 
101
                         rio[WS(ios, 1)] = To + Tt;
 
102
                         iio[-WS(ios, 3)] = To - Tt;
 
103
                    }
 
104
               }
 
105
          }
 
106
          iio[-WS(ios, 1)] = Tz + TA;
 
107
          rio[WS(ios, 3)] = Tz - TA;
 
108
     }
 
109
     return W;
 
110
}
 
111
 
 
112
static const tw_instr twinstr[] = {
 
113
     {TW_CEXP, 0, 1},
 
114
     {TW_CEXP, 0, 3},
 
115
     {TW_NEXT, 1, 0}
 
116
};
 
117
 
 
118
static const hc2hc_desc desc = { 4, "hf2_4", twinstr, &GENUS, {16, 8, 8, 0}, 0, 0, 0 };
 
119
 
 
120
void X(codelet_hf2_4) (planner *p) {
 
121
     X(khc2hc_register) (p, hf2_4, &desc);
 
122
}
 
123
#else                           /* HAVE_FMA */
 
124
 
 
125
/* Generated by: ../../../genfft/gen_hc2hc -compact -variables 4 -pipeline-latency 4 -twiddle-log3 -precompute-twiddles -n 4 -dit -name hf2_4 -include hf.h */
 
126
 
 
127
/*
 
128
 * This function contains 24 FP additions, 16 FP multiplications,
 
129
 * (or, 16 additions, 8 multiplications, 8 fused multiply/add),
 
130
 * 21 stack variables, and 16 memory accesses
 
131
 */
 
132
/*
 
133
 * Generator Id's : 
 
134
 * $Id: algsimp.ml,v 1.9 2006-02-12 23:34:12 athena Exp $
 
135
 * $Id: fft.ml,v 1.4 2006-01-05 03:04:27 stevenj Exp $
 
136
 * $Id: gen_hc2hc.ml,v 1.16 2006-02-12 23:34:12 athena Exp $
 
137
 */
 
138
 
 
139
#include "hf.h"
 
140
 
 
141
static const R *hf2_4(R *rio, R *iio, const R *W, stride ios, INT m, INT dist)
 
142
{
 
143
     INT i;
 
144
     for (i = m - 2; i > 0; i = i - 2, rio = rio + dist, iio = iio - dist, W = W + 4, MAKE_VOLATILE_STRIDE(ios)) {
 
145
          E T2, T4, T3, T5, T6, T8;
 
146
          T2 = W[0];
 
147
          T4 = W[1];
 
148
          T3 = W[2];
 
149
          T5 = W[3];
 
150
          T6 = FMA(T2, T3, T4 * T5);
 
151
          T8 = FNMS(T4, T3, T2 * T5);
 
152
          {
 
153
               E T1, Th, Tl, Tp, Ta, To, Te, Tk, Tf, Tg;
 
154
               T1 = rio[0];
 
155
               Tf = rio[WS(ios, 3)];
 
156
               Tg = iio[0];
 
157
               Th = FMA(T3, Tf, T5 * Tg);
 
158
               Tl = FNMS(T5, Tf, T3 * Tg);
 
159
               Tp = iio[-WS(ios, 3)];
 
160
               {
 
161
                    E T7, T9, Tc, Td;
 
162
                    T7 = rio[WS(ios, 2)];
 
163
                    T9 = iio[-WS(ios, 1)];
 
164
                    Ta = FMA(T6, T7, T8 * T9);
 
165
                    To = FNMS(T8, T7, T6 * T9);
 
166
                    Tc = rio[WS(ios, 1)];
 
167
                    Td = iio[-WS(ios, 2)];
 
168
                    Te = FMA(T2, Tc, T4 * Td);
 
169
                    Tk = FNMS(T4, Tc, T2 * Td);
 
170
               }
 
171
               {
 
172
                    E Tb, Ti, Tn, Tq;
 
173
                    Tb = T1 + Ta;
 
174
                    Ti = Te + Th;
 
175
                    iio[-WS(ios, 2)] = Tb - Ti;
 
176
                    rio[0] = Tb + Ti;
 
177
                    Tn = Tk + Tl;
 
178
                    Tq = To + Tp;
 
179
                    rio[WS(ios, 2)] = Tn - Tq;
 
180
                    iio[0] = Tn + Tq;
 
181
               }
 
182
               {
 
183
                    E Tj, Tm, Tr, Ts;
 
184
                    Tj = T1 - Ta;
 
185
                    Tm = Tk - Tl;
 
186
                    iio[-WS(ios, 3)] = Tj - Tm;
 
187
                    rio[WS(ios, 1)] = Tj + Tm;
 
188
                    Tr = Th - Te;
 
189
                    Ts = Tp - To;
 
190
                    rio[WS(ios, 3)] = Tr - Ts;
 
191
                    iio[-WS(ios, 1)] = Tr + Ts;
 
192
               }
 
193
          }
 
194
     }
 
195
     return W;
 
196
}
 
197
 
 
198
static const tw_instr twinstr[] = {
 
199
     {TW_CEXP, 0, 1},
 
200
     {TW_CEXP, 0, 3},
 
201
     {TW_NEXT, 1, 0}
 
202
};
 
203
 
 
204
static const hc2hc_desc desc = { 4, "hf2_4", twinstr, &GENUS, {16, 8, 8, 0}, 0, 0, 0 };
 
205
 
 
206
void X(codelet_hf2_4) (planner *p) {
 
207
     X(khc2hc_register) (p, hf2_4, &desc);
 
208
}
 
209
#endif                          /* HAVE_FMA */