Class FunctionObj#
Defined in File function.h
Inheritance Relationships#
Base Types#
public tvm::ffi::Object
(Class Object)public TVMFFIFunctionCell
(Struct TVMFFIFunctionCell)
Class Documentation#
-
class FunctionObj : public tvm::ffi::Object, public TVMFFIFunctionCell#
Object container class that backs ffi::Function.
Note
Do not use this class directly, use ffi::Function
Public Types
-
typedef void (*FCall)(const FunctionObj*, const AnyView*, int32_t, Any*)#
Typedef for C++ style calling signature that comes with exception propagation.
Public Functions
Public Members
-
void *cpp_call#
A function pointer to an underlying cpp call.
The signature is the same as TVMFFISafeCallType except the return type is void, and the function throws exception directly instead of returning error code. We use void* here to avoid depending on c++ compiler.
This pointer should be set to NULL for functions that are not originally created in cpp.
Note
The caller must assume the same cpp exception catching abi when using this pointer. When used across FFI boundaries, always use safe_call.
-
TVMFFISafeCallType safe_call#
A C API compatible call with exception catching.
Protected Functions
-
inline FunctionObj()#
Make default constructor protected.
Friends
- friend class Function
-
typedef void (*FCall)(const FunctionObj*, const AnyView*, int32_t, Any*)#