tvm
|
Return Value container, Unlike TVMArgValue, which only holds reference and do not delete the underlying container during destruction. More...
#include <packed_func.h>
Public Member Functions | |
TVMRetValue () | |
default constructor More... | |
TVMRetValue (TVMRetValue &&other) | |
move constructor from another return value. More... | |
~TVMRetValue () | |
destructor More... | |
TVMRetValue (const TVMRetValue &other) | |
operator DLDataType () const | |
operator DataType () const | |
template<typename FType > | |
operator TypedPackedFunc< FType > () const | |
TVMRetValue & | operator= (TVMRetValue &&other) |
TVMRetValue & | operator= (double value) |
TVMRetValue & | operator= (std::nullptr_t value) |
TVMRetValue & | operator= (void *value) |
TVMRetValue & | operator= (int64_t value) |
TVMRetValue & | operator= (int value) |
TVMRetValue & | operator= (DLDevice value) |
TVMRetValue & | operator= (DLDataType t) |
TVMRetValue & | operator= (const DataType &other) |
TVMRetValue & | operator= (bool value) |
TVMRetValue & | operator= (std::string value) |
TVMRetValue & | operator= (TVMByteArray value) |
TVMRetValue & | operator= (NDArray other) |
TVMRetValue & | operator= (Module m) |
TVMRetValue & | operator= (PackedFunc f) |
template<typename FType > | |
TVMRetValue & | operator= (const TypedPackedFunc< FType > &f) |
TVMRetValue & | operator= (const TVMRetValue &other) |
TVMRetValue & | operator= (const TVMArgValue &other) |
TVMRetValue & | operator= (TVMMovableArgValue_ &&other) |
void | MoveToCHost (TVMValue *ret_value, int *ret_type_code) |
Move the value back to front-end via C API. This marks the current container as null. The managed resources are moved to the front-end. The front end should take charge in managing them. More... | |
const TVMValue & | value () const |
template<typename TObjectRef , typename = typename std::enable_if_t<std::is_base_of_v<ObjectRef, TObjectRef>>> | |
TVMRetValue & | operator= (TObjectRef other) |
template<typename T , typename = typename std::enable_if_t<std::is_class_v<T>>> | |
operator T () const | |
template<typename TObjectRef > | |
TObjectRef | AsObjectRef () const |
template<typename TObjectRef , typename = typename std::enable_if<std::is_base_of<ObjectRef, TObjectRef>::value>::type> | |
bool | IsObjectRef () const |
Public Member Functions inherited from tvm::runtime::TVMPODValue_CRTP_< TVMRetValue > | |
bool | IsObjectRef () const |
TObjectRef | AsObjectRef () const |
operator double () const | |
operator int64_t () const | |
operator uint64_t () const | |
operator int () const | |
operator bool () const | |
TVMPODValue_ () | |
TVMPODValue_ (TVMValue value, int type_code) | |
Public Member Functions inherited from tvm::runtime::TVMPODValue_ | |
operator void * () const | |
operator DLTensor * () const | |
operator NDArray () const | |
operator Module () const | |
operator PackedFunc () const | |
operator Device () const | |
int | type_code () const |
template<typename T > | |
T * | ptr () const |
return handle as specific pointer type. More... | |
std::optional< bool > | TryAsBool () const |
std::optional< int64_t > | TryAsInt () const |
std::optional< double > | TryAsFloat () const |
Static Public Member Functions | |
static TVMRetValue | MoveFromCHost (TVMValue value, int type_code) |
Construct a new TVMRetValue by moving from return value stored via C API. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from tvm::runtime::TVMPODValue_ | |
TVMPODValue_ () | |
TVMPODValue_ (TVMValue value, int type_code) | |
Protected Attributes inherited from tvm::runtime::TVMPODValue_ | |
TVMValue | value_ |
The value. More... | |
int | type_code_ |
the type code More... | |
Return Value container, Unlike TVMArgValue, which only holds reference and do not delete the underlying container during destruction.
TVMRetValue holds value and will manage the underlying containers when it stores a complicated data type.
|
inline |
default constructor
|
inline |
move constructor from another return value.
other | The other return value. |
|
inline |
destructor
|
inline |
|
inline |
|
inline |
|
inlinestatic |
Construct a new TVMRetValue by moving from return value stored via C API.
value | the value. |
type_code | The type code. |
|
inline |
Move the value back to front-end via C API. This marks the current container as null. The managed resources are moved to the front-end. The front end should take charge in managing them.
ret_value | The return value. |
ret_type_code | The return type code. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |