OmniSciDB  0fdbebe030
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ForeignStorageBuffer Class Reference

#include <ForeignStorageInterface.h>

+ Inheritance diagram for ForeignStorageBuffer:
+ Collaboration diagram for ForeignStorageBuffer:

Public Member Functions

 ForeignStorageBuffer (const ChunkKey &chunk_key, PersistentForeignStorageInterface *persistent_foreign_storage)
 
void read (int8_t *const dst, const size_t numBytes, const size_t offset=0, const Data_Namespace::MemoryLevel dstBufferType=Data_Namespace::CPU_LEVEL, const int dstDeviceId=-1) override
 
void append (int8_t *src, const size_t numBytes, const Data_Namespace::MemoryLevel srcBufferType=Data_Namespace::CPU_LEVEL, const int deviceId=-1) override
 
Data_Namespace::MemoryLevel getType () const override
 
size_t size () const override
 
std::vector< int8_t > moveBuffer ()
 
void write (int8_t *src, const size_t numBytes, const size_t offset=0, const Data_Namespace::MemoryLevel srcBufferType=Data_Namespace::CPU_LEVEL, const int srcDeviceId=-1) override
 
void reserve (size_t numBytes) override
 
int8_t * getMemoryPtr () override
 
size_t pageCount () const override
 
size_t pageSize () const override
 
size_t reservedSize () const override
 
- Public Member Functions inherited from Data_Namespace::AbstractBuffer
 AbstractBuffer (const int device_id)
 
 AbstractBuffer (const int device_id, const SQLTypeInfo sql_type)
 
virtual ~AbstractBuffer ()
 
virtual int getDeviceId () const
 
virtual int pin ()
 
virtual int unPin ()
 
virtual int getPinCount ()
 
virtual bool isDirty () const
 
virtual bool isAppended () const
 
virtual bool isUpdated () const
 
virtual void setDirty ()
 
virtual void setUpdated ()
 
virtual void setAppended ()
 
void setSize (const size_t size)
 
void clearDirtyBits ()
 
void initEncoder (const SQLTypeInfo tmp_sql_type)
 
void syncEncoder (const AbstractBuffer *src_buffer)
 

Private Attributes

const ChunkKey chunk_key_
 
PersistentForeignStorageInterfacepersistent_foreign_storage_
 
std::vector< int8_t > buff_
 

Additional Inherited Members

- Public Attributes inherited from Data_Namespace::AbstractBuffer
std::unique_ptr< Encoderencoder
 
bool has_encoder
 
SQLTypeInfo sql_type
 
- Protected Attributes inherited from Data_Namespace::AbstractBuffer
size_t size_
 
bool is_dirty_
 
bool is_appended_
 
bool is_updated_
 
int device_id_
 

Detailed Description

Definition at line 52 of file ForeignStorageInterface.h.

Constructor & Destructor Documentation

ForeignStorageBuffer::ForeignStorageBuffer ( const ChunkKey chunk_key,
PersistentForeignStorageInterface persistent_foreign_storage 
)

Definition at line 20 of file ForeignStorageInterface.cpp.

24  , chunk_key_(chunk_key)
25  , persistent_foreign_storage_(persistent_foreign_storage) {}
An AbstractBuffer is a unit of data management for a data manager.
PersistentForeignStorageInterface * persistent_foreign_storage_

Member Function Documentation

void ForeignStorageBuffer::append ( int8_t *  src,
const size_t  numBytes,
const Data_Namespace::MemoryLevel  srcBufferType = Data_Namespace::CPU_LEVEL,
const int  deviceId = -1 
)
overridevirtual
int8_t* ForeignStorageBuffer::getMemoryPtr ( )
inlineoverridevirtual

Implements Data_Namespace::AbstractBuffer.

Definition at line 86 of file ForeignStorageInterface.h.

References CHECK().

86  {
87  CHECK(false);
88  return nullptr;
89  }
CHECK(cgen_state)

+ Here is the call graph for this function:

