24 namespace Data_Namespace {
45 CHECK_GE(
size(), num_bytes) <<
"Attempting to copy more bytes than a buffer contains";
46 size_t chunk_size = (num_bytes == 0) ?
size() : num_bytes;
47 destination_buffer->
reserve(chunk_size);
56 chunk_size - destination_buffer->
size(),
57 destination_buffer->
size(),
61 destination_buffer->
setSize(chunk_size);
void syncEncoder(const AbstractBuffer *src_buffer)
virtual int8_t * getMemoryPtr()=0
static Encoder * Create(Data_Namespace::AbstractBuffer *buffer, const SQLTypeInfo sqlType)
virtual MemoryLevel getType() const =0
void initEncoder(const SQLTypeInfo &tmp_sql_type)
#define LOG_IF(severity, condition)
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
An AbstractBuffer is a unit of data management for a data manager.
std::string get_type_name() const
std::unique_ptr< Encoder > encoder_
void setSize(const size_t size)
void copyTo(AbstractBuffer *destination_buffer, const size_t num_bytes=0)
virtual void reserve(size_t num_bytes)=0