Open3D (C++ API)  0.18.0+5c982c7
Public Member Functions | Data Fields
open3d::core::DeviceHashBackend Class Referenceabstract

#include <DeviceHashBackend.h>

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

Public Member Functions

 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
 

Data Fields

int64_t capacity_
 
int64_t key_dsize_
 
std::vector< int64_t > value_dsizes_
 
Device device_
 
std::shared_ptr< HashBackendBufferbuffer_
 

Constructor & Destructor Documentation

◆ DeviceHashBackend()

open3d::core::DeviceHashBackend::DeviceHashBackend ( int64_t  init_capacity,
int64_t  key_dsize,
const std::vector< int64_t > &  value_dsizes,
const Device device 
)
inline

◆ ~DeviceHashBackend()

virtual open3d::core::DeviceHashBackend::~DeviceHashBackend ( )
inlinevirtual

Member Function Documentation

◆ Allocate()

virtual void open3d::core::DeviceHashBackend::Allocate ( int64_t  capacity)
pure virtual

◆ BucketSizes()

virtual std::vector<int64_t> open3d::core::DeviceHashBackend::BucketSizes ( ) const
pure virtual

◆ Clear()

virtual void open3d::core::DeviceHashBackend::Clear ( )
pure virtual

◆ Erase()

virtual void open3d::core::DeviceHashBackend::Erase ( const void *  input_keys,
bool *  output_masks,
int64_t  count 
)
pure virtual

◆ Find()

virtual void open3d::core::DeviceHashBackend::Find ( const void *  input_keys,
buf_index_t output_buf_indices,
bool *  output_masks,
int64_t  count 
)
pure virtual

◆ Free()

virtual void open3d::core::DeviceHashBackend::Free ( )
pure virtual

◆ GetActiveIndices()

virtual int64_t open3d::core::DeviceHashBackend::GetActiveIndices ( buf_index_t output_buf_indices)
pure virtual

◆ GetBucketCount()

virtual int64_t open3d::core::DeviceHashBackend::GetBucketCount ( ) const
pure virtual

◆ GetCapacity()

int64_t open3d::core::DeviceHashBackend::GetCapacity ( ) const
inline

Get the maximum capacity of the hash map.

◆ GetDevice()

Device open3d::core::DeviceHashBackend::GetDevice ( ) const
inline

Get the current device.

◆ GetKeyBuffer()

Tensor open3d::core::DeviceHashBackend::GetKeyBuffer ( )
inline

Get the key buffer that stores actual keys.

◆ GetValueBuffer()

Tensor open3d::core::DeviceHashBackend::GetValueBuffer ( size_t  i = 0)
inline

Get the i-th value buffer that store an actual value array.

◆ GetValueBuffers()

std::vector<Tensor> open3d::core::DeviceHashBackend::GetValueBuffers ( )
inline

Get the value buffers that store actual array of values.

◆ Insert()

virtual void open3d::core::DeviceHashBackend::Insert ( const void *  input_keys,
const std::vector< const void * > &  input_values,
buf_index_t output_buf_indices,
bool *  output_masks,
int64_t  count 
)
pure virtual

◆ LoadFactor()

virtual float open3d::core::DeviceHashBackend::LoadFactor ( ) const
pure virtual

◆ Reserve()

virtual void open3d::core::DeviceHashBackend::Reserve ( int64_t  capacity)
pure virtual

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

Implemented in open3d::core::StdGPUHashBackend< Key, Hash, Eq >, open3d::core::SlabHashBackend< Key, Hash, Eq >, and open3d::core::TBBHashBackend< Key, Hash, Eq >.

◆ Size()

virtual int64_t open3d::core::DeviceHashBackend::Size ( ) const
pure virtual

Field Documentation

◆ buffer_

std::shared_ptr<HashBackendBuffer> open3d::core::DeviceHashBackend::buffer_

◆ capacity_

int64_t open3d::core::DeviceHashBackend::capacity_

◆ device_

Device open3d::core::DeviceHashBackend::device_

◆ key_dsize_

int64_t open3d::core::DeviceHashBackend::key_dsize_

◆ value_dsizes_

std::vector<int64_t> open3d::core::DeviceHashBackend::value_dsizes_

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