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

« back to all changes in this revision

Viewing changes to extern/fftw/dft/simd/codelets/n1bv_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:27:07 EDT 2006 */
 
23
 
 
24
#include "codelet-dft.h"
 
25
 
 
26
#ifdef HAVE_FMA
 
27
 
 
28
/* Generated by: ../../../genfft/gen_notw_c -fma -reorder-insns -schedule-for-pipeline -simd -compact -variables 4 -pipeline-latency 8 -sign 1 -n 5 -name n1bv_5 -include n1b.h */
 
29
 
 
30
/*
 
31
 * This function contains 16 FP additions, 11 FP multiplications,
 
32
 * (or, 7 additions, 2 multiplications, 9 fused multiply/add),
 
33
 * 23 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_notw_c.ml,v 1.17 2006-02-12 23:34:12 athena Exp $
 
40
 */
 
41
 
 
42
#include "n1b.h"
 
43
 
 
44
static void n1bv_5(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs)
 
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
     const R *xi;
 
52
     R *xo;
 
53
     xi = ii;
 
54
     xo = io;
 
55
     for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(is), MAKE_VOLATILE_STRIDE(os)) {
 
56
          V T1, T2, T3, T5, T6;
 
57
          T1 = LD(&(xi[0]), ivs, &(xi[0]));
 
58
          T2 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)]));
 
59
          T3 = LD(&(xi[WS(is, 4)]), ivs, &(xi[0]));
 
60
          T5 = LD(&(xi[WS(is, 2)]), ivs, &(xi[0]));
 
61
          T6 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)]));
 
62
          {
 
63
               V Tc, T4, Td, T7;
 
64
               Tc = VSUB(T2, T3);
 
65
               T4 = VADD(T2, T3);
 
66
               Td = VSUB(T5, T6);
 
67
               T7 = VADD(T5, T6);
 
68
               {
 
69
                    V Tg, Te, Ta, T8, T9, Tf, Tb;
 
70
                    Tg = VMUL(LDK(KP951056516), VFNMS(LDK(KP618033988), Tc, Td));
 
71
                    Te = VMUL(LDK(KP951056516), VFMA(LDK(KP618033988), Td, Tc));
 
72
                    Ta = VSUB(T4, T7);
 
73
                    T8 = VADD(T4, T7);
 
74
                    T9 = VFNMS(LDK(KP250000000), T8, T1);
 
75
                    ST(&(xo[0]), VADD(T1, T8), ovs, &(xo[0]));
 
76
                    Tf = VFNMS(LDK(KP559016994), Ta, T9);
 
77
                    Tb = VFMA(LDK(KP559016994), Ta, T9);
 
78
                    ST(&(xo[WS(os, 2)]), VFNMSI(Tg, Tf), ovs, &(xo[0]));
 
79
                    ST(&(xo[WS(os, 3)]), VFMAI(Tg, Tf), ovs, &(xo[WS(os, 1)]));
 
80
                    ST(&(xo[WS(os, 4)]), VFNMSI(Te, Tb), ovs, &(xo[0]));
 
81
                    ST(&(xo[WS(os, 1)]), VFMAI(Te, Tb), ovs, &(xo[WS(os, 1)]));
 
82
               }
 
83
          }
 
84
     }
 
85
}
 
86
 
 
87
static const kdft_desc desc = { 5, "n1bv_5", {7, 2, 9, 0}, &GENUS, 0, 0, 0, 0 };
 
88
void X(codelet_n1bv_5) (planner *p) {
 
89
     X(kdft_register) (p, n1bv_5, &desc);
 
90
}
 
91
 
 
92
#else                           /* HAVE_FMA */
 
93
 
 
94
/* Generated by: ../../../genfft/gen_notw_c -simd -compact -variables 4 -pipeline-latency 8 -sign 1 -n 5 -name n1bv_5 -include n1b.h */
 
95
 
 
96
/*
 
97
 * This function contains 16 FP additions, 6 FP multiplications,
 
98
 * (or, 13 additions, 3 multiplications, 3 fused multiply/add),
 
99
 * 18 stack variables, and 10 memory accesses
 
100
 */
 
101
/*
 
102
 * Generator Id's : 
 
103
 * $Id: algsimp.ml,v 1.9 2006-02-12 23:34:12 athena Exp $
 
104
 * $Id: fft.ml,v 1.4 2006-01-05 03:04:27 stevenj Exp $
 
105
 * $Id: gen_notw_c.ml,v 1.17 2006-02-12 23:34:12 athena Exp $
 
106
 */
 
107
 
 
108
#include "n1b.h"
 
109
 
 
110
static void n1bv_5(const R *ri, const R *ii, R *ro, R *io, stride is, stride os, INT v, INT ivs, INT ovs)
 
111
{
 
112
     DVK(KP250000000, +0.250000000000000000000000000000000000000000000);
 
113
     DVK(KP587785252, +0.587785252292473129168705954639072768597652438);
 
114
     DVK(KP951056516, +0.951056516295153572116439333379382143405698634);
 
115
     DVK(KP559016994, +0.559016994374947424102293417182819058860154590);
 
116
     INT i;
 
117
     const R *xi;
 
118
     R *xo;
 
119
     xi = ii;
 
120
     xo = io;
 
121
     for (i = v; i > 0; i = i - VL, xi = xi + (VL * ivs), xo = xo + (VL * ovs), MAKE_VOLATILE_STRIDE(is), MAKE_VOLATILE_STRIDE(os)) {
 
122
          V Tb, T3, Tc, T6, Ta;
 
123
          Tb = LD(&(xi[0]), ivs, &(xi[0]));
 
124
          {
 
125
               V T1, T2, T8, T4, T5, T9;
 
126
               T1 = LD(&(xi[WS(is, 1)]), ivs, &(xi[WS(is, 1)]));
 
127
               T2 = LD(&(xi[WS(is, 4)]), ivs, &(xi[0]));
 
128
               T8 = VADD(T1, T2);
 
129
               T4 = LD(&(xi[WS(is, 2)]), ivs, &(xi[0]));
 
130
               T5 = LD(&(xi[WS(is, 3)]), ivs, &(xi[WS(is, 1)]));
 
131
               T9 = VADD(T4, T5);
 
132
               T3 = VSUB(T1, T2);
 
133
               Tc = VADD(T8, T9);
 
134
               T6 = VSUB(T4, T5);
 
135
               Ta = VMUL(LDK(KP559016994), VSUB(T8, T9));
 
136
          }
 
137
          ST(&(xo[0]), VADD(Tb, Tc), ovs, &(xo[0]));
 
138
          {
 
139
               V T7, Tf, Te, Tg, Td;
 
140
               T7 = VBYI(VFMA(LDK(KP951056516), T3, VMUL(LDK(KP587785252), T6)));
 
141
               Tf = VBYI(VFNMS(LDK(KP951056516), T6, VMUL(LDK(KP587785252), T3)));
 
142
               Td = VFNMS(LDK(KP250000000), Tc, Tb);
 
143
               Te = VADD(Ta, Td);
 
144
               Tg = VSUB(Td, Ta);
 
145
               ST(&(xo[WS(os, 1)]), VADD(T7, Te), ovs, &(xo[WS(os, 1)]));
 
146
               ST(&(xo[WS(os, 3)]), VSUB(Tg, Tf), ovs, &(xo[WS(os, 1)]));
 
147
               ST(&(xo[WS(os, 4)]), VSUB(Te, T7), ovs, &(xo[0]));
 
148
               ST(&(xo[WS(os, 2)]), VADD(Tf, Tg), ovs, &(xo[0]));
 
149
          }
 
150
     }
 
151
}
 
152
 
 
153
static const kdft_desc desc = { 5, "n1bv_5", {13, 3, 3, 0}, &GENUS, 0, 0, 0, 0 };
 
154
void X(codelet_n1bv_5) (planner *p) {
 
155
     X(kdft_register) (p, n1bv_5, &desc);
 
156
}
 
157
 
 
158
#endif                          /* HAVE_FMA */