![]() |
fpmas 1.6
|
#include <communication.h>
Public Member Functions | |
| DataPack (std::size_t count, std::size_t data_size) | |
| DataPack () | |
| DataPack (const DataPack &other) | |
| DataPack (DataPack &&other) | |
| DataPack & | operator= (const DataPack &other) |
| DataPack & | operator= (DataPack &&other) |
| void | resize (std::size_t count) |
| void | free () |
| ~DataPack () | |
Public Attributes | |
| std::size_t | size |
| std::size_t | count |
| std::size_t | data_size |
| char * | buffer |
A convenient wrapper for void* buffers used in MPI functions.
|
inline |
Allocates a buffer of count items of size data_size.
|
inline |
Allocates a void buffer, of size 0.
|
inline |
Copy constructor.
Allocates a buffer of the same size as other, and copies data from other's buffer to this buffer.
| other | DataPack to copy from |
|
inline |
|
inline |
Frees the internal buffer.
Copy assignment.
Frees this buffer, and copies other's buffer into this buffer.
| other | DataPack to copy from |
Move assignment.
Frees this buffer, and moves other's buffer into this buffer.
| other | DataPack to move from |
|
inline |
Resizes the internal buffer so that it can contain count item.
The new buffer size is count * data_size.
Bytes in range [0, min(this->count, count)) are left unchanged, as specified by the std::realloc() standard method.
| count | new item count |
|
inline |
Frees the internal buffer.
| std::size_t fpmas::api::communication::DataPack::size |
Size of the buffer in bytes.
size = count * data_size
| std::size_t fpmas::api::communication::DataPack::count |
Items count in the buffer.
| std::size_t fpmas::api::communication::DataPack::data_size |
Size of each item, so that size = cound * data_size.
| char* fpmas::api::communication::DataPack::buffer |
Pointer to the internal buffer.