Template Numerical Library version\ main:4e58ea6
|
#include <TNL/Pointers/SmartPointersRegister.h>
Public Member Functions | |
void | insert (SmartPointer *pointer, int deviceId=-1) |
void | remove (SmartPointer *pointer, int deviceId=-1) |
bool | synchronizeDevice (int deviceId=-1) |
Protected Types | |
using | SetType = std::unordered_set< SmartPointer* > |
Protected Attributes | |
std::unordered_map< int, SetType > | pointersOnDevices |
Since TNL currently supports only execution on host (which does not need to register and synchronize smart pointers) and CUDA GPU's, the smart pointers register is implemented only for CUDA. If more execution types which need to register smart pointers are implemented in the future, this should beome a class template specialization.
|
inline |
Negative deviceId means that TNL::Backend::getDevice will be called to get the device ID.
|
inline |
Negative deviceId means that TNL::Backend::getDevice will be called to get the device ID.
|
inline |
Negative deviceId means that TNL::Backend::getDevice will be called to get the device ID.