Open3D (C++ API)  0.11.0
Public Member Functions | Data Fields
open3d::core::DeviceHashmap< Hash, KeyEq > Class Template Referenceabstract

Base class: shared interface. More...

#include <DeviceHashmap.h>

Inheritance diagram for open3d::core::DeviceHashmap< Hash, KeyEq >:
open3d::core::CPUHashmap< Hash, KeyEq > open3d::core::CUDAHashmap< Hash, KeyEq >

Public Member Functions

 DeviceHashmap (size_t init_buckets, size_t init_capacity, size_t dsize_key, size_t dsize_value, const Device &device)
 Comprehensive constructor for the developer. More...
 
virtual ~DeviceHashmap ()
 
virtual void Rehash (size_t buckets)=0
 
virtual void Insert (const void *input_keys, const void *input_values, iterator_t *output_iterators, bool *output_masks, size_t count)=0
 Parallel insert contiguous arrays of keys and values. More...
 
virtual void Activate (const void *input_keys, iterator_t *output_iterators, bool *output_masks, size_t count)=0
 
virtual void Find (const void *input_keys, iterator_t *output_iterators, bool *output_masks, size_t count)=0
 Parallel find a contiguous array of keys. More...
 
virtual void Erase (const void *input_keys, bool *output_masks, size_t count)=0
 Parallel erase a contiguous array of keys. More...
 
virtual size_t GetIterators (iterator_t *output_iterators)=0
 Parallel collect all iterators in the hash table. More...
 
virtual void UnpackIterators (const iterator_t *input_iterators, const bool *input_masks, void *output_keys, void *output_values, size_t count)=0
 Parallel unpack iterators to contiguous arrays of keys and/or values. More...
 
virtual void AssignIterators (iterator_t *input_iterators, const bool *input_masks, const void *input_values, size_t count)=0
 Parallel assign iterators in-place with associated values. More...
 
virtual size_t Size () const =0
 
virtual std::vector< size_t > BucketSizes () const =0
 
virtual float LoadFactor () const =0
 Return size / bucket_count. More...
 
int GetBucketCount () const
 
int GetCapacity () const
 
int GetKeyBytesize () const
 
int GetValueBytesize () const
 
Device GetDevice () const
 
float avg_capacity_bucket_ratio ()
 

Data Fields

size_t bucket_count_
 
size_t capacity_
 
size_t dsize_key_
 
size_t dsize_value_
 
Device device_
 

Detailed Description

template<typename Hash, typename KeyEq>
class open3d::core::DeviceHashmap< Hash, KeyEq >

Base class: shared interface.

Constructor & Destructor Documentation

◆ DeviceHashmap()

template<typename Hash , typename KeyEq >
open3d::core::DeviceHashmap< Hash, KeyEq >::DeviceHashmap ( size_t  init_buckets,
size_t  init_capacity,
size_t  dsize_key,
size_t  dsize_value,
const Device device 
)
inline

Comprehensive constructor for the developer.

◆ ~DeviceHashmap()

template<typename Hash , typename KeyEq >
virtual open3d::core::DeviceHashmap< Hash, KeyEq >::~DeviceHashmap ( )
inlinevirtual

Member Function Documentation

◆ Activate()

template<typename Hash , typename KeyEq >
virtual void open3d::core::DeviceHashmap< Hash, KeyEq >::Activate ( const void *  input_keys,
iterator_t output_iterators,
bool *  output_masks,
size_t  count 
)
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 >.

◆ AssignIterators()

template<typename Hash , typename KeyEq >
virtual void open3d::core::DeviceHashmap< Hash, KeyEq >::AssignIterators ( iterator_t input_iterators,
const bool *  input_masks,
const void *  input_values,
size_t  count 
)
pure virtual

Parallel assign iterators in-place with associated values.

Implemented in open3d::core::CUDAHashmap< Hash, KeyEq >, and open3d::core::CPUHashmap< Hash, KeyEq >.

◆ avg_capacity_bucket_ratio()

template<typename Hash , typename KeyEq >
float open3d::core::DeviceHashmap< Hash, KeyEq >::avg_capacity_bucket_ratio ( )
inline

◆ BucketSizes()

template<typename Hash , typename KeyEq >
virtual std::vector<size_t> open3d::core::DeviceHashmap< Hash, KeyEq >::BucketSizes ( ) const
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 >.

◆ Erase()

