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... | |
class | node |
struct | node_scoped_guard |
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) | |
Copy constructor. More... | |
concurrent_hash_map (const concurrent_hash_map &table, const allocator_type &a) | |
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 |
typedef tbb::internal::allocator_traits< node_allocator_type > | node_allocator_traits |
![]() | |
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) |
void | internal_move_assign (concurrent_hash_map &&other, tbb::internal::traits_true_type) |
void | internal_move_assign (concurrent_hash_map &&other, tbb::internal::traits_false_type) |
const_pointer | internal_fast_find (const Key &key) const |
Fast find when no concurrent erasure is used. For internal use inside TBB only! More... | |
![]() | |
hash_map_base () | |
Constructor. More... | |
template<typename Allocator > | |
void | enable_segment (segment_index_t k, const Allocator &allocator, bool is_initial=false) |
Enable segment. More... | |
template<typename Allocator > | |
void | delete_segment (segment_index_t s, const Allocator &allocator) |
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... | |
template<typename Allocator > | |
void | reserve (size_type buckets, const Allocator &allocator) |
Prepare enough segments for number of buckets. More... | |
void | internal_swap (hash_map_base &table) |
Swap hash_map_bases. More... | |
void | internal_move (hash_map_base &&other) |
Static Protected Member Functions | |
template<typename... Args> | |
static node * | create_node (node_allocator_type &allocator, Args &&... args) |
static node * | allocate_node_copy_construct (node_allocator_type &allocator, const Key &key, const T *t) |
static node * | allocate_node_move_construct (node_allocator_type &allocator, const Key &key, const T *t) |
static node * | allocate_node_default_construct (node_allocator_type &allocator, const Key &key, const T *) |
static node * | do_not_allocate_node (node_allocator_type &, const Key &, const T *) |
![]() | |
static segment_index_t | segment_index_of (size_type index) |
static segment_index_t | segment_base (segment_index_t k) |
static size_type | segment_size (segment_index_t k) |
static bool | is_valid (void *ptr) |
static void | init_buckets (segment_ptr_t ptr, size_type sz, bool is_initial) |
Initialize buckets. More... | |
static void | add_to_bucket (bucket *b, node_base *n) |
Add node. More... | |
Protected Attributes | |
node_allocator_type | my_allocator |
HashCompare | my_hash_compare |
![]() | |
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 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 55 of file concurrent_hash_map.h.
typedef Allocator tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::allocator_type |
Definition at line 594 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 591 of file concurrent_hash_map.h.
typedef const value_type* tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_pointer |
Definition at line 587 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 593 of file concurrent_hash_map.h.
typedef const value_type& tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_reference |
Definition at line 589 of file concurrent_hash_map.h.
typedef ptrdiff_t tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::difference_type |
Definition at line 585 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 590 of file concurrent_hash_map.h.
typedef Key tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::key_type |
Definition at line 581 of file concurrent_hash_map.h.
typedef T tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::mapped_type |
Definition at line 582 of file concurrent_hash_map.h.
|
protected |
Definition at line 600 of file concurrent_hash_map.h.
|
protected |
Definition at line 598 of file concurrent_hash_map.h.
typedef value_type* tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::pointer |
Definition at line 586 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 592 of file concurrent_hash_map.h.
typedef value_type& tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::reference |
Definition at line 588 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 584 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 583 of file concurrent_hash_map.h.
|
inlineexplicit |
Construct empty table.
Definition at line 816 of file concurrent_hash_map.h.
|
inlineexplicit |
Definition at line 820 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 825 of file concurrent_hash_map.h.
|
inline |
Definition at line 831 of file concurrent_hash_map.h.
|
inline |
Copy constructor.
Definition at line 838 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 847 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::call_clear_on_leave::dismiss(), and tbb::move().
|
inline |
Move constructor.
Definition at line 857 of file concurrent_hash_map.h.
|
inline |
Move constructor.
Definition at line 864 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::call_clear_on_leave::dismiss(), and tbb::move().
|
inline |
Construction with copying iteration range and given allocator instance.
Definition at line 879 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 888 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 898 of file concurrent_hash_map.h.
|
inline |
Definition at line 906 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 957 of file concurrent_hash_map.h.
|
inlinestaticprotected |
Definition at line 651 of file concurrent_hash_map.h.
|
inlinestaticprotected |
Definition at line 661 of file concurrent_hash_map.h.
References tbb::move().
|
inlinestaticprotected |
Definition at line 656 of file concurrent_hash_map.h.
References tbb::move().
|
inline |
Definition at line 972 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 >::internal_copy(), and tbb::operator==().
|
inline |
Definition at line 974 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 989 of file concurrent_hash_map.h.
void tbb::interface5::concurrent_hash_map< Key, T, HashCompare, A >::clear | ( | ) |
Clear table.
Definition at line 1491 of file concurrent_hash_map.h.
References __TBB_ASSERT, __TBB_USE_OPTIONAL_RTTI, 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(), s, and value.
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 1002 of file concurrent_hash_map.h.
|
inlinestaticprotected |
Definition at line 633 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node_scoped_guard::dismiss(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node::storage().
|
inlineprotected |
Definition at line 611 of file concurrent_hash_map.h.
|
inlinestaticprotected |
Definition at line 672 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 1077 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 1084 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 1091 of file concurrent_hash_map.h.
|
inline |
True if size()==0.
Definition at line 983 of file concurrent_hash_map.h.
|
inline |
Definition at line 973 of file concurrent_hash_map.h.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::internal_copy(), and tbb::operator==().
|
inline |
Definition at line 975 of file concurrent_hash_map.h.
|
inline |
Definition at line 976 of file concurrent_hash_map.h.
References end.
Referenced by tbb::operator==().
|
inline |
Definition at line 977 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 1372 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 1117 of file concurrent_hash_map.h.
|
inline |
Erase item by accessor.
Return true if item was erased by particularly this call.
Definition at line 1123 of file concurrent_hash_map.h.
|
protected |
delete item by accessor
Definition at line 1342 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 1008 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 1015 of file concurrent_hash_map.h.
References tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::release().
|
inlineprotected |
Definition at line 1148 of file concurrent_hash_map.h.
References end, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::const_accessor::release(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node::value().
|
inlineprotected |
Definition at line 1141 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 992 of file concurrent_hash_map.h.
References tbb::swap().
|
inline |
Insert item (if not already present) and acquire a read lock on the item.
Returns true if item is new.
Definition at line 1022 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 1029 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 1036 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 1043 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 1050 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 1057 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 1063 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 1069 of file concurrent_hash_map.h.
References tbb::move(), and value.
|
inline |
Insert range [first, last)
Definition at line 1099 of file concurrent_hash_map.h.
References tbb::internal::first(), key, and tbb::internal::last().
|
inline |
Insert initializer list.
Definition at line 1106 of file concurrent_hash_map.h.
|
protected |
Copy "source" to *this, where *this must start out empty.
Definition at line 1563 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(), 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, tbb::interface5::internal::rehash_req, and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node::value().
|
protected |
Definition at line 1589 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 1324 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 1189 of file concurrent_hash_map.h.
References __TBB_ASSERT, h, 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.
|
inlineprotected |
Definition at line 1171 of file concurrent_hash_map.h.
References tbb::internal::allocator_move_assignment(), and tbb::move().
|
inlineprotected |
Definition at line 1176 of file concurrent_hash_map.h.
References tbb::move().
|
protected |
Insert or find item and optionally acquire a lock on the item.
Definition at line 1244 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 986 of file concurrent_hash_map.h.
|
inline |
Assignment.
Definition at line 917 of file concurrent_hash_map.h.
References tbb::internal::allocator_copy_assignment(), tbb::move(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::my_allocator.
|
inline |
Move Assignment.
Definition at line 929 of file concurrent_hash_map.h.
|
inline |
Assignment.
Definition at line 940 of file concurrent_hash_map.h.
|
inline |
Definition at line 962 of file concurrent_hash_map.h.
|
inline |
Definition at line 965 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 1420 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, tbb::internal::runtime_warning(), and value.
|
inlineprotected |
Definition at line 709 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::internal::first(), 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, p, and value.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor::acquire().
|
inlineprotected |
Definition at line 677 of file concurrent_hash_map.h.
References __TBB_ASSERT, tbb::interface5::internal::hash_map_base::bucket::node_list, tbb::interface5::internal::rehash_req, and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::node::value().
|
inline |
Number of items in table.
Definition at line 980 of file concurrent_hash_map.h.
Referenced by 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 1409 of file concurrent_hash_map.h.
References tbb::internal::allocator_swap(), tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::my_allocator, tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::my_hash_compare, tbb::swap(), and value.
Referenced by tbb::swap().
|
friend |
Definition at line 1132 of file concurrent_hash_map.h.
|
friend |
Definition at line 1133 of file concurrent_hash_map.h.
|
friend |
Definition at line 597 of file concurrent_hash_map.h.
|
friend |
Definition at line 575 of file concurrent_hash_map.h.
|
friend |
Definition at line 578 of file concurrent_hash_map.h.
|
friend |
Definition at line 1135 of file concurrent_hash_map.h.
|
friend |
Definition at line 1136 of file concurrent_hash_map.h.
|
friend |
Definition at line 1137 of file concurrent_hash_map.h.
|
protected |
Definition at line 601 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 602 of file concurrent_hash_map.h.
Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::swap().