13#ifndef PROTEUS_MPIHELPERS_H
14#define PROTEUS_MPIHELPERS_H
44 template <
typename Callable>
void start(Callable &&ThreadFunc) {
48 Thread = std::make_unique<std::thread>(std::forward<Callable>(ThreadFunc));
57 std::unique_ptr<std::thread> Thread;
77 MPI_Comm Comm = MPI_COMM_NULL;
Manages the lifecycle of a background communication thread.
Definition MPIHelpers.h:36
void join()
Definition MPIHelpers.cpp:77
CommThreadHandle & operator=(const CommThreadHandle &)=delete
CommThreadHandle(const CommThreadHandle &)=delete
void start(Callable &&ThreadFunc)
Definition MPIHelpers.h:44
bool isRunning() const
Definition MPIHelpers.cpp:87
~CommThreadHandle()
Definition MPIHelpers.cpp:75
CommThreadHandle()=default
RAII wrapper for MPI communicator with thread safety checks.
Definition MPIHelpers.h:62
MPICommHandle(const MPICommHandle &)=delete
~MPICommHandle()
Definition MPIHelpers.cpp:65
int getRank() const
Definition MPIHelpers.cpp:69
int getSize() const
Definition MPIHelpers.cpp:71
MPICommHandle & operator=(const MPICommHandle &)=delete
void finalize()
Definition MPIHelpers.cpp:73
MPI_Comm get() const
Definition MPIHelpers.cpp:67
MPICommHandle()
Definition MPIHelpers.cpp:52
Definition MemoryCache.h:26
std::vector< char > packStoreMessage(MPI_Comm Comm, const HashT &HashValue, const CacheEntry &Entry)
Definition MPIHelpers.cpp:89
void validateMPIConfig()
Definition MPIHelpers.cpp:30
StoreMessage unpackStoreMessage(MPI_Comm Comm, const std::vector< char > &Buffer)
Definition MPIHelpers.cpp:130
MPITag
Definition MPIHelpers.h:27
Definition ObjectCache.h:27
Definition MPIRemoteLookupCache.h:24
Definition MPIRemoteLookupCache.h:28
Definition MPIHelpers.h:84
std::vector< char > Data
Definition MPIHelpers.h:86
bool IsDynLib
Definition MPIHelpers.h:87
HashT Hash
Definition MPIHelpers.h:85