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

« back to all changes in this revision

Viewing changes to extern/fftw/dft/codelets/standard/t1_3.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 13:58:09 EDT 2006 */
 
23
 
 
24
#include "codelet-dft.h"
 
25
 
 
26
#ifdef HAVE_FMA
 
27
 
 
28
/* Generated by: ../../../genfft/gen_twiddle -fma -reorder-insns -schedule-for-pipeline -compact -variables 4 -pipeline-latency 4 -n 3 -name t1_3 -include t.h */
 
29
 
 
30
/*
 
31
 * This function contains 16 FP additions, 14 FP multiplications,
 
32
 * (or, 6 additions, 4 multiplications, 10 fused multiply/add),
 
33
 * 21 stack variables, and 12 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.ml,v 1.24 2006-02-12 23:34:12 athena Exp $
 
40
 */
 
41
 
 
42
#include "t.h"
 
43
 
 
44
static const R *t1_3(R *ri, R *ii, const R *W, stride ios, INT m, INT dist)
 
45
{
 
46
     DK(KP866025403, +0.866025403784438646763723170752936183471402627);
 
47
     DK(KP500000000, +0.500000000000000000000000000000000000000000000);
 
48
     INT i;
 
49
     for (i = m; i > 0; i = i - 1, ri = ri + dist, ii = ii + dist, W = W + 4, MAKE_VOLATILE_STRIDE(ios)) {
 
50
          E T1, Tm, T9, Tc, Tb, Th, T7, Ti, Ta, Tj, Td;
 
51
          T1 = ri[0];
 
52
          Tm = ii[0];
 
53
          {
 
54
               E T3, T6, T2, T5, Tg, T4, T8;
 
55
               T3 = ri[WS(ios, 1)];
 
56
               T6 = ii[WS(ios, 1)];
 
57
               T2 = W[0];
 
58
               T5 = W[1];
 
59
               T9 = ri[WS(ios, 2)];
 
60
               Tc = ii[WS(ios, 2)];
 
61
               Tg = T2 * T6;
 
62
               T4 = T2 * T3;
 
63
               T8 = W[2];
 
64
               Tb = W[3];
 
65
               Th = FNMS(T5, T3, Tg);
 
66
               T7 = FMA(T5, T6, T4);
 
67
               Ti = T8 * Tc;
 
68
               Ta = T8 * T9;
 
69
          }
 
70
          Tj = FNMS(Tb, T9, Ti);
 
71
          Td = FMA(Tb, Tc, Ta);
 
72
          {
 
73
               E Tk, Te, To, Tn, Tl, Tf;
 
74
               Tk = Th - Tj;
 
75
               Tl = Th + Tj;
 
76
               Te = T7 + Td;
 
77
               To = Td - T7;
 
78
               ii[0] = Tl + Tm;
 
79
               Tn = FNMS(KP500000000, Tl, Tm);
 
80
               ri[0] = T1 + Te;
 
81
               Tf = FNMS(KP500000000, Te, T1);
 
82
               ii[WS(ios, 1)] = FMA(KP866025403, To, Tn);
 
83
               ii[WS(ios, 2)] = FNMS(KP866025403, To, Tn);
 
84
               ri[WS(ios, 2)] = FNMS(KP866025403, Tk, Tf);
 
85
               ri[WS(ios, 1)] = FMA(KP866025403, Tk, Tf);
 
86
          }
 
87
     }
 
88
     return W;
 
89
}
 
90
 
 
91
static const tw_instr twinstr[] = {
 
92
     {TW_FULL, 0, 3},
 
93
     {TW_NEXT, 1, 0}
 
94
};
 
95
 
 
96
static const ct_desc desc = { 3, "t1_3", twinstr, &GENUS, {6, 4, 10, 0}, 0, 0, 0 };
 
97
 
 
98
void X(codelet_t1_3) (planner *p) {
 
99
     X(kdft_dit_register) (p, t1_3, &desc);
 
100
}
 
