mxnet
Public Member Functions | List of all members
mxnet::runtime::MXNetRetValue Class Reference

Return Value container, Unlike MXNetArgValue, which only holds reference and do not delete the underlying container during destruction. More...

#include <packed_func.h>

Inheritance diagram for mxnet::runtime::MXNetRetValue:
Inheritance graph
Collaboration diagram for mxnet::runtime::MXNetRetValue:
Collaboration graph

Public Member Functions

 MXNetRetValue ()
 default constructor More...
 
 MXNetRetValue (MXNetRetValue &&other)
 move constructor from anoter return value. More...
 
 ~MXNetRetValue ()
 destructor More...
 
 MXNetRetValue (const MXNetRetValue &other)
 
 operator std::string () const
 
 operator DLDataType () const
 
 operator MXNetDataType () const
 
 operator PackedFunc () const
 
template<typename FType >
 operator TypedPackedFunc< FType > () const
 
MXNetRetValueoperator= (MXNetRetValue &&other)
 
MXNetRetValueoperator= (double value)
 
MXNetRetValueoperator= (std::nullptr_t value)
 
MXNetRetValueoperator= (void *value)
 
MXNetRetValueoperator= (int64_t value)
 
MXNetRetValueoperator= (int value)
 
MXNetRetValueoperator= (bool value)
 
MXNetRetValueoperator= (std::string value)
 
MXNetRetValueoperator= (DLDataType t)
 
MXNetRetValueoperator= (const MXNetDataType &other)
 
MXNetRetValueoperator= (MXNetByteArray value)
 
MXNetRetValueoperator= (ObjectRef other)
 
template<typename T >
MXNetRetValueoperator= (ObjectPtr< T > other)
 
MXNetRetValueoperator= (PackedFunc f)
 
template<typename FType >
MXNetRetValueoperator= (const TypedPackedFunc< FType > &f)
 
MXNetRetValueoperator= (const MXNetRetValue &other)
 
MXNetRetValueoperator= (const MXNetArgValue &other)
 
MXNetRetValueoperator= (::mxnet::NDArray *value)
 
template<typename T , typename = typename std::enable_if< extension_type_info<T>::code != 0>::type>
MXNetRetValueoperator= (const T &other)
 
