contains

contains#

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

◆ contains() [2/2]

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 bool stdgpu::unordered_map< Key, T, Hash, KeyEqual, Allocator >::contains ( const KeyLike &  key) const

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

Parameters
[in]keyThe key-like value
Returns
True if the requested key-like value was found, false otherwise