101
#else                           /* HAVE_FMA */
 
102
 
 
103
/* Generated by: ../../../genfft/gen_twiddle -compact -variables 4 -pipeline-latency 4 -n 3 -name t1_3 -include t.h */
 
104
 
 
105
/*
 
106
 * This function contains 16 FP additions, 12 FP multiplications,
 
107
 * (or, 10 additions, 6 multiplications, 6 fused multiply/add),
 
108
 * 15 stack variables, and 12 memory accesses
 
109
 */
 
110
/*
 
111
 * Generator Id's : 
 
112
 * $Id: algsimp.ml,v 1.9 2006-02-12 23:34:12 athena Exp $
 
113
 * $Id: fft.ml,v 1.4 2006-01-05 03:04:27 stevenj Exp $
 
114
 * $Id: gen_twiddle.ml,v 1.24 2006-02-12 23:34:12 athena Exp $
 
115
 */
 
116
 
 
117
#include "t.h"
 
118
 
 
119
static const R *t1_3(R *ri, R *ii, const R *W, stride ios, INT m, INT dist)
 
120
{
 
121
     DK(KP866025403, +0.866025403784438646763723170752936183471402627);
 
122
     DK(KP500000000, +0.500000000000000000000000000000000000000000000);
 
123
     INT i;
 
124
     for (i = m; i > 0; i = i - 1, ri = ri + dist, ii = ii + dist, W = W + 4, MAKE_VOLATILE_STRIDE(ios)) {
 
125
          E T1, Ti, T6, Te, Tb, Tf, Tc, Th;
 
126
          T1 = ri[0];
 
127
          Ti = ii[0];
 
128
          {
 
129
               E T3, T5, T2, T4;
 
130
               T3 = ri[WS(ios, 1)];
 
131
               T5 = ii[WS(ios, 1)];
 
132
               T2 = W[0];
 
133
               T4 = W[1];
 
134
               T6 = FMA(T2, T3, T4 * T5);
 
135
               Te = FNMS(T4, T3, T2 * T5);
 
136
          }
 
137
          {
 
138
               E T8, Ta, T7, T9;
 
139
               T8 = ri[WS(ios, 2)];
 
140
               Ta = ii[WS(ios, 2)];
 
141
               T7 = W[2];
 
142
               T9 = W[3];
 
143
               Tb = FMA(T7, T8, T9 * Ta);
 
144
               Tf = FNMS(T9, T8, T7 * Ta);
 
145
          }
 
146
          Tc = T6 + Tb;
 
147
          Th = Te + Tf;
 
148
          ri[0] = T1 + Tc;
 
149
          ii[0] = Th + Ti;
 
150
          {
 
151
               E Td, Tg, Tj, Tk;
 
152
               Td = FNMS(KP500000000, Tc, T1);
 
153
               Tg = KP866025403 * (Te - Tf);
 
154
               ri[WS(ios, 2)] = Td - Tg;
 
155
               ri[WS(ios, 1)] = Td + Tg;
 
156
               Tj = KP866025403 * (Tb - T6);
 
157
               Tk = FNMS(KP500000000, Th, Ti);
 
158
               ii[WS(ios, 1)] = Tj + Tk;
 
159
               ii[WS(ios, 2)] = Tk - Tj;
 
160
          }
 
161
     }
 
162
     return W;
 
163
}
 
164
 
 
165
static const tw_instr twinstr[] = {
 
166
     {TW_FULL, 0, 3},
 
167
     {TW_NEXT, 1, 0}
 
168
};
 
169
 
 
170
static const ct_desc desc = { 3, "t1_3", twinstr, &GENUS, {10, 6, 6, 0}, 0, 0, 0 };
 
171
 
 
172
void X(codelet_t1_3) (planner *p) {
 
173
     X(kdft_dit_register) (p, t1_3, &desc);
 
174
}
 
175
#endif                          /* HAVE_FMA */