MADNESS
0.10.1
|
Public Member Functions | |
template<typename A > | |
Impl (World &world, const A &group, const DistributedID &did) | |
Constructor. More... | |
World & | get_world () const |
Parent world accessor. More... | |
const DistributedID & | id () const |
Group id accessor. More... | |
void | local_update () const |
Local usage update. More... | |
void | make_tree (const ProcessID group_root, ProcessID &parent, ProcessID &child0, ProcessID &child1) const |
Compute the binary tree parent and children. More... | |
ProcessID | rank () const |
Group rank accessor. More... | |
ProcessID | rank (const ProcessID world_rank) const |
Map world rank to group rank. More... | |
void | remote_update (const int n) const |
Remote usage update. More... | |
ProcessID | size () const |
Group size accessor. More... | |
ProcessID | world_rank (const ProcessID group_rank) const |
Map group rank to world rank. More... | |
Static Public Member Functions | |
static void | deleter (Impl *pimpl) |
Local group deleter. More... | |
Static Private Member Functions | |
template<typename vectorT > | |
static vectorT::const_iterator | begin (const vectorT &v) |
Array const begin iterator accessor. More... | |
template<typename T , std::size_t N> | |
static T * | begin (T(&a)[N]) |
Array begin iterator accessor. More... | |
template<typename vectorT > | |
static vectorT::const_iterator | end (const vectorT &v) |
Array const end iterator accessor. More... | |
template<typename T , std::size_t N> | |
static T * | end (T(&a)[N]) |
Array end iterator accessor. More... | |
template<typename vectorT > | |
static std::enable_if<!std::is_array< vectorT >::value, std::size_t >::type | size (const vectorT &v) |
Array size accessor. More... | |
template<typename T , std::size_t N> | |
static std::size_t | size (T(&a)[N]) |
Array size accessor. More... | |
Private Attributes | |
DistributedID | did_ |
Group distributed id. More... | |
ProcessID | group_rank_ |
The group rank of this process. More... | |
std::vector< ProcessID > | group_to_world_map_ |
List of nodes in the group. More... | |
AtomicInt | local_count_ |
Local use count. More... | |
AtomicInt | remote_count_ |
Remote use count. More... | |
World & | world_ |
Parent world for this group. More... | |
|
inline |
Constructor.
A | An std compliant array (e.g. std::array or std::vector ) |
world | The world that is the basis for this group |
did | The distributed id associated with this group |
group | An array of Processes in world |
References group_rank_, group_to_world_map_, local_count_, MADNESS_ASSERT, rank(), madness::World::rank(), remote_count_, size(), madness::World::size(), and world_.
|
inlinestaticprivate |
|
inlinestatic |
Local group deleter.
Updates the remote usage count with the negative of the local usage count by calling remote_update
.
References local_count_, and remote_update().
|
inlinestaticprivate |
|
inline |
|
inline |
|
inline |
|
inline |
Compute the binary tree parent and children.
[in] | group_root | The head node of the binary tree |
[out] | parent | The parent node of the binary tree |
[out] | child0 | The left child node of the binary tree |
[out] | child1 | The right child node of the binary tree |
References end(), group_rank_, group_to_world_map_, MADNESS_ASSERT, and me.
|
inline |
Group rank accessor.
References group_rank_.
Referenced by Impl().
Map world rank to group rank.
world_rank | The world rank to be mapped |
world_rank
when it is a member of this group, otherwise -1
. References std::distance(), group_to_world_map_, and world_rank().
|
inline |
Remote usage update.
n | The value that will be added to the remote count Add n to the remote count. The remote count will be updated with the negative of the local count so the final value will be equal to zero when the group is ready for destruction. When the group is ready for destruction it will be removed from the group registry. |
References did_, remote_count_, and madness::Group::unregister_group().
Referenced by deleter().
|
inline |
Group size accessor.
References group_to_world_map_.
Referenced by Impl().
|
inlinestaticprivate |
|
inlinestaticprivate |
Map group rank to world rank.
References group_to_world_map_, and MADNESS_ASSERT.
Referenced by rank().
|
private |
Group distributed id.
Referenced by id(), and remote_update().
|
private |
The group rank of this process.
Referenced by Impl(), make_tree(), and rank().
|
private |
List of nodes in the group.
Referenced by Impl(), make_tree(), rank(), size(), and world_rank().
|
mutableprivate |
Local use count.
Referenced by Impl(), deleter(), and local_update().
|
mutableprivate |
Remote use count.
Referenced by Impl(), and remote_update().
|
private |
Parent world for this group.
Referenced by Impl(), and get_world().