KaMPIng 0.1.0
(Near) zero-overhead C++ MPI bindings.
|
Buffer holding serialized data. More...
#include <serialization.hpp>
Public Types | |
using | data_type |
Type of the encapsulated object to serialize/deserialize. | |
using | value_type = char |
Type of the elements in the buffer. | |
Public Member Functions | |
SerializationBuffer (DataBufferType &&object) | |
Construct a serialization buffer from a GenericDataBuffer containing the object to serialize/deserialize into. | |
void | serialize () |
Serialize the object into the character buffer stored internally. | |
DataBufferType | extract () && |
Extract the GenericDataBuffer containing the encapsulated object. | |
void | deserialize () |
Deserialize from the character buffer stored internally into the encapsulated object. | |
char * | data () noexcept |
Access the underlying buffer. | |
char const * | data () const noexcept |
Access the underlying buffer. | |
void | resize (size_t size) |
Resize the underlying buffer. | |
size_t | size () const |
Access the size of the underlying buffer. | |
Buffer holding serialized data.
This uses cereal
to serialize and deserialize objects.
OutArchive | Type of the archive to use for serialization. |
InArchive | Type of the archive to use for deserialization. |
Allocator | Type of the allocator to use for the buffer holding the serialized data. |
DataBufferType | Type of the GenericDataBuffer holding the data to serialize/deserialize into. |
using kamping::internal::SerializationBuffer< OutArchive, InArchive, Allocator, DataBufferType >::data_type |
Type of the encapsulated object to serialize/deserialize.
|
inline |
Resize the underlying buffer.
size | New size of the buffer. |