tvm
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
tvm::runtime::TVMPODValue_ Class Reference

Internal base class to handle conversion to POD values. More...

#include <packed_func.h>

Inheritance diagram for tvm::runtime::TVMPODValue_:
Collaboration diagram for tvm::runtime::TVMPODValue_:

Public Member Functions

 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
 

Protected Member Functions

 TVMPODValue_ ()
 
 TVMPODValue_ (TVMValue value, int type_code)
 

Protected Attributes

TVMValue value_
 The value. More...
 
int type_code_
 the type code More...
 

Friends

class TVMArgsSetter
 
class TVMRetValue
 
class TVMMovableArgValue_
 

Detailed Description

Internal base class to handle conversion to POD values.

Constructor & Destructor Documentation

◆ TVMPODValue_() [1/2]

tvm::runtime::TVMPODValue_::TVMPODValue_ ( )
inlineprotected

◆ TVMPODValue_() [2/2]

tvm::runtime::TVMPODValue_::TVMPODValue_ ( TVMValue  value,
int  type_code 
)
inlineprotected

Member Function Documentation

◆ operator Device()

tvm::runtime::TVMPODValue_::operator Device ( ) const
inline

◆ operator DLTensor *()

tvm::runtime::TVMPODValue_::operator DLTensor * ( ) const
inline

◆ operator Module()

tvm::runtime::TVMPODValue_::operator Module ( ) const
inline

◆ operator NDArray()

tvm::runtime::TVMPODValue_::operator NDArray ( ) const
inline

◆ operator PackedFunc()

tvm::runtime::TVMPODValue_::operator PackedFunc ( ) const
inline

◆ operator void *()

tvm::runtime::TVMPODValue_::operator void * ( ) const
inline

◆ ptr()

template<typename T >
T* tvm::runtime::TVMPODValue_::ptr ( ) const
inline

return handle as specific pointer type.

Template Parameters
Tthe data type.
Returns
The pointer type.

◆ TryAsBool()

std::optional<bool> tvm::runtime::TVMPODValue_::TryAsBool ( ) const
inline

◆ TryAsFloat()

std::optional<double> tvm::runtime::TVMPODValue_::TryAsFloat ( ) const
inline

◆ TryAsInt()

std::optional<int64_t> tvm::runtime::TVMPODValue_::TryAsInt ( ) const
inline

◆ type_code()

int tvm::runtime::TVMPODValue_::type_code ( ) const
inline

Friends And Related Function Documentation

◆ TVMArgsSetter

friend class TVMArgsSetter
friend

◆ TVMMovableArgValue_

friend class TVMMovableArgValue_
friend

◆ TVMRetValue

friend class TVMRetValue
friend

Member Data Documentation

◆ type_code_

int tvm::runtime::TVMPODValue_::type_code_
protected

the type code

◆ value_

TVMValue tvm::runtime::TVMPODValue_::value_
protected

The value.


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