sl@0: /* sl@0: * LIBOIL - Library of Optimized Inner Loops sl@0: * Copyright (c) 2003,2004 David A. Schleef sl@0: * All rights reserved. sl@0: * sl@0: * Redistribution and use in source and binary forms, with or without sl@0: * modification, are permitted provided that the following conditions sl@0: * are met: sl@0: * 1. Redistributions of source code must retain the above copyright sl@0: * notice, this list of conditions and the following disclaimer. sl@0: * 2. Redistributions in binary form must reproduce the above copyright sl@0: * notice, this list of conditions and the following disclaimer in the sl@0: * documentation and/or other materials provided with the distribution. sl@0: * sl@0: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR sl@0: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED sl@0: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE sl@0: * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, sl@0: * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES sl@0: * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR sl@0: * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) sl@0: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, sl@0: * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING sl@0: * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE sl@0: * POSSIBILITY OF SUCH DAMAGE. sl@0: */ sl@0: sl@0: //Portions Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. sl@0: sl@0: #ifndef _LIBOIL_PARAMETER_H_ sl@0: #define _LIBOIL_PARAMETER_H_ sl@0: sl@0: #include sl@0: #include sl@0: sl@0: OIL_BEGIN_DECLS sl@0: sl@0: #ifdef OIL_ENABLE_UNSTABLE_API sl@0: sl@0: /** sl@0: * OilType: sl@0: * sl@0: * Enumeration containing the data types understood by Liboil. sl@0: */ sl@0: typedef enum { sl@0: OIL_TYPE_UNKNOWN = 0, sl@0: OIL_TYPE_INT, sl@0: OIL_TYPE_s8, sl@0: OIL_TYPE_u8, sl@0: OIL_TYPE_s16, sl@0: OIL_TYPE_u16, sl@0: OIL_TYPE_s32, sl@0: OIL_TYPE_u32, sl@0: OIL_TYPE_s64, sl@0: OIL_TYPE_u64, sl@0: OIL_TYPE_f32, sl@0: OIL_TYPE_f64, sl@0: OIL_TYPE_s8p, sl@0: OIL_TYPE_u8p, sl@0: OIL_TYPE_s16p, sl@0: OIL_TYPE_u16p, sl@0: OIL_TYPE_s32p, sl@0: OIL_TYPE_u32p, sl@0: OIL_TYPE_s64p, sl@0: OIL_TYPE_u64p, sl@0: OIL_TYPE_f32p, sl@0: OIL_TYPE_f64p, sl@0: } OilType; sl@0: sl@0: /** sl@0: * OilArgType: sl@0: * sl@0: * Enumeration containing the types of parameter types understood sl@0: * by Liboil. sl@0: */ sl@0: typedef enum { sl@0: OIL_ARG_UNKNOWN = 0, sl@0: OIL_ARG_N, sl@0: OIL_ARG_M, sl@0: OIL_ARG_DEST1, sl@0: OIL_ARG_DSTR1, sl@0: OIL_ARG_DEST2, sl@0: OIL_ARG_DSTR2, sl@0: OIL_ARG_DEST3, sl@0: OIL_ARG_DSTR3, sl@0: OIL_ARG_SRC1, sl@0: OIL_ARG_SSTR1, sl@0: OIL_ARG_SRC2, sl@0: OIL_ARG_SSTR2, sl@0: OIL_ARG_SRC3, sl@0: OIL_ARG_SSTR3, sl@0: OIL_ARG_SRC4, sl@0: OIL_ARG_SSTR4, sl@0: OIL_ARG_SRC5, sl@0: OIL_ARG_SSTR5, sl@0: OIL_ARG_INPLACE1, sl@0: OIL_ARG_ISTR1, sl@0: OIL_ARG_INPLACE2, sl@0: OIL_ARG_ISTR2, sl@0: sl@0: OIL_ARG_LAST sl@0: } OilArgType; sl@0: sl@0: /** sl@0: * OilParameter: sl@0: * sl@0: * An opaque structure representing a single parameter in the sl@0: * function prototype of an OilFunctionClass. sl@0: */ sl@0: struct _OilParameter { sl@0: /*< private >*/ sl@0: char *type_name; sl@0: char *parameter_name; sl@0: sl@0: int order; sl@0: OilType type; sl@0: sl@0: int direction; sl@0: int is_pointer; sl@0: int is_stride; sl@0: int index; sl@0: int prestride_length; sl@0: int prestride_var; sl@0: int poststride_length; sl@0: int poststride_var; sl@0: sl@0: OilArgType parameter_type; sl@0: sl@0: uint8_t *src_data; sl@0: uint8_t *ref_data; sl@0: uint8_t *test_data; sl@0: unsigned long value; sl@0: sl@0: int pre_n; sl@0: int post_n; sl@0: int stride; sl@0: int size; sl@0: int guard; sl@0: int test_header; sl@0: int test_footer; sl@0: }; sl@0: sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: void *oil_param_get_source_data (OilParameter *param); sl@0: sl@0: sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: int oil_param_from_string (OilParameter *p, char *s); sl@0: sl@0: #define oil_type_is_floating_point(type) \ sl@0: (((type) == OIL_TYPE_f64p) || ((type) == OIL_TYPE_f32p)) sl@0: sl@0: #endif sl@0: sl@0: OIL_END_DECLS sl@0: sl@0: #endif sl@0: