erase

erase#

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

◆ erase() [1/3]

template<typename Key , typename T , typename Hash = hash<Key>, typename KeyEqual = equal_to<Key>, typename Allocator = safe_device_allocator<pair<const Key, T>>>
STDGPU_DEVICE_ONLY index_type stdgpu::unordered_map< Key, T, Hash, KeyEqual, Allocator >::erase ( const key_type key)

Deletes the value with the given key from the container.

Parameters
[in]keyThe key
Returns
1 if there was a value with key and it got erased, 0 otherwise