|
OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
#include <RandomStrategy.h>


Public Member Functions | |
| RandomStrategy (size_t num_masters, boost::shared_ptr< CommTopology > topology, MPI_Comm comm=MPI_COMM_WORLD) | |
| virtual | ~RandomStrategy () |
| void | split () |
Private Member Functions | |
| void | fillPids (int num) |
| int | nextRandomPid () |
Private Attributes | |
| std::set< int > | pids_ |
| boost::random::mt19937 | rng_ |
Additional Inherited Members | |
Protected Member Functions inherited from SplitStrategy | |
| SplitStrategy (CmdArguments_t args, MPI_Comm comm=MPI_COMM_WORLD) | |
| virtual | ~SplitStrategy () |
| virtual int | getNrWorkerGroups () const =0 |
| Get number of worker groups. More... | |
| MPI_Comm | getComm () const |
| int | getRank () const |
| int | getGlobalRank () const |
| int | getNP () const |
| Role_t | getRole () const |
| int | getLeader () const |
| int | getPoller () const |
Protected Attributes inherited from SplitStrategy | |
| int | rank_ |
| int | global_rank_ |
| int | num_procs_ |
| int | group_id_ |
| CmdArguments_t | cmd_args_ |
| Role_t | role_ |
| std::vector< unsigned int > | colorings_ |
| defines comm splitting More... | |
| int | leader_ |
| every core specifies a leader (master is its own leader) More... | |
| int | poller_ |
| every core can specifies a master More... | |
Randomly select num_masters master cores.
Definition at line 14 of file RandomStrategy.h.
|
inline |
Definition at line 18 of file RandomStrategy.h.
References fillPids(), and SplitStrategy::num_procs_.

|
inlinevirtual |
Definition at line 26 of file RandomStrategy.h.
|
inlineprivate |
|
inlineprivate |
|
inlinevirtual |
Forcing concrete implementation to split and assign poller, optimizer and worker nodes.
Implements SplitStrategy.
Definition at line 30 of file RandomStrategy.h.
References nextRandomPid(), pids_, SplitStrategy::rank_, and SplitStrategy::role_.

|
private |
Definition at line 68 of file RandomStrategy.h.
Referenced by fillPids(), nextRandomPid(), and split().
|
private |
Definition at line 69 of file RandomStrategy.h.
Referenced by nextRandomPid().
1.8.5