1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericopenlibs/liboil/src/deprecated/scalarmult_c_dep.c Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,323 @@
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 SCALARMULT_DEFINE_REF(type) \
1.46 +static void scalarmult_ ## 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) = OIL_GET(src,sstr*i,oil_type_ ## type) * *val; \
1.54 + } \
1.55 +} \
1.56 +OIL_DEFINE_CLASS(scalarmult_ ## type, \
1.57 + "oil_type_" #type " *d, int dstr, " \
1.58 + "oil_type_" #type " *s1, int sstr, " \
1.59 + "oil_type_" #type " *s2_1, int n"); \
1.60 +OIL_DEFINE_IMPL_REF (scalarmult_ ## type ## _ref, scalarmult_ ## type);
1.61 +
1.62 +
1.63 +/**
1.64 + * oil_scalarmult_s8:
1.65 + * @d:
1.66 + * @dstr:
1.67 + * @s1:
1.68 + * @sstr:
1.69 + * @s2_1:
1.70 + * @n:
1.71 + *
1.72 + * Multiplies the constant value @s2_1 to each value in @s1 and places the
1.73 + * result in @d.
1.74 + *
1.75 + * FIXME: This function is difficult to optimize and will likely be
1.76 + * replaced.
1.77 + */
1.78 +SCALARMULT_DEFINE_REF (s8);
1.79 +/**
1.80 + * oil_scalarmult_u8:
1.81 + * @d:
1.82 + * @dstr:
1.83 + * @s1:
1.84 + * @sstr:
1.85 + * @s2_1:
1.86 + * @n:
1.87 + *
1.88 + * Multiplies the constant value @s2_1 to each value in @s1 and places the
1.89 + * result in @d.
1.90 + *
1.91 + * FIXME: This function is difficult to optimize and will likely be
1.92 + * replaced.
1.93 + */
1.94 +SCALARMULT_DEFINE_REF (u8);
1.95 +/**
1.96 + * oil_scalarmult_s16:
1.97 + * @d:
1.98 + * @dstr:
1.99 + * @s1:
1.100 + * @sstr:
1.101 + * @s2_1:
1.102 + * @n:
1.103 + *
1.104 + * Multiplies the constant value @s2_1 to each value in @s1 and places the
1.105 + * result in @d.
1.106 + *
1.107 + * FIXME: This function is difficult to optimize and will likely be
1.108 + * replaced.
1.109 + */
1.110 +SCALARMULT_DEFINE_REF (s16);
1.111 +/**
1.112 + * oil_scalarmult_u16:
1.113 + * @d:
1.114 + * @dstr:
1.115 + * @s1:
1.116 + * @sstr:
1.117 + * @s2_1:
1.118 + * @n:
1.119 + *
1.120 + * Multiplies the constant value @s2_1 to each value in @s1 and places the
1.121 + * result in @d.
1.122 + *
1.123 + * FIXME: This function is difficult to optimize and will likely be
1.124 + * replaced.
1.125 + */
1.126 +SCALARMULT_DEFINE_REF (u16);
1.127 +/**
1.128 + * oil_scalarmult_s32:
1.129 + * @d:
1.130 + * @dstr:
1.131 + * @s1:
1.132 + * @sstr:
1.133 + * @s2_1:
1.134 + * @n:
1.135 + *
1.136 + * Multiplies the constant value @s2_1 to each value in @s1 and places the
1.137 + * result in @d.
1.138 + *
1.139 + * FIXME: This function is difficult to optimize and will likely be
1.140 + * replaced.
1.141 + */
1.142 +SCALARMULT_DEFINE_REF (s32);
1.143 +/**
1.144 + * oil_scalarmult_u32:
1.145 + * @d:
1.146 + * @dstr:
1.147 + * @s1:
1.148 + * @sstr:
1.149 + * @s2_1:
1.150 + * @n:
1.151 + *
1.152 + * Multiplies the constant value @s2_1 to each value in @s1 and places the
1.153 + * result in @d.
1.154 + *
1.155 + * FIXME: This function is difficult to optimize and will likely be
1.156 + * replaced.
1.157 + */
1.158 +SCALARMULT_DEFINE_REF (u32);
1.159 +/**
1.160 + * oil_scalarmult_f32:
1.161 + * @d:
1.162 + * @dstr:
1.163 + * @s1:
1.164 + * @sstr:
1.165 + * @s2_1:
1.166 + * @n:
1.167 + *
1.168 + * Multiplies the constant value @s2_1 to each value in @s1 and places the
1.169 + * result in @d.
1.170 + *
1.171 + * FIXME: This function is difficult to optimize and will likely be
1.172 + * replaced.
1.173 + */
1.174 +SCALARMULT_DEFINE_REF (f32);
1.175 +/**
1.176 + * oil_scalarmult_f64:
1.177 + * @d:
1.178 + * @dstr:
1.179 + * @s1:
1.180 + * @sstr:
1.181 + * @s2_1:
1.182 + * @n:
1.183 + *
1.184 + * Multiplies the constant value @s2_1 to each value in @s1 and places the
1.185 + * result in @d.
1.186 + *
1.187 + * FIXME: This function is difficult to optimize and will likely be
1.188 + * replaced.
1.189 + */
1.190 +SCALARMULT_DEFINE_REF (f64);
1.191 +
1.192 +#ifdef __SYMBIAN32__
1.193 +
1.194 +#endif
1.195 +OilFunctionClass* __oil_function_class_scalarmult_f32()
1.196 +{
1.197 +return &_oil_function_class_scalarmult_f32;
1.198 +}
1.199 +
1.200 +
1.201 +#ifdef __SYMBIAN32__
1.202 +
1.203 +#endif
1.204 +OilFunctionClass* __oil_function_class_scalarmult_f64()
1.205 +{
1.206 +return &_oil_function_class_scalarmult_f64;
1.207 +}
1.208 +
1.209 +#ifdef __SYMBIAN32__
1.210 +
1.211 +#endif
1.212 +OilFunctionClass* __oil_function_class_scalarmult_s16()
1.213 +{
1.214 +return &_oil_function_class_scalarmult_s16;
1.215 +}
1.216 +
1.217 +#ifdef __SYMBIAN32__
1.218 +
1.219 +#endif
1.220 +OilFunctionClass* __oil_function_class_scalarmult_s32()
1.221 +{
1.222 +return &_oil_function_class_scalarmult_s32;
1.223 +}
1.224 +
1.225 +#ifdef __SYMBIAN32__
1.226 +
1.227 +#endif
1.228 +OilFunctionClass* __oil_function_class_scalarmult_s8()
1.229 +{
1.230 +return &_oil_function_class_scalarmult_s8;
1.231 +}
1.232 +
1.233 +#ifdef __SYMBIAN32__
1.234 +
1.235 +#endif
1.236 +OilFunctionClass* __oil_function_class_scalarmult_u16()
1.237 +{
1.238 +return &_oil_function_class_scalarmult_u16;
1.239 +}
1.240 +
1.241 +#ifdef __SYMBIAN32__
1.242 +
1.243 +#endif
1.244 +OilFunctionClass* __oil_function_class_scalarmult_u32()
1.245 +{
1.246 +return &_oil_function_class_scalarmult_u32;
1.247 +}
1.248 +
1.249 +#ifdef __SYMBIAN32__
1.250 +
1.251 +#endif
1.252 +OilFunctionClass* __oil_function_class_scalarmult_u8()
1.253 +{
1.254 +return &_oil_function_class_scalarmult_u8;
1.255 +}
1.256 +
1.257 +/*
1.258 +OilFunctionClass* __oil_function_class_scalarmult_f32_ns()
1.259 +{
1.260 +return &_oil_function_class_scalarmult_f32_ns;
1.261 +}
1.262 +
1.263 +OilFunctionClass* __oil_function_class_scalarmult_f64_ns()
1.264 +{
1.265 +return &_oil_function_class_scalarmult_f64_ns;
1.266 +}
1.267 +*/
1.268 +
1.269 +
1.270 +
1.271 +#ifdef __SYMBIAN32__
1.272 +
1.273 +OilFunctionImpl* __oil_function_impl_scalarmult_s8_ref() {
1.274 + return &_oil_function_impl_scalarmult_s8_ref;
1.275 +}
1.276 +#endif
1.277 +
1.278 +#ifdef __SYMBIAN32__
1.279 +
1.280 +OilFunctionImpl* __oil_function_impl_scalarmult_u8_ref() {
1.281 + return &_oil_function_impl_scalarmult_u8_ref;
1.282 +}
1.283 +#endif
1.284 +
1.285 +#ifdef __SYMBIAN32__
1.286 +
1.287 +OilFunctionImpl* __oil_function_impl_scalarmult_s16_ref() {
1.288 + return &_oil_function_impl_scalarmult_s16_ref;
1.289 +}
1.290 +#endif
1.291 +
1.292 +#ifdef __SYMBIAN32__
1.293 +
1.294 +OilFunctionImpl* __oil_function_impl_scalarmult_u16_ref() {
1.295 + return &_oil_function_impl_scalarmult_u16_ref;
1.296 +}
1.297 +#endif
1.298 +
1.299 +#ifdef __SYMBIAN32__
1.300 +
1.301 +OilFunctionImpl* __oil_function_impl_scalarmult_s32_ref() {
1.302 + return &_oil_function_impl_scalarmult_s32_ref;
1.303 +}
1.304 +#endif
1.305 +
1.306 +#ifdef __SYMBIAN32__
1.307 +
1.308 +OilFunctionImpl* __oil_function_impl_scalarmult_u32_ref() {
1.309 + return &_oil_function_impl_scalarmult_u32_ref;
1.310 +}
1.311 +#endif
1.312 +
1.313 +#ifdef __SYMBIAN32__
1.314 +
1.315 +OilFunctionImpl* __oil_function_impl_scalarmult_f32_ref() {
1.316 + return &_oil_function_impl_scalarmult_f32_ref;
1.317 +}
1.318 +#endif
1.319 +
1.320 +#ifdef __SYMBIAN32__
1.321 +
1.322 +OilFunctionImpl* __oil_function_impl_scalarmult_f64_ref() {
1.323 + return &_oil_function_impl_scalarmult_f64_ref;
1.324 +}
1.325 +#endif
1.326 +