Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephan Seitz
pystencils
Commits
573f728f
Commit
573f728f
authored
Feb 23, 2020
by
Stephan Seitz
Browse files
Fix SerialDataHandling.swap to work with OpenCL
parent
494cfe09
Pipeline
#22145
passed with stage
in 9 minutes and 42 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
pystencils/datahandling/serial_datahandling.py
View file @
573f728f
...
@@ -226,7 +226,7 @@ class SerialDataHandling(DataHandling):
...
@@ -226,7 +226,7 @@ class SerialDataHandling(DataHandling):
def
swap
(
self
,
name1
,
name2
,
gpu
=
None
):
def
swap
(
self
,
name1
,
name2
,
gpu
=
None
):
if
gpu
is
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
=
self
.
gpu_arrays
if
gpu
else
self
.
cpu_arrays
arr
[
name1
],
arr
[
name2
]
=
arr
[
name2
],
arr
[
name1
]
arr
[
name1
],
arr
[
name2
]
=
arr
[
name2
],
arr
[
name1
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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