|
MXNET_DLL Registry & | set_body (PackedFunc f) |
| set the body of the function to be f More...
|
|
Registry & | set_body (PackedFunc::FType f) |
| set the body of the function to be f More...
|
|
template<typename FType , typename FLambda > |
Registry & | set_body_typed (FLambda f) |
| set the body of the function to be TypedPackedFunc. More...
|
|
template<typename R , typename... Args> |
Registry & | set_body_typed (R(*f)(Args...)) |
| set the body of the function to the given function pointer. Note that this doesn't work with lambdas, you need to explicitly give a type for those. Note that this will ignore default arg values and always require all arguments to be provided. More...
|
|
template<typename T , typename R , typename... Args> |
Registry & | set_body_method (R(T::*f)(Args...)) |
| set the body of the function to be the passed method pointer. Note that this will ignore default arg values and always require all arguments to be provided. More...
|
|
template<typename T , typename R , typename... Args> |
Registry & | set_body_method (R(T::*f)(Args...) const) |
| set the body of the function to be the passed method pointer. Note that this will ignore default arg values and always require all arguments to be provided. More...
|
|
template<typename TObjectRef , typename TNode , typename R , typename... Args, typename = typename std::enable_if<std::is_base_of<ObjectRef, TObjectRef>::value>::type> |
Registry & | set_body_method (R(TNode::*f)(Args...)) |
| set the body of the function to be the passed method pointer. Used when calling a method on a Node subclass through a ObjectRef subclass. Note that this will ignore default arg values and always require all arguments to be provided. More...
|
|
template<typename TObjectRef , typename TNode , typename R , typename... Args, typename = typename std::enable_if<std::is_base_of<ObjectRef, TObjectRef>::value>::type> |
Registry & | set_body_method (R(TNode::*f)(Args...) const) |
| set the body of the function to be the passed method pointer. Used when calling a method on a Node subclass through a ObjectRef subclass. Note that this will ignore default arg values and always require all arguments to be provided. More...
|
|
Registry for global function.
template<typename TObjectRef , typename TNode , typename R , typename... Args, typename = typename std::enable_if<std::is_base_of<ObjectRef, TObjectRef>::value>::type>
Registry& mxnet::runtime::Registry::set_body_method |
( |
R(TNode::*)(Args...) |
f | ) |
|
|
inline |
set the body of the function to be the passed method pointer. Used when calling a method on a Node subclass through a ObjectRef subclass. Note that this will ignore default arg values and always require all arguments to be provided.
struct ExampleNode: BaseNode {
int doThing(int x);
}
struct Example;
TVM_REGISTER_API("Example_doThing")
.set_body_method<Example>(&ExampleNode::doThing);
- Parameters
-
f | the method pointer to forward to. |
- Template Parameters
-
TObjectRef | the node reference type to call the method on |
TNode | the node type containing the method (inferred). |
R | the return type of the function (inferred). |
Args | the argument types of the function (inferred). |
template<typename TObjectRef , typename TNode , typename R , typename... Args, typename = typename std::enable_if<std::is_base_of<ObjectRef, TObjectRef>::value>::type>
Registry& mxnet::runtime::Registry::set_body_method |
( |
R(TNode::*)(Args...) const |
f | ) |
|
|
inline |
set the body of the function to be the passed method pointer. Used when calling a method on a Node subclass through a ObjectRef subclass. Note that this will ignore default arg values and always require all arguments to be provided.
struct ExampleNode: BaseNode {
int doThing(int x);
}
struct Example;
TVM_REGISTER_API("Example_doThing")
.set_body_method<Example>(&ExampleNode::doThing);
- Parameters
-
f | the method pointer to forward to. |
- Template Parameters
-
TObjectRef | the node reference type to call the method on |
TNode | the node type containing the method (inferred). |
R | the return type of the function (inferred). |
Args | the argument types of the function (inferred). |