|
template<class TObjectRef > |
R | operator() (const String &token, TObjectRef obj, Args... args) const |
| Call the dispatch function. More...
|
|
TSelf & | set_dispatch (String token, uint32_t type_index, runtime::PackedFunc f) |
| Set the dispatch function. More...
|
|
TSelf & | set_fallback (runtime::PackedFunc f) |
|
void | remove_fallback () |
|
template<typename TObjectRef , typename TCallable , typename = std::enable_if_t<IsDispatchFunction<TObjectRef, TCallable>::value>> |
TSelf & | set_dispatch (String token, TCallable f) |
| Set the dispatch function. More...
|
|
template<typename TCallable , typename = std::enable_if_t<IsDispatchFunction<ObjectRef, TCallable>::value>> |
TSelf & | set_fallback (TCallable f) |
|
void | remove_dispatch (String token, uint32_t type_index) |
| Remove dispatch function. More...
|
|
template<typename R, typename... Args>
class tvm::script::printer::IRDocsifierFunctor< R, Args >
Dynamic dispatch functor based on ObjectPath.
This functor dispatches based on the type of object and the input dispatch token.
template<typename R , typename... Args>
template<class TObjectRef >
Call the dispatch function.
- Parameters
-
token | The dispatch token. |
obj | The object. |
args | Other args. |
- Returns
- The return value of the dispatch function
If the TObjectRef isn't registered with the token, it will try to find dispatch function for TObjectRef with the default dispatch token (empty string).