Class foreign_storage::PassThroughBuffer

class PassThroughBuffer : public Data_Namespace::AbstractBuffer

PassThroughBuffer wraps a pointer with specifed data size. This class does not take ownership of the pointer. The underlying buffer is never intended to be modified only read, hence the constructor takes a const pointer.

Public Functions

PassThroughBuffer(const int8_t *data, const size_t data_byte_size)
PassThroughBuffer()
void read(int8_t *const destination, const size_t num_bytes, const size_t offset = 0, const MemoryLevel destination_buffer_type = CPU_LEVEL, const int destination_device_id = -1)
void write(int8_t *source, const size_t num_bytes, const size_t offset = 0, const MemoryLevel source_buffer_type = CPU_LEVEL, const int source_device_id = -1)
void reserve(size_t additional_num_bytes)
void append(int8_t *source, const size_t num_bytes, const MemoryLevel source_buffer_type = CPU_LEVEL, const int device_id = -1)
int8_t *getMemoryPtr()
size_t pageCount() const
size_t pageSize() const
size_t reservedSize() const
MemoryLevel getType() const

Private Members

int8_t *data_ptr_
size_t data_byte_size_