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

More multiple-assignment wrinkle ironing

parent 9eda57f6
No related branches found
No related tags found
No related merge requests found
...@@ -158,7 +158,7 @@ def collect_common_factors_on_increment(kernel, var_name, vary_by_axes=()): ...@@ -158,7 +158,7 @@ def collect_common_factors_on_increment(kernel, var_name, vary_by_axes=()):
continue continue
if not isinstance(insn, Assignment): if not isinstance(insn, Assignment):
raise LoopyError("'%s' modified by non-expression instruction" raise LoopyError("'%s' modified by non-single-assignment"
% var_name) % var_name)
lhs = insn.assignee lhs = insn.assignee
......
...@@ -426,8 +426,9 @@ def precompute(kernel, subst_use, sweep_inames=[], within=None, ...@@ -426,8 +426,9 @@ def precompute(kernel, subst_use, sweep_inames=[], within=None,
import loopy as lp import loopy as lp
for insn in kernel.instructions: for insn in kernel.instructions:
if isinstance(insn, lp.Assignment): if isinstance(insn, lp.MultiAssignmentBase):
invg(insn.assignee, kernel, insn) for assignee in insn.assignees:
invg(assignee, kernel, insn)
invg(insn.expression, kernel, insn) invg(insn.expression, kernel, insn)
access_descriptors = invg.access_descriptors access_descriptors = invg.access_descriptors
......
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