os/ossrv/genericopenlibs/liboil/src/liboilparameter.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/genericopenlibs/liboil/src/liboilparameter.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,162 @@
     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 +
    1.31 +//Portions Copyright (c)  2008-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. 
    1.32 +
    1.33 +#ifndef _LIBOIL_PARAMETER_H_
    1.34 +#define _LIBOIL_PARAMETER_H_
    1.35 +
    1.36 +#include <liboil/liboiltypes.h>
    1.37 +#include <liboil/liboilutils.h>
    1.38 +
    1.39 +OIL_BEGIN_DECLS
    1.40 +
    1.41 +#ifdef OIL_ENABLE_UNSTABLE_API
    1.42 +
    1.43 +/**
    1.44 + * OilType:
    1.45 + *
    1.46 + * Enumeration containing the data types understood by Liboil.
    1.47 + */
    1.48 +typedef enum {
    1.49 +  OIL_TYPE_UNKNOWN = 0,
    1.50 +  OIL_TYPE_INT,
    1.51 +  OIL_TYPE_s8,
    1.52 +  OIL_TYPE_u8,
    1.53 +  OIL_TYPE_s16,
    1.54 +  OIL_TYPE_u16,
    1.55 +  OIL_TYPE_s32,
    1.56 +  OIL_TYPE_u32,
    1.57 +  OIL_TYPE_s64,
    1.58 +  OIL_TYPE_u64,
    1.59 +  OIL_TYPE_f32,
    1.60 +  OIL_TYPE_f64,
    1.61 +  OIL_TYPE_s8p,
    1.62 +  OIL_TYPE_u8p,
    1.63 +  OIL_TYPE_s16p,
    1.64 +  OIL_TYPE_u16p,
    1.65 +  OIL_TYPE_s32p,
    1.66 +  OIL_TYPE_u32p,
    1.67 +  OIL_TYPE_s64p,
    1.68 +  OIL_TYPE_u64p,
    1.69 +  OIL_TYPE_f32p,
    1.70 +  OIL_TYPE_f64p,
    1.71 +} OilType;
    1.72 +
    1.73 +/**
    1.74 + * OilArgType:
    1.75 + *
    1.76 + * Enumeration containing the types of parameter types understood
    1.77 + * by Liboil.
    1.78 + */
    1.79 +typedef enum {
    1.80 +  OIL_ARG_UNKNOWN = 0,
    1.81 +  OIL_ARG_N,
    1.82 +  OIL_ARG_M,
    1.83 +  OIL_ARG_DEST1,
    1.84 +  OIL_ARG_DSTR1,
    1.85 +  OIL_ARG_DEST2,
    1.86 +  OIL_ARG_DSTR2,
    1.87 +  OIL_ARG_DEST3,
    1.88 +  OIL_ARG_DSTR3,
    1.89 +  OIL_ARG_SRC1,
    1.90 +  OIL_ARG_SSTR1,
    1.91 +  OIL_ARG_SRC2,
    1.92 +  OIL_ARG_SSTR2,
    1.93 +  OIL_ARG_SRC3,
    1.94 +  OIL_ARG_SSTR3,
    1.95 +  OIL_ARG_SRC4,
    1.96 +  OIL_ARG_SSTR4,
    1.97 +  OIL_ARG_SRC5,
    1.98 +  OIL_ARG_SSTR5,
    1.99 +  OIL_ARG_INPLACE1,
   1.100 +  OIL_ARG_ISTR1,
   1.101 +  OIL_ARG_INPLACE2,
   1.102 +  OIL_ARG_ISTR2,
   1.103 +
   1.104 +  OIL_ARG_LAST
   1.105 +} OilArgType;
   1.106 +
   1.107 +/**
   1.108 + * OilParameter:
   1.109 + * 
   1.110 + * An opaque structure representing a single parameter in the
   1.111 + * function prototype of an OilFunctionClass.
   1.112 + */
   1.113 +struct _OilParameter {
   1.114 +  /*< private >*/
   1.115 +  char *type_name;
   1.116 +  char *parameter_name;
   1.117 +
   1.118 +  int order;
   1.119 +  OilType type;
   1.120 +
   1.121 +  int direction;
   1.122 +  int is_pointer;
   1.123 +  int is_stride;
   1.124 +  int index;
   1.125 +  int prestride_length;
   1.126 +  int prestride_var;
   1.127 +  int poststride_length;
   1.128 +  int poststride_var;
   1.129 +
   1.130 +  OilArgType parameter_type;
   1.131 +
   1.132 +  uint8_t *src_data;
   1.133 +  uint8_t *ref_data;
   1.134 +  uint8_t *test_data;
   1.135 +  unsigned long value;
   1.136 +
   1.137 +  int pre_n;
   1.138 +  int post_n;
   1.139 +  int stride;
   1.140 +  int size;
   1.141 +  int guard;
   1.142 +  int test_header;
   1.143 +  int test_footer;
   1.144 +};
   1.145 +
   1.146 +#ifdef __SYMBIAN32__
   1.147 +IMPORT_C
   1.148 +#endif
   1.149 +void *oil_param_get_source_data (OilParameter *param);
   1.150 +
   1.151 +
   1.152 +#ifdef __SYMBIAN32__
   1.153 +IMPORT_C
   1.154 +#endif
   1.155 +int oil_param_from_string (OilParameter *p, char *s);
   1.156 +
   1.157 +#define oil_type_is_floating_point(type) \
   1.158 +  (((type) == OIL_TYPE_f64p) || ((type) == OIL_TYPE_f32p))
   1.159 +
   1.160 +#endif
   1.161 +
   1.162 +OIL_END_DECLS
   1.163 +
   1.164 +#endif
   1.165 +