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


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 | |
| DevicePointer (const DevicePointer &pointer) | |
| Copy constructor. | |
| template<typename Object_, typename = Enabler< Object_ >> | |
| DevicePointer (const DevicePointer< Object_, DeviceType > &pointer) | |
| Copy constructor. | |
| DevicePointer (DevicePointer &&pointer) noexcept | |
| Move constructor. | |
| template<typename Object_, typename = Enabler< Object_ >> | |
| DevicePointer (DevicePointer< Object_, DeviceType > &&pointer) | |
| Move constructor. | |
| DevicePointer (ObjectType &obj) | |
| Constructor with an object reference. | |
| DevicePointer (std::nullptr_t) | |
| Constructor of an empty pointer. | |
| ~DevicePointer () override=default | |
| Destructor. | |
| 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. | |
| __cuda_callable__ | operator bool () const |
| Conversion to boolean type. | |
| __cuda_callable__ 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 DevicePointer & | operator= (const DevicePointer &ptr) |
| Assignment operator. | |
| template<typename Object_, typename = Enabler< Object_ >> | |
| const DevicePointer & | operator= (const DevicePointer< Object_, DeviceType > &ptr) |
| Assignment operator for compatible object types. | |
| const DevicePointer & | operator= (DevicePointer &&ptr) noexcept |
| Move operator. | |
| template<typename Object_, typename = Enabler< Object_ >> | |
| const DevicePointer & | operator= (DevicePointer< Object_, DeviceType > &&ptr) |
| Move operator. | |
| void | swap (DevicePointer &ptr2) noexcept |
| Swap the owned object with another pointer. | |
| bool | synchronize () override |
| Cross-device pointer synchronization. | |
Protected Attributes | |
| Object * | pointer |
Specialization of the DevicePointer for the host system.
| Object | is a type of object to be owned by the pointer. |
|
inlineexplicit |
Constructor with an object reference.
| obj | reference to an object to be managed by the pointer. |
|
inline |
Copy constructor.
| pointer | is the source device pointer. |
|
inline |
Copy constructor.
This is specialization for compatible object types.
| pointer | is the source device pointer. |
|
inlinenoexcept |
Move constructor.
| pointer | is the source device pointer. |
|
inline |
Move constructor.
This is specialization for compatible object types.
| pointer | is the source device 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 |
|
inlinenoexcept |
Swap the owned object with another pointer.
| ptr2 | the other device pointer for swapping. |
|
inlineoverridevirtual |
Cross-device pointer synchronization.
For the smart pointers on the host, this method does nothing.
Implements TNL::Pointers::SmartPointer.