|
MADNESS 0.10.1
|
A global pointer address, valid anywhere in the world. More...
#include <worldptr.h>

Public Types | |
| typedef T * | pointer |
| Alias for the pointer type. | |
| typedef ptr_traits< T >::reference | reference |
| typedef unsigned long | worldidT |
| World ID type. | |
Public Member Functions | |
| WorldPtr () | |
| Default constructor. | |
| WorldPtr (const WorldPtr< T > &other) | |
| Copy constructor. | |
| template<typename U> | |
| WorldPtr (const WorldPtr< U > &other) | |
| Copy conversion constructor. | |
| WorldPtr (World &w, T *p) | |
| World pointer constructor. | |
| pointer | get () const |
| Pointer accessor. | |
| World & | get_world () const |
| World accessor. | |
| worldidT | get_worldid () const |
| World ID accessor. | |
| bool | has_owner () const |
| Check that the world pointer has an owner. | |
| bool | is_local () const |
| Check that the world pointer references a local pointer. | |
| template<class Archive> | |
| void | load_internal_ (const Archive &ar) |
| Deserialize the world pointer. | |
| operator bool () const | |
| Boolean conversion operator. | |
| bool | operator! () const |
| Boolean conversion (not) operator. | |
| template<typename U> | |
| bool | operator!= (const WorldPtr< U > &other) const |
| Inequality comparison operator. | |
| reference | operator* () const |
| Dereference operator. | |
| pointer | operator-> () const |
| Pointer arrow operator. | |
| template<typename U> | |
| bool | operator< (const WorldPtr< U > &other) const |
| Less-than comparison operator. | |
| WorldPtr< T > & | operator= (const WorldPtr< T > &other) |
| Copy assignment operator. | |
| template<typename U> | |
| WorldPtr< T > & | operator= (const WorldPtr< U > &other) |
| Copy conversion assignment operator. | |
| template<typename U> | |
| bool | operator== (const WorldPtr< U > &other) const |
| Equality comparison operator. | |
| ProcessID | owner () const |
| Rank accessor. | |
| template<class Archive> | |
| void | store_internal_ (const Archive &ar) const |
| Serialize the world pointer. | |
| template<typename U> | |
| void | swap (WorldPtr< U > &other) |
Swap the content of this with other. | |
Private Member Functions | |
| ProcessID | local_rank () const |
| Current local rank. | |
Private Attributes | |
| T * | pointer_ |
| The pointer being referenced. | |
| ProcessID | rank_ |
| The rank of the node that the pointer belongs to. | |
| World * | world_ |
| A pointer to the world. | |
| worldidT | worldid_ |
| The world ID. | |
Friends | |
| template<typename> | |
| class | WorldPtr |
| std::ostream & | operator<< (std::ostream &out, const WorldPtr< T > &p) |
| Output stream insertion operator for world pointers. | |
A global pointer address, valid anywhere in the world.
Stores a globally addressable pointer. It can be sent to any process in the world.
| T | The pointer type. |
| typedef T* madness::detail::WorldPtr< T >::pointer |
Alias for the pointer type.
| typedef ptr_traits<T>::reference madness::detail::WorldPtr< T >::reference |
| typedef unsigned long madness::detail::WorldPtr< T >::worldidT |
World ID type.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Pointer accessor.
Get the pointer from the world pointer.
| MadnessException | When the pointer references a remote address. |
References is_local(), MADNESS_ASSERT, and pointer_.
|
inline |
World accessor.
NULL). | MadnessException | When the pointer world has not been set (i.e. when has_owner()==false). |
References MADNESS_ASSERT, and world_.
|
inline |
World ID accessor.
References worldid_.
Referenced by load_internal_().
|
inline |
|
inline |
Check that the world pointer references a local pointer.
References local_rank(), and rank_.
Referenced by get(), operator*(), and operator->().
|
inline |
Deserialize the world pointer.
Deserialize the world pointer for remote communication or write to disk.
| Archive | The archive object type. |
| [in] | ar | The archive. |
References get_worldid(), pointer_, rank_, world_, madness::World::world_from_id(), worldid_, and madness::archive::wrap_opaque().
|
inlineprivate |
Current local rank.
References world_.
Referenced by is_local().
|
inline |
Boolean conversion operator.
References pointer_.
|
inline |
Boolean conversion (not) operator.
References pointer_.
|
inline |
|
inline |
Dereference operator.
Dereference the local pointer.
| MadnessException | If the pointer references a remote address, or if the pointer is NULL. |
References is_local(), MADNESS_ASSERT, and pointer_.
|
inline |
Pointer arrow operator.
Access members of the pointer.
| MadnessException | If the pointer references a remote address, or if the pointer is NULL. |
References is_local(), MADNESS_ASSERT, and pointer_.
|
inline |
Less-than comparison operator.
This operator does a lexicographical comparison of world ID, rank, and pointer (in that order).
| U | Another pointer type. |
| [in] | other | The other pointer to compare with. |
|
inline |
|
inline |
Copy conversion assignment operator.
Copy and convert a pointer from U* to T* type.
| U | The pointer type of the other pointer. |
| [in] | other | The world pointer to be copied. |
U* must be implicitly convertible to T* type.
|
inline |
|
inline |
|
inline |
Serialize the world pointer.
Serialize the world pointer for remote communication or write to disk.
| Archive | The archive object type. |
| [in] | ar | The archive. |
References pointer_, rank_, worldid_, and madness::archive::wrap_opaque().
|
inline |
|
friend |
References WorldPtr.
Referenced by WorldPtr(), WorldPtr(), WorldPtr, operator!=(), operator<(), operator<<, operator=(), operator=(), operator==(), and swap().
|
friend |
|
private |
The pointer being referenced.
Referenced by WorldPtr(), WorldPtr(), WorldPtr(), WorldPtr(), get(), load_internal_(), operator bool(), operator!(), operator!=(), operator*(), operator->(), operator<(), operator=(), operator=(), operator==(), store_internal_(), and swap().
|
private |
The rank of the node that the pointer belongs to.
Referenced by WorldPtr(), WorldPtr(), WorldPtr(), WorldPtr(), has_owner(), is_local(), load_internal_(), operator!=(), operator<(), operator=(), operator=(), operator==(), owner(), store_internal_(), and swap().
|
private |
A pointer to the world.
Referenced by WorldPtr(), WorldPtr(), WorldPtr(), WorldPtr(), get_world(), has_owner(), load_internal_(), local_rank(), operator=(), operator=(), and swap().
|
private |
The world ID.
Referenced by WorldPtr(), WorldPtr(), WorldPtr(), WorldPtr(), get_worldid(), load_internal_(), operator!=(), operator<(), operator=(), operator=(), operator==(), store_internal_(), and swap().