I have to get a GPU memory address with cudaMalloc which gives me a ptr T.

However I don't want to manually manage that memory so I wrap it in a ref that 
Nim GC will manage. I just pass it a finalizer proc (deallocCuda which calls 
official cudaFree) to make sure that when there is no more reference to that 
ptr T, it is deallocated.

So I have something like garbage-collected GPU memory object which is really 
neat.

Reply via email to