Open3D (C++ API)
0.12.0
|
Base class: shared interface. More...
#include <DeviceHashmap.h>
Public Member Functions | |
DeviceHashmap (int64_t init_buckets, int64_t init_capacity, int64_t dsize_key, int64_t dsize_value, const Device &device) | |
Comprehensive constructor for the developer. More... | |
virtual | ~DeviceHashmap () |
virtual void | Rehash (int64_t buckets)=0 |
virtual void | Insert (const void *input_keys, const void *input_values, addr_t *output_iterators, bool *output_masks, int64_t count)=0 |
Parallel insert contiguous arrays of keys and values. More... | |
virtual void | Activate (const void *input_keys, addr_t *output_iterators, bool *output_masks, int64_t count)=0 |
virtual void | Find (const void *input_keys, addr_t *output_iterators, 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 (addr_t *output_indices)=0 |
Parallel collect all iterators in the hash table. More... | |
virtual int64_t | Size () const =0 |
int64_t | GetCapacity () const |
int64_t | GetBucketCount () const |
Device | GetDevice () const |
int64_t | GetKeyBytesize () const |
int64_t | GetValueBytesize () const |
Tensor & | GetKeyBuffer () |
Tensor & | GetValueBuffer () |
virtual std::vector< int64_t > | BucketSizes () const =0 |
virtual float | LoadFactor () const =0 |
Return size / bucket_count. More... | |
float | avg_capacity_bucket_ratio () |
Data Fields | |
int64_t | bucket_count_ |
int64_t | capacity_ |
int64_t | dsize_key_ |
int64_t | dsize_value_ |
Device | device_ |
std::shared_ptr< HashmapBuffer > | buffer_ |
Base class: shared interface.
|
inline |
Comprehensive constructor for the developer.
|
inlinevirtual |
|
pure virtual |
Parallel activate contiguous arrays of keys without copying values. Specifically useful for large value elements (e.g., a tensor), where we can do in-place management after activation.
Implemented in open3d::core::CUDAHashmap< Hash, KeyEq >, and open3d::core::CPUHashmap< Hash, KeyEq >.
|
inline |
|
pure virtual |
Return number of elems per bucket. High performance not required, so directly returns a vector.
Implemented in open3d::core::CUDAHashmap< Hash, KeyEq >, and open3d::core::CPUHashmap< Hash, KeyEq >.
|
pure virtual |
Parallel erase a contiguous array of keys.
Implemented in open3d::core::CUDAHashmap< Hash, KeyEq >, and open3d::core::CPUHashmap< Hash, KeyEq >.
|
pure virtual |
Parallel find a contiguous array of keys.
Implemented in open3d::core::CUDAHashmap< Hash, KeyEq >, and open3d::core::CPUHashmap< Hash, KeyEq >.
|
pure virtual |
Parallel collect all iterators in the hash table.
Implemented in open3d::core::CUDAHashmap< Hash, KeyEq >, and open3d::core::CPUHashmap< Hash, KeyEq >.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
pure virtual |
Parallel insert contiguous arrays of keys and values.
Implemented in open3d::core::CUDAHashmap< Hash, KeyEq >, and open3d::core::CPUHashmap< Hash, KeyEq >.
|
pure virtual |
Return size / bucket_count.
Implemented in open3d::core::CUDAHashmap< Hash, KeyEq >, and open3d::core::CPUHashmap< Hash, KeyEq >.
|
pure virtual |
Rehash 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 open3d::core::CUDAHashmap< Hash, KeyEq >, and open3d::core::CPUHashmap< Hash, KeyEq >.
|
pure virtual |
Implemented in open3d::core::CUDAHashmap< Hash, KeyEq >, and open3d::core::CPUHashmap< Hash, KeyEq >.
int64_t open3d::core::DeviceHashmap< Hash, KeyEq >::bucket_count_ |
std::shared_ptr<HashmapBuffer> open3d::core::DeviceHashmap< Hash, KeyEq >::buffer_ |
int64_t open3d::core::DeviceHashmap< Hash, KeyEq >::capacity_ |
Device open3d::core::DeviceHashmap< Hash, KeyEq >::device_ |
int64_t open3d::core::DeviceHashmap< Hash, KeyEq >::dsize_key_ |
int64_t open3d::core::DeviceHashmap< Hash, KeyEq >::dsize_value_ |