ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq > Class Template Reference

#include <SlabHashBackendImpl.h>

Collaboration diagram for cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >:

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_
 
Slabbucket_list_head_
 
SlabNodeManagerImpl node_mgr_impl_
 
CUDAHashBackendBufferAccessor buffer_accessor_
 
int key_size_in_int_ = sizeof(Key) / sizeof(int)
 

Detailed Description

template<typename Key, typename Hash, typename Eq>
class cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >

Definition at line 45 of file SlabHashBackendImpl.h.

Constructor & Destructor Documentation

◆ SlabHashBackendImpl()

template<typename Key , typename Hash , typename Eq >
cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::SlabHashBackendImpl

Definition at line 175 of file SlabHashBackendImpl.h.

Member Function Documentation

◆ AllocateSlab()

template<typename Key , typename Hash , typename Eq >
__device__ uint32_t cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::AllocateSlab ( uint32_t  lane_id)

◆ ComputeBucket()

template<typename Key , typename Hash , typename Eq >
__device__ int64_t cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::ComputeBucket ( const Key &  key) const

◆ Erase()

template<typename Key , typename Hash , typename Eq >
__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 
)

◆ Find()

template<typename Key , typename Hash , typename Eq >
__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 
)

◆ FreeSlab()

template<typename Key , typename Hash , typename Eq >
__device__ __forceinline__ void cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::FreeSlab ( uint32_t  slab_ptr)

◆ Insert()

template<typename Key , typename Hash , typename Eq >
__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 
)

◆ Setup()

template<typename Key , typename Hash , typename Eq >
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.

◆ SlabEntryPtr()

template<typename Key , typename Hash , typename Eq >
__device__ uint32_t* cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::SlabEntryPtr ( uint32_t  bucket_id,
uint32_t  lane_id,
uint32_t  slab_ptr 
)
inline

◆ SlabEntryPtrFromHead()

template<typename Key , typename Hash , typename Eq >
__device__ uint32_t* cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::SlabEntryPtrFromHead ( uint32_t  bucket_id,
uint32_t  lane_id 
)
inline

◆ SlabEntryPtrFromNodes()

◆ WarpFindEmpty()

template<typename Key , typename Hash , typename Eq >
__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.

◆ WarpFindKey()

template<typename Key , typename Hash , typename Eq >
__device__ int32_t cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::WarpFindKey ( const Key &  src_key,
uint32_t  lane_id,
uint32_t  slab_entry 
)

◆ WarpSyncKey()

template<typename Key , typename Hash , typename Eq >
__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.

Member Data Documentation

◆ bucket_count_

template<typename Key , typename Hash , typename Eq >
int64_t cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::bucket_count_

◆ bucket_list_head_

template<typename Key , typename Hash , typename Eq >
Slab* cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::bucket_list_head_

◆ buffer_accessor_

template<typename Key , typename Hash , typename Eq >
CUDAHashBackendBufferAccessor cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::buffer_accessor_

◆ eq_fn_

template<typename Key , typename Hash , typename Eq >
Eq cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::eq_fn_

Definition at line 111 of file SlabHashBackendImpl.h.

◆ hash_fn_

template<typename Key , typename Hash , typename Eq >
Hash cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::hash_fn_

Definition at line 110 of file SlabHashBackendImpl.h.

◆ key_size_in_int_

template<typename Key , typename Hash , typename Eq >
int cloudViewer::core::SlabHashBackendImpl< Key, Hash, Eq >::key_size_in_int_ = sizeof(Key) / sizeof(int)

Definition at line 119 of file SlabHashBackendImpl.h.

◆ node_mgr_impl_


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