From e55c5d8a8b7b6c34c1cac07a47860588cd3c32bf Mon Sep 17 00:00:00 2001 From: Martin Bauer <martin.bauer@fau.de> Date: Tue, 1 Oct 2019 11:21:50 +0200 Subject: [PATCH] Bugfix in typing --- pystencils/cpu/kernelcreation.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pystencils/cpu/kernelcreation.py b/pystencils/cpu/kernelcreation.py index 7859c537..f351ce5a 100644 --- a/pystencils/cpu/kernelcreation.py +++ b/pystencils/cpu/kernelcreation.py @@ -42,12 +42,11 @@ def create_kernel(assignments: AssignmentOrAstNodeList, function_name: str = "ke Returns: AST node representing a function, that can be printed as C or CUDA code """ - def type_symbol(term): if isinstance(term, Field.Access) or isinstance(term, TypedSymbol): return term elif isinstance(term, sp.Symbol): - if not hasattr(type_info, '__getitem__'): + if isinstance(type_info, str) or not hasattr(type_info, '__getitem__'): return TypedSymbol(term.name, create_type(type_info)) else: return TypedSymbol(term.name, type_info[term.name]) -- GitLab