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

« back to all changes in this revision

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