#include <iostream>
#include <cstdlib>
#include <mpi.h>
Functions |
| void | Send_ProcD (const int to, const int nin, const double xin[], const MPI::Intracomm &icomm) |
| void | Recv_ProcD (const int from, int &nout, double xout[], const int maxbuf, const MPI::Intracomm &icomm) |
| void | ExchangeD (const int yourid, const int nin, const double xin[], int &nout, double xout[], const int maxbuf, const MPI::Intracomm &icomm) |
Variables |
| const int | TAG1 = 1 |
| const int | TAG2 = 2 |
Function Documentation
| void ExchangeD |
( |
const int |
yourid, |
|
|
const int |
nin, |
|
|
const double |
xin[], |
|
|
int & |
nout, |
|
|
double |
xout[], |
|
|
const int |
maxbuf, |
|
|
const MPI::Intracomm & |
icomm |
|
) |
| |
Exchanges vectors between my process and the process with rank .
- Parameters:
-
| [in] | yourid | rank of process in communicator icomm to send the message |
| [in] | nin | number of elements in vector xin |
| [in] | xin | my vector |
| [out] | nout | number of received elements stored in vector xout |
| [out] | xout | vector |
| [in] | maxbuf | maximal number of elements of xout |
| [in] | icomm | communicator to use |
| void Recv_ProcD |
( |
const int |
from, |
|
|
int & |
nout, |
|
|
double |
xout[], |
|
|
const int |
maxbuf, |
|
|
const MPI::Intracomm & |
icomm |
|
) |
| |
Receives data from process with rank from into a double-vector xout .
- Parameters:
-
| [in] | from | rank of process in communicator icomm to receive the message from |
| [out] | nout | number of received elements stored in vector xout |
| [out] | xout | vector |
| [in] | maxbuf | maximal number of elements of xout |
| [in] | icomm | communicator to use |
| void Send_ProcD |
( |
const int |
to, |
|
|
const int |
nin, |
|
|
const double |
xin[], |
|
|
const MPI::Intracomm & |
icomm |
|
) |
| |
Sends data of double-vector xin to the process with rank to .
- Parameters:
-
| [in] | to | rank of process in communicator icomm to send the message |
| [in] | nin | number of elements in vector xin |
| [in] | xin | vector |
| [in] | icomm | communicator to use |
Variable Documentation