From fc4cb54f28b9cc21cf349c360b52922dafdf9d01 Mon Sep 17 00:00:00 2001 From: Kaushik Kulkarni Date: Fri, 30 Mar 2018 14:26:34 -0500 Subject: [PATCH] Fixes minor error --- loopy/preprocess.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/loopy/preprocess.py b/loopy/preprocess.py index 0857a5e72..4309f9ae1 100644 --- a/loopy/preprocess.py +++ b/loopy/preprocess.py @@ -2156,15 +2156,16 @@ def check_functions_are_scoped(kernel): if isinstance(insn, MultiAssignmentBase): unscoped_calls = UnScopedCallCollector()(subst_expander( insn.expression)) + if unscoped_calls: + raise LoopyError("Unknown function '%s' obtained -- register a " + "function or a kernel corresponding to it." % + set(unscoped_calls).pop()) elif isinstance(insn, (CInstruction, _DataObliviousInstruction)): pass else: raise NotImplementedError("check_function_are_scoped not " "implemented for %s type of instruction." % type(insn)) - if unscoped_calls: - raise LoopyError("Unknown function '%s' obtained -- register a function" - " or a kernel corresponding to it." % set(unscoped_calls).pop()) # }}} -- GitLab