From 5643bffe3ed327668da685ffa819f4d24c05646a Mon Sep 17 00:00:00 2001 From: Sophia Vorderwuelbecke Date: Tue, 7 Jul 2020 18:36:41 +0100 Subject: [PATCH] Don't vectorise, if complex arguments. --- pyop2/sequential.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyop2/sequential.py b/pyop2/sequential.py index af7f30ada..b87c5b834 100644 --- a/pyop2/sequential.py +++ b/pyop2/sequential.py @@ -162,7 +162,8 @@ def code_to_compile(self): iname = "n" has_matrix = any(arg._is_mat for arg in self._args) has_rw = any(arg.access == RW for arg in self._args) - if isinstance(self._kernel.code, loopy.LoopKernel) and not (has_matrix or has_rw): + is_cplx = any(is_complex(arg.dtype) for arg in self._args) + if isinstance(self._kernel.code, loopy.LoopKernel) and not (has_matrix or has_rw or is_cplx): wrapper = loopy.inline_callable_kernel(wrapper, self._kernel.name) wrapper = vectorise(wrapper, iname, configuration["simd_width"]) code = loopy.generate_code_v2(wrapper)