Function tvm_rt::function::ffi::TVMFuncCreateFromCFunc   [−][src]
pub unsafe extern "C" fn TVMFuncCreateFromCFunc(
    func: Option<unsafe extern "C" fn(*mut TVMValue, *mut i32, i32, *mut c_void, *mut c_void) -> i32>, 
    resource_handle: *mut c_void, 
    fin: Option<unsafe extern "C" fn(*mut c_void)>, 
    out: *mut *mut c_void
) -> i32Expand description
\brief Wrap a TVMPackedCFunc to become a FunctionHandle.
The resource_handle will be managed by TVM API, until the function is no longer used.
\param func The packed C function. \param resource_handle The resource handle from front-end, can be NULL. \param fin The finalizer on resource handle when the FunctionHandle get freed, can be NULL \param out the result function handle. \return 0 when success, nonzero when failure happens