void MoveToCHost (MXNetValue *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 is moved to front-end and the front end should take charge in managing them. More...
 
const MXNetValuevalue () const
 
template<typename T , typename = typename std::enable_if< std::is_class<T>::value>::type>
 operator T () const
 
template<typename TObjectRef >
TObjectRef AsObjectRef () const
 
- Public Member Functions inherited from mxnet::runtime::MXNetPODValue_
 operator double () const
 
 operator int64_t () const
 
 operator uint64_t () const
 
 operator int () const
 
 operator bool () const
 
 operator void * () const
 
 operator ObjectRef () const
 
template<typename TObjectRef , typename = typename std::enable_if< std::is_class<TObjectRef>::value>::type>
bool IsObjectRef () const
 
int type_code () const
 
template<typename T >
T * ptr () const
 return handle as specific pointer type. More...
 

Additional Inherited Members

- Protected Member Functions inherited from mxnet::runtime::MXNetPODValue_
 MXNetPODValue_ ()
 
 MXNetPODValue_ (MXNetValue value, int type_code)
 
- Protected Attributes inherited from mxnet::runtime::MXNetPODValue_
MXNetValue value_
 The value. More...
 
int type_code_
 the type code More...
 

Detailed Description

Return Value container, Unlike MXNetArgValue, which only holds reference and do not delete the underlying container during destruction.

MXNetRetValue holds value and will manage the underlying containers when it stores a complicated data type.

Constructor & Destructor Documentation

◆ MXNetRetValue() [1/3]

mxnet::runtime::MXNetRetValue::MXNetRetValue ( )
inline

default constructor

◆ MXNetRetValue() [2/3]

mxnet::runtime::MXNetRetValue::MXNetRetValue ( MXNetRetValue &&  other)
inline

move constructor from anoter return value.

Parameters
otherThe other return value.

◆ ~MXNetRetValue()

mxnet::runtime::MXNetRetValue::~MXNetRetValue ( )
inline

destructor

◆ MXNetRetValue() [3/3]

mxnet::runtime::MXNetRetValue::MXNetRetValue ( const MXNetRetValue other)
inline

Member Function Documentation

◆ AsObjectRef()

template<typename TObjectRef >
TObjectRef mxnet::runtime::MXNetRetValue::AsObjectRef ( ) const
inline

◆ MoveToCHost()

void mxnet::runtime::MXNetRetValue::MoveToCHost ( MXNetValue ret_value,
int *  ret_type_code 
)
inline

Move the value back to front-end via C API. This marks the current container as null. The managed resources is moved to front-end and the front end should take charge in managing them.

Parameters
ret_valueThe return value.
ret_type_codeThe return type code.

◆ operator DLDataType()

mxnet::runtime::MXNetRetValue::operator DLDataType ( ) const
inline

◆ operator MXNetDataType()

mxnet::runtime::MXNetRetValue::operator MXNetDataType ( ) const
inline

◆ operator PackedFunc()

mxnet::runtime::MXNetRetValue::operator PackedFunc ( ) const
inline

◆ operator std::string()

mxnet::runtime::MXNetRetValue::operator std::string ( ) const
inline

◆ operator T()

template<typename T , typename >
mxnet::runtime::MXNetRetValue::operator T ( ) const
inline

◆ operator TypedPackedFunc< FType >()

template<typename FType >
mxnet::runtime::MXNetRetValue::operator TypedPackedFunc< FType > ( ) const
inline

◆ operator=() [1/19]

MXNetRetValue& mxnet::runtime::MXNetRetValue::operator= ( MXNetRetValue &&  other)
inline

◆ operator=() [2/19]

MXNetRetValue& mxnet::runtime::MXNetRetValue::operator= ( double  value)
inline

◆ operator=() [3/19]

MXNetRetValue& mxnet::runtime::MXNetRetValue::operator= ( std::nullptr_t  value)
inline

◆ operator=() [4/19]

MXNetRetValue& mxnet::runtime::MXNetRetValue::operator= ( void *  value)
inline

◆ operator=() [5/19]

MXNetRetValue& mxnet::runtime::MXNetRetValue::operator= ( int64_t  value)
inline

◆ operator=() [6/19]

MXNetRetValue& mxnet::runtime::MXNetRetValue::operator= ( int  value)
inline

◆ operator=() [7/19]

MXNetRetValue& mxnet::runtime::MXNetRetValue::operator= ( bool  value)
inline

◆ operator=() [8/19]

MXNetRetValue& mxnet::runtime::MXNetRetValue::operator= ( std::string  value)
inline

◆ operator=() [9/19]

MXNetRetValue& mxnet::runtime::MXNetRetValue::operator= ( DLDataType  t)
inline

◆ operator=() [10/19]

MXNetRetValue& mxnet::runtime::MXNetRetValue::operator= ( const MXNetDataType other)
inline

◆ operator=() [11/19]

MXNetRetValue& mxnet::runtime::MXNetRetValue::operator= ( MXNetByteArray  value)
inline

◆ operator=() [12/19]

MXNetRetValue& mxnet::runtime::MXNetRetValue::operator= ( ObjectRef  other)
inline

◆ operator=() [13/19]

template<typename T >
MXNetRetValue& mxnet::runtime::MXNetRetValue::operator= ( ObjectPtr< T >  other)
inline

◆ operator=() [14/19]

MXNetRetValue& mxnet::runtime::MXNetRetValue::operator= ( PackedFunc  f)
inline

◆ operator=() [15/19]

template<typename FType >
MXNetRetValue& mxnet::runtime::MXNetRetValue::operator= ( const TypedPackedFunc< FType > &  f)
inline

◆ operator=() [16/19]

MXNetRetValue& mxnet::runtime::MXNetRetValue::operator= ( const MXNetRetValue other)
inline

◆ operator=() [17/19]

MXNetRetValue& mxnet::runtime::MXNetRetValue::operator= ( const MXNetArgValue other)
inline

◆ operator=() [18/19]

MXNetRetValue& mxnet::runtime::MXNetRetValue::operator= ( ::mxnet::NDArray value)
inline

◆ operator=() [19/19]

template<typename T , typename = typename std::enable_if< extension_type_info<T>::code != 0>::type>
MXNetRetValue& mxnet::runtime::MXNetRetValue::operator= ( const T &  other)
inline

◆ value()

const MXNetValue& mxnet::runtime::MXNetRetValue::value ( ) const
inline
Returns
The value field, if the data is POD

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