Template Numerical Library version\ main:94209208
Loading...
Searching...
No Matches
Public Member Functions | Protected Types | Protected Attributes | List of all members
TNL::Pointers::SmartPointersRegister Class Reference

#include <TNL/Pointers/SmartPointersRegister.h>

Collaboration diagram for TNL::Pointers::SmartPointersRegister:
Collaboration graph
[legend]

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, SetTypepointersOnDevices
 

Detailed Description

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.

Member Function Documentation

◆ insert()

void TNL::Pointers::SmartPointersRegister::insert ( SmartPointer * pointer,
int deviceId = -1 )
inline

Negative deviceId means that TNL::Backend::getDevice will be called to get the device ID.

◆ remove()

void TNL::Pointers::SmartPointersRegister::remove ( SmartPointer * pointer,
int deviceId = -1 )
inline

Negative deviceId means that TNL::Backend::getDevice will be called to get the device ID.

◆ synchronizeDevice()

bool TNL::Pointers::SmartPointersRegister::synchronizeDevice ( int deviceId = -1)
inline

Negative deviceId means that TNL::Backend::getDevice will be called to get the device ID.


The documentation for this class was generated from the following file: