25 :
capacity_(hashmap_buffer.GetCapacity()),
31 for (
size_t i = 0; i < value_buffers.size(); ++i) {
32 void *value_buffer_ptr = value_buffers[i].GetDataPtr();
35 static_cast<uint8_t *
>(value_buffer_ptr));
42 heap_[(*heap_top_).fetch_sub(1) - 1] = buf_index;
uint8_t * key_buffer_ptr_
std::atomic< int > * heap_top_
std::vector< uint8_t * > value_buffer_ptrs_
void * GetValuePtr(buf_index_t buf_index, int value_idx=0)
buf_index_t DeviceAllocate()
std::vector< int64_t > value_dsizes_
void * GetKeyPtr(buf_index_t buf_index)
CPUHashBackendBufferAccessor(HashBackendBuffer &hashmap_buffer)
Must initialize from a non-const buffer to grab the heap top.
void DeviceFree(buf_index_t buf_index)
std::vector< Tensor > GetValueBuffers() const
Return the value buffer tensors.
Generic file read and write utility for python interface.