Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
Go to the documentation of this file.
20 #ifndef __TBB_concurrent_unordered_map_H
21 #define __TBB_concurrent_unordered_map_H
23 #define __TBB_concurrent_unordered_map_H_include_area
31 namespace interface5 {
34 template<
typename Key,
typename T,
typename Hash_compare,
typename Allocator,
bool Allow_multimapping>
42 #if __TBB_UNORDERED_NODE_HANDLE_PRESENT
46 #endif // __TBB_UNORDERED_NODE_HANDLE_PRESENT
53 template<
class Type1,
class Type2>
61 template<
typename Key,
typename T,
typename Hasher,
typename Key_equality,
typename Allocator>
64 template <
typename Key,
typename T,
typename Hasher = tbb::tbb_hash<Key>,
typename Key_equality = std::equal_to<Key>,
65 typename Allocator = tbb::tbb_allocator<std::pair<const Key, T> > >
68 internal::hash_compare<Key, Hasher, Key_equality>, Allocator, false> >
104 #if __TBB_UNORDERED_NODE_HANDLE_PRESENT
106 #endif // __TBB_UNORDERED_NODE_HANDLE_PRESENT
126 template <
typename Iterator>
135 template <
typename Iterator>
142 template <
typename Iterator>
150 #if __TBB_INITIALIZER_LISTS_PRESENT
157 insert(il.begin(),il.end());
163 insert(il.begin(), il.end());
170 insert(il.begin(), il.end());
173 #endif //# __TBB_INITIALIZER_LISTS_PRESENT
176 #if __TBB_CPP11_RVALUE_REF_PRESENT && !__TBB_IMPLICIT_MOVE_PRESENT
194 #endif //__TBB_CPP11_RVALUE_REF_PRESENT && !__TBB_IMPLICIT_MOVE_PRESENT
196 #if __TBB_CPP11_RVALUE_REF_PRESENT
201 #if __TBB_UNORDERED_NODE_HANDLE_PRESENT
202 template<
typename Hash,
typename Equality>
206 template<
typename Hash,
typename Equality>
210 template<
typename Hash,
typename Equality>
214 template<
typename Hash,
typename Equality>
218 #endif //__TBB_UNORDERED_NODE_HANDLE_PRESENT
234 return ((*where).second);
246 return ((*where).second);
258 return ((*where).second);
262 #if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT
267 template<
template<
typename...>
typename Map,
typename Key,
typename Element,
typename... Args>
268 using cu_map_t = Map<
270 std::conditional_t< (
sizeof...(Args)>0) && !is_allocator_v< pack_element_t<0, Args...> >,
271 pack_element_t<0, Args...>, tbb_hash<Key> >,
272 std::conditional_t< (
sizeof...(Args)>1) && !is_allocator_v< pack_element_t<1, Args...> >,
273 pack_element_t<1, Args...>, std::equal_to<Key> >,
274 std::conditional_t< (
sizeof...(Args)>0) && is_allocator_v< pack_element_t<
sizeof...(Args)-1, Args...> >,
281 concurrent_unordered_map (I, I)
282 -> internal::cu_map_t<concurrent_unordered_map, internal::iterator_key_t<I>, internal::iterator_mapped_t<I>>;
285 template<
typename I,
typename... Args>
286 concurrent_unordered_map(I, I,
size_t, Args...)
287 -> internal::cu_map_t<concurrent_unordered_map, internal::iterator_key_t<I>, internal::iterator_mapped_t<I>, Args...>;
290 template<
typename Key,
typename Element>
291 concurrent_unordered_map(std::initializer_list<std::pair<const Key, Element>>)
292 -> internal::cu_map_t<concurrent_unordered_map, Key, Element>;
295 template<
typename Key,
typename Element,
typename... Args>
296 concurrent_unordered_map(std::initializer_list<std::pair<const Key, Element>>,
size_t, Args...)
297 -> internal::cu_map_t<concurrent_unordered_map, Key, Element, Args...>;
301 template <
typename Key,
typename T,
typename Hasher = tbb::tbb_hash<Key>,
typename Key_equality = std::equal_to<Key>,
302 typename Allocator = tbb::tbb_allocator<std::pair<const Key, T> > >
303 class concurrent_unordered_multimap :
304 public internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T,
305 internal::hash_compare<Key, Hasher, Key_equality>, Allocator, true> >
311 #if __TBB_EXTRA_DEBUG
314 using traits_type::allow_multimapping;
316 using base_type::insert;
339 #if __TBB_UNORDERED_NODE_HANDLE_PRESENT
341 #endif //__TBB_UNORDERED_NODE_HANDLE_PRESENT
361 template <
typename Iterator>
370 template <
typename Iterator>
377 template <
typename Iterator>
385 #if __TBB_INITIALIZER_LISTS_PRESENT
388 const hasher& a_hasher = hasher(),
const key_equal& a_keyeq = key_equal(),
390 : base_type(n_of_buckets, key_compare(a_hasher, a_keyeq), a)
392 insert(il.begin(),il.end());
398 insert(il.begin(), il.end());
405 insert(il.begin(), il.end());
408 #endif //# __TBB_INITIALIZER_LISTS_PRESENT
410 #if __TBB_CPP11_RVALUE_REF_PRESENT && !__TBB_IMPLICIT_MOVE_PRESENT
428 #endif //__TBB_CPP11_RVALUE_REF_PRESENT && !__TBB_IMPLICIT_MOVE_PRESENT
430 #if __TBB_CPP11_RVALUE_REF_PRESENT
435 #if __TBB_UNORDERED_NODE_HANDLE_PRESENT
436 template<
typename Hash,
typename Equality>
438 { this->internal_merge(source); }
440 template<
typename Hash,
typename Equality>
442 { this->internal_merge(source); }
444 template<
typename Hash,
typename Equality>
446 { this->internal_merge(source); }
448 template<
typename Hash,
typename Equality>
450 { this->internal_merge(source); }
452 #endif //__TBB_UNORDERED_NODE_HANDLE_PRESENT
459 #if __TBB_CPP17_DEDUCTION_GUIDES_PRESENT
464 -> internal::cu_map_t<concurrent_unordered_multimap, internal::iterator_key_t<I>, internal::iterator_mapped_t<I>>;
467 template<
typename I,
typename... Args>
469 -> internal::cu_map_t<concurrent_unordered_multimap, internal::iterator_key_t<I>, internal::iterator_mapped_t<I>, Args...>;
472 template<
typename Key,
typename Element>
474 -> internal::cu_map_t<concurrent_unordered_multimap, Key, Element>;
477 template<
typename Key,
typename Element,
typename... Args>
484 using interface5::concurrent_unordered_map;
485 using interface5::concurrent_unordered_multimap;
490 #undef __TBB_concurrent_unordered_map_H_include_area
492 #endif// __TBB_concurrent_unordered_map_H
mapped_type & operator[](const key_type &key)
mapped_type & at(const key_type &key)
concurrent_unordered_multimap(size_type n_of_buckets, const allocator_type &a)
void merge(concurrent_unordered_multimap< Key, T, Hash, Equality, Allocator > &source)
Hash_compare hash_compare
tbb::internal::allocator_traits< allocator_type >::size_type size_type
void merge(concurrent_unordered_map< Key, T, Hash, Equality, Allocator > &&source)
void merge(concurrent_unordered_map< Key, T, Hash, Equality, Allocator > &&source)
void merge(concurrent_unordered_multimap< Key, T, Hash, Equality, Allocator > &source)
concurrent_unordered_multimap(const concurrent_unordered_multimap &table, const Allocator &a)
concurrent_unordered_multimap(Iterator first, Iterator last, size_type n_of_buckets=base_type::initial_bucket_number, const hasher &a_hasher=hasher(), const key_equal &a_keyeq=key_equal(), const allocator_type &a=allocator_type())
concurrent_unordered_multimap(std::initializer_list< value_type > il, size_type n_of_buckets, const hasher &a_hasher, const allocator_type &a)
concurrent_unordered_map(concurrent_unordered_map &&table, const Allocator &a)
base_type::pointer pointer
concurrent_unordered_map(size_type n_of_buckets, const allocator_type &a)
concurrent_unordered_multimap(concurrent_unordered_multimap &&table)
base_type::iterator local_iterator
concurrent_unordered_map(size_type n_of_buckets=base_type::initial_bucket_number, const hasher &a_hasher=hasher(), const key_equal &a_keyeq=key_equal(), const allocator_type &a=allocator_type())
concurrent_unordered_multimap(std::initializer_list< value_type > il, size_type n_of_buckets, const allocator_type &a)
void throw_exception(exception_id eid)
Versionless convenience wrapper for throw_exception_v4()
base_type::const_iterator const_local_iterator
Traits::value_type value_type
Container::iterator first(Container &c)
base_type::size_type size_type
concurrent_unordered_map(Iterator first, Iterator last, size_type n_of_buckets=base_type::initial_bucket_number, const hasher &a_hasher=hasher(), const key_equal &a_keyeq=key_equal(), const allocator_type &a=allocator_type())
base_type::const_pointer const_pointer
Container::iterator last(Container &c)
concurrent_unordered_map_traits< Key, T, hash_compare, Allocator, false > traits_type
const typedef allocator_type::value_type & const_reference
base_type::size_type size_type
concurrent_unordered_multimap & operator=(concurrent_unordered_multimap &&table)
void merge(concurrent_unordered_multimap< Key, T, Hash, Equality, Allocator > &&source)
Class for determining type of std::allocator<T>::value_type.
concurrent_unordered_map_traits(const hash_compare &hc)
void merge(concurrent_unordered_map< Key, T, Hash, Equality, Allocator > &source)
concurrent_unordered_map(std::initializer_list< value_type > il, size_type n_of_buckets, const hasher &a_hasher, const allocator_type &a)
concurrent_unordered_map_traits< Key, T, hash_compare, Allocator, true > traits_type
concurrent_unordered_multimap(Iterator first, Iterator last, size_type n_of_buckets, const allocator_type &a)
allocator_type::value_type & reference
base_type::const_pointer const_pointer
concurrent_unordered_map(size_type n_of_buckets, const hasher &a_hasher, const allocator_type &a)
base_type::reference reference
internal::concurrent_unordered_base< traits_type > base_type
std::pair< iterator, bool > insert(const value_type &value)
concurrent_unordered_map(const Allocator &a)
void merge(concurrent_unordered_map< Key, T, Hash, Equality, Allocator > &source)
base_type::difference_type difference_type
concurrent_unordered_map(const concurrent_unordered_map &table, const Allocator &a)
concurrent_unordered_map(Iterator first, Iterator last, size_type n_of_buckets, const allocator_type &a)
base_type::const_reference const_reference
void merge(concurrent_unordered_multimap< Key, T, Hash, Equality, Allocator > &&source)
const mapped_type & at(const key_type &key) const
base_type::const_iterator const_local_iterator
concurrent_unordered_multimap(size_type n_of_buckets, const hasher &a_hasher, const allocator_type &a)
concurrent_unordered_multimap(size_type n_of_buckets=base_type::initial_bucket_number, const hasher &a_hasher=hasher(), const key_equal &a_keyeq=key_equal(), const allocator_type &a=allocator_type())
base_type::node_type node_type
base_type::value_type value_type
concurrent_unordered_map(std::initializer_list< value_type > il, size_type n_of_buckets, const allocator_type &a)
void move(tbb_thread &t1, tbb_thread &t2)
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle * key
tbb::internal::allocator_traits< allocator_type >::const_pointer const_pointer
base_type::node_type node_type
Traits::node_type node_type
concurrent_unordered_base & operator=(const concurrent_unordered_base &right)
Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.
concurrent_unordered_map & operator=(const concurrent_unordered_map &table)
concurrent_unordered_multimap(concurrent_unordered_multimap &&table, const Allocator &a)
iterator find(const key_type &key)
tbb::internal::allocator_traits< allocator_type >::pointer pointer
internal::concurrent_unordered_base< traits_type > base_type
base_type::iterator iterator
Traits::allocator_type allocator_type
base_type::const_iterator const_iterator
concurrent_unordered_map_traits()
concurrent_unordered_multimap(const concurrent_unordered_multimap &table)
concurrent_unordered_multimap(const Allocator &a)
concurrent_unordered_map(Iterator first, Iterator last, size_type n_of_buckets, const hasher &a_hasher, const allocator_type &a)
base_type::reference reference
base_type::const_iterator const_iterator
base_type::allocator_type allocator_type
concurrent_unordered_map & operator=(concurrent_unordered_map &&table)
base_type::difference_type difference_type
static const Key & get_key(const std::pair< Type1, Type2 > &value)
std::pair< const Key, T > value_type
base_type::const_reference const_reference
concurrent_unordered_multimap & operator=(const concurrent_unordered_multimap &table)
void internal_merge(SourceType &source)
tbb::internal::node_handle< key_type, value_type, typename internal::split_ordered_list< value_type, allocator_type >::node, allocator_type > node_type
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value
concurrent_unordered_multimap(Iterator first, Iterator last, size_type n_of_buckets, const hasher &a_hasher, const allocator_type &a)
hash_compare my_hash_compare
tbb::internal::allocator_rebind< Allocator, value_type >::type allocator_type
Identifiers declared inside namespace internal should never be used directly by client code.
base_type::pointer pointer
base_type::allocator_type allocator_type
concurrent_unordered_map(const concurrent_unordered_map &table)
internal::hash_compare< Key, Hasher, Key_equality > hash_compare
concurrent_unordered_map(concurrent_unordered_map &&table)
base_type::iterator iterator
base_type::value_type value_type
tbb::internal::allocator_traits< allocator_type >::difference_type difference_type
static const size_type initial_bucket_number
allocator_traits< Alloc >::template rebind_alloc< T >::other type
base_type::iterator local_iterator
internal::hash_compare< Key, Hasher, Key_equality > hash_compare
Copyright © 2005-2020 Intel Corporation. All Rights Reserved.
Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
registered trademarks or trademarks of Intel Corporation or its
subsidiaries in the United States and other countries.
* Other names and brands may be claimed as the property of others.