File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
include/mlir/Analysis/Presburger Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -85,17 +85,17 @@ class PresburgerRelation {
85
85
// / Return the intersection of this set and the given set.
86
86
PresburgerRelation intersect (const PresburgerRelation &set) const ;
87
87
88
- // / Intersect the given `set` with the range in-place .
88
+ // / Return the range intersection of the given `set` with `this` relation .
89
89
// /
90
90
// / Formally, let the relation `this` be R: A -> B and `set` is C, then this
91
- // / operation modifies R to be A -> (B intersection C).
92
- PresburgerRelation intersectRange (PresburgerSet &set);
91
+ // / operation returns A -> (B intersection C).
92
+ PresburgerRelation intersectRange (const PresburgerSet &set) const ;
93
93
94
- // / Intersect the given `set` with the domain in-place .
94
+ // / Return the domain intersection of the given `set` with `this` relation .
95
95
// /
96
96
// / Formally, let the relation `this` be R: A -> B and `set` is C, then this
97
- // / operation modifies R to be (A intersection C) -> B.
98
- PresburgerRelation intersectDomain (const PresburgerSet &set);
97
+ // / operation returns (A intersection C) -> B.
98
+ PresburgerRelation intersectDomain (const PresburgerSet &set) const ;
99
99
100
100
// / Invert the relation, i.e. swap its domain and range.
101
101
// /
Original file line number Diff line number Diff line change @@ -143,7 +143,8 @@ PresburgerRelation::intersect(const PresburgerRelation &set) const {
143
143
return result;
144
144
}
145
145
146
- PresburgerRelation PresburgerRelation::intersectRange (PresburgerSet &set) {
146
+ PresburgerRelation
147
+ PresburgerRelation::intersectRange (const PresburgerSet &set) const {
147
148
assert (space.getRangeSpace ().isCompatible (set.getSpace ()) &&
148
149
" Range of `this` must be compatible with range of `set`" );
149
150
@@ -153,7 +154,7 @@ PresburgerRelation PresburgerRelation::intersectRange(PresburgerSet &set) {
153
154
}
154
155
155
156
PresburgerRelation
156
- PresburgerRelation::intersectDomain (const PresburgerSet &set) {
157
+ PresburgerRelation::intersectDomain (const PresburgerSet &set) const {
157
158
assert (space.getDomainSpace ().isCompatible (set.getSpace ()) &&
158
159
" Domain of `this` must be compatible with range of `set`" );
159
160
You can’t perform that action at this time.
0 commit comments