eyalroz / cuda-api-wrappers

Thin, unified, C++-flavored wrappers for the CUDA APIs
BSD 3-Clause "New" or "Revised" License
786 stars 80 forks source link

Make memory::region_t CUDA-independent #604

Closed eyalroz closed 6 months ago

eyalroz commented 7 months ago

There is only one aspect maiking cuda::memory::region_t depend on CUDA in any way, and that is the constructibility using CUdevice ptr. It is rather painless to take that away, and make the class a pure C++ utility; instead of this ctor, we can use cuda::memory::as_pointer() on the CUdeviceptr, and then construct in oblivion of CUDA.