Skip to content

Commit 034283e

Browse files
committed
Don't vectorise, if complex arguments.
1 parent 877a93a commit 034283e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pyop2/sequential.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,11 @@ def code_to_compile(self):
162162
iname = "n"
163163
has_matrix = any(arg._is_mat for arg in self._args)
164164
has_rw = any(arg.access == RW for arg in self._args)
165+
is_cplx = any(arg.dtype.name == 'complex128' for arg in self._args)
165166
if isinstance(self._kernel.code, loopy.LoopKernel) and not (has_matrix or has_rw):
166167
wrapper = loopy.inline_callable_kernel(wrapper, self._kernel.name)
167-
wrapper = vectorise(wrapper, iname, configuration["simd_width"])
168+
if not is_cplx:
169+
wrapper = vectorise(wrapper, iname, configuration["simd_width"])
168170
code = loopy.generate_code_v2(wrapper)
169171

170172
if self._kernel._cpp:

0 commit comments

Comments
 (0)