Data_Namespace::MemoryLevel ForeignStorageBuffer::getType ( ) const
inlineoverridevirtual
std::vector<int8_t> ForeignStorageBuffer::moveBuffer ( )
inline

Definition at line 74 of file ForeignStorageInterface.h.

References buff_.

74 { return std::move(buff_); }
std::vector< int8_t > buff_
size_t ForeignStorageBuffer::pageCount ( ) const
inlineoverridevirtual

Implements Data_Namespace::AbstractBuffer.

Definition at line 91 of file ForeignStorageInterface.h.

References CHECK().

91  {
92  CHECK(false);
93  return 0;
94  }
CHECK(cgen_state)

+ Here is the call graph for this function:

size_t ForeignStorageBuffer::pageSize ( ) const
inlineoverridevirtual

Implements Data_Namespace::AbstractBuffer.

Definition at line 96 of file ForeignStorageInterface.h.

References CHECK().

96  {
97  CHECK(false);
98  return 0;
99  }
CHECK(cgen_state)

+ Here is the call graph for this function:

void ForeignStorageBuffer::read ( int8_t *const  dst,
const size_t  numBytes,
const size_t  offset = 0,
const Data_Namespace::MemoryLevel  dstBufferType = Data_Namespace::CPU_LEVEL,
const int  dstDeviceId = -1 
)
overridevirtual

Implements Data_Namespace::AbstractBuffer.

Definition at line 27 of file ForeignStorageInterface.cpp.

References CHECK_EQ, chunk_key_, persistent_foreign_storage_, PersistentForeignStorageInterface::read(), and Data_Namespace::AbstractBuffer::sql_type.

31  {
32  CHECK_EQ(size_t(0), offset);
33  CHECK_EQ(-1, dstDeviceId);
35 }
#define CHECK_EQ(x, y)
Definition: Logger.h:205
PersistentForeignStorageInterface * persistent_foreign_storage_
virtual void read(const ChunkKey &chunk_key, const SQLTypeInfo &sql_type, int8_t *dest, const size_t num_bytes)=0

+ Here is the call graph for this function:

void ForeignStorageBuffer::reserve ( size_t  numBytes)
inlineoverridevirtual

Implements Data_Namespace::AbstractBuffer.

Definition at line 84 of file ForeignStorageInterface.h.

References CHECK().

84 { CHECK(false); }
CHECK(cgen_state)

+ Here is the call graph for this function:

size_t ForeignStorageBuffer::reservedSize ( ) const
inlineoverridevirtual

Implements Data_Namespace::AbstractBuffer.

Definition at line 101 of file ForeignStorageInterface.h.

References CHECK().

101  {
102  CHECK(false);
103  return 0;
104  }
CHECK(cgen_state)

+ Here is the call graph for this function:

size_t ForeignStorageBuffer::size ( ) const
inlineoverridevirtual
void ForeignStorageBuffer::write ( int8_t *  src,
const size_t  numBytes,
const size_t  offset = 0,
const Data_Namespace::MemoryLevel  srcBufferType = Data_Namespace::CPU_LEVEL,
const int  srcDeviceId = -1 
)
inlineoverridevirtual

Implements Data_Namespace::AbstractBuffer.

Definition at line 76 of file ForeignStorageInterface.h.

References CHECK().

80  {
81  CHECK(false);
82  }
CHECK(cgen_state)

+ Here is the call graph for this function:

Member Data Documentation

std::vector<int8_t> ForeignStorageBuffer::buff_
private

Definition at line 109 of file ForeignStorageInterface.h.

Referenced by append(), and moveBuffer().

const ChunkKey ForeignStorageBuffer::chunk_key_
private

Definition at line 107 of file ForeignStorageInterface.h.

Referenced by read().

PersistentForeignStorageInterface* ForeignStorageBuffer::persistent_foreign_storage_
private

Definition at line 108 of file ForeignStorageInterface.h.

Referenced by read().


The documentation for this class was generated from the following files: