|
Template Numerical Library version\ main:d08c4decc
|
Specialization of the SharedPointer for the host system. More...
#include <TNL/Pointers/SharedPointerHost.h>


Classes | |
| struct | PointerData |
Public Types | |
| using | DeviceType = Devices::Host |
| Type of the device where the object is to be mirrored. | |
| using | ObjectType = Object |
| Type of the object owned by the pointer. | |
Public Member Functions | |
| template<typename... Args> | |
| SharedPointer (Args... args) | |
| Constructor with parameters of the Object constructor. | |
| SharedPointer (const SharedPointer &pointer) | |
| Copy constructor. | |
| template<typename Object_, typename = Enabler< Object_ >> | |
| SharedPointer (const SharedPointer< Object_, DeviceType > &pointer) | |
| Copy constructor. | |
| SharedPointer (SharedPointer &&pointer) noexcept | |
| Move constructor. | |
| template<typename Object_, typename = Enabler< Object_ >> | |
| SharedPointer (SharedPointer< Object_, DeviceType > &&pointer) | |
| Move constructor. | |
| template<typename Value> | |
| SharedPointer (std::initializer_list< std::initializer_list< Value > > list) | |
| Constructor with nested initializer lists. | |
| template<typename Value> | |
| SharedPointer (std::initializer_list< Value > list) | |
| Constructor with initializer list. | |
| SharedPointer (std::nullptr_t) | |
| Constructor of an empty pointer. | |
| ~SharedPointer () override | |
| Destructor. | |
| void | clear () |
| Reset the pointer to empty state. | |
| template<typename Device = Devices::Host> | |
| __cuda_callable__ const Object & | getData () const |
| Constant object reference getter. | |
| template<typename Device = Devices::Host> | |
| __cuda_callable__ Object & | modifyData () |
| Non-constant object reference getter. | |
| operator bool () const | |
| Conversion to boolean type. | |
| bool | operator! () const |
| Negation operator. | |
| Object & | operator* () |
| Dereferencing operator for accessing the object owned by non-constant smart pointer. | |
| const Object & | operator* () const |
| Dereferencing operator for accessing the object owned by constant smart pointer. | |
| Object * | operator-> () |
| Arrow operator for accessing the object owned by non-constant smart pointer. | |
| const Object * | operator-> () const |
| Arrow operator for accessing the object owned by constant smart pointer. | |
| const SharedPointer & | operator= (const SharedPointer &ptr) |
| Assignment operator. | |
| template<typename Object_, typename = Enabler< Object_ >> | |
| const SharedPointer & | operator= (const SharedPointer< Object_, DeviceType > &ptr) |
| Assignment operator for compatible object types. | |
| const SharedPointer & | operator= (SharedPointer &&ptr) noexcept |
| Move operator. | |
| template<typename Object_, typename = Enabler< Object_ >> | |
| const SharedPointer & | operator= (SharedPointer< Object_, DeviceType > &&ptr) |
| Move operator. | |
| template<typename... Args> | |
| bool | recreate (Args... args) |
| Create new object based in given constructor parameters. | |
| void | swap (SharedPointer &ptr2) noexcept |
| Swap the owned object with another pointer. | |
| bool | synchronize () override |
| Cross-device pointer synchronization. | |
Protected Member Functions | |
| template<typename... Args> | |
| bool | allocate (Args... args) |
| void | free () |
Protected Attributes | |
| PointerData * | pd |
Specialization of the SharedPointer for the host system.
| Object | is a type of object to be owned by the pointer. |
|
inlineexplicit |
Constructor with parameters of the Object constructor.
| Args | is variadic template type of arguments of the Object constructor. |
| args | are arguments passed to the Object constructor. |
|
inlineexplicit |
Constructor with initializer list.
| Value | is type of the initializer list elements. |
| list | is the instance of the initializer list.. |
|
inlineexplicit |
Constructor with nested initializer lists.
| Value | is type of the nested initializer list elements. |
| list | is the instance of the nested initializer list.. |
|
inline |
Copy constructor.
| pointer | is the source shared pointer. |
|
inline |
Copy constructor.
This is specialization for compatible object types.
| pointer | is the source shared pointer. |
|
inlinenoexcept |
Move constructor.
| pointer | is the source shared pointer. |
|
inline |
Move constructor.
This is specialization for compatible object types.
| pointer | is the source shared pointer. |
|
inlinenodiscard |
Constant object reference getter.
No synchronization of this pointer will be performed due to calling this method.
| Device | says what image of the object one want to dereference. It can be either DeviceType or Devices::Host. |
|
inlinenodiscard |
Non-constant object reference getter.
No synchronization of this pointer will be performed due to calling this method.
| Device | says what image of the object one want to dereference. It can be either DeviceType or Devices::Host. |
|
inline |
Conversion to boolean type.
|
inline |
Negation operator.
|
inline |
Dereferencing operator for accessing the object owned by non-constant smart pointer.
|
inline |
Dereferencing operator for accessing the object owned by constant smart pointer.
|
inline |
Arrow operator for accessing the object owned by non-constant smart pointer.
|
inline |
Arrow operator for accessing the object owned by constant smart pointer.
|
inline |
Assignment operator.
It assigns object owned by the pointer ptr to this pointer.
| ptr | input pointer |
|
inline |
Assignment operator for compatible object types.
It assigns object owned by the pointer ptr to this pointer.
| ptr | input pointer |
|
inlinenoexcept |
Move operator.
It assigns object owned by the pointer ptr to this pointer.
| ptr | input pointer |
|
inline |
Move operator.
It assigns object owned by the pointer ptr to this pointer.
| ptr | input pointer |
|
inline |
Create new object based in given constructor parameters.
| Args | is variadic template type of arguments to be passed to the object constructor. |
| args | are arguments to be passed to the object constructor. |
|
inlinenoexcept |
Swap the owned object with another pointer.
| ptr2 | the other shared pointer for swapping. |
|
inlineoverridevirtual |
Cross-device pointer synchronization.
For the smart pointers on the host, this method does nothing.
Implements TNL::Pointers::SmartPointer.