Top | ![]() |
![]() |
![]() |
![]() |
OilFunctionImpl * | oil_impl_get_by_index () |
int | oil_impl_is_runnable () |
#define | OIL_DEFINE_IMPL_FULL() |
#define | OIL_DEFINE_IMPL() |
#define | OIL_DEFINE_IMPL_REF() |
#define | OIL_DEFINE_IMPL_ASM() |
#define | OIL_DEFINE_IMPL_DEPENDS() |
OilFunctionImpl *
oil_impl_get_by_index (int i
);
Returns a pointer to the function implementation with index i
.
int
oil_impl_is_runnable (OilFunctionImpl *impl
);
Determines whether the function implementation given by impl
can be executed by the current CPU.
#define OIL_DEFINE_IMPL_FULL(function,klass,flags)
Defines a OilFunctionImpl structure for the function function
and class klass
. CPU-dependent flags in flags
will indicate
that this implementation requires the given CPU flags.
#define OIL_DEFINE_IMPL(function,klass)
Shorthand for defining a C implementation. See OIL_DEFINE_IMPL_FULL()
.
#define OIL_DEFINE_IMPL_REF(function,klass)
Shorthand for defining a reference implementation. See OIL_DEFINE_IMPL_FULL()
.
#define OIL_DEFINE_IMPL_ASM(function,klass)
Shorthand for defining an implementation written in inline
assembly code. See OIL_DEFINE_IMPL_FULL()
.
#define OIL_DEFINE_IMPL_DEPENDS(function,klass,...)
Shorthand for defining an implementation that uses another Liboil
function class. This is not currently used. See
OIL_DEFINE_IMPL_FULL()
.
typedef struct { } OilFunctionImpl;
An opaque structure representing a function implementation.
Implementation flags.
OIL_IMPL_FLAG_REF
: is the reference implementation for the class.
OIL_IMPL_FLAG_OPT
: was compiled with alternate CFLAGS as specified
by --enable-alternate-optimization.
OIL_IMPL_FLAG_ASM
: is written in assembly code.
OIL_IMPL_FLAG_DISABLED
: is disabled. This can be set either in the
source code or during library initialization.
OIL_IMPL_FLAG_CMOV
: uses the i386 instruction cmov or its variants.
OIL_IMPL_FLAG_MMX
: uses MMX instructions.
OIL_IMPL_FLAG_SSE
: uses SSE instructions.
OIL_IMPL_FLAG_MMXEXT
: 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 OIL_IMPL_FLAG_SSE2
.
OIL_IMPL_FLAG_SSE2
: uses SSE2 instructions. This flag implies
OIL_IMPL_FLAG_SSE
and OIL_IMPL_FLAG_MMXEXT
.
OIL_IMPL_FLAG_3DNOW
: uses 3DNow! instructions.
OIL_IMPL_FLAG_3DNOWEXT
: uses extended 3DNow! instructions.
OIL_IMPL_FLAG_SSE3
: uses SSE3 instructions. This flag implies
OIL_IMPL_FLAG_SSE2
.
OIL_IMPL_FLAG_SSSE3
: uses SSSE3 instructions. This flag implies
OIL_IMPL_FLAG_SSE3
.
OIL_IMPL_FLAG_ALTIVEC
: uses Altivec instructions.
#define OIL_CPU_FLAG_MASK 0xffff0000
Mask describing which bits in OilImplFlag depend on the current CPU.