stdgpu: stdgpu::unordered_map< Key, T, Hash, KeyEqual, Allocator (original) (raw)

template<typename Key, typename T, typename Hash = hash, typename KeyEqual = equal_to, typename Allocator = safe_device_allocator<pair<const Key, T>>>
class stdgpu::unordered_map< Key, T, Hash, KeyEqual, Allocator >

A generic class similar to std::unordered_map on the GPU.

Template Parameters

Key The key type
T The mapped type
Hash The type of the hash functor
KeyEqual The type of the key equality functor
Allocator The allocator type

Differences to std::unordered_map:

Public Member Functions

unordered_map () noexcept=default

STDGPU_DEVICE_ONLY const_iterator

begin () const noexcept

STDGPU_DEVICE_ONLY iterator

begin () noexcept

STDGPU_HOST_DEVICE index_type

bucket (const key_type &key) const

STDGPU_HOST_DEVICE index_t

bucket_count () const

STDGPU_DEVICE_ONLY index_type

bucket_size (index_type n) const

STDGPU_DEVICE_ONLY const_iterator

cbegin () const noexcept

STDGPU_DEVICE_ONLY const_iterator

cend () const noexcept

void

clear ()

template<typename ExecutionPolicy , STDGPU_DETAIL_OVERLOAD_IF(is_execution_policy_v< remove_cvref_t< ExecutionPolicy > >) >

void

clear (ExecutionPolicy &&policy)

STDGPU_DEVICE_ONLY bool

contains (const key_type &key) const

template<typename KeyLike , STDGPU_DETAIL_OVERLOAD_IF(detail::is_transparent_v< Hash > &&detail::is_transparent_v< KeyEqual >) >

STDGPU_DEVICE_ONLY bool

contains (const KeyLike &key) const

STDGPU_DEVICE_ONLY index_type

count (const key_type &key) const

template<typename KeyLike , STDGPU_DETAIL_OVERLOAD_IF(detail::is_transparent_v< Hash > &&detail::is_transparent_v< KeyEqual >) >

STDGPU_DEVICE_ONLY index_type

count (const KeyLike &key) const

device_indexed_range< value_type >

device_range ()

device_indexed_range< const value_type >

device_range () const

template<typename ExecutionPolicy , STDGPU_DETAIL_OVERLOAD_IF(is_execution_policy_v< remove_cvref_t< ExecutionPolicy > >) >

device_indexed_range< value_type >

device_range (ExecutionPolicy &&policy)

template<typename ExecutionPolicy , STDGPU_DETAIL_OVERLOAD_IF(is_execution_policy_v< remove_cvref_t< ExecutionPolicy > >) >

device_indexed_range< const value_type >

device_range (ExecutionPolicy &&policy) const

template<class... Args>

STDGPU_DEVICE_ONLY pair< iterator, bool >

emplace (Args &&... args)

STDGPU_HOST_DEVICE bool

empty () const

template<typename ExecutionPolicy , STDGPU_DETAIL_OVERLOAD_IF(is_execution_policy_v< remove_cvref_t< ExecutionPolicy > >) >

bool

empty (ExecutionPolicy &&policy) const

STDGPU_DEVICE_ONLY const_iterator

end () const noexcept

STDGPU_DEVICE_ONLY iterator

end () noexcept

STDGPU_DEVICE_ONLY index_type

erase (const key_type &key)

template<typename ExecutionPolicy , typename KeyIterator , STDGPU_DETAIL_OVERLOAD_IF( is_execution_policy_v< remove_cvref_t< ExecutionPolicy > > &&detail::is_iterator_v< KeyIterator >) >

void

erase (ExecutionPolicy &&policy, KeyIterator begin, KeyIterator end)

template<typename KeyIterator , STDGPU_DETAIL_OVERLOAD_IF(detail::is_iterator_v< KeyIterator >) >

void

erase (KeyIterator begin, KeyIterator end)

STDGPU_DEVICE_ONLY iterator

find (const key_type &key)

STDGPU_DEVICE_ONLY const_iterator

find (const key_type &key) const

template<typename KeyLike , STDGPU_DETAIL_OVERLOAD_IF(detail::is_transparent_v< Hash > &&detail::is_transparent_v< KeyEqual >) >

STDGPU_DEVICE_ONLY iterator

find (const KeyLike &key)

template<typename KeyLike , STDGPU_DETAIL_OVERLOAD_IF(detail::is_transparent_v< Hash > &&detail::is_transparent_v< KeyEqual >) >

STDGPU_DEVICE_ONLY const_iterator

find (const KeyLike &key) const

STDGPU_HOST_DEVICE bool

full () const

template<typename ExecutionPolicy , STDGPU_DETAIL_OVERLOAD_IF(is_execution_policy_v< remove_cvref_t< ExecutionPolicy > >) >

bool

full (ExecutionPolicy &&policy) const

STDGPU_HOST_DEVICE allocator_type

get_allocator () const noexcept

STDGPU_HOST_DEVICE hasher

hash_function () const

STDGPU_DEVICE_ONLY pair< iterator, bool >

insert (const value_type &value)

template<typename ExecutionPolicy , typename ValueIterator , STDGPU_DETAIL_OVERLOAD_IF( is_execution_policy_v< remove_cvref_t< ExecutionPolicy > > &&detail::is_iterator_v< ValueIterator >) >

void

insert (ExecutionPolicy &&policy, ValueIterator begin, ValueIterator end)

template<typename ValueIterator , STDGPU_DETAIL_OVERLOAD_IF(detail::is_iterator_v< ValueIterator >) >

void

insert (ValueIterator begin, ValueIterator end)

STDGPU_HOST_DEVICE key_equal

key_eq () const

STDGPU_HOST_DEVICE float

load_factor () const

template<typename ExecutionPolicy , STDGPU_DETAIL_OVERLOAD_IF(is_execution_policy_v< remove_cvref_t< ExecutionPolicy > >) >

float

load_factor (ExecutionPolicy &&policy) const

STDGPU_HOST_DEVICE float

max_load_factor () const

STDGPU_HOST_DEVICE index_t

max_size () const noexcept

STDGPU_HOST_DEVICE index_t

size () const

template<typename ExecutionPolicy , STDGPU_DETAIL_OVERLOAD_IF(is_execution_policy_v< remove_cvref_t< ExecutionPolicy > >) >

index_t

size (ExecutionPolicy &&policy) const

bool

valid () const

template<typename ExecutionPolicy , STDGPU_DETAIL_OVERLOAD_IF(is_execution_policy_v< remove_cvref_t< ExecutionPolicy > >) >

bool

valid (ExecutionPolicy &&policy) const