#include <Hashmap.h>
|
| Hashmap (size_t init_capacity, Dtype dtype_key, Dtype dtype_val, const Device &device) |
|
| ~Hashmap () |
|
void | Rehash (size_t buckets) |
|
void | Insert (const void *input_keys, const void *input_values, iterator_t *output_iterators, bool *output_masks, size_t count) |
|
void | Insert (const Tensor &input_keys, const Tensor &input_values, Tensor &output_iterators, Tensor &output_masks) |
|
void | Activate (const void *input_keys, iterator_t *output_iterators, bool *output_masks, size_t count) |
|
void | Activate (const Tensor &input_keys, Tensor &output_iterators, Tensor &output_masks) |
|
void | Find (const void *input_keys, iterator_t *output_iterators, bool *output_masks, size_t count) |
|
void | Find (const Tensor &input_keys, Tensor &output_iterators, Tensor &output_masks) |
|
void | Erase (const void *input_keys, bool *output_masks, size_t count) |
|
void | Erase (const Tensor &input_keys, Tensor &output_masks) |
|
size_t | GetIterators (iterator_t *output_iterators) |
| Parallel collect all iterators in the hash table. More...
|
|
void | UnpackIterators (const iterator_t *input_iterators, const bool *input_masks, void *output_keys, void *output_values, size_t count) |
|
void | AssignIterators (iterator_t *input_iterators, const bool *input_masks, const void *input_values, size_t count) |
|
size_t | Size () const |
|
std::vector< size_t > | BucketSizes () const |
|
float | LoadFactor () const |
| Return size / bucket_count. More...
|
|
void | AssertKeyDtype (const Dtype &dtype_key) const |
|
void | AssertValueDtype (const Dtype &dtype_val) const |
|
Dtype | GetKeyDtype () const |
|
Dtype | GetValueDtype () const |
|
Device | GetDevice () const |
|
◆ Hashmap()
open3d::core::Hashmap::Hashmap |
( |
size_t |
init_capacity, |
|
|
Dtype |
dtype_key, |
|
|
Dtype |
dtype_val, |
|
|
const Device & |
device |
|
) |
| |
◆ ~Hashmap()
open3d::core::Hashmap::~Hashmap |
( |
| ) |
|
|
inline |
◆ Activate() [1/2]
void open3d::core::Hashmap::Activate |
( |
const void * |
input_keys, |
|
|
iterator_t * |
output_iterators, |
|
|
bool * |
output_masks, |
|
|
size_t |
count |
|
) |
| |
Parallel activate 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.
◆ Activate() [2/2]
void open3d::core::Hashmap::Activate |
( |
const Tensor & |
input_keys, |
|
|
Tensor & |
output_iterators, |
|
|
Tensor & |
output_masks |
|
) |
| |
Parallel activate arrays of keys in Tensor. Specifically useful for large value elements (e.g., a tensor), where we can do in-place management after activation.
◆ AssertKeyDtype()
void open3d::core::Hashmap::AssertKeyDtype |
( |
const Dtype & |
dtype_key | ) |
const |
◆ AssertValueDtype()
void open3d::core::Hashmap::AssertValueDtype |
( |
const Dtype & |
dtype_val | ) |
const |
◆ AssignIterators()
void open3d::core::Hashmap::AssignIterators |
( |
iterator_t * |
input_iterators, |
|
|
const bool * |
input_masks, |
|
|
const void * |
input_values, |
|
|
size_t |
count |
|
) |
| |
Parallel assign iterators in-place with associated values. Note: users should manage the key-value correspondences around iterators.
◆ BucketSizes()
std::vector< size_t > open3d::core::Hashmap::BucketSizes |
( |
| ) |
const |
Return number of elems per bucket. High performance not required, so directly returns a vector.
◆ Erase() [1/2]
void open3d::core::Hashmap::Erase |
( |
const void * |
input_keys, |
|
|
bool * |
output_masks, |
|
|
size_t |
count |
|
) |
| |
Parallel erase an array of keys. Output masks can be a nullptr if return results are not to be processed.
◆ Erase() [2/2]
void open3d::core::Hashmap::Erase |
( |
const Tensor & |
input_keys, |
|
|
Tensor & |
output_masks |
|
) |
| |
Parallel erase an array of keys in Tensor. Output masks is a bool Tensor.
◆ Find() [1/2]
void open3d::core::Hashmap::Find |
( |
const void * |
input_keys, |
|
|
iterator_t * |
output_iterators, |
|
|
bool * |
output_masks, |
|
|
size_t |
count |
|
) |
| |
Parallel find an array of keys. Output iterators and masks CANNOT be nullptrs as we have to interpret them.
◆ Find() [2/2]
void open3d::core::Hashmap::Find |
( |
const Tensor & |
input_keys, |
|
|
Tensor & |
output_iterators, |
|
|
Tensor & |
output_masks |
|
) |
| |
Parallel find an array of keys in Tensor. Output iterators is an object Tensor, masks is a bool Tensor.
◆ GetDevice()
Device open3d::core::Hashmap::GetDevice |
( |
| ) |
const |
|
inline |
◆ GetIterators()
size_t open3d::core::Hashmap::GetIterators |
( |
iterator_t * |
output_iterators | ) |
|
Parallel collect all iterators in the hash table.
◆ GetKeyDtype()
Dtype open3d::core::Hashmap::GetKeyDtype |
( |
| ) |
const |
|
inline |
◆ GetValueDtype()
Dtype open3d::core::Hashmap::GetValueDtype |
( |
| ) |
const |
|
inline |
◆ Insert() [1/2]
void open3d::core::Hashmap::Insert |
( |
const void * |
input_keys, |
|
|
const void * |
input_values, |
|
|
iterator_t * |
output_iterators, |
|
|
bool * |
output_masks, |
|
|
size_t |
count |
|
) |
| |
Parallel insert arrays of keys and values. Output iterators and masks can be nullptrs if return iterators are not to be processed.
◆ Insert() [2/2]
void open3d::core::Hashmap::Insert |
( |
const Tensor & |
input_keys, |
|
|
const Tensor & |
input_values, |
|
|
Tensor & |
output_iterators, |
|
|
Tensor & |
output_masks |
|
) |
| |
Parallel insert arrays of keys and values in Tensors. Output iterators and masks are Tensors and can be further processed
◆ LoadFactor()
float open3d::core::Hashmap::LoadFactor |
( |
| ) |
const |
Return size / bucket_count.
◆ Rehash()
void open3d::core::Hashmap::Rehash |
( |
size_t |
buckets | ) |
|
Rehash expects extra memory space at runtime, since it consists of 1) dumping all key value pairs to a buffer 2) deallocate old hash table 3) create a new hash table 4) parallel insert dumped key value pairs
◆ Size()
size_t open3d::core::Hashmap::Size |
( |
| ) |
const |
◆ UnpackIterators()
void open3d::core::Hashmap::UnpackIterators |
( |
const iterator_t * |
input_iterators, |
|
|
const bool * |
input_masks, |
|
|
void * |
output_keys, |
|
|
void * |
output_values, |
|
|
size_t |
count |
|
) |
| |
Parallel unpack iterators to contiguous arrays of keys and/or values. Output keys and values can be nullptrs if they are not to be processed/stored.
◆ kDefaultElemsPerBucket
constexpr uint32_t open3d::core::Hashmap::kDefaultElemsPerBucket = 4 |
|
static |
The documentation for this class was generated from the following files: