Smart pointer deleter functions, suitable for use with STL smart pointers. More...
Functions | |
template<typename T > | |
void | sp::nopDeleter (T *) |
A deleter that doesn't actually delete anything. More... | |
template<typename T > | |
void | sp::pinnedMemoryDeleter (T *p) |
Deleter for pinned host memory. More... | |
template<typename T > | |
void | sp::deviceMemoryDeleter (__device T *p) |
Deleter for device memory. More... | |
Smart pointer deleter functions, suitable for use with STL smart pointers.
You probably won't need to use these directly: the appropriate deleters are baked into the smart pointers returned by libSCALE's allocation APIs.
These APIs are useful if you're using a thirdparty CUDA API that does allocation and returns pointers to you. You can wrap the pointers it returns in smart pointers with the appropriate deleter so you don't need to do C-style memory management for it, even if the thirdparty API expects you do.
void sp::deviceMemoryDeleter | ( | __device T * | p | ) |
Deleter for device memory.
void sp::nopDeleter | ( | T * | ) |
A deleter that doesn't actually delete anything.
void sp::pinnedMemoryDeleter | ( | T * | p | ) |
Deleter for pinned host memory.