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

Commit 9c32bf4

Browse files
author
Sven Verdoolaege
committed
tensorElementsSet: extract iterator expressions from identity function
This avoids the use of functions in the C++ interface that will not be exported in mainline isl.
1 parent d7c04ae commit 9c32bf4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tc/core/polyhedral/memory_promotion.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,12 +414,13 @@ isl::set tensorElementsSet(const Scop& scop, isl::id tensorId) {
414414
space = space.named_set_from_params_id(tensorId, nDim);
415415

416416
auto tensorElements = isl::set::universe(space);
417+
auto identity = isl::multi_aff::identity(space.range().map_from_set());
417418
for (int i = 0; i < nDim; ++i) {
418419
auto minAff = halide2isl::makeIslAffFromExpr(
419420
space, halideParameter.min_constraint(i));
420421
auto extentAff = halide2isl::makeIslAffFromExpr(
421422
space, halideParameter.extent_constraint(i));
422-
auto aff = isl::aff(isl::local_space(space), isl::dim_type::set, i);
423+
auto aff = identity.get_aff(i);
423424
tensorElements = tensorElements & (minAff <= isl::aff_set(aff)) &
424425
(isl::aff_set(aff) < (minAff + extentAff));
425426
}

0 commit comments

Comments
 (0)