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.
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 usecuda::memory::as_pointer()
on theCUdeviceptr
, and then construct in oblivion of CUDA.