ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::core::HashBackendBuffer Class Reference

#include <HashBackendBuffer.h>

Collaboration diagram for cloudViewer::core::HashBackendBuffer:

Classes

struct  HeapTop
 

Public Member Functions

 HashBackendBuffer (int64_t capacity, int64_t key_dsize, std::vector< int64_t > value_dsizes, const Device &device)
 
void ResetHeap ()
 Reset the heap and heap top. More...
 
Device GetDevice () const
 Return device of the buffer. More...
 
int64_t GetCapacity () const
 Return capacity of the buffer. More...
 
int64_t GetKeyDsize () const
 Return key's data size in bytes. More...
 
std::vector< int64_t > GetValueDsizes () const
 Return value's data sizes in bytes. More...
 
int64_t GetCommonBlockSize () const
 Get the common block size divisor of all values types. More...
 
std::vector< int64_t > GetValueBlocksPerElement () const
 Return value's data sizes in the unit of common block size divisor. More...
 
Tensor GetIndexHeap () const
 Return the index heap tensor. More...
 
HeapTopGetHeapTop ()
 
int GetHeapTopIndex () const
 Return the current heap top. More...
 
Tensor GetKeyBuffer () const
 Return the key buffer tensor. More...
 
std::vector< TensorGetValueBuffers () const
 Return the value buffer tensors. More...
 
Tensor GetValueBuffer (size_t i=0) const
 Return the selected value buffer tensor at index i. More...
 

Protected Attributes

Tensor heap_
 
HeapTop heap_top_
 
Tensor key_buffer_
 
std::vector< Tensorvalue_buffers_
 
int64_t common_block_size_
 
std::vector< int64_t > blocks_per_element_
 

Detailed Description

Definition at line 46 of file HashBackendBuffer.h.

Constructor & Destructor Documentation

◆ HashBackendBuffer()

cloudViewer::core::HashBackendBuffer::HashBackendBuffer ( int64_t  capacity,
int64_t  key_dsize,
std::vector< int64_t >  value_dsizes,
const Device device 
)

Member Function Documentation

◆ GetCapacity()

int64_t cloudViewer::core::HashBackendBuffer::GetCapacity ( ) const

Return capacity of the buffer.

Definition at line 75 of file HashBackendBuffer.cpp.

References cloudViewer::core::Tensor::GetLength(), and heap_.

Referenced by cloudViewer::core::CUDAHashBackendBufferAccessor::Setup().

◆ GetCommonBlockSize()

int64_t cloudViewer::core::HashBackendBuffer::GetCommonBlockSize ( ) const

Get the common block size divisor of all values types.

Definition at line 89 of file HashBackendBuffer.cpp.

References common_block_size_.

Referenced by cloudViewer::core::CUDAHashBackendBufferAccessor::Setup().

◆ GetDevice()

Device cloudViewer::core::HashBackendBuffer::GetDevice ( ) const

Return device of the buffer.

Definition at line 73 of file HashBackendBuffer.cpp.

References cloudViewer::core::Tensor::GetDevice(), and heap_.

Referenced by ResetHeap(), and cloudViewer::core::CUDAHashBackendBufferAccessor::Setup().

◆ GetHeapTop()

HashBackendBuffer::HeapTop & cloudViewer::core::HashBackendBuffer::GetHeapTop ( )

Return the heap top structure. To be dispatched accordingly in C++/CUDA accessors.

Definition at line 99 of file HashBackendBuffer.cpp.

References heap_top_.

Referenced by cloudViewer::core::CPUHashBackendBufferAccessor::CPUHashBackendBufferAccessor(), and cloudViewer::core::CUDAHashBackendBufferAccessor::Setup().

◆ GetHeapTopIndex()

int cloudViewer::core::HashBackendBuffer::GetHeapTopIndex ( ) const

◆ GetIndexHeap()

Tensor cloudViewer::core::HashBackendBuffer::GetIndexHeap ( ) const

Return the index heap tensor.

Definition at line 97 of file HashBackendBuffer.cpp.

References heap_.

Referenced by ResetHeap(), and cloudViewer::core::CUDAHashBackendBufferAccessor::Setup().

◆ GetKeyBuffer()

Tensor cloudViewer::core::HashBackendBuffer::GetKeyBuffer ( ) const

Return the key buffer tensor.

Definition at line 110 of file HashBackendBuffer.cpp.

References key_buffer_.

Referenced by cloudViewer::core::CUDAHashBackendBufferAccessor::Setup().

◆ GetKeyDsize()

int64_t cloudViewer::core::HashBackendBuffer::GetKeyDsize ( ) const

◆ GetValueBlocksPerElement()

std::vector< int64_t > cloudViewer::core::HashBackendBuffer::GetValueBlocksPerElement ( ) const

Return value's data sizes in the unit of common block size divisor.

Definition at line 93 of file HashBackendBuffer.cpp.

References blocks_per_element_.

Referenced by cloudViewer::core::CUDAHashBackendBufferAccessor::Setup().

◆ GetValueBuffer()

Tensor cloudViewer::core::HashBackendBuffer::GetValueBuffer ( size_t  i = 0) const

Return the selected value buffer tensor at index i.

Definition at line 116 of file HashBackendBuffer.cpp.

References LogError, and value_buffers_.

◆ GetValueBuffers()

std::vector< Tensor > cloudViewer::core::HashBackendBuffer::GetValueBuffers ( ) const

◆ GetValueDsizes()

std::vector< int64_t > cloudViewer::core::HashBackendBuffer::GetValueDsizes ( ) const

Return value's data sizes in bytes.

Definition at line 81 of file HashBackendBuffer.cpp.

References value_buffers_.

Referenced by cloudViewer::core::CUDAHashBackendBufferAccessor::Setup().

◆ ResetHeap()

Member Data Documentation

◆ blocks_per_element_

std::vector<int64_t> cloudViewer::core::HashBackendBuffer::blocks_per_element_
protected

Definition at line 106 of file HashBackendBuffer.h.

Referenced by GetValueBlocksPerElement(), and HashBackendBuffer().

◆ common_block_size_

int64_t cloudViewer::core::HashBackendBuffer::common_block_size_
protected

Definition at line 105 of file HashBackendBuffer.h.

Referenced by GetCommonBlockSize(), and HashBackendBuffer().

◆ heap_

Tensor cloudViewer::core::HashBackendBuffer::heap_
protected

◆ heap_top_

HeapTop cloudViewer::core::HashBackendBuffer::heap_top_
protected

Definition at line 100 of file HashBackendBuffer.h.

Referenced by GetHeapTop(), GetHeapTopIndex(), HashBackendBuffer(), and ResetHeap().

◆ key_buffer_

Tensor cloudViewer::core::HashBackendBuffer::key_buffer_
protected

Definition at line 102 of file HashBackendBuffer.h.

Referenced by GetKeyBuffer(), GetKeyDsize(), and HashBackendBuffer().

◆ value_buffers_

std::vector<Tensor> cloudViewer::core::HashBackendBuffer::value_buffers_
protected

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