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

Commit c973b22

Browse files
author
Sven Verdoolaege
committed
MappedScop::map: use templated isl types
1 parent d56c5bf commit c973b22

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

tc/core/polyhedral/cuda/mapped_scop.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ const CudaDim& mappingSize<mapping::ThreadId>(const MappedScop* mscop) {
136136
// Return a pointer to the updated node (below the inserted filter)
137137
// for call chaining purposes.
138138
template <typename MappingTypeId>
139-
ScheduleTree* MappedScop::map(ScheduleTree* tree, isl::union_pw_aff_list list) {
139+
ScheduleTree* MappedScop::map(
140+
ScheduleTree* tree,
141+
isl::UnionPwAffListOn<Statement> list) {
140142
size_t nToMap = list.size();
141143
const auto& extent = mappingSize<MappingTypeId>(this).view;
142144
TC_CHECK_LE(nToMap, extent.size()) << "dimension overflow";
@@ -146,7 +148,7 @@ ScheduleTree* MappedScop::map(ScheduleTree* tree, isl::union_pw_aff_list list) {
146148
auto universe = domain.universe();
147149

148150
std::vector<MappingTypeId> idList;
149-
auto affList = isl::union_pw_aff_list(list.get_ctx(), 0);
151+
auto affList = isl::UnionPwAffListOn<Statement>(list.get_ctx(), 0);
150152
for (size_t i = 0; i < nToMap; ++i) {
151153
auto id = MappingTypeId::makeId(i);
152154
auto upa = list.get_at(i);
@@ -158,8 +160,8 @@ ScheduleTree* MappedScop::map(ScheduleTree* tree, isl::union_pw_aff_list list) {
158160

159161
for (size_t i = nToMap; i < extent.size(); ++i) {
160162
auto id = MappingTypeId::makeId(i);
161-
affList = affList.add(
162-
isl::union_pw_aff(universe, isl::val::zero(domain.get_ctx())));
163+
affList = affList.add(isl::UnionPwAffOn<Statement>(
164+
universe, isl::val::zero(domain.get_ctx())));
163165
idList.emplace_back(id);
164166
}
165167

tc/core/polyhedral/cuda/mapped_scop.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class MappedScop {
151151
template <typename MappingTypeId>
152152
detail::ScheduleTree* map(
153153
detail::ScheduleTree* tree,
154-
isl::union_pw_aff_list list);
154+
isl::UnionPwAffListOn<Statement> list);
155155
// Map "band" to block identifiers and then scale
156156
// the band members by "tileSizes".
157157
void mapToBlocksAndScaleBand(

0 commit comments

Comments
 (0)