MADNESS 0.10.1
Public Member Functions | Private Attributes | List of all members
madness::archive::MPIInputArchive Class Reference

Archive allowing buffering, deserialization of data, and point-to-point communication between processes with MPI. More...

#include <mpi_archive.h>

Inheritance diagram for madness::archive::MPIInputArchive:
Inheritance graph
[legend]
Collaboration diagram for madness::archive::MPIInputArchive:
Collaboration graph
[legend]

Public Member Functions

 MPIInputArchive (World &world, const ProcessID &src, int tag=SafeMPI::MPIAR_TAG)
 Construct an archive for receiving data via MPI.
 
template<class T >
std::enable_if< is_trivially_serializable< T >::value, void >::type load (T *t, long n) const
 Deserialize data and store it in the buffer.
 
- Public Member Functions inherited from madness::archive::BaseArchive
 BaseArchive ()
 

Private Attributes

ProcessID src
 The source process.
 
int tag
 MPI communication tag.
 
std::vector< unsigned char > v
 The buffer.
 
madness::archive::VectorInputArchive var
 Archive for loading the buffer.
 
Worldworld
 The world.
 

Additional Inherited Members

- Public Types inherited from madness::archive::BaseInputArchive
using is_loading = std::true_type
 Type used by Boost.Serialization to determine if this object is an input 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::BaseInputArchive
static constexpr bool is_input_archive = true
 Flag to determine if this object is an input 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.
 

Detailed Description

Archive allowing buffering, deserialization of data, and point-to-point communication between processes with MPI.

Constructor & Destructor Documentation

◆ MPIInputArchive()

madness::archive::MPIInputArchive::MPIInputArchive ( World world,
const ProcessID src,
int  tag = SafeMPI::MPIAR_TAG 
)
inline

Construct an archive for receiving data via MPI.

Parameters
[in]worldThe world.
[in]srcThe source process.
[in]tagMPI communication tag.

Member Function Documentation

◆ load()

template<class T >
std::enable_if< is_trivially_serializable< T >::value, void >::type madness::archive::MPIInputArchive::load ( T t,
long  n 
) const
inline

Deserialize data and store it in the buffer.

The function only appears (due to enable_if) if T is fundamental.

Template Parameters
TThe data type to be deserialized.
Parameters
[out]tPointer to the data.
[in]nNumber of data items to serialize.

References madness::archive::VectorInputArchive::load(), m, madness::World::mpi, madness::archive::VectorInputArchive::nbyte_avail(), madness::WorldMpiInterface::Recv(), madness::archive::VectorInputArchive::rewind(), src, tag, v, var, and world.

Member Data Documentation

◆ src

ProcessID madness::archive::MPIInputArchive::src
private

The source process.

Referenced by load().

◆ tag

int madness::archive::MPIInputArchive::tag
private

MPI communication tag.

Referenced by load().

◆ v

std::vector<unsigned char> madness::archive::MPIInputArchive::v
mutableprivate

The buffer.

Referenced by load().

◆ var

madness::archive::VectorInputArchive madness::archive::MPIInputArchive::var
private

Archive for loading the buffer.

Referenced by load().

◆ world

World* madness::archive::MPIInputArchive::world
mutableprivate

The world.

Referenced by load().


The documentation for this class was generated from the following file: