MOAB: Mesh Oriented datABase
(version 5.4.1)
|
#include <TupleList.hpp>
Public Member Functions | |
buffer (size_t sz) | |
buffer () | |
~buffer () | |
void | buffer_init_ (size_t sz, const char *file) |
void | buffer_reserve_ (size_t min, const char *file) |
void | reset () |
Public Attributes | |
size_t | buffSize |
char * | ptr |
Definition at line 90 of file TupleList.hpp.
moab::TupleList::buffer::buffer | ( | size_t | sz | ) |
Constructor which sets an initial capacity of the buffer
Definition at line 23 of file TupleList.cpp.
References buffer_init_(), buffSize, and ptr.
{ ptr = NULL; buffSize = 0; this->buffer_init_( sz, __FILE__ ); }
Default constructor (Note: buffer must be initialized before use!)
Definition at line 30 of file TupleList.cpp.
moab::TupleList::buffer::~buffer | ( | ) | [inline] |
void moab::TupleList::buffer::buffer_init_ | ( | size_t | sz, |
const char * | file | ||
) |
Initializes the buffer to have a capacity of size
Definition at line 36 of file TupleList.cpp.
References moab::fail().
Referenced by buffer().
void moab::TupleList::buffer::buffer_reserve_ | ( | size_t | min, |
const char * | file | ||
) |
Ensures that the buffer has at least a capacity of min
Definition at line 44 of file TupleList.cpp.
References moab::fail().
{ if( this->buffSize < min ) { size_t newSize = this->buffSize; newSize += newSize / 2 + 1; if( newSize < min ) newSize = min; void* res = realloc( ptr, newSize ); if( !res && newSize > 0 ) fail( "%s: reallocation of %d bytes failed\n", file, newSize ); ptr = (char*)res; this->buffSize = newSize; } }
void moab::TupleList::buffer::reset | ( | ) |
Frees any allocated memory used by the buffer
Definition at line 58 of file TupleList.cpp.
Referenced by moab::ParallelComm::exchange_owned_mesh(), moab::ParallelComm::get_sent_ents(), iMOAB_SetDoubleTagStorageWithGid(), moab::gs_data::initialize(), moab::ParallelComm::resolve_shared_ents(), moab::ParallelComm::send_entities(), moab::ParallelMergeMesh::SortMyMatches(), moab::ScdInterface::tag_shared_vertices(), and ~buffer().
Definition at line 93 of file TupleList.hpp.
Referenced by buffer().
Definition at line 94 of file TupleList.hpp.
Referenced by buffer(), and moab::TupleList::sort().