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

Commit 30cd79d

Browse files
author
Sven Verdoolaege
committed
mapToParameterWithExtent: use isl::multi_union_pw_aff::involves_param
1 parent 56f73b9 commit 30cd79d

File tree

2 files changed

+1
-54
lines changed

2 files changed

+1
-54
lines changed

tc/core/polyhedral/schedule_transforms-inl.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,7 @@ inline detail::ScheduleTree* mapToParameterWithExtent(
6262

6363
// Introduce the "mapping" parameter after checking it is not already present
6464
// in the schedule space.
65-
auto space = band->mupa_.get_space();
66-
int idPos = space.find_dim_by_id(isl::dim_type::param, id);
67-
if (idPos != -1) {
68-
for (auto upa : isl::MUPA(band->mupa_)) {
69-
for (auto pa : upa) {
70-
CHECK(not pa.pa.involves_dims(isl::dim_type::param, pos, 1));
71-
}
72-
}
73-
}
65+
CHECK(not band->mupa_.involves_param(id));
7466

7567
// Create mapping filter by equating the newly introduced
7668
// parameter "id" to the "pos"-th schedule dimension modulo its extent.

tc/external/detail/isl_mu_wrappers.h

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -84,51 +84,6 @@ namespace isl {
8484
// multi_aff is a vector-valued function, but just a plain aff is a
8585
// scalar-valued multivariate function plus parameters everywhere.
8686

87-
// Use the following API as follows:
88-
// isl::MUPA M(mupa);
89-
// cout << "MUPA: " << M.mupa << endl;
90-
// cout << "UPA: " << M[0].upa << endl;
91-
// cout << "PA: " << M[0][0].pa << endl;
92-
// cout << "PA[0] set: " << M[0][0][0].first << endl;
93-
// cout << "PA[0] aff: " << M[0][0][0].second << endl;
94-
//
95-
96-
/* WARNING: this does not allow inplace modifications .. ugh */
97-
struct PA : std::vector<std::pair<isl::set, isl::aff>> {
98-
explicit PA(isl::pw_aff pa_) : pa(pa_) {
99-
this->reserve(pa.n_piece());
100-
auto f = [&](isl::set s, isl::aff a) {
101-
this->push_back(std::make_pair(s, a));
102-
};
103-
pa.foreach_piece(f);
104-
}
105-
isl::pw_aff pa;
106-
};
107-
108-
/* WARNING: this does not allow inplace modifications .. ugh */
109-
struct UPA : std::vector<PA> {
110-
explicit UPA(isl::union_pw_aff upa_) : upa(upa_) {
111-
std::vector<PA> res;
112-
auto f = [&](isl::pw_aff pa) { this->push_back(PA(pa)); };
113-
upa.foreach_pw_aff(f);
114-
}
115-
PA extract(isl::space s) const {
116-
return PA(upa.extract_pw_aff(s));
117-
}
118-
isl::union_pw_aff upa;
119-
};
120-
121-
/* WARNING: this does not allow inplace modifications .. ugh */
122-
struct MUPA : std::vector<UPA> {
123-
explicit MUPA(isl::multi_union_pw_aff mupa_) : mupa(mupa_) {
124-
this->reserve(mupa.dim(isl::dim_type::set));
125-
for (size_t i = 0; i < mupa.dim(isl::dim_type::set); ++i) {
126-
this->push_back(UPA(mupa.get_union_pw_aff(i)));
127-
}
128-
}
129-
isl::multi_union_pw_aff mupa;
130-
};
131-
13287
template <typename T, isl::dim_type DT>
13388
struct DimIds : public std::vector<isl::id> {
13489
DimIds(T s) {

0 commit comments

Comments
 (0)