nlesc-recruit / cudawrappers

C++ wrapper for the Nvidia C libraries (e.g. CUDA driver, nvrtc, cuFFT etc.)
https://cudawrappers.readthedocs.io/en/latest/
Apache License 2.0
5 stars 5 forks source link

Add support for sliced DeviceMemory view #291

Closed csbnw closed 4 months ago

csbnw commented 4 months ago

Is your feature request related to a problem? Please describe. I would like to make a view of a cu::DeviceMemory object at some offset.

Describe the solution you'd like Add a cu::DeviceMemory constructor that accepts both another cu::DeviceMemory& other, size_t offset, and size_t size.

Describe alternatives you've considered Do this manually, using static_cast<CUdeviceptr> etc.

Additional context N.A.

loostrum commented 4 months ago

Added in #293