19 namespace foreign_storage {
24 const size_t num_bytes,
27 const int destination_device_id) {
28 memcpy(destination,
buffer_.get() + offset, num_bytes);
33 auto old_buffer = std::move(
buffer_);
46 const size_t num_bytes,
48 const int device_id) {
69 const size_t num_bytes,
72 const int source_device_id) {
size_t reserved_byte_count_
size_t pageCount() const override
size_t pageSize() const override
size_t reservedSize() const override
int8_t * getMemoryPtr() override
void append(int8_t *source, const size_t num_bytes, const MemoryLevel source_buffer_type=CPU_LEVEL, const int device_id=-1) override
void reserve(size_t additional_num_bytes) override
MemoryLevel getType() const override
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) override
An AbstractBuffer is a unit of data management for a data manager.
std::unique_ptr< int8_t[]> buffer_
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) override