Open3D (C++ API)
0.13.0
|
#include <SlabHashmap.h>
Public Member Functions | |
SlabHashmap (int64_t init_capacity, int64_t dsize_key, int64_t dsize_value, const Device &device) | |
~SlabHashmap () | |
void | Rehash (int64_t buckets) override |
void | Insert (const void *input_keys, const void *input_values, addr_t *output_addrs, bool *output_masks, int64_t count) override |
Parallel insert contiguous arrays of keys and values. More... | |
void | Activate (const void *input_keys, addr_t *output_addrs, bool *output_masks, int64_t count) override |
void | Find (const void *input_keys, addr_t *output_addrs, bool *output_masks, int64_t count) override |
Parallel find a contiguous array of keys. More... | |
void | Erase (const void *input_keys, bool *output_masks, int64_t count) override |
Parallel erase a contiguous array of keys. More... | |
int64_t | GetActiveIndices (addr_t *output_indices) override |
Parallel collect all iterators in the hash table. More... | |
void | Clear () override |
Clear stored map without reallocating memory. More... | |
int64_t | Size () const override |
int64_t | GetBucketCount () const override |
std::vector< int64_t > | BucketSizes () const override |
float | LoadFactor () const override |
SlabHashmapImpl< Key, Hash > | GetImpl () |
![]() | |
DeviceHashmap (int64_t init_capacity, int64_t dsize_key, int64_t dsize_value, const Device &device) | |
Comprehensive constructor for the developer. More... | |
virtual | ~DeviceHashmap () |
int64_t | GetCapacity () const |
int64_t | GetKeyBytesize () const |
int64_t | GetValueBytesize () const |
Device | GetDevice () const |
Tensor & | GetKeyBuffer () |
Tensor & | GetValueBuffer () |
Protected Member Functions | |
void | InsertImpl (const void *input_keys, const void *input_values, addr_t *output_addrs, bool *output_masks, int64_t count) |
void | Allocate (int64_t bucket_count, int64_t capacity) |
void | Free () |
Protected Attributes | |
SlabHashmapImpl< Key, Hash > | impl_ |
CUDAHashmapBufferAccessor | buffer_accessor_ |
std::shared_ptr< SlabNodeManager > | node_mgr_ |
int64_t | bucket_count_ |
Additional Inherited Members | |
![]() | |
int64_t | capacity_ |
int64_t | dsize_key_ |
int64_t | dsize_value_ |
Device | device_ |
std::shared_ptr< HashmapBuffer > | buffer_ |
open3d::core::SlabHashmap< Key, Hash >::SlabHashmap | ( | int64_t | init_capacity, |
int64_t | dsize_key, | ||
int64_t | dsize_value, | ||
const Device & | device | ||
) |
open3d::core::SlabHashmap< Key, Hash >::~SlabHashmap | ( | ) |
|
overridevirtual |
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.
Implements open3d::core::DeviceHashmap.
|
protected |
|
overridevirtual |
Return number of elems per bucket. High performance not required, so directly returns a vector.
Implements open3d::core::DeviceHashmap.
|
overridevirtual |
Clear stored map without reallocating memory.
Implements open3d::core::DeviceHashmap.
|
overridevirtual |
Parallel erase a contiguous array of keys.
Implements open3d::core::DeviceHashmap.
|
overridevirtual |
Parallel find a contiguous array of keys.
Implements open3d::core::DeviceHashmap.
|
protected |
|
overridevirtual |
Parallel collect all iterators in the hash table.
Implements open3d::core::DeviceHashmap.
|
overridevirtual |
Implements open3d::core::DeviceHashmap.
|
inline |
|
overridevirtual |
Parallel insert contiguous arrays of keys and values.
Implements open3d::core::DeviceHashmap.
|
protected |
Rehash, Insert, Activate all call InsertImpl. It will be clean to separate this implementation and avoid shared checks.
Increase heap_counter to pre-allocate potential memory increment and avoid atomicAdd in kernel.
|
overridevirtual |
Implements open3d::core::DeviceHashmap.
|
overridevirtual |
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
Implements open3d::core::DeviceHashmap.
|
overridevirtual |
Implements open3d::core::DeviceHashmap.
|
protected |
|
protected |
|
protected |
The struct is directly passed to kernels by value, so cannot be a shared pointer.
|
protected |