Template Class Buffer

Nested Relationships

Class Documentation

template <typename EntryType, typename DataStructure>
class Buffer

The Buffer utility.

Buffer used to agregate data transfers in insertion methods. It is associated to a DataStructure instance, through its global object identifier, and to the Locality target of the data transfers.

Template Parameters
  • EntryType: type of the entries stored in the buffer.
  • DataStructure: DataStructure using the buffer.

Public Types

enum State

Values:

INSERTED
FLUSH
WAIT_FOR_FLUSH
template<>
using EntriesArray = std::array<EntryType, kBufferSize>

Public Functions

Buffer(const Buffer &rhs)
Buffer()
Buffer(const rt::Locality &loc, const ObjectIdentifier<DataStructure> &oid)
void FlushBuffer()
void AsyncFlushBuffer(rt::Handle &handle)
void Insert(const EntryType entry)
void Insert(const EntryType *entry, const size_t num_entries)
void AsyncInsert(rt::Handle &handle, const EntryType &entry)
void AsyncInsert(rt::Handle &handle, const EntryType *entry, const size_t num_entries)

Public Static Attributes

constexpr size_t kBufferSize

=

constants::max(constants::kBufferNumBytes / sizeof(EntryType), 1lu)


Size of the buffer in terms of number of entries.

Protected Functions

Buffer(const ObjectIdentifier<DataStructure> &oid)

Protected Attributes

rt::Locality tgtLoc_
struct FlushArgs

Public Members

template<>
EntriesArray data
template<>
size_t numEntries
template<>
ObjectIdentifier<DataStructure> oid