|
MADNESS 0.10.1
|
Wraps an archive around a memory buffer for output. More...
#include <buffer_archive.h>


Public Member Functions | |
| BufferOutputArchive () | |
| Default constructor; the buffer will only count data. | |
| BufferOutputArchive (void *ptr, std::size_t nbyte) | |
| Constructor that assigns a buffer. | |
| void | close () |
| Close the archive. | |
| bool | count_only () const |
| Determine if this buffer is used for counting. | |
| void | flush () |
| Flush the archive. | |
| void | open (std::size_t) |
| Open a buffer with a specific size. | |
| std::size_t | size () const |
| Return the amount of data stored (counted) in the buffer. | |
| template<typename T > | |
| std::enable_if< madness::is_trivially_serializable< T >::value, void >::type | store (const T *t, long n) const |
| Stores (counts) data into the memory buffer. | |
Public Member Functions inherited from madness::archive::BaseArchive | |
| BaseArchive () | |
Private Attributes | |
| bool | countonly |
| Current output location. | |
| std::size_t | i |
| const std::size_t | nbyte |
| Buffer size. | |
| unsigned char *const | ptr |
| The memory buffer. | |
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. | |
Wraps an archive around a memory buffer for output.
| madness::MadnessException | in case of buffer overflow. |
The default constructor can also be used to count stuff.
|
inline |
Default constructor; the buffer will only count data.
|
inline |
Constructor that assigns a buffer.
| [in] | ptr | Pointer to the buffer. |
| [in] | nbyte | Size of the buffer. |
|
inline |
Close the archive.
Referenced by main().
|
inline |
Determine if this buffer is used for counting.
References countonly.
|
inline |
Flush the archive.
|
inline |
Open a buffer with a specific size.
|
inline |
Return the amount of data stored (counted) in the buffer.
References i.
Referenced by madness::WorldGopInterface::broadcast_serializable(), madness::WorldGopInterface::concat0(), main(), madness::new_am_arg(), and madness::archive::ArchiveStoreImpl< ParallelOutputArchive< VectorOutputArchive >, WorldContainer< keyT, valueT > >::store().
|
inline |
Stores (counts) data into the memory buffer.
The function only appears (due to enable_if) if T is serializable.
| T | Type of the data to be stored (counted). |
| [in] | t | Pointer to the data to be stored (counted). |
| [in] | n | Size of data to be stored (counted). |
References countonly, i, m, MADNESS_ASSERT, MADNESS_PRAGMA_GCC, nbyte, madness::nonlinear_vector_solver(), madness::pop(), madness::print(), and ptr.
|
private |
|
mutableprivate |
|
private |
Buffer size.
Referenced by store().
The memory buffer.
Referenced by store().