Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit fc8f5fb

Browse files
author
Sven Verdoolaege
committed
generalize operator&(isl::*, isl::*) to template form
This will ensure that it also applies to templated isl types.
1 parent 84ec837 commit fc8f5fb

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

tc/external/detail/islpp-inl.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,6 @@ inline isl::multi_aff operator/(isl::multi_aff left, isl::multi_val right) {
195195
///////////////////////////////////////////////////////////////////////////////
196196
// Operations on isl::set and isl::union_set
197197
///////////////////////////////////////////////////////////////////////////////
198-
inline isl::set operator&(isl::set S1, isl::set S2) {
199-
return S1.intersect(S2);
200-
}
201-
202198
inline isl::union_set operator&(isl::union_set S1, isl::set S2) {
203199
return S1.intersect(isl::union_set(S2));
204200
}
@@ -207,10 +203,6 @@ inline isl::union_set operator&(isl::set S1, isl::union_set S2) {
207203
return S2 & S1;
208204
}
209205

210-
inline isl::union_set operator&(isl::union_set S1, isl::union_set S2) {
211-
return S1.intersect(S2);
212-
}
213-
214206
///////////////////////////////////////////////////////////////////////////////
215207
// Operations on isl::set and isl::point
216208
///////////////////////////////////////////////////////////////////////////////

tc/external/detail/islpp.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ inline T operator-(T a, T b) {
4040
return a.sub(b);
4141
}
4242

43+
template <typename T>
44+
inline T operator&(T S1, T S2) {
45+
return S1.intersect(S2);
46+
}
47+
4348
inline isl::val operator*(isl::val l, isl::val r) {
4449
return l.mul(r);
4550
}
@@ -184,10 +189,8 @@ isl::multi_aff operator/(isl::multi_aff left, isl::multi_val right);
184189
///////////////////////////////////////////////////////////////////////////////
185190
// Operations on isl::set and isl::union_set
186191
///////////////////////////////////////////////////////////////////////////////
187-
isl::set operator&(isl::set S1, isl::set S2);
188192
isl::union_set operator&(isl::union_set S1, isl::set S2);
189193
isl::union_set operator&(isl::set S1, isl::union_set S2);
190-
isl::union_set operator&(isl::union_set S1, isl::union_set S2);
191194

192195
///////////////////////////////////////////////////////////////////////////////
193196
// Operations on isl::set and isl::point

0 commit comments

Comments
 (0)