Update contrib.
3 * Josep Torra. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 //Portions Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
31 #include <liboil/liboilclasses.h>
32 #include <liboil/liboilfunction.h>
37 extern void vfp_add_f32 (float *d, const float *s1, const float *s2, int n);
38 extern void vfp_add_f64 (double *d, const double *s1, const double *s2, int n);
39 extern void vfp_divide_f32 (float *d, const float *s1, const float *s2, int n);
40 extern void vfp_divide_f64 (double *d, const double *s1, const double *s2, int n);
41 extern void vfp_multiply_f32 (float *d, const float *s1, const float *s2, int n);
42 extern void vfp_multiply_f64 (double *d, const double *s1, const double *s2, int n);
43 extern void vfp_subtract_f32 (float *d, const float *s1, const float *s2, int n);
44 extern void vfp_subtract_f64 (double *d, const double *s1, const double *s2, int n);
46 extern void vfp_scalaradd_f32_ns (float *d, const float *s1, const float *s2_1, int n);
47 extern void vfp_scalaradd_f64_ns (double *d, const double *s1, const double *s2_1, int n);
48 extern void vfp_scalarmultiply_f32_ns (float *d, const float *s1, const float *s2_1, int n);
49 extern void vfp_scalarmultiply_f64_ns (double *d, const double *s1, const double *s2_1, int n);
51 extern void vfp_abs_f32_f32_ns(float *d, const float *s, int n);
52 extern void vfp_abs_f64_f64_ns(double *d, const double *s, int n);
53 extern void vfp_negative_f32(float *d, const float *s, int n);
54 extern void vfp_negative_f64(double *d, const double *s, int n);
56 OIL_DEFINE_IMPL_FULL (vfp_add_f32, add_f32, OIL_IMPL_FLAG_VFP);
57 OIL_DEFINE_IMPL_FULL (vfp_add_f64, add_f64, OIL_IMPL_FLAG_VFP);
59 OIL_DEFINE_IMPL_FULL (vfp_divide_f32, divide_f32, OIL_IMPL_FLAG_VFP);
60 OIL_DEFINE_IMPL_FULL (vfp_divide_f64, divide_f64, OIL_IMPL_FLAG_VFP);
62 OIL_DEFINE_IMPL_FULL (vfp_multiply_f32, multiply_f32, OIL_IMPL_FLAG_VFP);
63 OIL_DEFINE_IMPL_FULL (vfp_multiply_f64, multiply_f64, OIL_IMPL_FLAG_VFP);
65 OIL_DEFINE_IMPL_FULL (vfp_subtract_f32, subtract_f32, OIL_IMPL_FLAG_VFP);
66 OIL_DEFINE_IMPL_FULL (vfp_subtract_f64, subtract_f64, OIL_IMPL_FLAG_VFP);
68 OIL_DEFINE_IMPL_FULL (vfp_scalaradd_f32_ns, scalaradd_f32_ns, OIL_IMPL_FLAG_VFP);
69 //OIL_DEFINE_IMPL_FULL (vfp_scalaradd_f64_ns, scalaradd_f64_ns, OIL_IMPL_FLAG_VFP);
71 OIL_DEFINE_IMPL_FULL (vfp_scalarmultiply_f32_ns, scalarmultiply_f32_ns, OIL_IMPL_FLAG_VFP);
72 OIL_DEFINE_IMPL_FULL (vfp_scalarmultiply_f64_ns, scalarmultiply_f64_ns, OIL_IMPL_FLAG_VFP);
74 //OIL_DEFINE_IMPL_FULL (vfp_abs_f32_f32_ns, abs_f32_f32_ns, OIL_IMPL_FLAG_VFP);
75 //OIL_DEFINE_IMPL_FULL (vfp_abs_f64_f64_ns, abs_f64_f64_ns, OIL_IMPL_FLAG_VFP);
77 OIL_DEFINE_IMPL_FULL (vfp_negative_f32, negative_f32, OIL_IMPL_FLAG_VFP);
78 //OIL_DEFINE_IMPL_FULL (vfp_negative_f64, negative_f64, OIL_IMPL_FLAG_VFP);
85 OilFunctionImpl* __oil_function_impl_vfp_add_f32() {
86 return &_oil_function_impl_vfp_add_f32;
92 OilFunctionImpl* __oil_function_impl_vfp_add_f64() {
93 return &_oil_function_impl_vfp_add_f64;
99 OilFunctionImpl* __oil_function_impl_vfp_divide_f32() {
100 return &_oil_function_impl_vfp_divide_f32;
106 OilFunctionImpl* __oil_function_impl_vfp_divide_f64() {
107 return &_oil_function_impl_vfp_divide_f64;
113 OilFunctionImpl* __oil_function_impl_vfp_multiply_f32() {
114 return &_oil_function_impl_vfp_multiply_f32;
120 OilFunctionImpl* __oil_function_impl_vfp_multiply_f64() {
121 return &_oil_function_impl_vfp_multiply_f64;
127 OilFunctionImpl* __oil_function_impl_vfp_subtract_f32() {
128 return &_oil_function_impl_vfp_subtract_f32;
134 OilFunctionImpl* __oil_function_impl_vfp_subtract_f64() {
135 return &_oil_function_impl_vfp_subtract_f64;
141 OilFunctionImpl* __oil_function_impl_vfp_scalaradd_f32_ns() {
142 return &_oil_function_impl_vfp_scalaradd_f32_ns;
149 OilFunctionImpl* __oil_function_impl_vfp_scalaradd_f64_ns() {
150 return &_oil_function_impl_vfp_scalaradd_f64_ns;
157 OilFunctionImpl* __oil_function_impl_vfp_scalarmultiply_f32_ns() {
158 return &_oil_function_impl_vfp_scalarmultiply_f32_ns;
164 OilFunctionImpl* __oil_function_impl_vfp_scalarmultiply_f64_ns() {
165 return &_oil_function_impl_vfp_scalarmultiply_f64_ns;
172 OilFunctionImpl* __oil_function_impl_vfp_abs_f32_f32_ns() {
173 return &_oil_function_impl_vfp_abs_f32_f32_ns;
179 OilFunctionImpl* __oil_function_impl_vfp_abs_f64_f64_ns() {
180 return &_oil_function_impl_vfp_abs_f64_f64_ns;
187 OilFunctionImpl* __oil_function_impl_vfp_negative_f32() {
188 return &_oil_function_impl_vfp_negative_f32;
195 OilFunctionImpl* __oil_function_impl_vfp_negative_f64() {
196 return &_oil_function_impl_vfp_negative_f64;