Template Numerical Library version\ main:bb09b17
|
The DevicePointer is like SharedPointer, except it takes an existing host object - there is no call to the ObjectType's constructor nor destructor. More...
#include <TNL/Pointers/DevicePointer.h>
The DevicePointer is like SharedPointer, except it takes an existing host object - there is no call to the ObjectType's constructor nor destructor.
**NOTE: When using smart pointers to pass objects on GPU, one must call Pointers::synchronizeSmartPointersOnDevice< Devices::Cuda >() before calling a CUDA kernel working with smart pointers.**
Object | is a type of object to be owned by the pointer. |
Device | is device where the object is to be allocated. The object is always allocated on the host system as well for easier object manipulation. |
See also UniquePointer and SharedPointer.
See also DevicePointer< Object, Devices::Host > and DevicePointer< Object, Devices::Cuda >.