![]() |
Rosetta
2020.11
|
A stream decorator that takes raw input and zips it to a ostream. More...
#include <mpistream.hh>
Public Types | |
typedef std::basic_streambuf < Elem, Tr > | basic_streambuf_type |
typedef std::basic_ostream < Elem, Tr > & | ostream_reference |
typedef Elem | char_type |
typedef ElemA | char_allocator_type |
typedef ByteT | byte_type |
typedef ByteAT | byte_allocator_type |
typedef byte_type * | byte_buffer_type |
typedef std::vector< byte_type, byte_allocator_type > | byte_vector_type |
typedef std::vector< char_type, char_allocator_type > | char_vector_type |
typedef Tr | traits_type |
typedef Tr::int_type | int_type |
Public Member Functions | |
basic_mpi_streambuf (std::string filename, std::size_t buffer_size_, int master_rank_, bool append) | |
Construct a mpi stream. More... | |
~basic_mpi_streambuf () override | |
int | sync () override |
int_type | overflow (int_type c) override |
OVERFLOW. More... | |
virtual std::streamsize | flush () |
flushes the mpi buffer and output buffer More... | |
std::streamsize | flush_final () |
void | reset_state () |
resets the mpi stream and zeros the crc More... | |
int | file_status () const |
void | print_header (std::string const &) |
Private Member Functions | |
std::streamsize | flush (bool final) |
bool | send_to_master (char_type *, std::streamsize) |
+++ SEND_TO_MASTER ++++ More... | |
std::size_t | fill_input_buffer () |
Private Attributes | |
char_vector_type | m_buffer |
int | channel_id_ |
int | my_rank_ |
int | master_rank_ |
int | file_status_ |
A stream decorator that takes raw input and zips it to a ostream.
typedef std::basic_streambuf< Elem, Tr > utility::io::mpi_stream::basic_mpi_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::basic_streambuf_type |
typedef ByteAT utility::io::mpi_stream::basic_mpi_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::byte_allocator_type |
typedef byte_type* utility::io::mpi_stream::basic_mpi_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::byte_buffer_type |
typedef ByteT utility::io::mpi_stream::basic_mpi_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::byte_type |
typedef std::vector< byte_type, byte_allocator_type > utility::io::mpi_stream::basic_mpi_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::byte_vector_type |
typedef ElemA utility::io::mpi_stream::basic_mpi_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::char_allocator_type |
typedef Elem utility::io::mpi_stream::basic_mpi_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::char_type |
typedef std::vector< char_type, char_allocator_type > utility::io::mpi_stream::basic_mpi_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::char_vector_type |
typedef Tr::int_type utility::io::mpi_stream::basic_mpi_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::int_type |
typedef std::basic_ostream< Elem, Tr >& utility::io::mpi_stream::basic_mpi_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::ostream_reference |
typedef Tr utility::io::mpi_stream::basic_mpi_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::traits_type |
utility::io::mpi_stream::basic_mpi_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::basic_mpi_streambuf | ( | std::string | filename, |
std::size_t | buffer_size_, | ||
int | master_rank_, | ||
bool | append | ||
) |
Construct a mpi stream.
References utility::io::oc::cerr, utility::io::mpi_stream::basic_mpi_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::channel_id_, utility::io::mpi_stream::basic_mpi_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::file_status_, utility::filename(), utility::io::mpi_stream::basic_mpi_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::m_buffer, utility::io::mpi_stream::basic_mpi_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::master_rank_, utility::io::mpi_stream::MPI_FAIL, utility::io::mpi_stream::MPI_STREAM_OPEN, utility::io::mpi_stream::MPI_STREAM_OPEN_APPEND, utility::io::mpi_stream::MPI_STREAM_TAG, and utility::io::mpi_stream::basic_mpi_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::my_rank_.
|
override |
|
inline |
|
private |
|
inlinevirtual |
flushes the mpi buffer and output buffer
Referenced by utility::io::mpi_stream::basic_mpi_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::flush_final().
|
private |
|
inline |
|
override |
OVERFLOW.
References numeric::statistics::w().
void utility::io::mpi_stream::basic_mpi_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::print_header | ( | std::string const & | ) |
void utility::io::mpi_stream::basic_mpi_streambuf< Elem, Tr, ElemA, ByteT, ByteAT >::reset_state | ( | ) |
resets the mpi stream and zeros the crc
This method should be called after flush_finalize() to allow future writes
References utility::io::oc::cout.
|
private |
+++ SEND_TO_MASTER ++++
References utility::io::mpi_stream::MPI_STREAM_SEND, and utility::io::mpi_stream::MPI_STREAM_TAG.
|
override |
|
private |
|
private |
|
private |
|
private |
|
private |