MADNESS
0.10.1
|
Archive allowing buffering, serialization of data, and point-to-point communication between processes with MPI. More...
#include <mpi_archive.h>
Public Member Functions | |
MPIOutputArchive (World &world, const ProcessID &dest, int tag=SafeMPI::MPIAR_TAG) | |
Construct an archive for sending data via MPI. More... | |
~MPIOutputArchive () | |
Destructor. Close the archive first, which may entail sending data. More... | |
void | close () |
Close the archive (i.e., send any data in the buffer). More... | |
void | flush () const |
Send all data in the buffer to the destination process. More... | |
template<class T > | |
std::enable_if< is_trivially_serializable< T >::value, void >::type | store (const T *t, long n) const |
Serialize data and store it in the buffer. More... | |
Public Member Functions inherited from madness::archive::BaseArchive | |
BaseArchive () | |
Private Attributes | |
const std::size_t | bufsize |
Size of the buffer. More... | |
ProcessID | dest |
The destination process. More... | |
int | tag |
MPI communication tag. More... | |
std::vector< unsigned char > | v |
The buffer. More... | |
madness::archive::VectorOutputArchive | var |
Archive for storing the buffer. More... | |
World * | world |
The world. More... | |
Additional Inherited Members | |
Public Types inherited from madness::archive::BaseOutputArchive | |
using | is_saving = std::true_type |
Type used by Boost.Serialization to determine if this object is an output archive. More... | |
Public Types inherited from madness::archive::BaseArchive | |
using | is_loading = std::false_type |
Type used by Boost.Serialization to determine if this object is an input archive. More... | |
using | is_saving = std::false_type |
Type used by Boost.Serialization to determine if this object is an output archive. More... | |
Static Public Attributes inherited from madness::archive::BaseOutputArchive | |
static constexpr bool | is_output_archive = true |
Flag to determine if this object is an output archive. More... | |
Static Public Attributes inherited from madness::archive::BaseArchive | |
static constexpr bool | is_archive = true |
Flag to determine if this object is an archive. More... | |
static constexpr bool | is_input_archive = false |
Flag to determine if this object is an input archive. More... | |
static constexpr bool | is_output_archive = false |
Flag to determine if this object is an output archive. More... | |
static constexpr bool | is_parallel_archive = false |
Flag to determine if this object is a parallel archive. More... | |
Archive allowing buffering, serialization of data, and point-to-point communication between processes with MPI.
|
inline |
|
inline |
Destructor. Close the archive first, which may entail sending data.
References close().
|
inline |
Close the archive (i.e., send any data in the buffer).
References flush().
Referenced by ~MPIOutputArchive().
|
inline |
Send all data in the buffer to the destination process.
References bufsize, dest, madness::World::mpi, madness::WorldMpiInterface::Send(), tag, v, and world.
Referenced by close(), madness::archive::ArchiveStoreImpl< ParallelOutputArchive< localarchiveT >, WorldContainer< keyT, valueT > >::store(), and store().
|
inline |
Serialize data and store it in the buffer.
The function only appears (due to enable_if
) if T
is fundamental.
T | The data type to be serialized. |
[in] | t | Pointer to the data. |
[in] | n | Number of data items to serialize. |
References bufsize, flush(), madness::archive::VectorOutputArchive::store(), v, and var.
|
private |
Size of the buffer.
Referenced by MPIOutputArchive(), flush(), and store().
|
private |
The destination process.
Referenced by flush().
|
private |
MPI communication tag.
Referenced by flush().
|
mutableprivate |
The buffer.
Referenced by MPIOutputArchive(), flush(), and store().
|
private |
Archive for storing the buffer.
Referenced by store().