|
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 tbb::internal::allocator_rebind< Allocator, node >::type | 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 54 of file concurrent_hash_map.h.
| typedef Allocator tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::allocator_type |
Definition at line 554 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 551 of file concurrent_hash_map.h.
| typedef const value_type* tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_pointer |
Definition at line 547 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 553 of file concurrent_hash_map.h.
| typedef const value_type& tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_reference |
Definition at line 549 of file concurrent_hash_map.h.
| typedef ptrdiff_t tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::difference_type |
Definition at line 545 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 550 of file concurrent_hash_map.h.
| typedef Key tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::key_type |
Definition at line 541 of file concurrent_hash_map.h.
| typedef T tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::mapped_type |
Definition at line 542 of file concurrent_hash_map.h.
|
protected |
Definition at line 558 of file concurrent_hash_map.h.
| typedef value_type* tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::pointer |
Definition at line 546 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 552 of file concurrent_hash_map.h.
| typedef value_type& tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::reference |
Definition at line 548 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 544 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 543 of file concurrent_hash_map.h.
|
inlineexplicit |
Construct empty table.
Definition at line 760 of file concurrent_hash_map.h.
|
inlineexplicit |
Definition at line 764 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 769 of file concurrent_hash_map.h.
|
inline |
Definition at line 775 of file concurrent_hash_map.h.
|
inline |
Copy constructor.
Definition at line 782 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::call_clear_on_leave::dismiss(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::get_allocator(), tbb::move(), and tbb::swap().
|
inline |
Move constructor.
Definition at line 792 of file concurrent_hash_map.h.
|
inline |
Move constructor.
Definition at line 799 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 >::size(), and tbb::swap().
|
inline |
Construction with copying iteration range and given allocator instance.
Definition at line 814 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::call_clear_on_leave::dismiss().
|
inline |
Definition at line 823 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::call_clear_on_leave::dismiss().
|
inline |
Construct empty table with n preallocated buckets. This number serves also as initial concurrency level.
Definition at line 833 of file concurrent_hash_map.h.
|
inline |
Definition at line 841 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::call_clear_on_leave::dismiss().
|
inline |
Clear table and destroy it.
Definition at line 898 of file concurrent_hash_map.h.
|
inlinestaticprotected |
Definition at line 596 of file concurrent_hash_map.h.
|
inlinestaticprotected |
Definition at line 612 of file concurrent_hash_map.h.
|
inlinestaticprotected |
Definition at line 606 of file concurrent_hash_map.h.
|
inlinestaticprotected |
Definition at line 601 of file concurrent_hash_map.h.
References tbb::move().
|
inline |
Definition at line 913 of file concurrent_hash_map.h.
References 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 915 of file concurrent_hash_map.h.
References tbb::interface5::internal::hash_map_base::bucket::node_list.
|
inline |
Returns the current number of buckets.
Definition at line 930 of file concurrent_hash_map.h.
| void tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::clear | ( | ) |
Clear table.
Definition at line 1413 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 >::call_clear_on_leave::~call_clear_on_leave().
|
inline |
Return count of items (0 or 1)
Definition at line 943 of file concurrent_hash_map.h.
|
inlineprotected |
Definition at line 591 of file concurrent_hash_map.h.
|
inlinestaticprotected |
Definition at line 616 of file concurrent_hash_map.h.
References __TBB_ASSERT.
|
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 1018 of file concurrent_hash_map.h.
|
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 1025 of file concurrent_hash_map.h.
|
inline |
Insert item by copying if there is no such key present already.
Returns true if item is inserted.
Definition at line 1032 of file concurrent_hash_map.h.
|
inline |
True if size()==0.
Definition at line 924 of file concurrent_hash_map.h.
|
inline |
Definition at line 914 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 >::internal_copy(), and tbb::operator==().
|
inline |
Definition at line 916 of file concurrent_hash_map.h.
|
inline |
Definition at line 917 of file concurrent_hash_map.h.
References end.
Referenced by tbb::operator==().
|
inline |
Definition at line 918 of file concurrent_hash_map.h.
References end.
| 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 1296 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(), 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 1058 of file concurrent_hash_map.h.
|
inline |
Erase item by accessor.
Return true if item was erased by particularly this call.
Definition at line 1064 of file concurrent_hash_map.h.
|
protected |
delete item by accessor
Definition at line 1266 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().
|
inline |
Find item and acquire a read lock on the item.
Return true if item is found, false otherwise.
Definition at line 949 of file concurrent_hash_map.h.
References 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 956 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::release().
|
inlineprotected |
Definition at line 1089 of file concurrent_hash_map.h.
References end, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node::item, and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::release().
|
inlineprotected |
Definition at line 1082 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::release(), and value.
|
inline |
return allocator object
Definition at line 933 of file concurrent_hash_map.h.
References tbb::swap().
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 963 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::release().
|
inline |
Insert item (if not already present) and acquire a write lock on the item.
Returns true if item is new.
Definition at line 970 of file concurrent_hash_map.h.
References 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 977 of file concurrent_hash_map.h.
References 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 write lock on the item.
Returns true if item is new.
Definition at line 984 of file concurrent_hash_map.h.
References 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.
Returns true if item is inserted.
Definition at line 991 of file concurrent_hash_map.h.
|
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 998 of file concurrent_hash_map.h.
References 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 1004 of file concurrent_hash_map.h.
References 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 1010 of file concurrent_hash_map.h.
References tbb::move(), and value.
|
inline |
Insert range [first, last)
Definition at line 1040 of file concurrent_hash_map.h.
References tbb::internal::first(), key, and tbb::internal::last().
|
inline |
Insert initializer list.
Definition at line 1047 of file concurrent_hash_map.h.
|
protected |
Copy "source" to *this, where *this must start out empty.
Definition at line 1490 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.
|
protected |
Definition at line 1515 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 1248 of file concurrent_hash_map.h.
References __TBB_ASSERT, __TBB_Log2(), h, tbb::interface5::internal::hash_map_base::bucket::node_list, and tbb::interface5::internal::rehash_req.
|
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 1113 of file concurrent_hash_map.h.
References __TBB_ASSERT, h, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node::item, tbb::internal::itt_load_word_with_acquire(), lock, tbb::interface5::internal::hash_map_base::bucket::mutex, tbb::interface5::internal::hash_map_base::bucket::node_list, and tbb::interface5::internal::rehash_req.
|
protected |
Insert or find item and optionally acquire a lock on the item.
Definition at line 1168 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(), 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.
|
inline |
Upper bound on size.
Definition at line 927 of file concurrent_hash_map.h.
|
inline |
Assignment.
Definition at line 852 of file concurrent_hash_map.h.
References tbb::move(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::my_allocator, tbb::swap(), and value.
|
inline |
Move Assignment.
Definition at line 862 of file concurrent_hash_map.h.
|
inline |
Assignment.
Definition at line 881 of file concurrent_hash_map.h.
|
inline |
Definition at line 903 of file concurrent_hash_map.h.
|
inline |
Definition at line 906 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 1342 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 653 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::empty_rehashed, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor::is_writer(), mask, tbb::interface5::internal::hash_map_base::bucket::mutex, 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 621 of file concurrent_hash_map.h.
References __TBB_ASSERT, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node::item, tbb::interface5::internal::hash_map_base::bucket::node_list, and tbb::interface5::internal::rehash_req.
|
inline |
Number of items in table.
Definition at line 921 of file concurrent_hash_map.h.
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 1333 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::swap().
|
friend |
Definition at line 1073 of file concurrent_hash_map.h.
|
friend |
Definition at line 1074 of file concurrent_hash_map.h.
|
friend |
Definition at line 557 of file concurrent_hash_map.h.
|
friend |
Definition at line 535 of file concurrent_hash_map.h.
|
friend |
Definition at line 538 of file concurrent_hash_map.h.
|
friend |
Definition at line 1076 of file concurrent_hash_map.h.
|
friend |
Definition at line 1077 of file concurrent_hash_map.h.
|
friend |
Definition at line 1078 of file concurrent_hash_map.h.
|
protected |
Definition at line 560 of file concurrent_hash_map.h.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::operator=(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::swap().
|
protected |
Definition at line 561 of file concurrent_hash_map.h.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::swap().