Open3D (C++ API)  0.15.1
Public Member Functions | Protected Attributes
open3d::core::StdGPUHashBackend< Key, Hash, Eq > Class Template Reference

#include <StdGPUHashBackend.h>

Inheritance diagram for open3d::core::StdGPUHashBackend< Key, Hash, Eq >:
open3d::core::DeviceHashBackend

Public Member Functions

 StdGPUHashBackend (int64_t init_capacity, int64_t key_dsize, const std::vector< int64_t > &value_dsizes, const Device &device)
 
 ~StdGPUHashBackend ()
 
void Reserve (int64_t capacity) override
 
void Insert (const void *input_keys, const std::vector< const void * > &input_values_soa, buf_index_t *output_buf_indices, bool *output_masks, int64_t count) override
 Parallel insert contiguous arrays of keys and values. More...
 
void Find (const void *input_keys, buf_index_t *output_buf_indices, 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 (buf_index_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
 Get the size (number of valid entries) of the hash map. More...
 
int64_t GetBucketCount () const override
 Get the number of buckets of the hash map. More...
 
std::vector< int64_t > BucketSizes () const override
 Get the number of entries per bucket. More...
 
float LoadFactor () const override
 Get the current load factor, defined as size / bucket count. More...
 
InternalStdGPUHashBackend< Key, Hash, Eq > GetImpl () const
 
void Allocate (int64_t capacity)
 
void Free ()
 
- Public Member Functions inherited from open3d::core::DeviceHashBackend
 DeviceHashBackend (int64_t init_capacity, int64_t key_dsize, const std::vector< int64_t > &value_dsizes, const Device &device)
 
virtual ~DeviceHashBackend ()
 
virtual void Reserve (int64_t capacity)=0
 
virtual void Insert (const void *input_keys, const std::vector< const void * > &input_values, buf_index_t *output_buf_indices, bool *output_masks, int64_t count)=0
 Parallel insert contiguous arrays of keys and values. More...
 
virtual void Find (const void *input_keys, buf_index_t *output_buf_indices, 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 (buf_index_t *output_buf_indices)=0
 Parallel collect all iterators in the hash table. More...
 
virtual void Clear ()=0
 Clear stored map without reallocating memory. More...
 
virtual int64_t Size () const =0
 Get the size (number of valid entries) of the hash map. More...
 
virtual int64_t GetBucketCount () const =0
 Get the number of buckets of the hash map. More...
 
virtual float LoadFactor () const =0
 Get the current load factor, defined as size / bucket count. More...
 
int64_t GetCapacity () const
 Get the maximum capacity of the hash map. More...
 
Device GetDevice () const
 Get the current device. More...
 
virtual std::vector< int64_t > BucketSizes () const =0
 Get the number of entries per bucket. More...
 
Tensor GetKeyBuffer ()
 Get the key buffer that stores actual keys. More...
 
std::vector< TensorGetValueBuffers ()
 Get the value buffers that store actual array of values. More...
 
Tensor GetValueBuffer (size_t i=0)
 Get the i-th value buffer that store an actual value array. More...
 
virtual void Allocate (int64_t capacity)=0
 
virtual void Free ()=0
 

Protected Attributes

InternalStdGPUHashBackend< Key, Hash, Eq > impl_
 
CUDAHashBackendBufferAccessor buffer_accessor_
 

Additional Inherited Members

- Data Fields inherited from open3d::core::DeviceHashBackend
int64_t capacity_
 
int64_t key_dsize_
 
std::vector< int64_t > value_dsizes_
 
Device device_
 
std::shared_ptr< HashBackendBufferbuffer_
 

Constructor & Destructor Documentation

◆ StdGPUHashBackend()

template<typename Key , typename Hash , typename Eq >
open3d::core::StdGPUHashBackend< Key, Hash, Eq >::StdGPUHashBackend ( int64_t  init_capacity,
int64_t  key_dsize,
const std::vector< int64_t > &  value_dsizes,
const Device device 
)

◆ ~StdGPUHashBackend()

template<typename Key , typename Hash , typename Eq >
open3d::core::StdGPUHashBackend< Key, Hash, Eq >::~StdGPUHashBackend

Member Function Documentation

◆ Allocate()

template<typename Key , typename Hash , typename Eq >
void open3d::core::StdGPUHashBackend< Key, Hash, Eq >::Allocate ( int64_t  capacity)
virtual

◆ BucketSizes()

template<typename Key , typename Hash , typename Eq >
std::vector< int64_t > open3d::core::StdGPUHashBackend< Key, Hash, Eq >::BucketSizes ( ) const
overridevirtual

Get the number of entries per bucket.

Implements open3d::core::DeviceHashBackend.

◆ Clear()

template<typename Key , typename Hash , typename Eq >
void open3d::core::StdGPUHashBackend< Key, Hash, Eq >::Clear ( )
overridevirtual

Clear stored map without reallocating memory.

Implements open3d::core::DeviceHashBackend.

◆ Erase()

template<typename Key , typename Hash , typename Eq >
void open3d::core::StdGPUHashBackend< Key, Hash, Eq >::Erase ( const void *  input_keys,
bool *  output_masks,
int64_t  count 
)
overridevirtual

Parallel erase a contiguous array of keys.

Implements open3d::core::DeviceHashBackend.

◆ Find()

template<typename Key , typename Hash , typename Eq >
void open3d::core::StdGPUHashBackend< Key, Hash, Eq >::Find ( const void *  input_keys,
buf_index_t output_buf_indices,
bool *  output_masks,
int64_t  count 
)
overridevirtual

Parallel find a contiguous array of keys.

Implements open3d::core::DeviceHashBackend.

◆ Free()

template<typename Key , typename Hash , typename Eq >
void open3d::core::StdGPUHashBackend< Key, Hash, Eq >::Free
virtual

◆ GetActiveIndices()

template<typename Key , typename Hash , typename Eq >
int64_t open3d::core::StdGPUHashBackend< Key, Hash, Eq >::GetActiveIndices ( buf_index_t output_buf_indices)
overridevirtual

Parallel collect all iterators in the hash table.

Implements open3d::core::DeviceHashBackend.

◆ GetBucketCount()

template<typename Key , typename Hash , typename Eq >
int64_t open3d::core::StdGPUHashBackend< Key, Hash, Eq >::GetBucketCount ( ) const
overridevirtual

Get the number of buckets of the hash map.

Implements open3d::core::DeviceHashBackend.

◆ GetImpl()

template<typename Key , typename Hash , typename Eq >
InternalStdGPUHashBackend< Key, Hash, Eq > open3d::core::StdGPUHashBackend< Key, Hash, Eq >::GetImpl ( ) const
inline

◆ Insert()

template<typename Key , typename Hash , typename Eq >
void open3d::core::StdGPUHashBackend< Key, Hash, Eq >::Insert ( const void *  input_keys,
const std::vector< const void * > &  input_values,
buf_index_t output_buf_indices,
bool *  output_masks,
int64_t  count 
)
overridevirtual

Parallel insert contiguous arrays of keys and values.

Implements open3d::core::DeviceHashBackend.

◆ LoadFactor()

template<typename Key , typename Hash , typename Eq >
float open3d::core::StdGPUHashBackend< Key, Hash, Eq >::LoadFactor ( ) const
overridevirtual

Get the current load factor, defined as size / bucket count.

Implements open3d::core::DeviceHashBackend.

◆ Reserve()

template<typename Key , typename Hash , typename Eq >
void open3d::core::StdGPUHashBackend< Key, Hash, Eq >::Reserve ( int64_t  capacity)
overridevirtual

Reserve 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::DeviceHashBackend.

◆ Size()

template<typename Key , typename Hash , typename Eq >
int64_t open3d::core::StdGPUHashBackend< Key, Hash, Eq >::Size ( ) const
overridevirtual

Get the size (number of valid entries) of the hash map.

Implements open3d::core::DeviceHashBackend.

Field Documentation

◆ buffer_accessor_

template<typename Key , typename Hash , typename Eq >
CUDAHashBackendBufferAccessor open3d::core::StdGPUHashBackend< Key, Hash, Eq >::buffer_accessor_
protected

◆ impl_

template<typename Key , typename Hash , typename Eq >
InternalStdGPUHashBackend<Key, Hash, Eq> open3d::core::StdGPUHashBackend< Key, Hash, Eq >::impl_
protected

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