Skip to content

Commit 75b5ec7

Browse files
committed
temp fix for postincrementindex data dependence
1 parent eadaa06 commit 75b5ec7

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

devito/ir/support/basic.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from devito.types import (ComponentAccess, Dimension, DimensionTuple, Fence,
1919
CriticalRegion, Function, Symbol, Temp, TempArray,
2020
TBArray)
21+
from devito.types.misc import PostIncrementIndex
2122

2223
__all__ = ['IterationInstance', 'TimedAccess', 'Scope', 'ExprGeometry']
2324

@@ -409,7 +410,11 @@ def distance(self, other):
409410
# `self.itintervals=(time, x, y)`, `n=0`
410411
continue
411412
elif not sai and not oai:
412-
if self[n] - other[n] == 0:
413+
# TODO: temp fix
414+
if any(isinstance(i, PostIncrementIndex)
415+
for i in (self[n], other[n])):
416+
ret.append(S.Zero)
417+
elif self[n] - other[n] == 0:
413418
# E.g., `self=R<a,[4]>` and `other=W<a,[4]>`
414419
ret.append(S.Zero)
415420
else:

0 commit comments

Comments
 (0)