21 using namespace Data_Namespace;
23 namespace foreign_storage {
28 void read(int8_t*
const destination,
29 const size_t num_bytes,
30 const size_t offset = 0,
32 const int destination_device_id = -1)
override;
34 void write(int8_t* source,
35 const size_t num_bytes,
36 const size_t offset = 0,
38 const int source_device_id = -1)
override;
40 void reserve(
size_t additional_num_bytes)
override;
42 void append(int8_t* source,
43 const size_t num_bytes,
45 const int device_id = -1)
override;
47 int8_t* getMemoryPtr()
override;
48 size_t pageCount()
const override;
49 size_t pageSize()
const override;
50 size_t reservedSize()
const override;
size_t reserved_byte_count_
size_t append(FILE *f, const size_t size, const int8_t *buf)
Appends the specified number of bytes to the end of the file f from buf.
size_t write(FILE *f, const size_t offset, const size_t size, const int8_t *buf)
Writes the specified number of bytes to the offset position in file f from buf.
An AbstractBuffer is a unit of data management for a data manager.
size_t read(FILE *f, const size_t offset, const size_t size, int8_t *buf, const std::string &file_path)
Reads the specified number of bytes from the offset position in file f into buf.
std::unique_ptr< int8_t[]> buffer_