30 size_t rowid_size_in_bytes,
32 bool for_window_framing =
false)
37 for_window_framing) {}
56 const int device_id = -1)
84 VLOG(1) <<
"Allocate " << buf_size
85 <<
" bytes buffer on GPU to keep the hash table copied from CPU";
145 std::string layout_str =
148 std::ostringstream oss;
149 oss <<
"Initialize a " << device_type <<
" perfect join hash table";
153 oss <<
", join type " << layout_str
155 <<
", # entries stored in the payload buffer: "
159 VLOG(1) << oss.str();
BucketizedHashEntryInfo getHashEntryInfo() const
PerfectHashTable(const ExecutorDeviceType device_type, PerfectHashTableEntryInfo hash_table_entry_info, Data_Namespace::DataMgr *data_mgr=nullptr, const int device_id=-1)
int8_t * getGpuBuffer() const override
int8_t * getCpuBuffer() override
HashType getLayout() const override
virtual int8_t * getMemoryPtr()=0
std::unique_ptr< int32_t[]> cpu_hash_table_buff_
size_t getHashTableBufferSize(const ExecutorDeviceType device_type) const override
PerfectHashTableEntryInfo getHashTableEntryInfo() const
virtual size_t reservedSize() const =0
Data_Namespace::AbstractBuffer * gpu_hash_table_buff_
size_t getEntryCount() const override
size_t getEmittedKeysCount() const override
PerfectHashTableEntryInfo(size_t num_hash_entries, size_t num_keys, size_t rowid_size_in_bytes, HashType layout, bool for_window_framing=false)
HashType getHashTableLayout() const
size_t getNumHashEntries() const
PerfectHashTableEntryInfo hash_table_entry_info_
void setColumnNumElems(size_t elem)
An AbstractBuffer is a unit of data management for a data manager.
void setHashEntryInfo(BucketizedHashEntryInfo &hash_entry_info)
size_t computeTotalNumSlots() const override
size_t getNumKeys() const
BucketizedHashEntryInfo hash_entry_info_
size_t computeHashTableSize() const override
static Data_Namespace::AbstractBuffer * allocGpuAbstractBuffer(Data_Namespace::DataMgr *data_mgr, const size_t num_bytes, const int device_id)
void allocateGpuMemory(const size_t num_entries)
void printInitLog(ExecutorDeviceType device_type)
~PerfectHashTable() override
size_t getColumnNumElems() const
size_t getRowIdSize() const override
Allocate GPU memory using GpuBuffers via DataMgr.
void free(AbstractBuffer *buffer)
size_t getRowIdSizeInBytes() const
size_t rowid_size_in_bytes_
Data_Namespace::DataMgr * data_mgr_