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

Public Member Functions | |
| SlabHashBackendImpl () | |
| __host__ void | Setup (int64_t init_buckets, const SlabNodeManagerImpl &node_mgr_impl, const CUDAHashBackendBufferAccessor &buffer_accessor) |
| __device__ bool | Insert (bool lane_active, uint32_t lane_id, uint32_t bucket_id, const Key &key, buf_index_t buf_index) |
| Warp-insert a pre-allocated buf_index at key. More... | |
| __device__ Pair< buf_index_t, bool > | Find (bool lane_active, uint32_t lane_id, uint32_t bucket_id, const Key &key) |
| Warp-find a buf_index and its mask at key. More... | |
| __device__ Pair< buf_index_t, bool > | Erase (bool lane_active, uint32_t lane_id, uint32_t bucket_id, const Key &key) |
| Warp-erase an entry at key. More... | |
| __device__ void | WarpSyncKey (const Key &key, uint32_t lane_id, Key &ret_key) |
| Warp-synchronize a key in a slab. More... | |
| __device__ int32_t | WarpFindKey (const Key &src_key, uint32_t lane_id, uint32_t slab_entry) |
| Warp-find a key in a slab. More... | |
| __device__ int32_t | WarpFindEmpty (uint32_t slab_entry) |
| Warp-find the first empty slot in a slab. More... | |
| __device__ int64_t | ComputeBucket (const Key &key) const |
| __device__ uint32_t | AllocateSlab (uint32_t lane_id) |
| __device__ void | FreeSlab (uint32_t slab_ptr) |
| __device__ uint32_t * | SlabEntryPtr (uint32_t bucket_id, uint32_t lane_id, uint32_t slab_ptr) |
| __device__ uint32_t * | SlabEntryPtrFromNodes (uint32_t slab_ptr, uint32_t lane_id) |
| __device__ uint32_t * | SlabEntryPtrFromHead (uint32_t bucket_id, uint32_t lane_id) |
Public Attributes | |
| Hash | hash_fn_ |
| Eq | eq_fn_ |
| int64_t | bucket_count_ |
| Slab * | bucket_list_head_ |
| SlabNodeManagerImpl | node_mgr_impl_ |
| CUDAHashBackendBufferAccessor | buffer_accessor_ |
| int | key_size_in_int_ = sizeof(Key) / sizeof(int) |
Definition at line 45 of file SlabHashBackendImpl.h.
| cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::SlabHashBackendImpl |
Definition at line 175 of file SlabHashBackendImpl.h.
| __device__ uint32_t cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::AllocateSlab | ( | uint32_t | lane_id | ) |
Definition at line 463 of file SlabHashBackendImpl.h.
References cloudViewer::core::SlabNodeManagerImpl::WarpAllocate().
| __device__ int64_t cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::ComputeBucket | ( | const Key & | key | ) | const |
Definition at line 457 of file SlabHashBackendImpl.h.
Referenced by cloudViewer::core::EraseKernelPass0(), cloudViewer::core::FindKernel(), and cloudViewer::core::InsertKernelPass1().
| __device__ Pair< buf_index_t, bool > cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::Erase | ( | bool | lane_active, |
| uint32_t | lane_id, | ||
| uint32_t | bucket_id, | ||
| const Key & | key | ||
| ) |
Warp-erase an entry at key.
Definition at line 361 of file SlabHashBackendImpl.h.
References cloudViewer::core::kEmptyNodeAddr, cloudViewer::core::kEmptySlabAddr, cloudViewer::core::kHeadSlabAddr, cloudViewer::core::kNextSlabPtrLaneId, cloudViewer::core::kSyncLanesMask, cloudViewer::core::kWarpSize, and cloudViewer::core::make_pair().
Referenced by cloudViewer::core::EraseKernelPass0().
| __device__ Pair< buf_index_t, bool > cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::Find | ( | bool | lane_active, |
| uint32_t | lane_id, | ||
| uint32_t | bucket_id, | ||
| const Key & | key | ||
| ) |
Warp-find a buf_index and its mask at key.
Definition at line 294 of file SlabHashBackendImpl.h.
References cloudViewer::core::kEmptySlabAddr, cloudViewer::core::kHeadSlabAddr, cloudViewer::core::kNextSlabPtrLaneId, cloudViewer::core::kNullAddr, cloudViewer::core::kSyncLanesMask, cloudViewer::core::kWarpSize, and cloudViewer::core::make_pair().
Referenced by cloudViewer::core::FindKernel().
| __device__ __forceinline__ void cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::FreeSlab | ( | uint32_t | slab_ptr | ) |
Definition at line 468 of file SlabHashBackendImpl.h.
References cloudViewer::core::SlabNodeManagerImpl::FreeUntouched().
| __device__ bool cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::Insert | ( | bool | lane_active, |
| uint32_t | lane_id, | ||
| uint32_t | bucket_id, | ||
| const Key & | key, | ||
| buf_index_t | buf_index | ||
| ) |
Warp-insert a pre-allocated buf_index at key.
Definition at line 189 of file SlabHashBackendImpl.h.
References cloudViewer::core::kEmptyNodeAddr, cloudViewer::core::kEmptySlabAddr, cloudViewer::core::kHeadSlabAddr, cloudViewer::core::kNextSlabPtrLaneId, cloudViewer::core::kSyncLanesMask, and cloudViewer::core::kWarpSize.
Referenced by cloudViewer::core::InsertKernelPass1().
| void cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::Setup | ( | int64_t | init_buckets, |
| const SlabNodeManagerImpl & | node_mgr_impl, | ||
| const CUDAHashBackendBufferAccessor & | buffer_accessor | ||
| ) |
Definition at line 179 of file SlabHashBackendImpl.h.
|
inline |
|
inline |
Definition at line 103 of file SlabHashBackendImpl.h.
References cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::bucket_list_head_, and cloudViewer::core::kWarpSize.
Referenced by cloudViewer::core::CountElemsPerBucketKernel(), cloudViewer::core::GetActiveIndicesKernel(), and cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::SlabEntryPtr().
|
inline |
Definition at line 99 of file SlabHashBackendImpl.h.
References cloudViewer::core::SlabNodeManagerImpl::get_unit_ptr_from_slab(), and cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::node_mgr_impl_.
Referenced by cloudViewer::core::CountElemsPerBucketKernel(), cloudViewer::core::GetActiveIndicesKernel(), and cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::SlabEntryPtr().
| __device__ int32_t cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::WarpFindEmpty | ( | uint32_t | slab_entry | ) |
Warp-find the first empty slot in a slab.
Definition at line 450 of file SlabHashBackendImpl.h.
References cloudViewer::core::kEmptyNodeAddr, and cloudViewer::core::kNodePtrLanesMask.
| __device__ int32_t cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::WarpFindKey | ( | const Key & | src_key, |
| uint32_t | lane_id, | ||
| uint32_t | slab_entry | ||
| ) |
Warp-find a key in a slab.
Definition at line 433 of file SlabHashBackendImpl.h.
References cloudViewer::core::CUDAHashBackendBufferAccessor::GetKeyPtr(), cloudViewer::core::kEmptyNodeAddr, and cloudViewer::core::kNodePtrLanesMask.
| __device__ void cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::WarpSyncKey | ( | const Key & | key, |
| uint32_t | lane_id, | ||
| Key & | ret_key | ||
| ) |
Warp-synchronize a key in a slab.
Definition at line 422 of file SlabHashBackendImpl.h.
References cloudViewer::core::kSyncLanesMask, and cloudViewer::core::kWarpSize.
| int64_t cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::bucket_count_ |
Definition at line 112 of file SlabHashBackendImpl.h.
Referenced by cloudViewer::core::CountElemsPerBucketKernel(), and cloudViewer::core::GetActiveIndicesKernel().
| Slab* cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::bucket_list_head_ |
Definition at line 114 of file SlabHashBackendImpl.h.
Referenced by cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::SlabEntryPtrFromHead().
| CUDAHashBackendBufferAccessor cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::buffer_accessor_ |
Definition at line 116 of file SlabHashBackendImpl.h.
Referenced by cloudViewer::core::EraseKernelPass1(), cloudViewer::core::InsertKernelPass0(), and cloudViewer::core::InsertKernelPass2().
| Eq cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::eq_fn_ |
Definition at line 111 of file SlabHashBackendImpl.h.
| Hash cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::hash_fn_ |
Definition at line 110 of file SlabHashBackendImpl.h.
| int cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::key_size_in_int_ = sizeof(Key) / sizeof(int) |
Definition at line 119 of file SlabHashBackendImpl.h.
| SlabNodeManagerImpl cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::node_mgr_impl_ |
Definition at line 115 of file SlabHashBackendImpl.h.
Referenced by cloudViewer::core::CountElemsPerBucketKernel(), cloudViewer::core::EraseKernelPass0(), cloudViewer::core::FindKernel(), cloudViewer::core::GetActiveIndicesKernel(), cloudViewer::core::InsertKernelPass1(), and cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::SlabEntryPtrFromNodes().