sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2007
|
sl@0
|
3 |
* Josep Torra. All rights reserved.
|
sl@0
|
4 |
*
|
sl@0
|
5 |
* Redistribution and use in source and binary forms, with or without
|
sl@0
|
6 |
* modification, are permitted provided that the following conditions
|
sl@0
|
7 |
* are met:
|
sl@0
|
8 |
* 1. Redistributions of source code must retain the above copyright
|
sl@0
|
9 |
* notice, this list of conditions and the following disclaimer.
|
sl@0
|
10 |
* 2. Redistributions in binary form must reproduce the above copyright
|
sl@0
|
11 |
* notice, this list of conditions and the following disclaimer in the
|
sl@0
|
12 |
* documentation and/or other materials provided with the distribution.
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
|
sl@0
|
15 |
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
sl@0
|
16 |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
sl@0
|
17 |
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
|
sl@0
|
18 |
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
sl@0
|
19 |
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
sl@0
|
20 |
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
sl@0
|
21 |
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
sl@0
|
22 |
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
sl@0
|
23 |
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
sl@0
|
24 |
* SUCH DAMAGE.
|
sl@0
|
25 |
*/
|
sl@0
|
26 |
//Portions Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
|
sl@0
|
27 |
|
sl@0
|
28 |
#ifdef HAVE_CONFIG_H
|
sl@0
|
29 |
#include "config.h"
|
sl@0
|
30 |
#endif
|
sl@0
|
31 |
#include <liboil/liboilclasses.h>
|
sl@0
|
32 |
#include <liboil/liboilfunction.h>
|
sl@0
|
33 |
|
sl@0
|
34 |
#if __VFP_FP__
|
sl@0
|
35 |
|
sl@0
|
36 |
#if __ARMCC__
|
sl@0
|
37 |
extern void vfp_add_f32 (float *d, const float *s1, const float *s2, int n);
|
sl@0
|
38 |
extern void vfp_add_f64 (double *d, const double *s1, const double *s2, int n);
|
sl@0
|
39 |
extern void vfp_divide_f32 (float *d, const float *s1, const float *s2, int n);
|
sl@0
|
40 |
extern void vfp_divide_f64 (double *d, const double *s1, const double *s2, int n);
|
sl@0
|
41 |
extern void vfp_multiply_f32 (float *d, const float *s1, const float *s2, int n);
|
sl@0
|
42 |
extern void vfp_multiply_f64 (double *d, const double *s1, const double *s2, int n);
|
sl@0
|
43 |
extern void vfp_subtract_f32 (float *d, const float *s1, const float *s2, int n);
|
sl@0
|
44 |
extern void vfp_subtract_f64 (double *d, const double *s1, const double *s2, int n);
|
sl@0
|
45 |
|
sl@0
|
46 |
extern void vfp_scalaradd_f32_ns (float *d, const float *s1, const float *s2_1, int n);
|
sl@0
|
47 |
extern void vfp_scalaradd_f64_ns (double *d, const double *s1, const double *s2_1, int n);
|
sl@0
|
48 |
extern void vfp_scalarmultiply_f32_ns (float *d, const float *s1, const float *s2_1, int n);
|
sl@0
|
49 |
extern void vfp_scalarmultiply_f64_ns (double *d, const double *s1, const double *s2_1, int n);
|
sl@0
|
50 |
|
sl@0
|
51 |
extern void vfp_abs_f32_f32_ns(float *d, const float *s, int n);
|
sl@0
|
52 |
extern void vfp_abs_f64_f64_ns(double *d, const double *s, int n);
|
sl@0
|
53 |
extern void vfp_negative_f32(float *d, const float *s, int n);
|
sl@0
|
54 |
extern void vfp_negative_f64(double *d, const double *s, int n);
|
sl@0
|
55 |
|
sl@0
|
56 |
OIL_DEFINE_IMPL_FULL (vfp_add_f32, add_f32, OIL_IMPL_FLAG_VFP);
|
sl@0
|
57 |
OIL_DEFINE_IMPL_FULL (vfp_add_f64, add_f64, OIL_IMPL_FLAG_VFP);
|
sl@0
|
58 |
|
sl@0
|
59 |
OIL_DEFINE_IMPL_FULL (vfp_divide_f32, divide_f32, OIL_IMPL_FLAG_VFP);
|
sl@0
|
60 |
OIL_DEFINE_IMPL_FULL (vfp_divide_f64, divide_f64, OIL_IMPL_FLAG_VFP);
|
sl@0
|
61 |
|
sl@0
|
62 |
OIL_DEFINE_IMPL_FULL (vfp_multiply_f32, multiply_f32, OIL_IMPL_FLAG_VFP);
|
sl@0
|
63 |
OIL_DEFINE_IMPL_FULL (vfp_multiply_f64, multiply_f64, OIL_IMPL_FLAG_VFP);
|
sl@0
|
64 |
|
sl@0
|
65 |
OIL_DEFINE_IMPL_FULL (vfp_subtract_f32, subtract_f32, OIL_IMPL_FLAG_VFP);
|
sl@0
|
66 |
OIL_DEFINE_IMPL_FULL (vfp_subtract_f64, subtract_f64, OIL_IMPL_FLAG_VFP);
|
sl@0
|
67 |
|
sl@0
|
68 |
OIL_DEFINE_IMPL_FULL (vfp_scalaradd_f32_ns, scalaradd_f32_ns, OIL_IMPL_FLAG_VFP);
|
sl@0
|
69 |
//OIL_DEFINE_IMPL_FULL (vfp_scalaradd_f64_ns, scalaradd_f64_ns, OIL_IMPL_FLAG_VFP);
|
sl@0
|
70 |
|
sl@0
|
71 |
OIL_DEFINE_IMPL_FULL (vfp_scalarmultiply_f32_ns, scalarmultiply_f32_ns, OIL_IMPL_FLAG_VFP);
|
sl@0
|
72 |
OIL_DEFINE_IMPL_FULL (vfp_scalarmultiply_f64_ns, scalarmultiply_f64_ns, OIL_IMPL_FLAG_VFP);
|
sl@0
|
73 |
|
sl@0
|
74 |
//OIL_DEFINE_IMPL_FULL (vfp_abs_f32_f32_ns, abs_f32_f32_ns, OIL_IMPL_FLAG_VFP);
|
sl@0
|
75 |
//OIL_DEFINE_IMPL_FULL (vfp_abs_f64_f64_ns, abs_f64_f64_ns, OIL_IMPL_FLAG_VFP);
|
sl@0
|
76 |
|
sl@0
|
77 |
OIL_DEFINE_IMPL_FULL (vfp_negative_f32, negative_f32, OIL_IMPL_FLAG_VFP);
|
sl@0
|
78 |
//OIL_DEFINE_IMPL_FULL (vfp_negative_f64, negative_f64, OIL_IMPL_FLAG_VFP);
|
sl@0
|
79 |
|
sl@0
|
80 |
|
sl@0
|
81 |
|
sl@0
|
82 |
|
sl@0
|
83 |
#ifdef __SYMBIAN32__
|
sl@0
|
84 |
|
sl@0
|
85 |
OilFunctionImpl* __oil_function_impl_vfp_add_f32() {
|
sl@0
|
86 |
return &_oil_function_impl_vfp_add_f32;
|
sl@0
|
87 |
}
|
sl@0
|
88 |
#endif
|
sl@0
|
89 |
|
sl@0
|
90 |
#ifdef __SYMBIAN32__
|
sl@0
|
91 |
|
sl@0
|
92 |
OilFunctionImpl* __oil_function_impl_vfp_add_f64() {
|
sl@0
|
93 |
return &_oil_function_impl_vfp_add_f64;
|
sl@0
|
94 |
}
|
sl@0
|
95 |
#endif
|
sl@0
|
96 |
|
sl@0
|
97 |
#ifdef __SYMBIAN32__
|
sl@0
|
98 |
|
sl@0
|
99 |
OilFunctionImpl* __oil_function_impl_vfp_divide_f32() {
|
sl@0
|
100 |
return &_oil_function_impl_vfp_divide_f32;
|
sl@0
|
101 |
}
|
sl@0
|
102 |
#endif
|
sl@0
|
103 |
|
sl@0
|
104 |
#ifdef __SYMBIAN32__
|
sl@0
|
105 |
|
sl@0
|
106 |
OilFunctionImpl* __oil_function_impl_vfp_divide_f64() {
|
sl@0
|
107 |
return &_oil_function_impl_vfp_divide_f64;
|
sl@0
|
108 |
}
|
sl@0
|
109 |
#endif
|
sl@0
|
110 |
|
sl@0
|
111 |
#ifdef __SYMBIAN32__
|
sl@0
|
112 |
|
sl@0
|
113 |
OilFunctionImpl* __oil_function_impl_vfp_multiply_f32() {
|
sl@0
|
114 |
return &_oil_function_impl_vfp_multiply_f32;
|
sl@0
|
115 |
}
|
sl@0
|
116 |
#endif
|
sl@0
|
117 |
|
sl@0
|
118 |
#ifdef __SYMBIAN32__
|
sl@0
|
119 |
|
sl@0
|
120 |
OilFunctionImpl* __oil_function_impl_vfp_multiply_f64() {
|
sl@0
|
121 |
return &_oil_function_impl_vfp_multiply_f64;
|
sl@0
|
122 |
}
|
sl@0
|
123 |
#endif
|
sl@0
|
124 |
|
sl@0
|
125 |
#ifdef __SYMBIAN32__
|
sl@0
|
126 |
|
sl@0
|
127 |
OilFunctionImpl* __oil_function_impl_vfp_subtract_f32() {
|
sl@0
|
128 |
return &_oil_function_impl_vfp_subtract_f32;
|
sl@0
|
129 |
}
|
sl@0
|
130 |
#endif
|
sl@0
|
131 |
|
sl@0
|
132 |
#ifdef __SYMBIAN32__
|
sl@0
|
133 |
|
sl@0
|
134 |
OilFunctionImpl* __oil_function_impl_vfp_subtract_f64() {
|
sl@0
|
135 |
return &_oil_function_impl_vfp_subtract_f64;
|
sl@0
|
136 |
}
|
sl@0
|
137 |
#endif
|
sl@0
|
138 |
|
sl@0
|
139 |
#ifdef __SYMBIAN32__
|
sl@0
|
140 |
|
sl@0
|
141 |
OilFunctionImpl* __oil_function_impl_vfp_scalaradd_f32_ns() {
|
sl@0
|
142 |
return &_oil_function_impl_vfp_scalaradd_f32_ns;
|
sl@0
|
143 |
}
|
sl@0
|
144 |
#endif
|
sl@0
|
145 |
|
sl@0
|
146 |
/*
|
sl@0
|
147 |
#ifdef __SYMBIAN32__
|
sl@0
|
148 |
|
sl@0
|
149 |
OilFunctionImpl* __oil_function_impl_vfp_scalaradd_f64_ns() {
|
sl@0
|
150 |
return &_oil_function_impl_vfp_scalaradd_f64_ns;
|
sl@0
|
151 |
}
|
sl@0
|
152 |
#endif
|
sl@0
|
153 |
*/
|
sl@0
|
154 |
|
sl@0
|
155 |
#ifdef __SYMBIAN32__
|
sl@0
|
156 |
|
sl@0
|
157 |
OilFunctionImpl* __oil_function_impl_vfp_scalarmultiply_f32_ns() {
|
sl@0
|
158 |
return &_oil_function_impl_vfp_scalarmultiply_f32_ns;
|
sl@0
|
159 |
}
|
sl@0
|
160 |
#endif
|
sl@0
|
161 |
|
sl@0
|
162 |
#ifdef __SYMBIAN32__
|
sl@0
|
163 |
|
sl@0
|
164 |
OilFunctionImpl* __oil_function_impl_vfp_scalarmultiply_f64_ns() {
|
sl@0
|
165 |
return &_oil_function_impl_vfp_scalarmultiply_f64_ns;
|
sl@0
|
166 |
}
|
sl@0
|
167 |
#endif
|
sl@0
|
168 |
|
sl@0
|
169 |
/*
|
sl@0
|
170 |
#ifdef __SYMBIAN32__
|
sl@0
|
171 |
|
sl@0
|
172 |
OilFunctionImpl* __oil_function_impl_vfp_abs_f32_f32_ns() {
|
sl@0
|
173 |
return &_oil_function_impl_vfp_abs_f32_f32_ns;
|
sl@0
|
174 |
}
|
sl@0
|
175 |
#endif
|
sl@0
|
176 |
|
sl@0
|
177 |
#ifdef __SYMBIAN32__
|
sl@0
|
178 |
|
sl@0
|
179 |
OilFunctionImpl* __oil_function_impl_vfp_abs_f64_f64_ns() {
|
sl@0
|
180 |
return &_oil_function_impl_vfp_abs_f64_f64_ns;
|
sl@0
|
181 |
}
|
sl@0
|
182 |
#endif
|
sl@0
|
183 |
*/
|
sl@0
|
184 |
|
sl@0
|
185 |
#ifdef __SYMBIAN32__
|
sl@0
|
186 |
|
sl@0
|
187 |
OilFunctionImpl* __oil_function_impl_vfp_negative_f32() {
|
sl@0
|
188 |
return &_oil_function_impl_vfp_negative_f32;
|
sl@0
|
189 |
}
|
sl@0
|
190 |
#endif
|
sl@0
|
191 |
|
sl@0
|
192 |
/*
|
sl@0
|
193 |
#ifdef __SYMBIAN32__
|
sl@0
|
194 |
|
sl@0
|
195 |
OilFunctionImpl* __oil_function_impl_vfp_negative_f64() {
|
sl@0
|
196 |
return &_oil_function_impl_vfp_negative_f64;
|
sl@0
|
197 |
}
|
sl@0
|
198 |
#endif
|
sl@0
|
199 |
*/
|
sl@0
|
200 |
#endif
|
sl@0
|
201 |
#endif
|