Skip to content

Commit

Permalink
Don't vectorise, if complex arguments.
Browse files Browse the repository at this point in the history
  • Loading branch information
sv2518 committed Jul 7, 2020
1 parent 877a93a commit 5643bff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyop2/sequential.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5643bff

Please sign in to comment.