Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Alexander Reinauer
pystencils
Commits
a911cd46
Commit
a911cd46
authored
Feb 23, 2020
by
Stephan Seitz
Committed by
Alexander Reinauer
Mar 31, 2020
Browse files
Fix SerialDataHandling.swap to work with OpenCL
parent
24d1dfcf
Changes
1
Hide whitespace changes
Inline
Side-by-side
pystencils/datahandling/serial_datahandling.py
View file @
a911cd46
...
...
@@ -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
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment