diff -r 000000000000 -r bde4ae8d615e os/ossrv/genericopenlibs/liboil/src/deprecated/abs_c_dep.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/os/ossrv/genericopenlibs/liboil/src/deprecated/abs_c_dep.c Fri Jun 15 03:10:57 2012 +0200 @@ -0,0 +1,294 @@ +/* + * LIBOIL - Library of Optimized Inner Loops + * Copyright (c) 2003 David A. Schleef + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +//Portions Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +//#include "liboil_wsd_solutions.h" +#include "liboil/liboilfunction.h" +#include "liboil/simdpack/simdpack.h" +#include + +/* +#if EMULATOR +GET_GLOBAL_VAR_FROM_TLS(_class,abs_f32_f32,OilFunctionClass) +#define _oil_function_class_abs_f32_f32 (*GET_OIL_WSD_VAR_NAME(_class,abs_f32_f32,g)()) +#else +OIL_DEFINE_CLASS (abs_f32_f32, "float *dest, int dstr, float *src, int sstr, int n"); +#endif +*/ + +OIL_DEFINE_CLASS (abs_u8_s8, "uint8_t *dest, int dstr, int8_t *src, int sstr, int n"); +OIL_DEFINE_CLASS (abs_u16_s16, "uint16_t *dest, int dstr, int16_t *src, int sstr, int n"); +OIL_DEFINE_CLASS (abs_u32_s32, "uint32_t *dest, int dstr, int32_t *src, int sstr, int n"); +OIL_DEFINE_CLASS (abs_f32_f32, "float *dest, int dstr, float *src, int sstr, int n"); +OIL_DEFINE_CLASS (abs_f64_f64, "double *dest, int dstr, double *src, int sstr, int n"); + + +//static void abs_test (OilFunctionClass *klass, OilFunctionImpl *impl); + +#define ABS(x) ((x)>0 ? (x) : -(x)) + + +/** + * oil_abs_u8_s8: + * @dest: destination array + * @dstr: stride of destination elements + * @src: source array + * @sstr: stride of source elements + * @n: number of elements in arrays + * + * Calculates the absolute value of each element in the source array + * and writes it into the destination array. + */ +static void +abs_u8_s8_ref (uint8_t *dest, int dstr, int8_t *src, int sstr, int n) +{ + int i; + int x; + + for (i=0; ifunc; + } +#endif + +#ifdef __SYMBIAN32__ + +EXPORT_C void** _oil_function_class_ptr_abs_u8_s8 () { + oil_function_class_ptr_abs_u8_s8 = __oil_function_class_abs_u8_s8(); + return &oil_function_class_ptr_abs_u8_s8->func; + } +#endif + +#ifdef __SYMBIAN32__ + +EXPORT_C void** _oil_function_class_ptr_abs_u16_s16 () { + oil_function_class_ptr_abs_u16_s16 = __oil_function_class_abs_u16_s16(); + return &oil_function_class_ptr_abs_u16_s16->func; + } +#endif + +#ifdef __SYMBIAN32__ + +EXPORT_C void** _oil_function_class_ptr_abs_u32_s32 () { + oil_function_class_ptr_abs_u32_s32 = __oil_function_class_abs_u32_s32(); + return &oil_function_class_ptr_abs_u32_s32->func; + } +#endif + +#ifdef __SYMBIAN32__ + +EXPORT_C void** _oil_function_class_ptr_abs_f64_f64 () { + oil_function_class_ptr_abs_f64_f64 = __oil_function_class_abs_f64_f64(); + return &oil_function_class_ptr_abs_f64_f64->func; + } +#endif +