24 #ifndef TVM_IR_SPAN_H_ 25 #define TVM_IR_SPAN_H_ 54 static constexpr
const char*
_type_key =
"SourceName";
97 v->Visit(
"source_name", &source_name);
98 v->Visit(
"line", &line);
99 v->Visit(
"column", &column);
100 v->Visit(
"end_line", &end_line);
101 v->Visit(
"end_column", &end_column);
117 TVM_DLL
Span(
SourceName source_name,
int line,
int end_line,
int column,
int end_column);
120 TVM_DLL Span
Merge(
const Span& other)
const;
126 #endif // TVM_IR_SPAN_H_ tvm::Span Span
Definition: base.h:65
Definitions and helper macros for IR/AST nodes.
bool SEqualReduce(const SpanNode *other, SEqualReducer equal) const
Definition: span.h:105
The name of a source fragment.
Definition: span.h:41
A Reducer class to reduce the structural equality result of two objects.
Definition: structural_equal.h:102
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
static constexpr bool _type_has_method_sequal_reduce
Definition: span.h:48
PrimExpr equal(PrimExpr a, PrimExpr b, Span span=Span())
equal
tvm::SourceName SourceName
Definition: base.h:64
SourceName source_name
The source name.
Definition: span.h:85
TVM_DECLARE_FINAL_OBJECT_INFO(SourceNameNode, Object)
base class of all object containers.
Definition: object.h:167
int column
The column offset.
Definition: span.h:89
int line
The line number.
Definition: span.h:87
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
String name
The source name.
Definition: span.h:44
The source name of a file span.
Definition: span.h:62
void VisitAttrs(AttrVisitor *v)
Definition: span.h:96
int end_column
The end column number.
Definition: span.h:93
static constexpr const char * _type_key
Definition: span.h:54
Reference to string objects.
Definition: string.h:124
#define TVM_DEFINE_OBJECT_REF_METHODS(TypeName, ParentType, ObjectName)
Definition: object.h:713
bool SEqualReduce(const SourceNameNode *other, SEqualReducer equal) const
Definition: span.h:50
int end_line
The end line number.
Definition: span.h:91
Base class of all object reference.
Definition: object.h:511
Stores locations in frontend source that generated a node.
Definition: span.h:82
A managed object in the TVM runtime.
Map< K, V > Merge(Map< K, V > lhs, const Map< K, V > &rhs)
Merge two Maps.
Definition: map.h:1468
void VisitAttrs(AttrVisitor *v)
Definition: span.h:46