Open3D (C++ API)  0.12.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 (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
 
TensorGetKeyBuffer ()
 
TensorGetValueBuffer ()
 
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< HashmapBufferbuffer_
 

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 ( int64_t  init_buckets,
int64_t  init_capacity,
int64_t  dsize_key,
int64_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,
addr_t output_iterators,
bool *  output_masks,
int64_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 >.

◆ 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<int64_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,
int64_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,
addr_t output_iterators,
bool *  output_masks,
int64_t  count 
)
pure virtual

Parallel find a contiguous array of keys.

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

◆ GetActiveIndices()

template<typename Hash , typename KeyEq >
virtual int64_t open3d::core::DeviceHashmap< Hash, KeyEq >::GetActiveIndices ( addr_t output_indices)
pure virtual

Parallel collect all iterators in the hash table.

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

◆ GetBucketCount()

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

◆ GetCapacity()

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

◆ GetDevice()

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

◆ GetKeyBuffer()

template<typename Hash , typename KeyEq >
Tensor& open3d::core::DeviceHashmap< Hash, KeyEq >::GetKeyBuffer ( )
inline

◆ GetKeyBytesize()

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

◆ GetValueBuffer()

template<typename Hash , typename KeyEq >
Tensor& open3d::core::DeviceHashmap< Hash, KeyEq >::GetValueBuffer ( )
inline

◆ GetValueBytesize()

template<typename Hash , typename KeyEq >
int64_t 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,
addr_t output_iterators,
bool *  output_masks,
int64_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 ( int64_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 int64_t open3d::core::DeviceHashmap< Hash, KeyEq >::Size ( ) const
pure virtual

Field Documentation

◆ bucket_count_

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

◆ buffer_

template<typename Hash , typename KeyEq >
std::shared_ptr<HashmapBuffer> open3d::core::DeviceHashmap< Hash, KeyEq >::buffer_

◆ capacity_

template<typename Hash , typename KeyEq >
int64_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 >
int64_t open3d::core::DeviceHashmap< Hash, KeyEq >::dsize_key_

◆ dsize_value_

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

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