Proxy for accessing the stored flags. The flag on a given rank is locked on construction and unlocked on destruction.
More...
#include <DistrFlags.h>
Proxy for accessing the stored flags. The flag on a given rank is locked on construction and unlocked on destruction.
- Warning
- The overlying DistrFlags object must be alive and allocated for Proxy to work. If it is destroyed or only default constructed, than any access functions will throw a logic error.
◆ Proxy()
molpro::linalg::array::util::DistrFlags::Proxy::Proxy |
( |
MPI_Comm |
comm, |
|
|
MPI_Win |
win, |
|
|
int |
rank, |
|
|
std::shared_ptr< int > |
counter |
|
) |
| |
Construct Proxy using contents of an active DistrFlags object.
Passing contents of DistrFlags object instead of a reference, allows movement of the overlying object without invalidating the Proxy.
- Parameters
-
comm | communicator |
win | MPI window |
rank | rank of processor to access |
counter | number of proxies with this window |
◆ ~Proxy()
molpro::linalg::array::util::DistrFlags::Proxy::~Proxy |
( |
| ) |
|
◆ get()
int molpro::linalg::array::util::DistrFlags::Proxy::get |
( |
| ) |
const |
◆ rank()
int molpro::linalg::array::util::DistrFlags::Proxy::rank |
( |
| ) |
const |
|
inline |
Which rank the proxy has access to.
◆ replace()
int molpro::linalg::array::util::DistrFlags::Proxy::replace |
( |
int |
val | ) |
|
replace value of flag
- Returns
- original value
◆ m_comm
MPI_Comm molpro::linalg::array::util::DistrFlags::Proxy::m_comm = {} |
|
protected |
◆ m_counter
std::shared_ptr<int> molpro::linalg::array::util::DistrFlags::Proxy::m_counter |
|
protected |
counter of proxy objects created by overlying DistrFlags object.
◆ m_rank
int molpro::linalg::array::util::DistrFlags::Proxy::m_rank |
|
protected |
empty window handle
rank of process to lock
◆ m_win
MPI_Win molpro::linalg::array::util::DistrFlags::Proxy::m_win = MPI_WIN_NULL |
|
protected |