SeapodymCourier class for managing memory exposure and data fetching between MPI processes.
More...
#include <SeapodymCourier.h>
|
| SeapodymCourier (MPI_Comm comm=MPI_COMM_WORLD) |
| Constructor.
|
| ~SeapodymCourier () |
| Destructor.
|
double * | getDataPtr () const |
| Get the pointer to the exposed data.
|
void | expose (double *data, int data_size) |
| Expose the memory to other processes.
|
std::vector< double > | fetch (int source_worker) |
| Fetch data from a remote process and store it in the local data array.
|
std::vector< double > | accumulate (int targetWorker) |
| Accumulate the data from all workers.
|
void | free () |
| Free the MPI window and reset the data pointer.
|
| SeapodymCourier (const SeapodymCourier &)=delete |
SeapodymCourier & | operator= (const SeapodymCourier &)=delete |
| SeapodymCourier (SeapodymCourier &&other) noexcept |
SeapodymCourier & | operator= (SeapodymCourier &&other) noexcept |
SeapodymCourier class for managing memory exposure and data fetching between MPI processes.
This class allows workers to expose their memory to other processes and fetch data from them. It uses MPI windows for memory exposure and communication.
◆ SeapodymCourier()
SeapodymCourier::SeapodymCourier |
( |
MPI_Comm | comm = MPI_COMM_WORLD | ) |
|
Constructor.
- Parameters
-
comm | MPI communicator to use for communication |
◆ accumulate()
std::vector< double > SeapodymCourier::accumulate |
( |
int | targetWorker | ) |
|
Accumulate the data from all workers.
- Parameters
-
targetWorker | Rank of the target process to which to accumulate data |
- Returns
- A vector containing the accumulated data from all workers
◆ expose()
void SeapodymCourier::expose |
( |
double * | data, |
|
|
int | data_size ) |
Expose the memory to other processes.
- Parameters
-
data | Pointer to the data to be exposed |
data_size | Number of elements in the data array |
◆ fetch()
std::vector< double > SeapodymCourier::fetch |
( |
int | source_worker | ) |
|
Fetch data from a remote process and store it in the local data array.
- Parameters
-
source_worker | Rank of the target process from which to fetch data |
- Returns
- data
◆ getDataPtr()
double * SeapodymCourier::getDataPtr |
( |
| ) |
const |
|
inline |
Get the pointer to the exposed data.
- Returns
- Pointer to the exposed data
The documentation for this class was generated from the following files: