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

Commit 950d406

Browse files
author
Sven Verdoolaege
committed
makeMapping: use templated isl types
1 parent c973b22 commit 950d406

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

tc/core/polyhedral/schedule_tree.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,13 @@ std::unique_ptr<ScheduleTree> ScheduleTree::makeFilter(
238238

239239
std::unique_ptr<ScheduleTree> ScheduleTree::makeMappingUnsafe(
240240
const std::vector<mapping::MappingId>& mappedIds,
241-
isl::union_pw_aff_list mappedAffs,
241+
isl::UnionPwAffListOn<Statement> mappedAffs,
242242
std::vector<ScheduleTreeUPtr>&& children) {
243243
TC_CHECK_EQ(mappedIds.size(), static_cast<size_t>(mappedAffs.size()))
244244
<< "expected as many mapped ids as affs";
245245
ScheduleTreeMapping::Mapping mapping;
246246
for (size_t i = 0, n = mappedAffs.size(); i < n; ++i) {
247-
auto aff = isl::UnionPwAffOn<Statement>(mappedAffs.get_at(i));
248-
mapping.emplace(mappedIds.at(i), aff);
247+
mapping.emplace(mappedIds.at(i), mappedAffs.get_at(i));
249248
}
250249
TC_CHECK_GE(mapping.size(), 1u) << "empty mapping";
251250
TC_CHECK_EQ(mappedIds.size(), mapping.size())

tc/core/polyhedral/schedule_tree.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ struct ScheduleTree {
302302
template <typename MappingIdType>
303303
static inline ScheduleTreeUPtr makeMapping(
304304
const std::vector<MappingIdType>& mappedIds,
305-
isl::union_pw_aff_list mappedAffs,
305+
isl::UnionPwAffListOn<Statement> mappedAffs,
306306
std::vector<ScheduleTreeUPtr>&& children = {}) {
307307
static_assert(
308308
std::is_base_of<mapping::MappingId, MappingIdType>::value,
@@ -319,7 +319,7 @@ struct ScheduleTree {
319319
// Internal type-unsafe function to construct mappings.
320320
static ScheduleTreeUPtr makeMappingUnsafe(
321321
const std::vector<mapping::MappingId>& mappedIds,
322-
isl::union_pw_aff_list mappedAffs,
322+
isl::UnionPwAffListOn<Statement> mappedAffs,
323323
std::vector<ScheduleTreeUPtr>&& children);
324324

325325
public:

0 commit comments

Comments
 (0)