Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable region and offsets for Read/Write/Copy #173

Closed
StRigaud opened this issue Aug 16, 2023 · 2 comments
Closed

Enable region and offsets for Read/Write/Copy #173

StRigaud opened this issue Aug 16, 2023 · 2 comments
Assignees

Comments

@StRigaud
Copy link
Member

For simplification, all call for memory accesses which takes an offset and a region are defined with defaults value (hard-coded).

Enabling none defaults value for these entries could simplify memory accessibility, e.g. __getitem__ and __setitem__ for the python wrapper.

ToDo:

  • adapt read/write/copy call for both buffer and image using Rect buffer for OpenCL
  • insure compatibility with CUDA
  • clarify copy method behavior (see issue #96)
  • make offsets and region defaults to keep classics behaviour
@StRigaud StRigaud self-assigned this Aug 16, 2023
@StRigaud
Copy link
Member Author

Buffer read, and write should now be manipulated using clEnqueue_op_BufferRect() if buffer is 2d or 3d.
CUDA version should rely on CUDA_MEMCPY for 2d and 3d.

From this we can enable a read_region and write_region method to the array class which should take the host_ptr (as source or destination). a starting coord (x,y,z) and a region size (w,h,d).

This can be mimic with the crop and paste kernel but in a less efficient way

@StRigaud
Copy link
Member Author

done with

Now, read, write, copy can take an origin and a region.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant