1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericopenlibs/liboil/src/deprecated/scalaradd_c_dep.c Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,316 @@
1.4 +/*
1.5 + * LIBOIL - Library of Optimized Inner Loops
1.6 + * Copyright (c) 2003,2004 David A. Schleef <ds@schleef.org>
1.7 + * All rights reserved.
1.8 + *
1.9 + * Redistribution and use in source and binary forms, with or without
1.10 + * modification, are permitted provided that the following conditions
1.11 + * are met:
1.12 + * 1. Redistributions of source code must retain the above copyright
1.13 + * notice, this list of conditions and the following disclaimer.
1.14 + * 2. Redistributions in binary form must reproduce the above copyright
1.15 + * notice, this list of conditions and the following disclaimer in the
1.16 + * documentation and/or other materials provided with the distribution.
1.17 + *
1.18 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1.19 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1.20 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1.21 + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
1.22 + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
1.23 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1.24 + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1.25 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
1.26 + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
1.27 + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1.28 + * POSSIBILITY OF SUCH DAMAGE.
1.29 + */
1.30 +//Portions Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
1.31 +
1.32 +#ifdef HAVE_CONFIG_H
1.33 +#include "config.h"
1.34 +#endif
1.35 +
1.36 +#include <liboil/liboilfunction.h>
1.37 +#include "liboil/simdpack/simdpack.h"
1.38 +
1.39 +#ifdef __SYMBIAN32__
1.40 +#ifdef __WINSCW__
1.41 +#pragma warn_emptydecl off
1.42 +#endif//__WINSCW__
1.43 +#endif//__SYMBIAN32__
1.44 +
1.45 +#define SCALARADD_DEFINE_REF(type) \
1.46 +static void scalaradd_ ## type ## _ref( \
1.47 + oil_type_ ## type *dest, int dstr, \
1.48 + oil_type_ ## type *src, int sstr, \
1.49 + oil_type_ ## type *val, int n) \
1.50 +{ \
1.51 + int i; \
1.52 + for(i=0;i<n;i++){ \
1.53 + OIL_GET(dest,dstr*i, oil_type_ ## type) = \
1.54 + OIL_GET(src,sstr*i, oil_type_ ## type) + *val; \
1.55 + } \
1.56 +} \
1.57 +OIL_DEFINE_CLASS (scalaradd_ ## type, \
1.58 + "oil_type_" #type " *d, int dstr, " \
1.59 + "oil_type_" #type " *s1, int sstr, " \
1.60 + "oil_type_" #type " *s2_1 int n"); \
1.61 +OIL_DEFINE_IMPL_REF (scalaradd_ ## type ## _ref, scalaradd_ ## type);
1.62 +
1.63 +
1.64 +/**
1.65 + * oil_scalaradd_s8:
1.66 + * @d:
1.67 + * @dstr:
1.68 + * @s1:
1.69 + * @sstr:
1.70 + * @s2_1:
1.71 + * @n:
1.72 + *
1.73 + * Adds the constant value @s2_1 to each value in @s1 and places the
1.74 + * result in @d.
1.75 + *
1.76 + * FIXME: This function is difficult to optimize and will likely be
1.77 + * replaced.
1.78 + */
1.79 +SCALARADD_DEFINE_REF (s8);
1.80 +/**
1.81 + * oil_scalaradd_u8:
1.82 + * @d:
1.83 + * @dstr:
1.84 + * @s1:
1.85 + * @sstr:
1.86 + * @s2_1:
1.87 + * @n:
1.88 + *
1.89 + * Adds the constant value @s2_1 to each value in @s1 and places the
1.90 + * result in @d.
1.91 + *
1.92 + * FIXME: This function is difficult to optimize and will likely be
1.93 + * replaced.
1.94 + */
1.95 +SCALARADD_DEFINE_REF (u8);
1.96 +/**
1.97 + * oil_scalaradd_s16:
1.98 + * @d:
1.99 + * @dstr:
1.100 + * @s1:
1.101 + * @sstr:
1.102 + * @s2_1:
1.103 + * @n:
1.104 + *
1.105 + * Adds the constant value @s2_1 to each value in @s1 and places the
1.106 + * result in @d.
1.107 + *
1.108 + * FIXME: This function is difficult to optimize and will likely be
1.109 + * replaced.
1.110 + */
1.111 +SCALARADD_DEFINE_REF (s16);
1.112 +/**
1.113 + * oil_scalaradd_u16:
1.114 + * @d:
1.115 + * @dstr:
1.116 + * @s1:
1.117 + * @sstr:
1.118 + * @s2_1:
1.119 + * @n:
1.120 + *
1.121 + * Adds the constant value @s2_1 to each value in @s1 and places the
1.122 + * result in @d.
1.123 + *
1.124 + * FIXME: This function is difficult to optimize and will likely be
1.125 + * replaced.
1.126 + */
1.127 +SCALARADD_DEFINE_REF (u16);
1.128 +/**
1.129 + * oil_scalaradd_s32:
1.130 + * @d:
1.131 + * @dstr:
1.132 + * @s1:
1.133 + * @sstr:
1.134 + * @s2_1:
1.135 + * @n:
1.136 + *
1.137 + * Adds the constant value @s2_1 to each value in @s1 and places the
1.138 + * result in @d.
1.139 + *
1.140 + * FIXME: This function is difficult to optimize and will likely be
1.141 + * replaced.
1.142 + */
1.143 +SCALARADD_DEFINE_REF (s32);
1.144 +/**
1.145 + * oil_scalaradd_u32:
1.146 + * @d:
1.147 + * @dstr:
1.148 + * @s1:
1.149 + * @sstr:
1.150 + * @s2_1:
1.151 + * @n:
1.152 + *
1.153 + * Adds the constant value @s2_1 to each value in @s1 and places the
1.154 + * result in @d.
1.155 + *
1.156 + * FIXME: This function is difficult to optimize and will likely be
1.157 + * replaced.
1.158 + */
1.159 +SCALARADD_DEFINE_REF (u32);
1.160 +/**
1.161 + * oil_scalaradd_f32:
1.162 + * @d:
1.163 + * @dstr:
1.164 + * @s1:
1.165 + * @sstr:
1.166 + * @s2_1:
1.167 + * @n:
1.168 + *
1.169 + * Adds the constant value @s2_1 to each value in @s1 and places the
1.170 + * result in @d.
1.171 + *
1.172 + * FIXME: This function is difficult to optimize and will likely be
1.173 + * replaced.
1.174 + */
1.175 +SCALARADD_DEFINE_REF (f32);
1.176 +/**
1.177 + * oil_scalaradd_f64:
1.178 + * @d:
1.179 + * @dstr:
1.180 + * @s1:
1.181 + * @sstr:
1.182 + * @s2_1:
1.183 + * @n:
1.184 + *
1.185 + * Adds the constant value @s2_1 to each value in @s1 and places the
1.186 + * result in @d.
1.187 + *
1.188 + * FIXME: This function is difficult to optimize and will likely be
1.189 + * replaced.
1.190 + */
1.191 +SCALARADD_DEFINE_REF (f64);
1.192 +#ifdef __SYMBIAN32__
1.193 +
1.194 +OilFunctionClass* __oil_function_class_scalaradd_f32()
1.195 +{
1.196 +return &_oil_function_class_scalaradd_f32;
1.197 +}
1.198 +#endif
1.199 +/*
1.200 +OilFunctionClass* __oil_function_class_scalaradd_f32_ns()
1.201 +{
1.202 +return &_oil_function_class_scalaradd_f32_ns;
1.203 +}
1.204 +*/
1.205 +
1.206 +#ifdef __SYMBIAN32__
1.207 +
1.208 +#endif
1.209 +OilFunctionClass* __oil_function_class_scalaradd_f64()
1.210 +{
1.211 +return &_oil_function_class_scalaradd_f64;
1.212 +}
1.213 +
1.214 +#ifdef __SYMBIAN32__
1.215 +
1.216 +#endif
1.217 +OilFunctionClass* __oil_function_class_scalaradd_s16()
1.218 +{
1.219 +return &_oil_function_class_scalaradd_s16;
1.220 +}
1.221 +
1.222 +#ifdef __SYMBIAN32__
1.223 +
1.224 +#endif
1.225 +OilFunctionClass* __oil_function_class_scalaradd_s32()
1.226 +{
1.227 +return &_oil_function_class_scalaradd_s32;
1.228 +}
1.229 +
1.230 +#ifdef __SYMBIAN32__
1.231 +
1.232 +#endif
1.233 +OilFunctionClass* __oil_function_class_scalaradd_s8()
1.234 +{
1.235 +return &_oil_function_class_scalaradd_s8;
1.236 +}
1.237 +
1.238 +#ifdef __SYMBIAN32__
1.239 +
1.240 +#endif
1.241 +OilFunctionClass* __oil_function_class_scalaradd_u16()
1.242 +{
1.243 +return &_oil_function_class_scalaradd_u16;
1.244 +}
1.245 +
1.246 +#ifdef __SYMBIAN32__
1.247 +
1.248 +#endif
1.249 +OilFunctionClass* __oil_function_class_scalaradd_u32()
1.250 +{
1.251 +return &_oil_function_class_scalaradd_u32;
1.252 +}
1.253 +
1.254 +#ifdef __SYMBIAN32__
1.255 +
1.256 +#endif
1.257 +OilFunctionClass* __oil_function_class_scalaradd_u8()
1.258 +{
1.259 +return &_oil_function_class_scalaradd_u8;
1.260 +}
1.261 +
1.262 +
1.263 +
1.264 +#ifdef __SYMBIAN32__
1.265 +
1.266 +OilFunctionImpl* __oil_function_impl_scalaradd_s8_ref() {
1.267 + return &_oil_function_impl_scalaradd_s8_ref;
1.268 +}
1.269 +#endif
1.270 +
1.271 +#ifdef __SYMBIAN32__
1.272 +
1.273 +OilFunctionImpl* __oil_function_impl_scalaradd_u8_ref() {
1.274 + return &_oil_function_impl_scalaradd_u8_ref;
1.275 +}
1.276 +#endif
1.277 +
1.278 +#ifdef __SYMBIAN32__
1.279 +
1.280 +OilFunctionImpl* __oil_function_impl_scalaradd_s16_ref() {
1.281 + return &_oil_function_impl_scalaradd_s16_ref;
1.282 +}
1.283 +#endif
1.284 +
1.285 +#ifdef __SYMBIAN32__
1.286 +
1.287 +OilFunctionImpl* __oil_function_impl_scalaradd_u16_ref() {
1.288 + return &_oil_function_impl_scalaradd_u16_ref;
1.289 +}
1.290 +#endif
1.291 +
1.292 +#ifdef __SYMBIAN32__
1.293 +
1.294 +OilFunctionImpl* __oil_function_impl_scalaradd_s32_ref() {
1.295 + return &_oil_function_impl_scalaradd_s32_ref;
1.296 +}
1.297 +#endif
1.298 +
1.299 +#ifdef __SYMBIAN32__
1.300 +
1.301 +OilFunctionImpl* __oil_function_impl_scalaradd_u32_ref() {
1.302 + return &_oil_function_impl_scalaradd_u32_ref;
1.303 +}
1.304 +#endif
1.305 +
1.306 +#ifdef __SYMBIAN32__
1.307 +
1.308 +OilFunctionImpl* __oil_function_impl_scalaradd_f32_ref() {
1.309 + return &_oil_function_impl_scalaradd_f32_ref;
1.310 +}
1.311 +#endif
1.312 +
1.313 +#ifdef __SYMBIAN32__
1.314 +
1.315 +OilFunctionImpl* __oil_function_impl_scalaradd_f64_ref() {
1.316 + return &_oil_function_impl_scalaradd_f64_ref;
1.317 +}
1.318 +#endif
1.319 +