find

find#

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

◆ find() [3/4]

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

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