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

Commit 292b999

Browse files
author
Sven Verdoolaege
committed
removeRangeStrides: use templated isl types
1 parent 8f5a191 commit 292b999

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tc/core/polyhedral/memory_promotion.cc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,19 @@ namespace {
4545
// D -> O: o_i = f(D)
4646
//
4747
// by subtracting "offsets" and by dividing the result by "strides".
48-
isl::map removeRangeStrides(
49-
isl::map relation,
50-
isl::multi_val strides,
51-
isl::multi_aff offsets) {
48+
template <typename Domain, typename Range>
49+
isl::Map<Domain, Range> removeRangeStrides(
50+
isl::Map<Domain, Range> relation,
51+
isl::MultiVal<Range> strides,
52+
isl::MultiAff<Domain, Range> offsets) {
5253
TC_CHECK_EQ(strides.size(), offsets.size());
5354

5455
auto space = relation.get_space();
55-
auto stridesMA = isl::multi_aff::identity(space.range().map_from_set());
56+
auto stridesMA =
57+
isl::MultiAff<Range, Range>::identity(space.range().map_from_set());
5658
stridesMA = stridesMA / strides;
5759

58-
return relation.sum(isl::map(offsets.neg())).apply_range(isl::map(stridesMA));
60+
return relation.sum(offsets.neg().asMap()).apply_range(stridesMA.asMap());
5961
}
6062

6163
// Compute a box approximation of the range of the given relation,

0 commit comments

Comments
 (0)