19 namespace foreign_storage {
23 , data_ptr_(const_cast<int8_t*>(data))
24 , data_byte_size_(data_byte_size) {
29 const size_t num_bytes,
32 const int destination_device_id) {
33 memcpy(destination,
data_ptr_ + offset, num_bytes);
37 UNREACHABLE() <<
" unexpected call to purposefully unimplemented function in "
42 const size_t num_bytes,
44 const int device_id) {
45 UNREACHABLE() <<
" unexpected call to purposefully unimplemented function in "
54 UNREACHABLE() <<
" unexpected call to purposefully unimplemented function in "
64 const size_t num_bytes,
67 const int source_device_id) {
68 UNREACHABLE() <<
" unexpected call to purposefully unimplemented function in "
73 UNREACHABLE() <<
" unexpected call to purposefully unimplemented function in "
79 UNREACHABLE() <<
" unexpected call to purposefully unimplemented function in "
MemoryLevel getType() const 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 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
PassThroughBuffer()=delete
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.
void setSize(const size_t size)
int8_t * getMemoryPtr() override
size_t pageSize() const override
size_t reservedSize() const override
void reserve(size_t additional_num_bytes) override
size_t pageCount() const override