Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioLuporini committed Aug 23, 2023
1 parent d1e2a71 commit 55e0371
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions devito/passes/clusters/aliases.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,17 +366,11 @@ def cbk_search(expr):
def cbk_search2(expr, rank):
ret = []
for e in cbk_search(expr):
v = e
mapper = deindexify(v)
mapper = deindexify(e)
for i in rank:
if i in mapper:
ret.extend(mapper[i])

# Prevent nested substitutions
subs = {j: Symbol(name='aaa') for j in mapper[i]}
v = uxreplace(v, subs)
mapper = deindexify(v)

break
return ret

candidates = sorted(grank, reverse=True)[:2]
Expand Down Expand Up @@ -599,8 +593,6 @@ def collect(extracted, ispace, minstorage):
nr = nredundants(ispace, pivot)
score = estimate_cost(pivot, True)*((na - 1) + nr)
if score > 0:
if score == 210:
from IPython import embed; embed()
aliases.add(pivot, aliaseds, list(mapper), distances, score)

return aliases
Expand Down Expand Up @@ -1114,9 +1106,9 @@ def naliases(self):

udims = set().union(*[unbounded(c.expr) for c in self._items])
sdims = [d for d in udims if d.is_Stencil]
implicit = int(np.prod([i._size for i in sdims])) - 1
implicit = int(np.prod([i._size for i in sdims]))

return na + implicit
return na*max(implicit, 1)

@cached_property
def _pivot_legal_rotations(self):
Expand Down

0 comments on commit 55e0371

Please sign in to comment.