template<typename Elem, typename Tr = std::char_traits< Elem >, typename ElemA = std::allocator< Elem >, typename ByteT = unsigned char, typename ByteAT = std::allocator< ByteT >>
class utility::io::mpi_stream::basic_mpi_ostream< Elem, Tr, ElemA, ByteT, ByteAT >
A mpiper ostream.
This class is a ostream decorator that behaves 'almost' like any other ostream.
At construction, it takes any ostream that shall be used to output of the compressed data.
When finished, you need to call the special method zflush or call the destructor to flush all the intermidiate streams.
Example:
ostringstream ostringstream_;
mpiper<<
f<<
" "<<d<<
" "<<
ui<<
" "<<ul<<
" "<<us<<
" "<<
c<<
" "<<dum;
mpiper.zflush();
f
Definition: create_a3b_hbs.py:631
list c
Definition: kmeans_adaptive_kernel_density_bb_dependent_rotlib.py:196
Definition: config_dialog.cpp:9
basic_mpi_ostream< char > mpi_ostream
Definition: mpistream.hh:336
template<typename Elem , typename Tr = std::char_traits< Elem >, typename ElemA = std::allocator< Elem >, typename ByteT = unsigned char, typename ByteAT = std::allocator< ByteT >>
Constructs a mpiper ostream decorator.
- Parameters
-
| ostream_ | ostream where the compressed output is written |
| is_gmpi_ | true if gmpi header and footer have to be added |
| level_ | level of compression 0, bad and fast, 9, good and slower, |
| strategy_ | compression strategy |
| window_size_ | see zlib doc |
| memory_level_ | see zlib doc |
| buffer_size_ | the buffer size used to mpi data |
- Note
- When is_gmpi_ is true, a gmpi header and footer is automatically added
References utility::io::mpi_stream::basic_mpi_ostreambase< Elem, Tr, ElemA, ByteT, ByteAT >::file_status(), header(), utility::io::mpi_stream::MPI_FAIL, utility::io::mpi_stream::MPI_SUCCESS_NEW, and utility::io::mpi_stream::basic_mpi_ostreambase< Elem, Tr, ElemA, ByteT, ByteAT >::print_header().
template<typename Elem , typename Tr = std::char_traits< Elem >, typename ElemA = std::allocator< Elem >, typename ByteT = unsigned char, typename ByteAT = std::allocator< ByteT >>
write char
if mpi stream has been finalized, will reset
the stream and add header if necessary
References kmeans_adaptive_kernel_density_bb_dependent_rotlib::c, and utility::io::mpi_stream::basic_mpi_ostream< Elem, Tr, ElemA, ByteT, ByteAT >::put().
Referenced by utility::io::mpi_stream::basic_mpi_ostream< Elem, Tr, ElemA, ByteT, ByteAT >::put(), and utility::io::ozstream::put().
template<typename Elem , typename Tr = std::char_traits< Elem >, typename ElemA = std::allocator< Elem >, typename ByteT = unsigned char, typename ByteAT = std::allocator< ByteT >>
write a string
if mpi stream has been finalized, will reset
the stream and add header if necessary
References count, str(), and utility::io::mpi_stream::basic_mpi_ostream< Elem, Tr, ElemA, ByteT, ByteAT >::write().
Referenced by utility::io::mpi_stream::basic_mpi_ostream< Elem, Tr, ElemA, ByteT, ByteAT >::put_long_as_uint32(), utility::io::mpi_stream::basic_mpi_ostream< Elem, Tr, ElemA, ByteT, ByteAT >::write(), and utility::io::ozstream::write().
template<typename Elem , typename Tr = std::char_traits< Elem >, typename ElemA = std::allocator< Elem >, typename ByteT = unsigned char, typename ByteAT = std::allocator< ByteT >>
tracks to see if mpi stream was finalized
set to true during zflush_finalize()
set to false during reset_state()