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

Commit 036ecde

Browse files
author
Sven Verdoolaege
committed
extractAccess: 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 45c5ed6 commit 036ecde

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tc/core/halide2isl.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,15 +264,15 @@ isl::map extractAccess(
264264
// the allocation could be accessed.
265265
isl::set access = isl::set::universe(tensorSpace);
266266

267+
auto identity = isl::multi_aff::identity(tensorSpace.map_from_set());
267268
for (size_t i = 0; i < args.size(); i++) {
268269
// Then add one equality constraint per dimension to encode the
269270
// point in the allocation actually read/written for each point in
270271
// the iteration space. In the case of gathers or scatters, we may
271272
// have to leave some things unconstrained.
272273

273274
// The coordinate written to in the range ...
274-
auto rangePoint =
275-
isl::pw_aff(isl::local_space(tensorSpace), isl::dim_type::set, i);
275+
auto rangePoint = identity.get_aff(i);
276276
// ... equals the coordinate accessed as a function of the parameters.
277277
auto domainPoint = halide2isl::makeIslAffFromExpr(tensorSpace, args[i]);
278278
if (!domainPoint.is_null()) {

0 commit comments

Comments
 (0)