template<typename KeyT, typename HashT, uint32 CTA_SIZE, uint32 TABLE_SIZE, KeyT INVALID_KEY = 0xFFFFFFFF>
struct cugar::cuda::BlockHashMap< KeyT, HashT, CTA_SIZE, TABLE_SIZE, INVALID_KEY >
This class implements a cuda block-wide Hash Set, allowing arbitrary threads from the same CTA to add new entries at the same time.
__global__ void kernel()
{
typedef BlockHashMap<uint32,uint32,128,512> hash_map_type;
__shared__ typename hash_map_type::TempStorage hash_map_storage;
hash_map_type hash_map( hash_map_storage );
hash_map.insert( threadIdx.x/2, hash(threadIdx.x/2) );
__shared__ uint32 hash_map_values[512];
for (uint32 i = threadIdx.x; i < 512; i += 128)
hash_map_values[i] = 0;
__syncthreads();
const uint32 slot = hash_map.find( threadIdx.x/2 );
}