24 #ifndef TVM_IR_TYPE_H_
25 #define TVM_IR_TYPE_H_
27 #include <tvm/ffi/container/array.h>
28 #include <tvm/ffi/dtype.h>
29 #include <tvm/ffi/reflection/registry.h>
59 namespace refl = tvm::ffi::reflection;
60 refl::ObjectDef<PointerTypeNode>()
98 namespace refl = tvm::ffi::reflection;
137 return n && n->
fields.size() == 0;
156 namespace refl = tvm::ffi::reflection;
157 refl::ObjectDef<FuncTypeNode>()
189 namespace refl = tvm::ffi::reflection;
190 refl::ObjectDef<TensorMapTypeNode>();
Base expression and primitive type nodes.
Function type.
Definition: type.h:148
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("ir.FuncType", FuncTypeNode, TypeNode)
Type ret_type
The type of return value.
Definition: type.h:153
ffi::Array< Type > arg_types
type type of arguments
Definition: type.h:151
static void RegisterReflection()
Definition: type.h:155
Managed reference to FuncTypeNode.
Definition: type.h:168
FuncType(ffi::Array< Type > arg_types, Type ret_type, Span span=Span())
Constructor.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(FuncType, Type, FuncTypeNode)
Low-level raw pointer type.
Definition: type.h:47
Type element_type
The type of the element which the pointer points to.
Definition: type.h:52
ffi::String storage_scope
The storage scope of the pointer.
Definition: type.h:56
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("ir.PointerType", PointerTypeNode, TypeNode)
static void RegisterReflection()
Definition: type.h:58
PointerType(Type element_type, ffi::String storage_scope="")
Constructor.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(PointerType, Type, PointerTypeNode)
static PointerType VoidPointerTy(ffi::String storage_scope="")
Construct an opaque pointer with void element type.
static PrimType Void()
Construct the void sentinel type, encoded as handle(0, 0).
Definition: source_map.h:111
The type of tensor map.
Definition: type.h:186
static void RegisterReflection()
Definition: type.h:188
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("ir.TensorMapType", TensorMapTypeNode, TypeNode)
Managed reference to TensorMapTypeNode.
Definition: type.h:199
TensorMapType(Span span=Span())
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(TensorMapType, Type, TensorMapTypeNode)
The type of tuple values.
Definition: type.h:90
TupleTypeNode()
Definition: type.h:95
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("ir.TupleType", TupleTypeNode, TypeNode)
static void RegisterReflection()
Definition: type.h:97
ffi::Array< Type > fields
The type of each field in the tuple.
Definition: type.h:93
Managed reference to TupleTypeNode.
Definition: type.h:108
TupleType(ffi::Array< Type > fields, Span span=Span())
Constructor.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(TupleType, Type, TupleTypeNode)
static TupleType Empty()
Create an empty tuple type that constains nothing.
Type is the base type of all types.
Definition: base_expr.h:52
Managed reference to TypeNode.
Definition: base_expr.h:77
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition: analyzer.h:40
bool IsVoidType(const Type &type)
Check whether the tyep represents void.
Definition: type.h:135
Type VoidType()
Definition: type.h:129
A map from source names to source code.