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

Commit 2caef67

Browse files
author
Sven Verdoolaege
committed
use templated isl types makeNextElementMap
1 parent 1ab9fbd commit 2caef67

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tc/core/polyhedral/cuda/memory_promotion_heuristic.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,12 @@ bool hasReuseWithin(
154154
* Create a map that increments the "dim"-th dimension and keeps all other
155155
* dimensions unchanged.
156156
*/
157-
isl::map makeNextElementMap(isl::space setSpace, unsigned dim) {
157+
template <typename Domain>
158+
isl::Map<Domain, Domain> makeNextElementMap(
159+
isl::Space<Domain> setSpace,
160+
unsigned dim) {
158161
auto mapSpace = setSpace.map_from_set();
159-
auto identityMA = isl::multi_aff::identity(mapSpace);
162+
auto identityMA = isl::MultiAff<Domain, Domain>::identity(mapSpace);
160163

161164
size_t size = identityMA.size();
162165
if (dim < 0 || dim >= size) {
@@ -167,7 +170,7 @@ isl::map makeNextElementMap(isl::space setSpace, unsigned dim) {
167170

168171
auto aff = identityMA.get_aff(dim);
169172
identityMA = identityMA.set_aff(dim, aff + 1);
170-
return isl::map(identityMA);
173+
return identityMA.asMap();
171174
}
172175

173176
/*

0 commit comments

Comments
 (0)