From 9d78f318d1ed1ac40d143bf69215effef4a03de4 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Tue, 23 Jun 2020 02:24:45 -0500 Subject: [PATCH] Move import to top level This accounts for 10% of codegen time for sumpy m2l 3d order 6 --- loopy/target/c/codegen/expression.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loopy/target/c/codegen/expression.py b/loopy/target/c/codegen/expression.py index 1bf197c08..6776fb3d2 100644 --- a/loopy/target/c/codegen/expression.py +++ b/loopy/target/c/codegen/expression.py @@ -44,6 +44,7 @@ from loopy.type_inference import TypeInferenceMapper from loopy.diagnostic import LoopyError, LoopyWarning from loopy.tools import is_integer from loopy.types import LoopyType +from loopy.target.c import CExpression # {{{ Loopy expression to C expression mapper @@ -112,7 +113,6 @@ class ExpressionToCExpressionMapper(IdentityMapper): prec = PREC_NONE assert prec == PREC_NONE - from loopy.target.c import CExpression return CExpression( self.codegen_state.ast_builder.get_c_expression_to_code_mapper(), self.rec(expr, type_context, needed_dtype)) -- GitLab