Function
function
¶
P = ParamSpec('P')
module-attribute
¶
R = TypeVar('R')
module-attribute
¶
CFunc
¶
Bases: Protocol
A callable native function pointer.
Source code in xdsl/jit/function.py
RawJITFunc
dataclass
¶
A JIT-compiled native function.
Backends may subclass this to retain native runtime state that must outlive
calls through c_func.
Source code in xdsl/jit/function.py
WrappedJITFunc
dataclass
¶
A Python-callable wrapper around a :class:RawJITFunc.
Applies configured argument and result conversions around the native call.
Source code in xdsl/jit/function.py
raw_func: RawJITFunc
instance-attribute
¶
Underlying native binding.
original_func: Callable[P, R]
instance-attribute
¶
The undecorated Python function.
__call__: Callable[P, R]
instance-attribute
¶
Wrapped call implementation.
__init__(raw_func: RawJITFunc, original_func: Callable[P, R], __call__: Callable[P, R]) -> None
¶
wrap_jit_func(raw_func: RawJITFunc, original_func: Callable[P, R], signature: TypeForm[Callable[P, R]], py_type_context: PyTypeContext) -> WrappedJITFunc[P, R]
¶
Wrap a :class:RawJITFunc as a :class:WrappedJITFunc.
Builds argument/result converters from signature and checks that the
resulting C signature matches raw_func.c_func_type.