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

Commit f8019d9

Browse files
author
Sven Verdoolaege
committed
tightenLaunchBounds: minor simplification
There is no need to extract the entire list of sets in a union set only to find out if it involves a single set.
1 parent 6712ed3 commit f8019d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core/polyhedral/cuda/tighten_launch_bounds.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ std::pair<tc::Grid, tc::Block> tightenLaunchBounds(
9797
if (!f) {
9898
return true;
9999
}
100-
auto us = isl::UNION_SET(f->filter_);
101-
if (us.size() != 1) {
100+
if (f->filter_.n_set() != 1) {
102101
std::stringstream ss;
103102
ss << "In tree:\n"
104103
<< *root << "\nnot a single set in filter: " << f->filter_;
105104
throw tightening::TighteningException(ss.str());
106105
}
107-
return !Scop::isSyncId(us[0].get_tuple_id());
106+
auto single = isl::set::from_union_set(f->filter_);
107+
return !Scop::isSyncId(single.get_tuple_id());
108108
},
109109
leaves(root));
110110
for (auto p : nonSyncLeaves) {

0 commit comments

Comments
 (0)