tvm
Public Member Functions | List of all members
tvm::runtime::TVMMovableArgValue_ Class Reference

Internal auxiliary struct for TypedPackedFunc to indicate a movable argument. More...

#include <packed_func.h>

Inheritance diagram for tvm::runtime::TVMMovableArgValue_:
Collaboration diagram for tvm::runtime::TVMMovableArgValue_:

Public Member Functions

 TVMMovableArgValue_ (TVMValue value, int type_code)
 
template<typename FType >
 operator TypedPackedFunc< FType > () const
 
 operator DLDataType () const
 
 operator DataType () const
 
 operator TVMArgValue () const
 
template<typename T , typename = typename std::enable_if<std::is_base_of<ObjectRef, T>::value>::type>
 operator T () const
 Helper converter function. Try to move out an argument if possible, fall back to normal argument conversion rule otherwise. More...
 
- Public Member Functions inherited from tvm::runtime::TVMPODValue_
 operator double () const
 
 operator int64_t () const
 
 operator uint64_t () const
 
 operator int () const
 
 operator bool () const
 
 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...
 
template<typename TObjectRef , typename = typename std::enable_if<std::is_base_of<ObjectRef, TObjectRef>::value>::type>
bool IsObjectRef () const
 
template<typename TObjectRef >
TObjectRef AsObjectRef () const
 

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...
 

Detailed Description

Internal auxiliary struct for TypedPackedFunc to indicate a movable argument.

We can only construct a movable argument once from a single argument position. If the argument is passed as RValue reference, the result will be moved. We should only construct a MovableArg from an argument once, as the result will can moved.

Note
For internal development purpose only.

Constructor & Destructor Documentation

◆ TVMMovableArgValue_()

tvm::runtime::TVMMovableArgValue_::TVMMovableArgValue_ ( TVMValue  value,
int  type_code 
)
inline

Member Function Documentation

◆ operator DataType()

tvm::runtime::TVMMovableArgValue_::operator DataType ( ) const
inline

◆ operator DLDataType()

tvm::runtime::TVMMovableArgValue_::operator DLDataType ( ) const
inline

◆ operator T()

template<typename T , typename >
tvm::runtime::TVMMovableArgValue_::operator T
inline

Helper converter function. Try to move out an argument if possible, fall back to normal argument conversion rule otherwise.

◆ operator TVMArgValue()

tvm::runtime::TVMMovableArgValue_::operator TVMArgValue ( ) const
inline

◆ operator TypedPackedFunc< FType >()

template<typename FType >
tvm::runtime::TVMMovableArgValue_::operator TypedPackedFunc< FType > ( ) const
inline

The documentation for this class was generated from the following file: