Skip to content
Snippets Groups Projects
Commit a4bf021a authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Use Subscript.index_tuple in more places

parent 4412cab0
No related branches found
No related tags found
No related merge requests found
......@@ -323,9 +323,7 @@ class VectorizabilityChecker(RecursiveMapper):
if not isinstance(var, ArrayBase):
raise LoopyError("non-array subscript '%s'" % expr)
index = expr.index
if not isinstance(index, tuple):
index = (index,)
index = expr.index_tuple
from loopy.symbolic import get_dependencies
from loopy.kernel.array import VectorArrayDimTag
......
......@@ -703,11 +703,7 @@ def _get_assignee_and_index(expr):
agg = expr.aggregate
assert isinstance(agg, Variable)
idx = expr.index
if not isinstance(idx, tuple):
idx = (idx,)
return (agg.name, idx)
return (agg.name, expr.index_tuple)
else:
raise RuntimeError("invalid lvalue '%s'" % expr)
......
......@@ -1159,9 +1159,7 @@ class AccessRangeMapper(WalkMapper):
if expr.aggregate.name != self.arg_name:
return
subscript = expr.index
if not isinstance(subscript, tuple):
subscript = (subscript,)
subscript = expr.index_tuple
if not get_dependencies(subscript) <= set(domain.get_var_dict()):
self.bad_subscripts.append(expr)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment