|
DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
|
Process-singleton managing the buffer attached to MPI for MPI_Bsend (buffered sends).
More...
#include <MPI.hpp>
Public Types | |
| using | size_type = decltype(buf)::size_type |
Public Member Functions | |
| MPI_int | size () |
Current buffer size in bytes (fits in MPI_int; asserted). | |
| void | claim (MPI_Aint cs, int reportRank=0) |
Reserve cs additional bytes, growing and re-attaching the MPI buffer if needed. reportRank is only used for diagnostic logs. | |
| void | unclaim (MPI_int cs) |
Release cs previously-claim ed bytes (only updates accounting; does not shrink the buffer). | |
| void * | getBuf () |
| Direct pointer to the attached buffer (for diagnostics). | |
Static Public Member Functions | |
| static MPIBufferHandler & | Instance () |
| Access the process-wide singleton. | |
Process-singleton managing the buffer attached to MPI for MPI_Bsend (buffered sends).
Some algorithms (e.g., serialised writes) use buffered sends to decouple sender from receiver. MPI requires the application to provide the buffer via MPI_Buffer_attach. This singleton owns that buffer, grows it on demand via claim, and exposes a thin accounting layer (claim / unclaim) so multiple components can share the buffer without stepping on each other.
Thread-safe construction on C++11; not MT-safe for concurrent claims.
| using DNDS::MPIBufferHandler::size_type = decltype(buf)::size_type |
|
inline |
|
inline |
|
static |
|
inline |
|
inline |