OIL_CHECK_PROTOTYPE: :
Macro used internally to implement the --enable-prototype-checking configure option.
OilImplFlag:
Implementation flags.
: is the reference implementation for the class.
: was compiled with alternate CFLAGS as specified by --enable-alternate-optimization.
: is written in assembly code.
: is disabled. This can be set either in the source code or during library initialization.
: uses the i386 instruction cmov or its variants.
: uses MMX instructions.
: uses SSE instructions.
: uses AMD's extended MMX instructions. These are a subset of what Intel calls SSE2. If an implementation uses only AMD's extended MMX instructions, it should set this flag, and not .
: uses SSE2 instructions. This flag implies and .
: uses 3DNow! instructions.
: uses extended 3DNow! instructions.
: uses SSE3 instructions. This flag implies .
: uses SSSE3 instructions. This flag implies .
: uses Altivec instructions.
Enumerator | Value | Description |
---|---|---|
OIL_IMPL_FLAG_REF | (1<<0) | |
OIL_IMPL_FLAG_OPT | (1<<1) | |
OIL_IMPL_FLAG_ASM | (1<<2) | |
OIL_IMPL_FLAG_DISABLED | (1<<3) | |
OIL_IMPL_FLAG_CMOV | (1<<16) | |
OIL_IMPL_FLAG_MMX | (1<<17) | |
OIL_IMPL_FLAG_SSE | (1<<18) | |
OIL_IMPL_FLAG_MMXEXT | (1<<19) | |
OIL_IMPL_FLAG_SSE2 | (1<<20) | |
OIL_IMPL_FLAG_3DNOW | (1<<21) | |
OIL_IMPL_FLAG_3DNOWEXT | (1<<22) | |
OIL_IMPL_FLAG_SSE3 | (1<<23) | |
OIL_IMPL_FLAG_ALTIVEC | (1<<24) | |
OIL_IMPL_FLAG_EDSP | (1<<25) | |
OIL_IMPL_FLAG_ARM6 | (1<<26) | |
OIL_IMPL_FLAG_VFP | (1<<27) | |
OIL_IMPL_FLAG_SSSE3 | (1<<28) |
OIL_OPT_MANGLE:
Used internally to implement the --enable-alternate-optimizations configure option. OIL_OPT_FLAG_MANGLE:
Used internally to implement the --enable-alternate-optimizations configure option. OIL_NO_CLASSES:
Used internally to implement the --enable-alternate-optimizations configure option. OIL_OPT_SUFFIX:
Used internally to implement the --enable-alternate-optimizations configure option.
OIL_GET: : : :
Offsets by number of bytes, and dereferences it as type . Note that the offset is in bytes, and not in the size of the pointer type.
OIL_CPU_FLAG_MASK:
Mask describing which bits in OilImplFlag depend on the current CPU.
OIL_DECLARE_CLASS: : the name of a function class (without the oil_ prefix)
Declares the Liboil function class .
SECTION:liboilmacros : Macros : Macros OIL_DEFINE_CLASS_FULL: : name of class to declare (without oil_ prefix) : prototype of class Test: test function
Defines a OilFunctionClass structure for . Classes defined this way will be automatically at Liboil initialization time.
OIL_DEFINE_CLASS: : name of class to declare (without oil_ prefix) : prototype of class
Defines a OilFunctionClass structure for . Classes defined this way will be automatically at Liboil initialization time.
OIL_DEFINE_IMPL_FULL: : name of function : name of class to declare (without oil_ prefix) : implementation flags and CPU requirements
Defines a OilFunctionImpl structure for the function and class . CPU-dependent flags in will indicate that this implementation requires the given CPU flags.
OIL_DEFINE_IMPL: : name of function : name of class to declare (without oil_ prefix)
Shorthand for defining a C implementation. See OIL_DEFINE_IMPL_FULL().
OIL_DEFINE_IMPL_REF: : name of function : name of class to declare (without oil_ prefix)
Shorthand for defining a reference implementation. See OIL_DEFINE_IMPL_FULL().
OIL_DEFINE_IMPL_ASM: : name of function : name of class to declare (without oil_ prefix)
Shorthand for defining an implementation written in inline assembly code. See OIL_DEFINE_IMPL_FULL().
OIL_DEFINE_IMPL_DEPENDS : name of function : name of class to declare (without oil_ prefix) @...: other classes this implementation uses
Shorthand for defining an implementation that uses another Liboil function class. This is not currently used. See OIL_DEFINE_IMPL_FULL().
IMPORT_C void | oil_optimize_all | ( | void | ) |
oil_optimize_all:
Optimize all function classes.
IMPORT_C void | oil_optimize | ( | const char * | class_name | ) |
oil_optimize: : a string
Optimize the function class that has the name specified by .
IMPORT_C OilFunctionClass * | oil_class_get_by_index | ( | int | i | ) |
oil_class_get_by_index: : index
Returns a pointer to the function class with index .
Returns: an
IMPORT_C OilFunctionClass * | oil_class_get | ( | const char * | class_name | ) |
oil_class_get: : the name of the function class
Returns a pointer to the function class that has the given class name. If no such class is found, NULL is returned.
Returns: a pointer to a function class
IMPORT_C void | oil_class_optimize | ( | OilFunctionClass * | klass | ) |
oil_class_optimize: : a function class
Tests and profiles each implementation for the given function class. Testing compares the output of running each implementation on random input against the reference implementation for the same input.
IMPORT_C int | oil_class_get_n_classes | ( | void | ) |
oil_class_get_n_classes:
Returns the number of function classes.
Returns: the number of function classes
IMPORT_C OilFunctionImpl * | oil_impl_get_by_index | ( | int | i | ) |
oil_impl_get_by_index: : index
Returns a pointer to the function implementation with index .
Returns: a pointer to a function implementation structure
IMPORT_C int | oil_impl_is_runnable | ( | OilFunctionImpl * | impl | ) |
oil_impl_is_runnable: : an
Determines whether the function implementation given by can be executed by the current CPU.
Returns: 1 if the implementation can be executed, otherwise 0
IMPORT_C int | oil_impl_is_usable | ( | OilFunctionImpl * | impl | ) |
oil_impl_is_usable: : an
Determines whether the function implementation given by is useful, that is, it can be executed on the current CPU and passes tests.
Returns: 1 if the implementation can be used, otherwise 0
IMPORT_C void | oil_class_choose_by_name | ( | OilFunctionClass * | klass, |
const char * | name | |||
) |
IMPORT_C void | oil_class_register_impl_full | ( | OilFunctionClass * | klass, |
void(*)(void) | func, | |||
const char * | name, | |||
unsigned int | flags | |||
) |
IMPORT_C void | oil_class_register_impl | ( | OilFunctionClass * | klass, |
OilFunctionImpl * | impl | |||
) |
oil_class_register_impl: : the class : an implementation
Adds to the list of implementations associated with the function class given by .
IMPORT_C void | oil_class_register_impl_by_name | ( | const char * | klass_name, |
OilFunctionImpl * | impl | |||
) |
oil_class_register_impl_by_name: : the name of the class : an implementation
Adds to the list of implementations associated with the function class given by .
IMPORT_C void | oil_init_no_optimize | ( | void | ) |
oil_init_no_optimize:
Initialize liboil similar to oil_init(), but do not run the profiling stage. This function is mainly useful for internal programs.