From 4f1a99ce72c37c3948d7a496c972adab4dd33352 Mon Sep 17 00:00:00 2001 From: Michael Kuron <mkuron@icp.uni-stuttgart.de> Date: Thu, 27 May 2021 09:05:28 +0000 Subject: [PATCH] Correctly check for VectorType in _print_Function --- pystencils/backends/cbackend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pystencils/backends/cbackend.py b/pystencils/backends/cbackend.py index ba7426a14..94f21c076 100644 --- a/pystencils/backends/cbackend.py +++ b/pystencils/backends/cbackend.py @@ -670,7 +670,7 @@ class VectorizedCustomSympyPrinter(CustomSympyPrinter): else: is_boolean = get_type_of_expression(arg) == create_type("bool") is_integer = get_type_of_expression(arg) == create_type("int") or \ - (isinstance(arg, TypedSymbol) and arg.dtype.is_int()) + (isinstance(arg, TypedSymbol) and not isinstance(arg.dtype, VectorType) and arg.dtype.is_int()) instruction = 'makeVecConstBool' if is_boolean else \ 'makeVecConstInt' if is_integer else 'makeVecConst' return self.instruction_set[instruction].format(self._print(arg), **self._kwargs) -- GitLab