![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <HashBackendBuffer.h>

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... | |
| HeapTop & | GetHeapTop () |
| int | GetHeapTopIndex () const |
| Return the current heap top. More... | |
| Tensor | GetKeyBuffer () const |
| Return the key buffer tensor. More... | |
| std::vector< Tensor > | GetValueBuffers () 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< Tensor > | value_buffers_ |
| int64_t | common_block_size_ |
| std::vector< int64_t > | blocks_per_element_ |
Definition at line 46 of file HashBackendBuffer.h.
| cloudViewer::core::HashBackendBuffer::HashBackendBuffer | ( | int64_t | capacity, |
| int64_t | key_dsize, | ||
| std::vector< int64_t > | value_dsizes, | ||
| const Device & | device | ||
| ) |
Definition at line 15 of file HashBackendBuffer.cpp.
References blocks_per_element_, common_block_size_, cloudViewer::core::HashBackendBuffer::HeapTop::cuda, heap_, heap_top_, cloudViewer::core::Dtype::Int32, cloudViewer::core::Device::IsCUDA(), key_buffer_, cloudViewer::core::Dtype::Object, ResetHeap(), patch::to_string(), cloudViewer::core::UInt32, and value_buffers_.
| 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().
| 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().
| 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().
| 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().
| int cloudViewer::core::HashBackendBuffer::GetHeapTopIndex | ( | ) | const |
Return the current heap top.
Definition at line 103 of file HashBackendBuffer.cpp.
References cloudViewer::core::HashBackendBuffer::HeapTop::cpu, cloudViewer::core::HashBackendBuffer::HeapTop::cuda, heap_, heap_top_, cloudViewer::core::IsDevice::IsCUDA(), and cloudViewer::core::Tensor::Item().
| 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().
| 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().
| int64_t cloudViewer::core::HashBackendBuffer::GetKeyDsize | ( | ) | const |
Return key's data size in bytes.
Definition at line 77 of file HashBackendBuffer.cpp.
References cloudViewer::core::Dtype::ByteSize(), cloudViewer::core::Tensor::GetDtype(), and key_buffer_.
Referenced by cloudViewer::core::CUDAHashBackendBufferAccessor::Setup().
| 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().
| 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_.
| std::vector< Tensor > cloudViewer::core::HashBackendBuffer::GetValueBuffers | ( | ) | const |
Return the value buffer tensors.
Definition at line 112 of file HashBackendBuffer.cpp.
References value_buffers_.
Referenced by cloudViewer::core::CPUHashBackendBufferAccessor::CPUHashBackendBufferAccessor(), and cloudViewer::core::CUDAHashBackendBufferAccessor::Setup().
| 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().
| void cloudViewer::core::HashBackendBuffer::ResetHeap | ( | ) |
Reset the heap and heap top.
Definition at line 60 of file HashBackendBuffer.cpp.
References cloudViewer::core::HashBackendBuffer::HeapTop::cpu, cloudViewer::core::CPUResetHeap(), cloudViewer::core::HashBackendBuffer::HeapTop::cuda, CUDA_CALL, cloudViewer::core::Tensor::Fill(), GetDevice(), GetIndexHeap(), heap_top_, cloudViewer::core::Device::IsCPU(), and cloudViewer::core::Device::IsCUDA().
Referenced by HashBackendBuffer().
|
protected |
Definition at line 106 of file HashBackendBuffer.h.
Referenced by GetValueBlocksPerElement(), and HashBackendBuffer().
|
protected |
Definition at line 105 of file HashBackendBuffer.h.
Referenced by GetCommonBlockSize(), and HashBackendBuffer().
|
protected |
Definition at line 99 of file HashBackendBuffer.h.
Referenced by GetCapacity(), GetDevice(), GetHeapTopIndex(), GetIndexHeap(), and HashBackendBuffer().
|
protected |
Definition at line 100 of file HashBackendBuffer.h.
Referenced by GetHeapTop(), GetHeapTopIndex(), HashBackendBuffer(), and ResetHeap().
|
protected |
Definition at line 102 of file HashBackendBuffer.h.
Referenced by GetKeyBuffer(), GetKeyDsize(), and HashBackendBuffer().
|
protected |
Definition at line 103 of file HashBackendBuffer.h.
Referenced by GetValueBuffer(), GetValueBuffers(), GetValueDsizes(), and HashBackendBuffer().