MCPcopy Create free account
hub / github.com/apache/tvm-ffi / SafeCall

Method SafeCall

include/tvm/ffi/function.h:189–196  ·  view source on GitHub ↗

\cond Doxygen_Suppress Implementing safe call style

Source from the content-addressed store, hash-verified

187 /// \cond Doxygen_Suppress
188 // Implementing safe call style
189 static int SafeCall(void* func, const TVMFFIAny* args, int32_t num_args, TVMFFIAny* result) {
190 TVM_FFI_SAFE_CALL_BEGIN();
191 TVM_FFI_ICHECK_LT(result->type_index, TypeIndex::kTVMFFIStaticObjectBegin);
192 FunctionObj* self = static_cast<FunctionObj*>(func);
193 reinterpret_cast<FCall>(self->cpp_call)(self, reinterpret_cast<const AnyView*>(args), num_args,
194 reinterpret_cast<Any*>(result));
195 TVM_FFI_SAFE_CALL_END();
196 }
197 /// \endcond
198 /*! \brief Type-erased filed for storing callable object*/
199 mutable TCallable callable_;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected