mxnet
|
Packed function is a type-erased function. The arguments are passed by packed format. More...
#include <packed_func.h>
Public Types | |
using | FType = std::function< void(MXNetArgs args, MXNetRetValue *rv)> |
The internal std::function. More... | |
Public Member Functions | |
PackedFunc () | |
default constructor More... | |
PackedFunc (std::nullptr_t null) | |
constructor from null More... | |
PackedFunc (FType body) | |
constructing a packed function from a std::function. More... | |
template<typename... Args> | |
MXNetRetValue | operator() (Args &&...args) const |
Call packed function by directly passing in unpacked format. More... | |
void | CallPacked (MXNetArgs args, MXNetRetValue *rv) const |
Call the function in packed format. More... | |
FType | body () const |
bool | operator== (std::nullptr_t null) const |
bool | operator!= (std::nullptr_t null) const |
Packed function is a type-erased function. The arguments are passed by packed format.
This is an useful unified interface to call generated functions, It is the unified function function type of TVM. It corresponds to TVMFunctionHandle in C runtime API.
using mxnet::runtime::PackedFunc::FType = std::function<void (MXNetArgs args, MXNetRetValue* rv)> |
The internal std::function.
args | The arguments to the function. |
rv | The return value. |
|
inline |
default constructor
|
inline |
constructor from null
|
inlineexplicit |
constructing a packed function from a std::function.
body | the internal container of packed function. |
|
inline |
|
inline |
Call the function in packed format.
args | The arguments |
rv | The return value. |
|
inline |
|
inline |
Call packed function by directly passing in unpacked format.
args | Arguments to be passed. |
Args | arguments to be passed. |
|
inline |