28 #include <boost/thread/locks.hpp>
29 #include <boost/thread/shared_mutex.hpp>
39 namespace Data_Namespace {
68 virtual void read(int8_t*
const dst,
69 const size_t num_bytes,
70 const size_t offset = 0,
72 const int dst_device_id = -1) = 0;
73 virtual void write(int8_t* src,
74 const size_t num_bytes,
75 const size_t offset = 0,
77 const int src_device_id = -1) = 0;
78 virtual void reserve(
size_t num_bytes) = 0;
79 virtual void append(int8_t* src,
80 const size_t num_bytes,
82 const int device_id = -1) = 0;
91 virtual inline int pin() {
return 0; }
92 virtual inline int unPin() {
return 0; }
void syncEncoder(const AbstractBuffer *src_buffer)
virtual int8_t * getMemoryPtr()=0
virtual MemoryLevel getType() const =0
virtual int getPinCount()
virtual size_t reservedSize() const =0
virtual size_t pageCount() const =0
Constants for Builtin SQL Types supported by HEAVY.AI.
void initEncoder(const SQLTypeInfo &tmp_sql_type)
virtual void read(int8_t *const dst, const size_t num_bytes, const size_t offset=0, const MemoryLevel dst_buffer_type=CPU_LEVEL, const int dst_device_id=-1)=0
AbstractBuffer(const int device_id)
virtual size_t pageSize() const =0
An AbstractBuffer is a unit of data management for a data manager.
void setSqlType(const SQLTypeInfo &sql_type)
virtual void write(int8_t *src, const size_t num_bytes, const size_t offset=0, const MemoryLevel src_buffer_type=CPU_LEVEL, const int src_device_id=-1)=0
virtual void setMemoryPtr(int8_t *new_ptr)
AbstractBuffer(const int device_id, const SQLTypeInfo sql_type)
std::unique_ptr< Encoder > encoder_
virtual void append(int8_t *src, const size_t num_bytes, const MemoryLevel src_buffer_type=CPU_LEVEL, const int device_id=-1)=0
void setSize(const size_t size)
void copyTo(AbstractBuffer *destination_buffer, const size_t num_bytes=0)
SQLTypeInfo getSqlType() const
Encoder * getEncoder() const
bool g_enable_watchdog false
std::shared_timed_mutex shared_mutex
virtual void reserve(size_t num_bytes)=0
virtual ~AbstractBuffer()