tvm
Classes | Namespaces | Macros | Functions
type_functor.h File Reference

A way to defined arbitrary function signature with dispatch on types. More...

#include <tvm/ir/tensor_type.h>
#include <tvm/ir/type_relation.h>
#include <tvm/node/functor.h>
#include <string>
#include <utility>
#include <vector>
Include dependency graph for type_functor.h:

Go to the source code of this file.

Classes

class  tvm::TypeFunctor< R(const Type &n, Args...)>
 
class  tvm::TypeVisitor
 A type visitor that recursively visit types. More...
 
class  tvm::TypeMutator
 TypeMutator that mutates expressions. More...
 

Namespaces

 tvm
 runtime implementation for LibTorch/TorchScript.
 

Macros

#define TYPE_FUNCTOR_DEFAULT    { return VisitTypeDefault_(op, std::forward<Args>(args)...); }
 
#define TVM_TYPE_FUNCTOR_DISPATCH(OP)
 

Functions

Type tvm::Bind (const Type &type, const Map< TypeVar, Type > &args_map)
 Bind free type variables in the type. More...
 

Detailed Description

A way to defined arbitrary function signature with dispatch on types.

Macro Definition Documentation

◆ TVM_TYPE_FUNCTOR_DISPATCH

#define TVM_TYPE_FUNCTOR_DISPATCH (   OP)
Value:
vtable.template set_dispatch<OP>([](const ObjectRef& n, TSelf* self, Args... args) { \
return self->VisitType_(static_cast<const OP*>(n.get()), std::forward<Args>(args)...); \
});

◆ TYPE_FUNCTOR_DEFAULT

#define TYPE_FUNCTOR_DEFAULT    { return VisitTypeDefault_(op, std::forward<Args>(args)...); }