find

find#

stdgpu: stdgpu::unordered_map::find
stdgpu Latest
Efficient STL-like Data Structures on the GPU

◆ find() [4/4]

template<typename Key , typename T , typename Hash = hash<Key>, typename KeyEqual = equal_to<Key>, typename Allocator = safe_device_allocator<pair<const Key, T>>>
template<typename KeyLike , STDGPU_DETAIL_OVERLOAD_IF(detail::is_transparent_v< Hash > &&detail::is_transparent_v< KeyEqual >) >
STDGPU_DEVICE_ONLY const_iterator stdgpu::unordered_map< Key, T, Hash, KeyEqual, Allocator >::find ( const KeyLike &  key) const

Determines if the given key-like value is stored in the container.

Parameters
[in]keyThe key-like value
Returns
An iterator to the position of the requested key-like value if it was found, end() otherwise