Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sebastian Bindgen
pystencils
Commits
6b38151c
Commit
6b38151c
authored
Oct 30, 2020
by
Stephan Seitz
Browse files
Allow **kernel_creation_args in create_boundary_kernel
parent
43bdbcb8
Changes
1
Hide whitespace changes
Inline
Side-by-side
pystencils/boundaries/boundaryhandling.py
View file @
6b38151c
...
...
@@ -442,10 +442,11 @@ class BoundaryOffsetInfo(CustomCodeNode):
INV_DIR_SYMBOL
=
TypedSymbol
(
"invdir"
,
"int"
)
def
create_boundary_kernel
(
field
,
index_field
,
stencil
,
boundary_functor
,
target
=
'cpu'
,
openmp
=
True
):
def
create_boundary_kernel
(
field
,
index_field
,
stencil
,
boundary_functor
,
target
=
'cpu'
,
openmp
=
True
,
**
kernel_creation_args
):
elements
=
[
BoundaryOffsetInfo
(
stencil
)]
index_arr_dtype
=
index_field
.
dtype
.
numpy_dtype
dir_symbol
=
TypedSymbol
(
"dir"
,
index_arr_dtype
.
fields
[
'dir'
][
0
])
elements
+=
[
Assignment
(
dir_symbol
,
index_field
[
0
](
'dir'
))]
elements
+=
boundary_functor
(
field
,
direction_symbol
=
dir_symbol
,
index_field
=
index_field
)
return
create_indexed_kernel
(
elements
,
[
index_field
],
target
=
target
,
cpu_openmp
=
openmp
)
return
create_indexed_kernel
(
elements
,
[
index_field
],
target
=
target
,
cpu_openmp
=
openmp
,
**
kernel_creation_args
)
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