From 6c92f17c7161e4577cc353991f11724de3fd3d97 Mon Sep 17 00:00:00 2001 From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de> Date: Mon, 18 Apr 2016 17:28:01 +0200 Subject: [PATCH] [bugfix] The var_subst_map is a member of codegen_state not of the ecm When using CInstructions with plain CTarget() as code generation target, an AttributeError was thrown when evaluating the if clause here. This commit uses the var_subst_map of the codegen_state instead. --- loopy/codegen/instruction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loopy/codegen/instruction.py b/loopy/codegen/instruction.py index 323951a63..d3a7ae42c 100644 --- a/loopy/codegen/instruction.py +++ b/loopy/codegen/instruction.py @@ -232,7 +232,7 @@ def generate_c_instruction_code(kernel, insn, codegen_state): from pymbolic.primitives import Variable for name, iname_expr in insn.iname_exprs: if (isinstance(iname_expr, Variable) - and name not in ecm.var_subst_map): + and name not in codegen_state.var_subst_map): # No need, the bare symbol will work continue -- GitLab