Template Function tvm::ffi::GetRef#
Defined in File cast.h
Function Documentation#
-
template<typename RefType, typename ObjectType>
inline RefType tvm::ffi::GetRef(const ObjectType *ptr)# Get a reference type from a raw object ptr type.
It is always important to get a reference type if we want to return a value as reference or keep the object alive beyond the scope of the function.
- Parameters:
ptr – The object pointer
- Template Parameters:
RefType – The reference type
ObjectType – The object type
- Returns:
The corresponding RefType