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
64454993
Commit
64454993
authored
Feb 06, 2020
by
Stephan Seitz
Browse files
Enable overriding of kwargs in SerialDataHandling.run_kernel
parent
0bb88bca
Pipeline
#21842
passed with stage
in 9 minutes and 29 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
pystencils/datahandling/serial_datahandling.py
View file @
64454993
...
...
@@ -9,7 +9,8 @@ from pystencils.datahandling.datahandling_interface import DataHandling
from
pystencils.datahandling.pycuda
import
PyCudaArrayHandler
from
pystencils.datahandling.pyopencl
import
PyOpenClArrayHandler
from
pystencils.field
import
(
Field
,
FieldType
,
create_numpy_array_with_layout
,
layout_string_to_tuple
,
spatial_layout_string_to_tuple
)
Field
,
FieldType
,
create_numpy_array_with_layout
,
layout_string_to_tuple
,
spatial_layout_string_to_tuple
)
from
pystencils.slicing
import
normalize_slice
,
remove_ghost_layers
from
pystencils.utils
import
DotDict
...
...
@@ -239,7 +240,7 @@ class SerialDataHandling(DataHandling):
def
run_kernel
(
self
,
kernel_function
,
**
kwargs
):
arrays
=
self
.
gpu_arrays
if
kernel_function
.
ast
.
backend
in
self
.
_GPU_LIKE_BACKENDS
else
self
.
cpu_arrays
kernel_function
(
**
arrays
,
**
kwargs
)
kernel_function
(
**
{
**
arrays
,
**
kwargs
}
)
def
get_kernel_kwargs
(
self
,
kernel_function
,
**
kwargs
):
result
=
{}
...
...
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