MADNESS
version 0.9
|
A collection of processes. More...
#include <group.h>
Public Member Functions | |
Group () | |
Default constructor. More... | |
Group (const Group &other) | |
Copy constructor. More... | |
template<typename A > | |
Group (World &world, const A &group, const DistributedID &did) | |
Create a new group. More... | |
template<typename A > | |
Group (World &world, const A &group, const std::size_t tag) | |
Create a new group. More... | |
template<typename A > | |
Group (World &world, const A &group, const uniqueidT &uid, const std::size_t tag) | |
Create a new group. More... | |
Group & | operator= (const Group &other) |
Copy assignment operator. More... | |
void | local_update () const |
Update local usage count. More... | |
void | remote_update () const |
Update remote usage count. More... | |
bool | empty () const |
Quary empty group. More... | |
const DistributedID & | id () const |
Group id accessor. More... | |
World & | get_world () const |
Parent world accessor. More... | |
ProcessID | rank () const |
Group rank accessor. More... | |
ProcessID | rank (const ProcessID world_rank) const |
Map world rank to group rank. More... | |
ProcessID | size () const |
Group size accessor. More... | |
ProcessID | world_rank (const ProcessID group_rank) const |
Map group rank to world rank. More... | |
void | make_tree (const ProcessID group_root, ProcessID &parent, ProcessID &child1, ProcessID &child2) const |
Compute the binary tree parents and children. More... | |
template<typename Archive > | |
void | serialize (const Archive &) |
Static Public Member Functions | |
static madness::Future< Group > | get_group (const DistributedID &did) |
Get group from the registry. More... | |
A collection of processes.
Group
is a light weight object that can be used to specify a set of processes that will participate in Gop collective operations. The advantage of Group over MPI (or SafeMPI) groups is that it eliminates the need to construct new communicator and the associated barrier.
|
inline |
Default constructor.
Create an empty group
|
inline |
Copy constructor.
other | The group to be copied |
|
inline |
Create a new group.
A | An array type |
world | The parent world for this group |
group | An array with a list of process to be included in the |
did | The distributed id associated with this group |
group
list must be included in the parent world.
|
inline |
Create a new group.
A | An array type |
world | The parent world for this group |
group | An array with a list of process to be included in the |
tag | The tag associated with this group group. |
group
list must be included in the parent world.
|
inline |
Create a new group.
A | An array type |
world | The parent world for this group |
group | An array with a list of process to be included in the |
uid | The unique id (used by WorldObject ) associated with this group |
tag | The tag associated with this group group. |
group
list must be included in the parent world.
|
inline |
Quary empty group.
true
when this group is empty Referenced by madness::WorldGopInterface::all_reduce(), madness::WorldGopInterface::bcast(), madness::WorldGopInterface::lazy_sync(), and madness::WorldGopInterface::reduce().
|
static |
Get group from the registry.
Get a registered group.
This function is used to acquire the group in an active message handler.
did | The id associated with the group |
|
inline |
Parent world accessor.
Referenced by madness::WorldGopInterface::all_reduce(), madness::WorldGopInterface::bcast(), madness::WorldGopInterface::lazy_sync(), and madness::WorldGopInterface::reduce().
|
inline |
Group id accessor.
|
inline |
Update local usage count.
Calling this function indicates that this group will be used by a task function that was spawned by a remote process. For each call to this function, remote_update
must be called exactly once.
WorldGopInterface
will call this function as needed. Users may call this function if a Group
is used in user provided collective operations.
|
inline |
Compute the binary tree parents and children.
[in] | root | The head node of the binary tree in the group |
[out] | parent | The parent node of the binary tree |
[out] | child1 | The left child node of the binary tree |
[out] | child2 | The right child node of the binary tree |
Referenced by madness::WorldGopInterface::all_reduce(), madness::WorldGopInterface::lazy_sync(), and madness::WorldGopInterface::reduce().
Copy assignment operator.
other | The group to be copied |
|
inline |
Group rank accessor.
Referenced by madness::WorldGopInterface::all_reduce(), and madness::WorldGopInterface::bcast().
Map world rank to group rank.
world_rank | The world rank to be mapped |
world_rank
process in the group
|
inline |
Update remote usage count.
Calling this function indicates that this group has been used by a task function that was spawned by a remote process. For each call to this function, remote_update
must be called exactly once.
WorldGopInterface
will call this function as needed. Users may call this function if a Group
is used in user provided collective operations.
|
inline |
|
inline |
Group size accessor.
Referenced by madness::WorldGopInterface::all_reduce(), madness::WorldGopInterface::bcast(), madness::WorldGopInterface::lazy_sync(), and madness::WorldGopInterface::reduce().
Map group rank to world rank.
group_rank | The group rank to be mapped to a world rank |