template<typename Hash , typename KeyEq >
virtual void open3d::core::DeviceHashmap< Hash, KeyEq >::Erase ( const void *  input_keys,
bool *  output_masks,
size_t  count 
)
pure virtual

Parallel erase a contiguous array of keys.

Implemented in open3d::core::CUDAHashmap< Hash, KeyEq >, and open3d::core::CPUHashmap< Hash, KeyEq >.

◆ Find()

template<typename Hash , typename KeyEq >
virtual void open3d::core::DeviceHashmap< Hash, KeyEq >::Find ( const void *  input_keys,
iterator_t output_iterators,
bool *  output_masks,
size_t  count 
)
pure virtual

Parallel find a contiguous array of keys.

Implemented in open3d::core::CUDAHashmap< Hash, KeyEq >, and open3d::core::CPUHashmap< Hash, KeyEq >.

◆ GetBucketCount()

template<typename Hash , typename KeyEq >
int open3d::core::DeviceHashmap< Hash, KeyEq >::GetBucketCount ( ) const
inline

◆ GetCapacity()

template<typename Hash , typename KeyEq >
int open3d::core::DeviceHashmap< Hash, KeyEq >::GetCapacity ( ) const
inline

◆ GetDevice()

template<typename Hash , typename KeyEq >
Device open3d::core::DeviceHashmap< Hash, KeyEq >::GetDevice ( ) const
inline

◆ GetIterators()

template<typename Hash , typename KeyEq >
virtual size_t open3d::core::DeviceHashmap< Hash, KeyEq >::GetIterators ( iterator_t output_iterators)
pure virtual

Parallel collect all iterators in the hash table.

Implemented in open3d::core::CUDAHashmap< Hash, KeyEq >, and open3d::core::CPUHashmap< Hash, KeyEq >.

◆ GetKeyBytesize()

template<typename Hash , typename KeyEq >
int open3d::core::DeviceHashmap< Hash, KeyEq >::GetKeyBytesize ( ) const
inline

◆ GetValueBytesize()

template<typename Hash , typename KeyEq >
int open3d::core::DeviceHashmap< Hash, KeyEq >::GetValueBytesize ( ) const
inline

◆ Insert()

template<typename Hash , typename KeyEq >
virtual void open3d::core::DeviceHashmap< Hash, KeyEq >::Insert ( const void *  input_keys,
const void *  input_values,
iterator_t output_iterators,
bool *  output_masks,
size_t  count 
)
pure virtual

Parallel insert contiguous arrays of keys and values.

Implemented in open3d::core::CUDAHashmap< Hash, KeyEq >, and open3d::core::CPUHashmap< Hash, KeyEq >.

◆ LoadFactor()

template<typename Hash , typename KeyEq >
virtual float open3d::core::DeviceHashmap< Hash, KeyEq >::LoadFactor ( ) const
pure virtual

◆ Rehash()

template<typename Hash , typename KeyEq >
virtual void open3d::core::DeviceHashmap< Hash, KeyEq >::Rehash ( size_t  buckets)
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 >.

◆ Size()

template<typename Hash , typename KeyEq >
virtual size_t open3d::core::DeviceHashmap< Hash, KeyEq >::Size ( ) const
pure virtual

◆ UnpackIterators()

template<typename Hash , typename KeyEq >
virtual void open3d::core::DeviceHashmap< Hash, KeyEq >::UnpackIterators ( const iterator_t input_iterators,
const bool *  input_masks,
void *  output_keys,
void *  output_values,
size_t  count 
)
pure virtual

Parallel unpack iterators to contiguous arrays of keys and/or values.

Implemented in open3d::core::CUDAHashmap< Hash, KeyEq >, and open3d::core::CPUHashmap< Hash, KeyEq >.

Field Documentation

◆ bucket_count_

template<typename Hash , typename KeyEq >
size_t open3d::core::DeviceHashmap< Hash, KeyEq >::bucket_count_

◆ capacity_

template<typename Hash , typename KeyEq >
size_t open3d::core::DeviceHashmap< Hash, KeyEq >::capacity_

◆ device_

template<typename Hash , typename KeyEq >
Device open3d::core::DeviceHashmap< Hash, KeyEq >::device_

◆ dsize_key_

template<typename Hash , typename KeyEq >
size_t open3d::core::DeviceHashmap< Hash, KeyEq >::dsize_key_

◆ dsize_value_

template<typename Hash , typename KeyEq >
size_t open3d::core::DeviceHashmap< Hash, KeyEq >::dsize_value_

The documentation for this class was generated from the following file: