libSCALE  0.2.0
A modern C++ CUDA API

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...
 

Detailed Description

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.

Function Documentation

◆ deviceMemoryDeleter()

template<typename T >
void sp::deviceMemoryDeleter ( __device T *  p)

Deleter for device memory.

◆ nopDeleter()

template<typename T >
void sp::nopDeleter ( T *  )

A deleter that doesn't actually delete anything.

◆ pinnedMemoryDeleter()

template<typename T >
void sp::pinnedMemoryDeleter ( T *  p)

Deleter for pinned host memory.