21 using namespace Data_Namespace;
23 namespace foreign_storage {
36 void read(int8_t*
const destination,
37 const size_t num_bytes,
38 const size_t offset = 0,
40 const int destination_device_id = -1)
override;
42 void write(int8_t* source,
43 const size_t num_bytes,
44 const size_t offset = 0,
46 const int source_device_id = -1)
override;
48 void reserve(
size_t additional_num_bytes)
override;
50 void append(int8_t* source,
51 const size_t num_bytes,
53 const int device_id = -1)
override;
55 int8_t* getMemoryPtr()
override;
56 size_t pageCount()
const override;
57 size_t pageSize()
const override;
58 size_t reservedSize()
const override;
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.