Coordinates send and receive between processes by notifying processes to expect a send from X other processes.
More...
#include <SRManager.h>
|
| SRManager (boost::mpi::communicator *comm) |
| Creates an SRManager that uses the specified communicator. More...
|
|
| SRManager (boost::mpi::communicator *comm, int *toSend, int *toRecv) |
| Creates an SRManager that uses the specified communicator, using the user-specified arrays instead of its internal arrays. More...
|
|
void | mark (int pos) |
| Marks the position in the array as 'true' (sets to one). More...
|
|
void | setVal (int pos, int val) |
| Sets the value at the given index in the array. More...
|
|
void | clear () |
| Clears the send and receive arrays (sets all values to 0).
|
|
void | retrieveSources () |
| Performs the actual send operation, populating the receive array with values from the other processes' send arrays.
|
|
void | retrieveSources (std::vector< int > &sources) |
| Performs the send operation and populates the vector passed with values representing all elements in the array that have non-zero values after the receive. More...
|
|
void | retrieveSources (const std::vector< int > &targets, std::vector< int > &sources, int tag=0) |
| Populates the send array based on the values listed in the 'targets' vector (which should be a list of process IDs to which this processer will send information) then performs the send operation, then populates the vector passed with values representing all elements in the receive array that have non-zero values after the receive. More...
|
|
Coordinates send and receive between processes by notifying processes to expect a send from X other processes.
◆ SRManager() [1/2]
SRManager::SRManager |
( |
boost::mpi::communicator * |
comm | ) |
|
Creates an SRManager that uses the specified communicator.
- Parameters
-
comm | the communicator to use |
◆ SRManager() [2/2]
SRManager::SRManager |
( |
boost::mpi::communicator * |
comm, |
|
|
int * |
toSend, |
|
|
int * |
toRecv |
|
) |
| |
Creates an SRManager that uses the specified communicator, using the user-specified arrays instead of its internal arrays.
The ability to use external arrays is a convenience for conditions in which it is useful to maintain the array of values for other purposes but exchange them using the SRManager.
- Parameters
-
comm | the communicator to use |
toSend | the array to be used as the send array |
toRecv | the array to be used as the receive array If the pointer passed for the receive array is null, an internal array will be used. This is to provide for situations in which the user wishes to maintain the send array but not the receive array. |
◆ mark()
void SRManager::mark |
( |
int |
pos | ) |
|
Marks the position in the array as 'true' (sets to one).
- Parameters
-
pos | the position in the array to be set, AKA the processor to which information will be sent. |
◆ retrieveSources() [1/2]
void SRManager::retrieveSources |
( |
const std::vector< int > & |
targets, |
|
|
std::vector< int > & |
sources, |
|
|
int |
tag = 0 |
|
) |
| |
Populates the send array based on the values listed in the 'targets' vector (which should be a list of process IDs to which this processer will send information) then performs the send operation, then populates the vector passed with values representing all elements in the receive array that have non-zero values after the receive.
- Parameters
-
targets | vector of integers representing process to which this one intends to send information |
sources | vector that will be populated with list of integers representing processes that will send this process information @tag optional parameter, now obsolete (included for backward compatibility with boost-based SRManager prior to 2.0 release. |
◆ retrieveSources() [2/2]
void SRManager::retrieveSources |
( |
std::vector< int > & |
sources | ) |
|
Performs the send operation and populates the vector passed with values representing all elements in the array that have non-zero values after the receive.
- Parameters
-
sources | vector that will have a list of all processes that sent non-zero values to this one |
◆ setVal()
void SRManager::setVal |
( |
int |
pos, |
|
|
int |
val |
|
) |
| |
Sets the value at the given index in the array.
Note: Does not perform error checking; user should ensure that index value is valid.
- Parameters
-
pos | index value for position in array to be set |
val | value to which the array element should be set |
The documentation for this class was generated from the following files:
- /home/nick/Documents/repos/repast.hpc/src/repast_hpc/SRManager.h
- /home/nick/Documents/repos/repast.hpc/src/repast_hpc/SRManager.cpp