![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <DeviceHashBackend.h>


Public Member Functions | |
| DeviceHashBackend (int64_t init_capacity, int64_t key_dsize, const std::vector< int64_t > &value_dsizes, const Device &device) | |
| virtual | ~DeviceHashBackend () |
| virtual void | Reserve (int64_t capacity)=0 |
| virtual void | Insert (const void *input_keys, const std::vector< const void * > &input_values, buf_index_t *output_buf_indices, bool *output_masks, int64_t count)=0 |
| Parallel insert contiguous arrays of keys and values. More... | |
| virtual void | Find (const void *input_keys, buf_index_t *output_buf_indices, bool *output_masks, int64_t count)=0 |
| Parallel find a contiguous array of keys. More... | |
| virtual void | Erase (const void *input_keys, bool *output_masks, int64_t count)=0 |
| Parallel erase a contiguous array of keys. More... | |
| virtual int64_t | GetActiveIndices (buf_index_t *output_buf_indices)=0 |
| Parallel collect all iterators in the hash table. More... | |
| virtual void | Clear ()=0 |
| Clear stored map without reallocating memory. More... | |
| virtual int64_t | Size () const =0 |
| Get the size (number of valid entries) of the hash map. More... | |
| virtual int64_t | GetBucketCount () const =0 |
| Get the number of buckets of the hash map. More... | |
| virtual float | LoadFactor () const =0 |
| Get the current load factor, defined as size / bucket count. More... | |
| int64_t | GetCapacity () const |
| Get the maximum capacity of the hash map. More... | |
| Device | GetDevice () const |
| Get the current device. More... | |
| virtual std::vector< int64_t > | BucketSizes () const =0 |
| Get the number of entries per bucket. More... | |
| Tensor | GetKeyBuffer () |
| Get the key buffer that stores actual keys. More... | |
| std::vector< Tensor > | GetValueBuffers () |
| Get the value buffers that store actual array of values. More... | |
| Tensor | GetValueBuffer (size_t i=0) |
| Get the i-th value buffer that store an actual value array. More... | |
| virtual void | Allocate (int64_t capacity)=0 |
| virtual void | Free ()=0 |
Public Attributes | |
| int64_t | capacity_ |
| int64_t | key_dsize_ |
| std::vector< int64_t > | value_dsizes_ |
| Device | device_ |
| std::shared_ptr< HashBackendBuffer > | buffer_ |
Definition at line 20 of file DeviceHashBackend.h.
|
inline |
Definition at line 22 of file DeviceHashBackend.h.
|
inlinevirtual |
Definition at line 30 of file DeviceHashBackend.h.
|
pure virtual |
|
pure virtual |
Get the number of entries per bucket.
Implemented in cloudViewer::core::StdGPUHashBackend< Key, Hash, Eq >, cloudViewer::core::SlabHashBackend< Key, Hash, Eq >, and cloudViewer::core::TBBHashBackend< Key, Hash, Eq >.
|
pure virtual |
Clear stored map without reallocating memory.
Implemented in cloudViewer::core::StdGPUHashBackend< Key, Hash, Eq >, cloudViewer::core::SlabHashBackend< Key, Hash, Eq >, and cloudViewer::core::TBBHashBackend< Key, Hash, Eq >.
|
pure virtual |
Parallel erase a contiguous array of keys.
Implemented in cloudViewer::core::StdGPUHashBackend< Key, Hash, Eq >, cloudViewer::core::SlabHashBackend< Key, Hash, Eq >, and cloudViewer::core::TBBHashBackend< Key, Hash, Eq >.
|
pure virtual |
Parallel find a contiguous array of keys.
Implemented in cloudViewer::core::StdGPUHashBackend< Key, Hash, Eq >, cloudViewer::core::SlabHashBackend< Key, Hash, Eq >, and cloudViewer::core::TBBHashBackend< Key, Hash, Eq >.
|
pure virtual |
|
pure virtual |
Parallel collect all iterators in the hash table.
Implemented in cloudViewer::core::StdGPUHashBackend< Key, Hash, Eq >, cloudViewer::core::SlabHashBackend< Key, Hash, Eq >, and cloudViewer::core::TBBHashBackend< Key, Hash, Eq >.
|
pure virtual |
Get the number of buckets of the hash map.
Implemented in cloudViewer::core::StdGPUHashBackend< Key, Hash, Eq >, cloudViewer::core::SlabHashBackend< Key, Hash, Eq >, and cloudViewer::core::TBBHashBackend< Key, Hash, Eq >.
|
inline |
Get the maximum capacity of the hash map.
Definition at line 74 of file DeviceHashBackend.h.
References capacity_.
|
inline |
|
inline |
Get the key buffer that stores actual keys.
Definition at line 83 of file DeviceHashBackend.h.
References buffer_.
|
inline |
Get the i-th value buffer that store an actual value array.
Definition at line 89 of file DeviceHashBackend.h.
References buffer_.
|
inline |
Get the value buffers that store actual array of values.
Definition at line 86 of file DeviceHashBackend.h.
References buffer_.
|
pure virtual |
Parallel insert contiguous arrays of keys and values.
Implemented in cloudViewer::core::StdGPUHashBackend< Key, Hash, Eq >, cloudViewer::core::SlabHashBackend< Key, Hash, Eq >, and cloudViewer::core::TBBHashBackend< Key, Hash, Eq >.
|
pure virtual |
Get the current load factor, defined as size / bucket count.
Implemented in cloudViewer::core::StdGPUHashBackend< Key, Hash, Eq >, cloudViewer::core::SlabHashBackend< Key, Hash, Eq >, and cloudViewer::core::TBBHashBackend< Key, Hash, Eq >.
|
pure virtual |
Reserve expects a lot of extra memory space at runtime, since it consists of 1) dumping all key value pairs to a buffer 2) creating a new hash table 3) parallel inserting dumped key value pairs 4) deallocating old hash table
Implemented in cloudViewer::core::StdGPUHashBackend< Key, Hash, Eq >, cloudViewer::core::SlabHashBackend< Key, Hash, Eq >, and cloudViewer::core::TBBHashBackend< Key, Hash, Eq >.
|
pure virtual |
Get the size (number of valid entries) of the hash map.
Implemented in cloudViewer::core::StdGPUHashBackend< Key, Hash, Eq >, cloudViewer::core::SlabHashBackend< Key, Hash, Eq >, and cloudViewer::core::TBBHashBackend< Key, Hash, Eq >.
| std::shared_ptr<HashBackendBuffer> cloudViewer::core::DeviceHashBackend::buffer_ |
Definition at line 102 of file DeviceHashBackend.h.
Referenced by GetKeyBuffer(), GetValueBuffer(), and GetValueBuffers().
| int64_t cloudViewer::core::DeviceHashBackend::capacity_ |
Definition at line 95 of file DeviceHashBackend.h.
Referenced by GetCapacity().
| Device cloudViewer::core::DeviceHashBackend::device_ |
Definition at line 100 of file DeviceHashBackend.h.
Referenced by GetDevice(), cloudViewer::core::SlabHashBackend< Key, Hash, Eq >::SlabHashBackend(), and cloudViewer::core::StdGPUHashBackend< Key, Hash, Eq >::StdGPUHashBackend().
| int64_t cloudViewer::core::DeviceHashBackend::key_dsize_ |
Definition at line 97 of file DeviceHashBackend.h.
| std::vector<int64_t> cloudViewer::core::DeviceHashBackend::value_dsizes_ |
Definition at line 98 of file DeviceHashBackend.h.