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

Pass field information (shape,stride) as single elements instead of arr

- small (length < 5) arrays with shape and stride information had to be
  memcpy'd to the GPU before every kernel call
- instead of passing the information as arrays, the single elements are
  passed
- leads to more function arguments, but simplifies GPU kernel calls

-> changes in all backends required
parent 1627446b
Branches
Tags
No related merge requests found
...@@ -56,9 +56,9 @@ def create_stream_pull_only_kernel(stencil, numpy_arr=None, src_field_name="src" ...@@ -56,9 +56,9 @@ def create_stream_pull_only_kernel(stencil, numpy_arr=None, src_field_name="src"
dim = len(stencil[0]) dim = len(stencil[0])
if numpy_arr is None: if numpy_arr is None:
src = Field.create_generic(src_field_name, dim, index_dimensions=1, src = Field.create_generic(src_field_name, dim, index_shape=(len(stencil),),
layout=generic_layout, dtype=generic_field_type) layout=generic_layout, dtype=generic_field_type)
dst = Field.create_generic(dst_field_name, dim, index_dimensions=1, dst = Field.create_generic(dst_field_name, dim, index_shape=(len(stencil),),
layout=generic_layout, dtype=generic_field_type) layout=generic_layout, dtype=generic_field_type)
else: else:
src = Field.create_from_numpy_array(src_field_name, numpy_arr, index_dimensions=1) src = Field.create_from_numpy_array(src_field_name, numpy_arr, index_dimensions=1)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment