DIY  3.0
data-parallel out-of-core C++ library
 All Classes Namespaces Functions Typedefs Groups Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
diy::MemoryBuffer Struct Reference
Inheritance diagram for diy::MemoryBuffer:
diy::BinaryBuffer

Public Member Functions

 MemoryBuffer (size_t position_=0)
 
virtual void save_binary (const char *x, size_t count) override
 copy count bytes from x into the buffer
 
virtual void load_binary (char *x, size_t count) override
 copy count bytes into x from the buffer
 
virtual void load_binary_back (char *x, size_t count) override
 copy count bytes into x from the back of the buffer
 
void clear ()
 
void wipe ()
 
void reset ()
 
void skip (size_t s)
 
void swap (MemoryBuffer &o)
 
bool empty () const
 
size_t size () const
 
void reserve (size_t s)
 
 operator bool () const
 
void write (const std::string &fn) const
 
void read (const std::string &fn)
 

Static Public Member Functions

static void copy (MemoryBuffer &from, MemoryBuffer &to)
 copy a memory buffer from one buffer to another, bypassing making a temporary copy first
 
static float growth_multiplier ()
 multiplier used for the geometric growth of the container
 

Public Attributes

size_t position
 
std::vector< char > buffer
 

Detailed Description

Examples:
reduce/all-to-all.cpp, and serialization/test-serialization.cpp.

The documentation for this struct was generated from the following file: