diff --git a/src/wrap_cl.hpp b/src/wrap_cl.hpp index 4892e9155c0d61967482635cdeaafbe0a35a768a..ae59fa25b2302740936d9e6262e415fc5151deea 100644 --- a/src/wrap_cl.hpp +++ b/src/wrap_cl.hpp @@ -2404,8 +2404,8 @@ namespace pyopencl py::object py_buffer_origin, py::object py_host_origin, py::object py_region, - py::sequence py_buffer_pitches, - py::sequence py_host_pitches, + py::object py_buffer_pitches, + py::object py_host_pitches, py::object py_wait_for, bool is_blocking ) @@ -2459,8 +2459,8 @@ namespace pyopencl py::object py_src_origin, py::object py_dst_origin, py::object py_region, - py::sequence py_src_pitches, - py::sequence py_dst_pitches, + py::object py_src_pitches, + py::object py_dst_pitches, py::object py_wait_for) { PYOPENCL_PARSE_WAIT_FOR; diff --git a/test/test_wrapper.py b/test/test_wrapper.py index 9776b03231583a021260ff65de72a24d978f6722..fa1e1d2714b477278da59df178eb6a8ea8b8b1f1 100644 --- a/test/test_wrapper.py +++ b/test/test_wrapper.py @@ -1086,6 +1086,19 @@ def test_compile_link(ctx_factory): queue.finish() +def test_copy_buffer_rect(ctx_factory): + ctx = ctx_factory() + queue = cl.CommandQueue(ctx) + + arr1 = cl_array.zeros(queue, (2, 3), "f") + arr2 = cl_array.zeros(queue, (4, 5), "f") + arr1.fill(1) + cl.enqueue_copy( + queue, arr2.data, arr1.data, + src_origin=(0, 0), dst_origin=(1, 1), + region=arr1.shape[::-1]) + + if __name__ == "__main__": # make sure that import failures get reported, instead of skipping the tests. import pyopencl # noqa