|
KaMPIng 0.2.0
Flexible and (near) zero-overhead C++ bindings for MPI
|
Responsible for storing and communicating intermediate results between PEs. More...
#include <reproducible_reduce.hpp>
Public Member Functions | |
| MessageBuffer (Communicator const &comm) | |
Construct a new message buffer utilizing the given communicator comm. | |
| void | receive (int const source_rank) |
| Receive a message from another PE and store its contents. | |
| void | flush (void) |
| Asynchronously send locally stored intermediate results. | |
| void | wait (void) |
| Wait until the message dispatched by flush() is actually sent and clear any stored values. | |
| void | put (int const target_rank, size_t const index, T const value) |
| Store an intermediate result inside the message buffer for eventual transmission to its destination. | |
| T const | get (int const source_rank, size_t const index) |
Get the intermediate result with the specified index from source_rank. | |
Responsible for storing and communicating intermediate results between PEs.
| T | Type of the stored values. |
| Communicator | Type of the underlying communicator. |
|
inline |
Construct a new message buffer utilizing the given communicator comm.
| comm | Underlying communicator used to send the messages. |
|
inline |
Asynchronously send locally stored intermediate results.
If there are none, no message is dispatched.
|
inline |
Get the intermediate result with the specified index from source_rank.
If the value has been received beforehand, it is immediately returned. Otherwise the method blocks until the message from source_rank containing the value arrives.
| source_rank | Rank of the PE that holds the desired intermediate result. |
| index | Global index of the intermediate result. |
|
inline |
Store an intermediate result inside the message buffer for eventual transmission to its destination.
Triggers a send if
target_rank orvalue | target_rank | Rank of the PE which requires the value for further processing. |
| index | Global index of the value being sent. |
| value | Actual value that must be sent. |
|
inline |
Receive a message from another PE and store its contents.
| source_rank | Rank of the sender. |