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. | |
~MPIOutputArchive () | |
Destructor. Close the archive first, which may entail sending data. | |
void | close () |
Close the archive (i.e., send any data in the buffer). | |
void | flush () const |
Send all data in the buffer to the destination process. | |
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. | |
Public Member Functions inherited from madness::archive::BaseArchive | |
BaseArchive () | |
Private Attributes | |
const std::size_t | bufsize |
Size of the buffer. | |
ProcessID | dest |
The destination process. | |
int | tag |
MPI communication tag. | |
std::vector< unsigned char > | v |
The buffer. | |
madness::archive::VectorOutputArchive | var |
Archive for storing the buffer. | |
World * | world |
The world. | |
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. | |
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. | |
using | is_saving = std::false_type |
Type used by Boost.Serialization to determine if this object is an output archive. | |
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. | |
Static Public Attributes inherited from madness::archive::BaseArchive | |
static constexpr bool | is_archive = true |
Flag to determine if this object is an archive. | |
static constexpr bool | is_input_archive = false |
Flag to determine if this object is an input archive. | |
static constexpr bool | is_output_archive = false |
Flag to determine if this object is an output archive. | |
static constexpr bool | is_parallel_archive = false |
Flag to determine if this object is a parallel archive. | |
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().