coreylowman / cudarc

Safe rust wrapper around CUDA toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add a way to transform a CudaSlice into/from a CUdeviceptr

coreylowman opened this issue · comments

This would be an unsafe method to gain access to the underlying driver CUdeviceptr.

This would enable things like caching allocations. Notably, this would need to extract the underlying CUdeviceptr without actually dropping the CudaSlice. This can be done with std::mem::forget, but care needs to be taken to handle the host Vec if the CudaSlice owns one.