Skip to content

Commit 09daaea

Browse files
committed
compiler: update
1 parent 2fa4880 commit 09daaea

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

devito/ir/clusters/cluster.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -358,15 +358,17 @@ def dspace(self):
358358
# Dimension-centric view of the data space
359359
intervals = IntervalGroup.generate('union', *parts.values())
360360

361-
# 'union' may have resulted in intervals stricter than needed
362-
# e.g. issue #2235. We relax the upper interval with the upper
363-
# from not mapped parts
361+
# 'union' may consume intervals (values) from keys that have dimensions
362+
# not mapped to intervals e.g. issue #2235, resulting in reduced
363+
# iteration size. Here, we relax this mapped upper interval, by
364+
# intersecting intervals with matching only dimensions
364365
for f, v in parts.items():
365-
for d in f.dimensions:
366+
for i in v:
366367
# oobs check is not required but helps reduce
367368
# interval reconstruction
368-
if d in oobs and not v[d].is_Null:
369-
intervals = intervals.set_upper(d, v[d].upper)
369+
if i.dim in oobs and i.dim in f.dimensions:
370+
ii = intervals[i.dim].intersection(v[i.dim])
371+
intervals = intervals.set_upper(i.dim, ii.upper)
370372

371373
# E.g., `db0 -> time`, but `xi NOT-> x`
372374
intervals = intervals.promote(lambda d: not d.is_Sub)

0 commit comments

Comments
 (0)