|
Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
Unordered map from Key to T. More...
#include <concurrent_hash_map.h>
Classes | |
| class | accessor |
| Allows write access to elements and combines data access, locking, and garbage collection. More... | |
| struct | accessor_not_used |
| class | bucket_accessor |
| bucket accessor is to find, rehash, acquire a lock, and access a bucket More... | |
| struct | call_clear_on_leave |
| class | const_accessor |
| Combines data access, locking, and garbage collection. More... | |
| struct | node |
Public Types | |
| typedef Key | key_type |
| typedef T | mapped_type |
| typedef std::pair< const Key, T > | value_type |
| typedef hash_map_base::size_type | size_type |
| typedef ptrdiff_t | difference_type |
| typedef value_type * | pointer |
| typedef const value_type * | const_pointer |
| typedef value_type & | reference |
| typedef const value_type & | const_reference |
| typedef internal::hash_map_iterator< concurrent_hash_map, value_type > | iterator |
| typedef internal::hash_map_iterator< concurrent_hash_map, const value_type > | const_iterator |
| typedef internal::hash_map_range< iterator > | range_type |
| typedef internal::hash_map_range< const_iterator > | const_range_type |
| typedef Allocator | allocator_type |
Public Member Functions | |
| concurrent_hash_map (const allocator_type &a=allocator_type()) | |
| Construct empty table. More... | |
| concurrent_hash_map (const HashCompare &compare, const allocator_type &a=allocator_type()) | |
| concurrent_hash_map (size_type n, const allocator_type &a=allocator_type()) | |
| Construct empty table with n preallocated buckets. This number serves also as initial concurrency level. More... | |
| concurrent_hash_map (size_type n, const HashCompare &compare, const allocator_type &a=allocator_type()) | |
| concurrent_hash_map (const concurrent_hash_map &table, const allocator_type &a=allocator_type()) | |
| Copy constructor. More... | |
| concurrent_hash_map (concurrent_hash_map &&table) | |
| Move constructor. More... | |
| concurrent_hash_map (concurrent_hash_map &&table, const allocator_type &a) | |
| Move constructor. More... | |
| template<typename I > | |
| concurrent_hash_map (I first, I last, const allocator_type &a=allocator_type()) | |
| Construction with copying iteration range and given allocator instance. More... | |
| template<typename I > | |
| concurrent_hash_map (I first, I last, const HashCompare &compare, const allocator_type &a=allocator_type()) | |
| concurrent_hash_map (std::initializer_list< value_type > il, const allocator_type &a=allocator_type()) | |
| Construct empty table with n preallocated buckets. This number serves also as initial concurrency level. More... | |
| concurrent_hash_map (std::initializer_list< value_type > il, const HashCompare &compare, const allocator_type &a=allocator_type()) | |
| concurrent_hash_map & | operator= (const concurrent_hash_map &table) |
| Assignment. More... | |
| concurrent_hash_map & | operator= (concurrent_hash_map &&table) |
| Move Assignment. More... | |
| concurrent_hash_map & | operator= (std::initializer_list< value_type > il) |
| Assignment. More... | |
| void | rehash (size_type n=0) |
| Rehashes and optionally resizes the whole table. More... | |
| void | clear () |
| Clear table. More... | |
| ~concurrent_hash_map () | |
| Clear table and destroy it. More... | |
| range_type | range (size_type grainsize=1) |
| const_range_type | range (size_type grainsize=1) const |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| std::pair< iterator, iterator > | equal_range (const Key &key) |
| std::pair< const_iterator, const_iterator > | equal_range (const Key &key) const |
| size_type | size () const |
| Number of items in table. More... | |
| bool | empty () const |
| True if size()==0. More... | |
| size_type | max_size () const |
| Upper bound on size. More... | |
| size_type | bucket_count () const |
| Returns the current number of buckets. More... | |
| allocator_type | get_allocator () const |
| return allocator object More... | |
| void | swap (concurrent_hash_map &table) |
| swap two instances. Iterators are invalidated More... | |
| size_type | count (const Key &key) const |
| Return count of items (0 or 1) More... | |
| bool | find (const_accessor &result, const Key &key) const |
| Find item and acquire a read lock on the item. More... | |
| bool | find (accessor &result, const Key &key) |
| Find item and acquire a write lock on the item. More... | |
| bool | insert (const_accessor &result, const Key &key) |
| Insert item (if not already present) and acquire a read lock on the item. More... | |
| bool | insert (accessor &result, const Key &key) |
| Insert item (if not already present) and acquire a write lock on the item. More... | |
| bool | insert (const_accessor &result, const value_type &value) |
| Insert item by copying if there is no such key present already and acquire a read lock on the item. More... | |
| bool | insert (accessor &result, const value_type &value) |
| Insert item by copying if there is no such key present already and acquire a write lock on the item. More... | |
| bool | insert (const value_type &value) |
| Insert item by copying if there is no such key present already. More... | |
| bool | insert (const_accessor &result, value_type &&value) |
| Insert item by copying if there is no such key present already and acquire a read lock on the item. More... | |
| bool | insert (accessor &result, value_type &&value) |
| Insert item by copying if there is no such key present already and acquire a write lock on the item. More... | |
| bool | insert (value_type &&value) |
| Insert item by copying if there is no such key present already. More... | |
| template<typename... Args> | |
| bool | emplace (const_accessor &result, Args &&... args) |
| Insert item by copying if there is no such key present already and acquire a read lock on the item. More... | |
| template<typename... Args> | |
| bool | emplace (accessor &result, Args &&... args) |
| Insert item by copying if there is no such key present already and acquire a write lock on the item. More... | |
| template<typename... Args> | |
| bool | emplace (Args &&... args) |
| Insert item by copying if there is no such key present already. More... | |
| template<typename I > | |
| void | insert (I first, I last) |
| Insert range [first, last) More... | |
| void | insert (std::initializer_list< value_type > il) |
| Insert initializer list. More... | |
| bool | erase (const Key &key) |
| Erase item. More... | |
| bool | erase (const_accessor &item_accessor) |
| Erase item by const_accessor. More... | |
| bool | erase (accessor &item_accessor) |
| Erase item by accessor. More... | |
Protected Types | |
| typedef Allocator::template rebind< node >::other | node_allocator_type |
Protected Types inherited from tbb::interface5::internal::hash_map_base | |
| typedef size_t | size_type |
| Size type. More... | |
| typedef size_t | hashcode_t |
| Type of a hash code. More... | |
| typedef size_t | segment_index_t |
| Segment index type. More... | |
| typedef hash_map_node_base | node_base |
| Node base type. More... | |
| typedef bucket * | segment_ptr_t |
| Segment pointer. More... | |
| typedef segment_ptr_t | segments_table_t[pointers_per_table] |
| Segment pointers table type. More... | |
Protected Member Functions | |
| void | delete_node (node_base *n) |
| node * | search_bucket (const key_type &key, bucket *b) const |
| void | rehash_bucket (bucket *b_new, const hashcode_t h) |
| bool | lookup (bool op_insert, const Key &key, const T *t, const_accessor *result, bool write, node *(*allocate_node)(node_allocator_type &, const Key &, const T *), node *tmp_n=0) |
| Insert or find item and optionally acquire a lock on the item. More... | |
| template<typename Accessor > | |
| bool | generic_move_insert (Accessor &&result, value_type &&value) |
| template<typename Accessor , typename... Args> | |
| bool | generic_emplace (Accessor &&result, Args &&... args) |
| bool | exclude (const_accessor &item_accessor) |
| delete item by accessor More... | |
| template<typename I > | |
| std::pair< I, I > | internal_equal_range (const Key &key, I end) const |
| Returns an iterator for an item defined by the key, or for the next item after it (if upper==true) More... | |
| void | internal_copy (const concurrent_hash_map &source) |
| Copy "source" to *this, where *this must start out empty. More... | |
| template<typename I > | |
| void | internal_copy (I first, I last, size_type reserve_size) |
| const_pointer | internal_fast_find (const Key &key) const |
| Fast find when no concurrent erasure is used. For internal use inside TBB only! More... | |
Protected Member Functions inherited from tbb::interface5::internal::hash_map_base | |
| hash_map_base () | |
| Constructor. More... | |
| void | enable_segment (segment_index_t k, bool is_initial=false) |
| Enable segment. More... | |
| bucket * | get_bucket (hashcode_t h) const throw () |
| Get bucket by (masked) hashcode. More... | |
| void | mark_rehashed_levels (hashcode_t h) throw () |
| bool | check_mask_race (const hashcode_t h, hashcode_t &m) const |
| Check for mask race. More... | |
| bool | check_rehashing_collision (const hashcode_t h, hashcode_t m_old, hashcode_t m) const |
| Process mask race, check for rehashing collision. More... | |
| segment_index_t | insert_new_node (bucket *b, node_base *n, hashcode_t mask) |
| Insert a node and check for load factor. More... | |
| void | reserve (size_type buckets) |
| Prepare enough segments for number of buckets. More... | |
| void | internal_swap (hash_map_base &table) |
| Swap hash_map_bases. More... | |
Protected Attributes | |
| node_allocator_type | my_allocator |
| HashCompare | my_hash_compare |
Protected Attributes inherited from tbb::interface5::internal::hash_map_base | |
| atomic< hashcode_t > | my_mask |
| Hash mask = sum of allocated segment sizes - 1. More... | |
| segments_table_t | my_table |
| Segment pointers table. Also prevents false sharing between my_mask and my_size. More... | |
| atomic< size_type > | my_size |
| Size of container in stored items. More... | |
| bucket | my_embedded_segment [embedded_buckets] |
| Zero segment. More... | |
Friends | |
| template<typename Container , typename Value > | |
| class | internal::hash_map_iterator |
| template<typename I > | |
| class | internal::hash_map_range |
| class | const_accessor |
| const_accessor * | accessor_location (accessor_not_used const &) |
| const_accessor * | accessor_location (const_accessor &a) |
| bool | is_write_access_needed (accessor const &) |
| bool | is_write_access_needed (const_accessor const &) |
| bool | is_write_access_needed (accessor_not_used const &) |
Additional Inherited Members | |
Static Protected Attributes inherited from tbb::interface5::internal::hash_map_base | |
| static size_type const | embedded_block = 1 |
| Count of segments in the first block. More... | |
| static size_type const | embedded_buckets = 1<<embedded_block |
| Count of segments in the first block. More... | |
| static size_type const | first_block = 8 |
| Count of segments in the first block. More... | |
| static size_type const | pointers_per_table = sizeof(segment_index_t) * 8 |
| Size of a pointer / table size. More... | |
Unordered map from Key to T.
concurrent_hash_map is associative container with concurrent access.
Definition at line 52 of file concurrent_hash_map.h.
| typedef Allocator tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::allocator_type |
Definition at line 552 of file concurrent_hash_map.h.
| typedef internal::hash_map_iterator<concurrent_hash_map,const value_type> tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_iterator |
Definition at line 549 of file concurrent_hash_map.h.
| typedef const value_type* tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_pointer |
Definition at line 545 of file concurrent_hash_map.h.
| typedef internal::hash_map_range<const_iterator> tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_range_type |
Definition at line 551 of file concurrent_hash_map.h.
| typedef const value_type& tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_reference |
Definition at line 547 of file concurrent_hash_map.h.
| typedef ptrdiff_t tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::difference_type |
Definition at line 543 of file concurrent_hash_map.h.
| typedef internal::hash_map_iterator<concurrent_hash_map,value_type> tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::iterator |
Definition at line 548 of file concurrent_hash_map.h.
| typedef Key tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::key_type |
Definition at line 539 of file concurrent_hash_map.h.
| typedef T tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::mapped_type |
Definition at line 540 of file concurrent_hash_map.h.
|
protected |
Definition at line 556 of file concurrent_hash_map.h.
| typedef value_type* tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::pointer |
Definition at line 544 of file concurrent_hash_map.h.
| typedef internal::hash_map_range<iterator> tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::range_type |
Definition at line 550 of file concurrent_hash_map.h.
| typedef value_type& tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::reference |
Definition at line 546 of file concurrent_hash_map.h.
| typedef hash_map_base::size_type tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::size_type |
Definition at line 542 of file concurrent_hash_map.h.
| typedef std::pair<const Key,T> tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::value_type |
Definition at line 541 of file concurrent_hash_map.h.
|
inlineexplicit |
Construct empty table.
Definition at line 758 of file concurrent_hash_map.h.
|
inlineexplicit |
Definition at line 762 of file concurrent_hash_map.h.
|
inline |
Construct empty table with n preallocated buckets. This number serves also as initial concurrency level.
Definition at line 767 of file concurrent_hash_map.h.
References tbb::interface5::internal::hash_map_base::reserve().
|
inline |
Definition at line 773 of file concurrent_hash_map.h.
References tbb::interface5::internal::hash_map_base::reserve().
|
inline |
Copy constructor.
Definition at line 780 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::call_clear_on_leave::dismiss(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::internal_copy().
|
inline |
Move constructor.
Definition at line 790 of file concurrent_hash_map.h.
|
inline |
Move constructor.
Definition at line 797 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::begin(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::call_clear_on_leave::dismiss(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::end(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::get_allocator(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::internal_copy(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::size(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::swap().
|
inline |
Construction with copying iteration range and given allocator instance.
Definition at line 812 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::call_clear_on_leave::dismiss(), tbb::internal::first(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::internal_copy(), and tbb::internal::last().
|
inline |
Definition at line 821 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::call_clear_on_leave::dismiss(), tbb::internal::first(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::internal_copy(), and tbb::internal::last().
|
inline |
Construct empty table with n preallocated buckets. This number serves also as initial concurrency level.
Definition at line 831 of file concurrent_hash_map.h.
|
inline |
Definition at line 839 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::call_clear_on_leave::dismiss(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::internal_copy().
|
inline |
Clear table and destroy it.
Definition at line 896 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::clear().
|
inlinestaticprotected |
Definition at line 594 of file concurrent_hash_map.h.
References key.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::insert().
|
inlinestaticprotected |
Definition at line 610 of file concurrent_hash_map.h.
References key.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::insert().
|
inlinestaticprotected |
Definition at line 604 of file concurrent_hash_map.h.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::generic_emplace().
|
inlinestaticprotected |
Definition at line 599 of file concurrent_hash_map.h.
References key, and tbb::move().
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::generic_move_insert().
|
inline |
Definition at line 911 of file concurrent_hash_map.h.
References tbb::interface5::internal::hash_map_base::my_embedded_segment, and tbb::interface5::internal::hash_map_base::bucket::node_list.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::concurrent_hash_map(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::internal_copy(), and tbb::operator==().
|
inline |
Definition at line 913 of file concurrent_hash_map.h.
References tbb::interface5::internal::hash_map_base::my_embedded_segment, and tbb::interface5::internal::hash_map_base::bucket::node_list.
|
inline |
Returns the current number of buckets.
Definition at line 928 of file concurrent_hash_map.h.
References tbb::interface5::internal::hash_map_base::my_mask.
| void tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::clear | ( | ) |
Clear table.
Definition at line 1384 of file concurrent_hash_map.h.
References __TBB_ASSERT, __TBB_USE_OPTIONAL_RTTI, tbb::cache_aligned_allocator< T >::deallocate(), tbb::interface5::internal::empty_rehashed, h, int, tbb::interface5::internal::hash_map_base::bucket::mutex, tbb::interface5::internal::hash_map_node_base::next, tbb::interface5::internal::hash_map_base::bucket::node_list, tbb::interface5::internal::rehash_req, tbb::internal::runtime_warning(), and s.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::operator=(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::call_clear_on_leave::~call_clear_on_leave(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::~concurrent_hash_map().
|
inline |
Return count of items (0 or 1)
Definition at line 941 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::do_not_allocate_node(), and key.
|
inlineprotected |
Definition at line 589 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::my_allocator.
|
inlinestaticprotected |
Definition at line 614 of file concurrent_hash_map.h.
References __TBB_ASSERT.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::count(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::find(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::generic_emplace().
|
inline |
Insert item by copying if there is no such key present already and acquire a read lock on the item.
Returns true if item is new.
Definition at line 1016 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::generic_emplace().
|
inline |
Insert item by copying if there is no such key present already and acquire a write lock on the item.
Returns true if item is new.
Definition at line 1023 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::generic_emplace().
|
inline |
Insert item by copying if there is no such key present already.
Returns true if item is inserted.
Definition at line 1030 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::generic_emplace().
|
inline |
True if size()==0.
Definition at line 922 of file concurrent_hash_map.h.
References tbb::interface5::internal::hash_map_base::my_size.
|
inline |
Definition at line 912 of file concurrent_hash_map.h.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::concurrent_hash_map(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::equal_range(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::internal_copy(), and tbb::operator==().
|
inline |
Definition at line 914 of file concurrent_hash_map.h.
|
inline |
Definition at line 915 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::end(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::internal_equal_range(), and key.
Referenced by tbb::operator==().
|
inline |
Definition at line 916 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::end(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::internal_equal_range(), and key.
| bool tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::erase | ( | const Key & | key | ) |
Erase item.
Return true if item was erased by particularly this call.
Definition at line 1267 of file concurrent_hash_map.h.
References h, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor::is_writer(), tbb::internal::itt_load_word_with_acquire(), key, tbb::interface5::internal::hash_map_node_base::mutex, tbb::interface5::internal::hash_map_node_base::next, and p.
|
inline |
Erase item by const_accessor.
Return true if item was erased by particularly this call.
Definition at line 1056 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::exclude().
|
inline |
Erase item by accessor.
Return true if item was erased by particularly this call.
Definition at line 1062 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::exclude().
|
protected |
delete item by accessor
Definition at line 1237 of file concurrent_hash_map.h.
References __TBB_ASSERT, h, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::is_writer(), tbb::internal::itt_load_word_with_acquire(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::my_hash, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::my_node, tbb::interface5::internal::hash_map_node_base::next, p, and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::release().
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::erase().
|
inline |
Find item and acquire a read lock on the item.
Return true if item is found, false otherwise.
Definition at line 947 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::do_not_allocate_node(), key, and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::release().
|
inline |
Find item and acquire a write lock on the item.
Return true if item is found, false otherwise.
Definition at line 954 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::do_not_allocate_node(), key, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::lookup(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::release().
|
inlineprotected |
Definition at line 1087 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor_location, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::allocate_node_emplace_construct(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::do_not_allocate_node(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::is_write_access_needed, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node::item, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::lookup(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::my_allocator.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::emplace().
|
inlineprotected |
Definition at line 1080 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::accessor_location, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::allocate_node_move_construct(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::is_write_access_needed, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::lookup(), and value.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::insert().
|
inline |
return allocator object
Definition at line 931 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::my_allocator.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::concurrent_hash_map().
|
inline |
Insert item (if not already present) and acquire a read lock on the item.
Returns true if item is new.
Definition at line 961 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::allocate_node_default_construct(), key, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::lookup(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::release().
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::insert().
|
inline |
Insert item (if not already present) and acquire a write lock on the item.
Returns true if item is new.
Definition at line 968 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::allocate_node_default_construct(), key, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::lookup(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::release().
|
inline |
Insert item by copying if there is no such key present already and acquire a read lock on the item.
Returns true if item is new.
Definition at line 975 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::allocate_node_copy_construct(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::lookup(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::release(), and value.
|
inline |
Insert item by copying if there is no such key present already and acquire a write lock on the item.
Returns true if item is new.
Definition at line 982 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::allocate_node_copy_construct(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::lookup(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::release(), and value.
|
inline |
Insert item by copying if there is no such key present already.
Returns true if item is inserted.
Definition at line 989 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::allocate_node_copy_construct(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::lookup(), and value.
|
inline |
Insert item by copying if there is no such key present already and acquire a read lock on the item.
Returns true if item is new.
Definition at line 996 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::generic_move_insert(), tbb::move(), and value.
|
inline |
Insert item by copying if there is no such key present already and acquire a write lock on the item.
Returns true if item is new.
Definition at line 1002 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::generic_move_insert(), tbb::move(), and value.
|
inline |
Insert item by copying if there is no such key present already.
Returns true if item is inserted.
Definition at line 1008 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::generic_move_insert(), tbb::move(), and value.
|
inline |
Insert range [first, last)
Definition at line 1038 of file concurrent_hash_map.h.
References tbb::internal::first(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::insert(), and tbb::internal::last().
|
inline |
Insert initializer list.
Definition at line 1045 of file concurrent_hash_map.h.
|
protected |
Copy "source" to *this, where *this must start out empty.
Definition at line 1461 of file concurrent_hash_map.h.
References __TBB_ASSERT, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::begin(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::end(), tbb::interface5::internal::hash_map_base::get_bucket(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node::item, mask, tbb::interface5::internal::hash_map_base::my_mask, tbb::interface5::internal::hash_map_base::my_size, tbb::interface5::internal::hash_map_base::bucket::node_list, and tbb::interface5::internal::rehash_req.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::concurrent_hash_map(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::operator=().
|
protected |
Definition at line 1486 of file concurrent_hash_map.h.
References __TBB_ASSERT, tbb::internal::first(), h, tbb::internal::last(), tbb::interface5::internal::hash_map_base::bucket::node_list, and tbb::interface5::internal::rehash_req.
|
protected |
Returns an iterator for an item defined by the key, or for the next item after it (if upper==true)
Definition at line 1219 of file concurrent_hash_map.h.
References __TBB_ASSERT, __TBB_Log2(), h, key, tbb::interface5::internal::hash_map_base::bucket::node_list, and tbb::interface5::internal::rehash_req.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::equal_range().
|
inlineprotected |
Fast find when no concurrent erasure is used. For internal use inside TBB only!
Return pointer to item with given key, or NULL if no such item exists. Must not be called concurrently with erasure operations.
Definition at line 1111 of file concurrent_hash_map.h.
References __TBB_ASSERT, tbb::interface5::internal::hash_map_base::check_mask_race(), tbb::interface5::internal::hash_map_base::get_bucket(), h, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node::item, tbb::internal::itt_load_word_with_acquire(), key, lock, tbb::interface5::internal::hash_map_base::bucket::mutex, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::my_hash_compare, tbb::interface5::internal::hash_map_base::my_mask, tbb::interface5::internal::hash_map_base::bucket::node_list, tbb::interface5::internal::rehash_req, and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::search_bucket().
|
protected |
Insert or find item and optionally acquire a lock on the item.
Definition at line 1139 of file concurrent_hash_map.h.
References __TBB_ASSERT, __TBB_Yield, h, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor::is_writer(), tbb::internal::itt_load_word_with_acquire(), key, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::my_hash, and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::my_node.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::find(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::generic_emplace(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::generic_move_insert(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::insert().
|
inline |
Upper bound on size.
Definition at line 925 of file concurrent_hash_map.h.
|
inline |
Assignment.
Definition at line 850 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::clear(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::internal_copy().
|
inline |
Move Assignment.
Definition at line 860 of file concurrent_hash_map.h.
|
inline |
Assignment.
Definition at line 879 of file concurrent_hash_map.h.
|
inline |
Definition at line 901 of file concurrent_hash_map.h.
|
inline |
Definition at line 904 of file concurrent_hash_map.h.
| void tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::rehash | ( | size_type | n = 0 | ) |
Rehashes and optionally resizes the whole table.
Useful to optimize performance before or after concurrent operations. Also enables using of find() and count() concurrent methods in serial context.
Definition at line 1313 of file concurrent_hash_map.h.
References __TBB_ASSERT, __TBB_Log2(), __TBB_USE_OPTIONAL_RTTI, tbb::interface5::internal::empty_rehashed, h, int, mask, tbb::interface5::internal::hash_map_base::bucket::mutex, tbb::interface5::internal::hash_map_node_base::next, tbb::interface5::internal::hash_map_base::bucket::node_list, p, tbb::interface5::internal::rehash_req, and tbb::internal::runtime_warning().
|
inlineprotected |
Definition at line 651 of file concurrent_hash_map.h.
References __TBB_ASSERT, tbb::internal::__TBB_load_with_acquire(), __TBB_Log2(), tbb::internal::__TBB_store_with_release(), tbb::interface5::internal::hash_map_base::add_to_bucket(), tbb::interface5::internal::empty_rehashed, h, tbb::interface5::internal::hash_map_base::is_valid(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor::is_writer(), mask, tbb::interface5::internal::hash_map_base::bucket::mutex, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::my_hash_compare, tbb::interface5::internal::hash_map_base::bucket::node_list, and p.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor::acquire().
|
inlineprotected |
Definition at line 619 of file concurrent_hash_map.h.
References __TBB_ASSERT, tbb::interface5::internal::hash_map_base::is_valid(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node::item, key, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::my_hash_compare, tbb::interface5::internal::hash_map_base::bucket::node_list, and tbb::interface5::internal::rehash_req.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::internal_fast_find().
|
inline |
Number of items in table.
Definition at line 919 of file concurrent_hash_map.h.
References tbb::interface5::internal::hash_map_base::my_size.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::concurrent_hash_map(), and tbb::operator==().
| void tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::swap | ( | concurrent_hash_map< Key, T, HashCompare, Allocator > & | table | ) |
swap two instances. Iterators are invalidated
Definition at line 1304 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::my_allocator, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::my_hash_compare, and tbb::swap().
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::concurrent_hash_map(), and tbb::swap().
|
friend |
|
friend |
Definition at line 1072 of file concurrent_hash_map.h.
|
friend |
Definition at line 555 of file concurrent_hash_map.h.
|
friend |
Definition at line 533 of file concurrent_hash_map.h.
|
friend |
Definition at line 536 of file concurrent_hash_map.h.
|
friend |
|
friend |
Definition at line 1075 of file concurrent_hash_map.h.
|
friend |
Definition at line 1076 of file concurrent_hash_map.h.
|
protected |
Definition at line 558 of file concurrent_hash_map.h.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::delete_node(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::generic_emplace(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::get_allocator(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::swap().
|
protected |
Definition at line 559 of file concurrent_hash_map.h.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::internal_fast_find(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::rehash_bucket(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::search_bucket(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::swap().