49 #ifndef TVM_IR_TYPE_H_
50 #define TVM_IR_TYPE_H_
212 v->Visit(
"fields", &
fields);
213 v->Visit(
"span", &
span);
259 return n && n->
fields.size() == 0;
280 v->Visit(
"span", &
span);
Runtime Array container types.
Visitor class to get the attributes of an AST/IR node. The content is going to be called for each fie...
Definition: reflection.h:52
Function type.
Definition: type.h:270
bool SEqualReduce(const FuncTypeNode *other, SEqualReducer equal) const
Definition: type.h:283
static constexpr const char * _type_key
Definition: type.h:293
Type ret_type
The type of return value.
Definition: type.h:275
TVM_DECLARE_FINAL_OBJECT_INFO(FuncTypeNode, TypeNode)
void SHashReduce(SHashReducer hash_reduce) const
Definition: type.h:288
Array< Type > arg_types
type type of arguments
Definition: type.h:273
void VisitAttrs(AttrVisitor *v)
Definition: type.h:277
Managed reference to FuncTypeNode.
Definition: type.h:301
FuncType(Array< Type > arg_types, Type ret_type, Span span=Span())
Constructor.
TVM_DEFINE_OBJECT_REF_METHODS(FuncType, Type, FuncTypeNode)
Low-level raw pointer type.
Definition: type.h:151
Type element_type
The type of the element which the pointer points to.
Definition: type.h:156
TVM_DECLARE_FINAL_OBJECT_INFO(PointerTypeNode, TypeNode)
void SHashReduce(SHashReducer hash_reduce) const
Definition: type.h:174
void VisitAttrs(AttrVisitor *v)
Definition: type.h:162
static constexpr const char * _type_key
Definition: type.h:180
bool SEqualReduce(const PointerTypeNode *other, SEqualReducer equal) const
Definition: type.h:167
String storage_scope
The storage scope of the pointer.
Definition: type.h:160
TVM_DEFINE_OBJECT_REF_METHODS(PointerType, Type, PointerTypeNode)
PointerType(Type element_type, String storage_scope="")
Constructor.
Primitive data types used in the low-level IR.
Definition: type.h:106
runtime::DataType dtype
The corresponding dtype field.
Definition: type.h:111
void VisitAttrs(AttrVisitor *v)
Definition: type.h:113
static constexpr const char * _type_key
Definition: type.h:121
TVM_DECLARE_FINAL_OBJECT_INFO(PrimTypeNode, TypeNode)
void SHashReduce(SHashReducer hash_reduce) const
Definition: type.h:119
bool SEqualReduce(const PrimTypeNode *other, SEqualReducer equal) const
Definition: type.h:115
PrimType(runtime::DataType dtype, Span span=Span())
Constructor.
TVM_DEFINE_OBJECT_REF_METHODS(PrimType, Type, PrimTypeNode)
A Reducer class to reduce the structural equality result of two objects.
Definition: structural_equal.h:135
A Reducer class to reduce the structural hash value.
Definition: structural_hash.h:121
Definition: source_map.h:120
The type of tuple values.
Definition: type.h:204
TupleTypeNode()
Definition: type.h:209
bool SEqualReduce(const TupleTypeNode *other, SEqualReducer equal) const
Definition: type.h:216
void SHashReduce(SHashReducer hash_reduce) const
Definition: type.h:220
Array< Type > fields
The type of each field in the tuple.
Definition: type.h:207
static constexpr const char * _type_key
Definition: type.h:222
TVM_DECLARE_FINAL_OBJECT_INFO(TupleTypeNode, TypeNode)
void VisitAttrs(AttrVisitor *v)
Definition: type.h:211
Managed reference to TupleTypeNode.
Definition: type.h:230
TVM_DEFINE_OBJECT_REF_METHODS(TupleType, Type, TupleTypeNode)
TupleType(Array< Type > fields, Span span=Span())
Constructor.
static TupleType Empty()
Create an empty tuple type that constains nothing.
Type is the base type of all types.
Definition: type.h:74
static constexpr const uint32_t _type_child_slots
Definition: type.h:85
static constexpr const bool _type_has_method_shash_reduce
Definition: type.h:84
Span span
Span that points to the original source code. Reserved debug information.
Definition: type.h:80
static constexpr const bool _type_has_method_sequal_reduce
Definition: type.h:83
TVM_DECLARE_BASE_OBJECT_INFO(TypeNode, Object)
static constexpr const char * _type_key
Definition: type.h:82
Managed reference to TypeNode.
Definition: type.h:93
TVM_DEFINE_OBJECT_REF_METHODS(Type, ObjectRef, TypeNode)
Array, container representing a contiguous sequence of ObjectRefs.
Definition: array.h:289
Runtime primitive data type.
Definition: data_type.h:43
Base class of all object reference.
Definition: object.h:520
const ObjectType * as() const
Try to downcast the internal Object to a raw pointer of a corresponding type.
Definition: object.h:911
base class of all object containers.
Definition: object.h:172
Reference to string objects.
Definition: string.h:97
bool empty() const
Retun if the string is empty.
Definition: string.h:207
Performance counters for profiling via the PAPI library.
Definition: analyzer.h:36
bool IsVoidType(const Type &type)
Check whether the tyep represents void.
Definition: type.h:257
PrimExpr equal(PrimExpr a, PrimExpr b, Span span=Span())
equal
Type VoidType()
Definition: type.h:251
Definitions and helper macros for IR/AST nodes.
A managed object in the TVM runtime.
A map from source names to source code.