Skip to content
Snippets Groups Projects
Commit 5320a78b authored by Martin Bauer's avatar Martin Bauer
Browse files

Swap by default now swaps data on the default target

parent 6f8ff7ad
No related branches found
No related tags found
No related merge requests found
......@@ -197,7 +197,9 @@ class SerialDataHandling(DataHandling):
arr.flags.writeable = False
return arr
def swap(self, name1, name2, gpu=False):
def swap(self, name1, name2, gpu=None):
if gpu is None:
gpu = self.default_target == "gpu"
arr = self.gpu_arrays if gpu else self.cpu_arrays
arr[name1], arr[name2] = arr[name2], arr[name1]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment