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

A single argument value to PackedFunc. Containing both type_code and TVMValue. More...

#include <packed_func.h>

Inheritance diagram for tvm::runtime::TVMArgValue:
Collaboration diagram for tvm::runtime::TVMArgValue:

Public Member Functions

 TVMArgValue ()
 default constructor More...
 
 TVMArgValue (TVMValue value, int type_code)
 constructor More...
 
template<typename FType >
 operator TypedPackedFunc< FType > () const
 
const TVMValuevalue () const
 
template<typename T , typename = typename std::enable_if<std::is_class<T>::value>::type>
 operator T () const
 
 operator DLDataType () const
 
 operator DataType () 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_
 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

A single argument value to PackedFunc. Containing both type_code and TVMValue.

Provides utilities to do type cast into other types.

Constructor & Destructor Documentation

◆ TVMArgValue() [1/2]

tvm::runtime::TVMArgValue::TVMArgValue ( )
inline

default constructor

◆ TVMArgValue() [2/2]

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

constructor

Parameters
valueof the function
type_codeThe type code.

Member Function Documentation

◆ AsObjectRef()

template<typename TObjectRef >
TObjectRef tvm::runtime::TVMPODValue_::AsObjectRef ( typename TObjectRef  )
inline

◆ IsObjectRef()

template<typename TObjectRef , typename = typename std::enable_if<std::is_base_of<ObjectRef, TObjectRef>::value>::type>
bool tvm::runtime::TVMPODValue_::IsObjectRef ( typename TObjectRef  ,
typename  = typename std::enable_if<std::is_base_of<ObjectRef, TObjectRef>::value>::type 
)
inline

◆ operator DataType()

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

◆ operator DLDataType()

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

◆ operator T()

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

◆ operator TypedPackedFunc< FType >()

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

◆ value()

const TVMValue& tvm::runtime::TVMArgValue::value ( ) const
inline

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