 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
24 #ifdef BUILD_CUDA_MODULE
25 void CUDAResetHeap(Tensor &heap);
50 std::atomic<int>
cpu = {0};
55 std::vector<int64_t> value_dsizes,
Generic file read and write utility for python interface.
Definition: CloudViewerConfig.cpp:12
Dtype GetDtype() const
Definition: Tensor.h:1164
Tensor key_buffer_
Definition: HashBackendBuffer.h:102
std::vector< Tensor > GetValueBuffers() const
Return the value buffer tensors.
Definition: HashBackendBuffer.cpp:112
Definition: HashBackendBuffer.h:48
HeapTop & GetHeapTop()
Definition: HashBackendBuffer.cpp:99
int64_t GetLength() const
Definition: Tensor.h:1125
Tensor cuda
Definition: HashBackendBuffer.h:49
void Fill(S v)
Fill the whole Tensor with a scalar value, the scalar will be casted to the Tensor's Dtype.
Definition: Tensor.h:1400
const Dtype UInt32
Definition: Dtype.cpp:50
bool IsCUDA() const
Definition: Device.h:99
int64_t ByteSize() const
Definition: Dtype.h:59
Definition: HashBackendBuffer.h:46
std::vector< int64_t > GetValueBlocksPerElement() const
Return value's data sizes in the unit of common block size divisor.
Definition: HashBackendBuffer.cpp:93
int64_t common_block_size_
Definition: HashBackendBuffer.h:105
bool IsCUDA() const
Returns true iff device type is CUDA.
Definition: Device.h:49
Tensor heap_
Definition: HashBackendBuffer.h:99
#define CUDA_CALL(cuda_function,...)
Definition: CUDAUtils.h:49
HeapTop heap_top_
Definition: HashBackendBuffer.h:100
int GetHeapTopIndex() const
Return the current heap top.
Definition: HashBackendBuffer.cpp:103
void CPUResetHeap(Tensor &heap)
Definition: CPUHashBackendBuffer.cpp:14
Tensor GetValueBuffer(size_t i=0) const
Return the selected value buffer tensor at index i.
Definition: HashBackendBuffer.cpp:116
int64_t GetKeyDsize() const
Return key's data size in bytes.
Definition: HashBackendBuffer.cpp:77
Device GetDevice() const override
Definition: Tensor.cpp:1435
uint32_t buf_index_t
Definition: HashBackendBuffer.h:44
Tensor GetIndexHeap() const
Return the index heap tensor.
Definition: HashBackendBuffer.cpp:97
std::vector< Tensor > value_buffers_
Definition: HashBackendBuffer.h:103
#define LogError(...)
Definition: Logging.h:60
void ResetHeap()
Reset the heap and heap top.
Definition: HashBackendBuffer.cpp:60
bool IsCPU() const
Returns true iff device type is CPU.
Definition: Device.h:46
T Item() const
Definition: Tensor.h:618
std::vector< int64_t > GetValueDsizes() const
Return value's data sizes in bytes.
Definition: HashBackendBuffer.cpp:81
Device GetDevice() const
Return device of the buffer.
Definition: HashBackendBuffer.cpp:73
HashBackendBuffer(int64_t capacity, int64_t key_dsize, std::vector< int64_t > value_dsizes, const Device &device)
Definition: HashBackendBuffer.cpp:15
std::vector< int64_t > blocks_per_element_
Definition: HashBackendBuffer.h:106
int64_t GetCapacity() const
Return capacity of the buffer.
Definition: HashBackendBuffer.cpp:75
Tensor GetKeyBuffer() const
Return the key buffer tensor.
Definition: HashBackendBuffer.cpp:110
int64_t GetCommonBlockSize() const
Get the common block size divisor of all values types.
Definition: HashBackendBuffer.cpp:89
std::atomic< int > cpu
Definition: HashBackendBuffer.h:50
static const Dtype Int32
Definition: Dtype.h:28
std::string to_string(const T &n)
Definition: Common.h:20