From 573f728fe27e411e3f508e1691a9e2aea112d0c8 Mon Sep 17 00:00:00 2001 From: Stephan Seitz <stephan.seitz@fau.de> Date: Sun, 23 Feb 2020 20:35:23 +0100 Subject: [PATCH] Fix SerialDataHandling.swap to work with OpenCL --- pystencils/datahandling/serial_datahandling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pystencils/datahandling/serial_datahandling.py b/pystencils/datahandling/serial_datahandling.py index a9fca34e3..d4af43f18 100644 --- a/pystencils/datahandling/serial_datahandling.py +++ b/pystencils/datahandling/serial_datahandling.py @@ -226,7 +226,7 @@ class SerialDataHandling(DataHandling): def swap(self, name1, name2, gpu=None): if gpu is None: - gpu = self.default_target == "gpu" + gpu = self.default_target in self._GPU_LIKE_TARGETS arr = self.gpu_arrays if gpu else self.cpu_arrays arr[name1], arr[name2] = arr[name2], arr[name1] -- GitLab