Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::interface5::internal::concurrent_unordered_base< Traits > Class Template Reference

#include <_concurrent_unordered_impl.h>

Inheritance diagram for tbb::interface5::internal::concurrent_unordered_base< Traits >:
Collaboration diagram for tbb::interface5::internal::concurrent_unordered_base< Traits >:

Classes

struct  call_internal_clear_on_exit
 
class  const_range_type
 
class  range_type
 

Public Member Functions

allocator_type get_allocator () const
 
bool empty () const
 
size_type size () const
 
size_type max_size () const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
range_type range ()
 
const_range_type range () const
 
std::pair< iterator, bool > insert (const value_type &value)
 
iterator insert (const_iterator, const value_type &value)
 
std::pair< iterator, bool > insert (value_type &&value)
 
iterator insert (const_iterator, value_type &&value)
 
template<typename... Args>
std::pair< iterator, bool > emplace (Args &&... args)
 
template<typename... Args>
iterator emplace_hint (const_iterator, Args &&... args)
 
template<class Iterator >
void insert (Iterator first, Iterator last)
 
void insert (std::initializer_list< value_type > il)
 Insert initializer list. More...
 
iterator unsafe_erase (const_iterator where)
 
iterator unsafe_erase (const_iterator first, const_iterator last)
 
size_type unsafe_erase (const key_type &key)
 
void swap (concurrent_unordered_base &right)
 
hasher hash_function () const
 
key_equal key_eq () const
 
void clear ()
 
iterator find (const key_type &key)
 
const_iterator find (const key_type &key) const
 
size_type count (const key_type &key) const
 
std::pair< iterator, iteratorequal_range (const key_type &key)
 
std::pair< const_iterator, const_iteratorequal_range (const key_type &key) const
 
size_type unsafe_bucket_count () const
 
size_type unsafe_max_bucket_count () const
 
size_type unsafe_bucket_size (size_type bucket)
 
size_type unsafe_bucket (const key_type &key) const
 
local_iterator unsafe_begin (size_type bucket)
 
const_local_iterator unsafe_begin (size_type bucket) const
 
local_iterator unsafe_end (size_type bucket)
 
const_local_iterator unsafe_end (size_type bucket) const
 
const_local_iterator unsafe_cbegin (size_type bucket) const
 
const_local_iterator unsafe_cend (size_type bucket) const
 
float load_factor () const
 
float max_load_factor () const
 
void max_load_factor (float newmax)
 
void rehash (size_type buckets)
 

Protected Types

typedef concurrent_unordered_base< Traits > self_type
 
typedef Traits::value_type value_type
 
typedef Traits::key_type key_type
 
typedef Traits::hash_compare hash_compare
 
typedef Traits::allocator_type allocator_type
 
typedef hash_compare::hasher hasher
 
typedef hash_compare::key_equal key_equal
 
typedef allocator_type::pointer pointer
 
typedef allocator_type::const_pointer const_pointer
 
typedef allocator_type::reference reference
 
typedef allocator_type::const_reference const_reference
 
typedef allocator_type::size_type size_type
 
typedef allocator_type::difference_type difference_type
 
typedef split_ordered_list< value_type, typename Traits::allocator_type > solist_t
 
typedef solist_t::nodeptr_t nodeptr_t
 
typedef solist_t::raw_iterator raw_iterator
 
typedef solist_t::raw_const_iterator raw_const_iterator
 
typedef solist_t::iterator iterator
 
typedef solist_t::const_iterator const_iterator
 
typedef iterator local_iterator
 
typedef const_iterator const_local_iterator
 

Protected Member Functions

 concurrent_unordered_base (size_type n_of_buckets=initial_bucket_number, const hash_compare &hc=hash_compare(), const allocator_type &a=allocator_type())
 
 concurrent_unordered_base (const concurrent_unordered_base &right, const allocator_type &a)
 
 concurrent_unordered_base (const concurrent_unordered_base &right)
 
 concurrent_unordered_base (concurrent_unordered_base &&right)
 
 concurrent_unordered_base (concurrent_unordered_base &&right, const allocator_type &a)
 
concurrent_unordered_baseoperator= (const concurrent_unordered_base &right)
 
concurrent_unordered_baseoperator= (concurrent_unordered_base &&other)
 
concurrent_unordered_baseoperator= (std::initializer_list< value_type > il)
 assignment operator from initializer_list More...
 
 ~concurrent_unordered_base ()
 

Static Protected Attributes

static const size_type initial_bucket_number = 8
 

Private Types

typedef std::pair< iterator, iteratorpairii_t
 
typedef std::pair< const_iterator, const_iteratorpaircc_t
 

Private Member Functions

void internal_init ()
 
void internal_clear ()
 
void internal_copy (const self_type &right)
 
void internal_swap_buckets (concurrent_unordered_base &right)
 
template<typename AllowCreate , typename ValueType >
std::pair< iterator, bool > internal_insert (__TBB_FORWARDING_REF(ValueType) value, nodeptr_t pnode=NULL)
 
iterator internal_find (const key_type &key)
 
iterator internal_erase (const_iterator it)
 
pairii_t internal_equal_range (const key_type &key)
 
void init_bucket (size_type bucket)
 
void adjust_table_size (size_type total_elements, size_type current_size)
 
size_type get_parent (size_type bucket) const
 
raw_iterator get_bucket (size_type bucket) const
 
raw_iterator prepare_bucket (sokey_t hash_key)
 
void set_bucket (size_type bucket, raw_iterator dummy_head)
 
bool is_initialized (size_type bucket) const
 
sokey_t split_order_key_regular (sokey_t order_key) const
 
sokey_t split_order_key_dummy (sokey_t order_key) const
 

Static Private Member Functions

static size_type internal_distance (const_iterator first, const_iterator last)
 
static size_type segment_index_of (size_type index)
 
static size_type segment_base (size_type k)
 
static size_type segment_size (size_type k)
 

Private Attributes

atomic< size_typemy_number_of_buckets
 
solist_t my_solist
 
allocator_type::template rebind< raw_iterator >::other my_allocator
 
float my_maximum_bucket_size
 
atomic< raw_iterator * > my_buckets [pointers_per_table]
 

Static Private Attributes

static size_type const pointers_per_table = sizeof(size_type) * 8
 
static const size_type initial_bucket_load = 4
 

Detailed Description

template<typename Traits>
class tbb::interface5::internal::concurrent_unordered_base< Traits >

Definition at line 57 of file _concurrent_unordered_impl.h.

Member Typedef Documentation

◆ allocator_type

template<typename Traits>
typedef Traits::allocator_type tbb::interface5::internal::concurrent_unordered_base< Traits >::allocator_type
protected

Definition at line 661 of file _concurrent_unordered_impl.h.

◆ const_iterator

Definition at line 676 of file _concurrent_unordered_impl.h.

◆ const_local_iterator

template<typename Traits>
typedef const_iterator tbb::interface5::internal::concurrent_unordered_base< Traits >::const_local_iterator
protected

Definition at line 678 of file _concurrent_unordered_impl.h.

◆ const_pointer

template<typename Traits>
typedef allocator_type::const_pointer tbb::interface5::internal::concurrent_unordered_base< Traits >::const_pointer
protected

Definition at line 665 of file _concurrent_unordered_impl.h.

◆ const_reference

template<typename Traits>
typedef allocator_type::const_reference tbb::interface5::internal::concurrent_unordered_base< Traits >::const_reference
protected

Definition at line 667 of file _concurrent_unordered_impl.h.

◆ difference_type

template<typename Traits>
typedef allocator_type::difference_type tbb::interface5::internal::concurrent_unordered_base< Traits >::difference_type
protected

Definition at line 669 of file _concurrent_unordered_impl.h.

◆ hash_compare

template<typename Traits>
typedef Traits::hash_compare tbb::interface5::internal::concurrent_unordered_base< Traits >::hash_compare
protected

Definition at line 660 of file _concurrent_unordered_impl.h.

◆ hasher

template<typename Traits>
typedef hash_compare::hasher tbb::interface5::internal::concurrent_unordered_base< Traits >::hasher
protected

Definition at line 662 of file _concurrent_unordered_impl.h.

◆ iterator

template<typename Traits>
typedef solist_t::iterator tbb::interface5::internal::concurrent_unordered_base< Traits >::iterator
protected

Definition at line 675 of file _concurrent_unordered_impl.h.

◆ key_equal

template<typename Traits>
typedef hash_compare::key_equal tbb::interface5::internal::concurrent_unordered_base< Traits >::key_equal
protected

Definition at line 663 of file _concurrent_unordered_impl.h.

◆ key_type

template<typename Traits>
typedef Traits::key_type tbb::interface5::internal::concurrent_unordered_base< Traits >::key_type
protected

Definition at line 659 of file _concurrent_unordered_impl.h.

◆ local_iterator

template<typename Traits>
typedef iterator tbb::interface5::internal::concurrent_unordered_base< Traits >::local_iterator
protected

Definition at line 677 of file _concurrent_unordered_impl.h.

◆ nodeptr_t

template<typename Traits>
typedef solist_t::nodeptr_t tbb::interface5::internal::concurrent_unordered_base< Traits >::nodeptr_t
protected

Definition at line 671 of file _concurrent_unordered_impl.h.

◆ paircc_t

template<typename Traits>
typedef std::pair<const_iterator, const_iterator> tbb::interface5::internal::concurrent_unordered_base< Traits >::paircc_t
private

Definition at line 686 of file _concurrent_unordered_impl.h.

◆ pairii_t

template<typename Traits>
typedef std::pair<iterator, iterator> tbb::interface5::internal::concurrent_unordered_base< Traits >::pairii_t
private

Definition at line 685 of file _concurrent_unordered_impl.h.

◆ pointer

template<typename Traits>
typedef allocator_type::pointer tbb::interface5::internal::concurrent_unordered_base< Traits >::pointer
protected

Definition at line 664 of file _concurrent_unordered_impl.h.

◆ raw_const_iterator

Definition at line 674 of file _concurrent_unordered_impl.h.

◆ raw_iterator

template<typename Traits>
typedef solist_t::raw_iterator tbb::interface5::internal::concurrent_unordered_base< Traits >::raw_iterator
protected

Definition at line 673 of file _concurrent_unordered_impl.h.

◆ reference

template<typename Traits>
typedef allocator_type::reference tbb::interface5::internal::concurrent_unordered_base< Traits >::reference
protected

Definition at line 666 of file _concurrent_unordered_impl.h.

◆ self_type

template<typename Traits>
typedef concurrent_unordered_base<Traits> tbb::interface5::internal::concurrent_unordered_base< Traits >::self_type
protected

Definition at line 657 of file _concurrent_unordered_impl.h.

◆ size_type

template<typename Traits>
typedef allocator_type::size_type tbb::interface5::internal::concurrent_unordered_base< Traits >::size_type
protected

Definition at line 668 of file _concurrent_unordered_impl.h.

◆ solist_t

template<typename Traits>
typedef split_ordered_list<value_type, typename Traits::allocator_type> tbb::interface5::internal::concurrent_unordered_base< Traits >::solist_t
protected

Definition at line 670 of file _concurrent_unordered_impl.h.

◆ value_type

template<typename Traits>
typedef Traits::value_type tbb::interface5::internal::concurrent_unordered_base< Traits >::value_type
protected

Definition at line 658 of file _concurrent_unordered_impl.h.

Constructor & Destructor Documentation

◆ concurrent_unordered_base() [1/5]

template<typename Traits>
tbb::interface5::internal::concurrent_unordered_base< Traits >::concurrent_unordered_base ( size_type  n_of_buckets = initial_bucket_number,
const hash_compare hc = hash_compare(),
const allocator_type a = allocator_type() 
)
inlineprotected

Definition at line 703 of file _concurrent_unordered_impl.h.

705  : Traits(hc), my_solist(a),
707  {
708  if( n_of_buckets == 0) ++n_of_buckets;
709  my_number_of_buckets = size_type(1)<<__TBB_Log2((uintptr_t)n_of_buckets*2-1); // round up to power of 2
710  internal_init();
711  }
intptr_t __TBB_Log2(uintptr_t x)
Definition: tbb_machine.h:864
allocator_type::template rebind< raw_iterator >::other my_allocator

◆ concurrent_unordered_base() [2/5]

template<typename Traits>
tbb::interface5::internal::concurrent_unordered_base< Traits >::concurrent_unordered_base ( const concurrent_unordered_base< Traits > &  right,
const allocator_type a 
)
inlineprotected

Definition at line 713 of file _concurrent_unordered_impl.h.

◆ concurrent_unordered_base() [3/5]

template<typename Traits>
tbb::interface5::internal::concurrent_unordered_base< Traits >::concurrent_unordered_base ( const concurrent_unordered_base< Traits > &  right)
inlineprotected

Definition at line 720 of file _concurrent_unordered_impl.h.

721  : Traits(right.my_hash_compare), my_solist(right.get_allocator()), my_allocator(right.get_allocator())
722  {
723  //FIXME:exception safety seems to be broken here
724  internal_init();
725  internal_copy(right);
726  }
allocator_type::template rebind< raw_iterator >::other my_allocator

◆ concurrent_unordered_base() [4/5]

template<typename Traits>
tbb::interface5::internal::concurrent_unordered_base< Traits >::concurrent_unordered_base ( concurrent_unordered_base< Traits > &&  right)
inlineprotected

Definition at line 729 of file _concurrent_unordered_impl.h.

◆ concurrent_unordered_base() [5/5]

template<typename Traits>
tbb::interface5::internal::concurrent_unordered_base< Traits >::concurrent_unordered_base ( concurrent_unordered_base< Traits > &&  right,
const allocator_type a 
)
inlineprotected

Definition at line 738 of file _concurrent_unordered_impl.h.

739  : Traits(right.my_hash_compare), my_solist(a), my_allocator(a)
740  {
741  call_internal_clear_on_exit clear_buckets_on_exception(this);
742 
743  internal_init();
744  if (a == right.get_allocator()){
747  this->swap(right);
748  }else{
749  my_maximum_bucket_size = right.my_maximum_bucket_size;
750  my_number_of_buckets = right.my_number_of_buckets;
751  my_solist.my_element_count = right.my_solist.my_element_count;
752 
753  if (! right.my_solist.empty()){
754  nodeptr_t previous_node = my_solist.my_head;
755 
756  // Move all elements one by one, including dummy ones
757  for (raw_const_iterator it = ++(right.my_solist.raw_begin()), last = right.my_solist.raw_end(); it != last; ++it)
758  {
759  const nodeptr_t pnode = it.get_node_ptr();
760  nodeptr_t node;
761  if (pnode->is_dummy()) {
762  node = my_solist.create_node(pnode->get_order_key());
763  size_type bucket = __TBB_ReverseBits(pnode->get_order_key()) % my_number_of_buckets;
764  set_bucket(bucket, node);
765  }else{
766  node = my_solist.create_node(pnode->get_order_key(), std::move(pnode->my_element));
767  }
768 
769  previous_node = my_solist.try_insert_atomic(previous_node, node, NULL);
770  __TBB_ASSERT(previous_node != NULL, "Insertion of node failed. Concurrent inserts in constructor ?");
771  }
773  }
774  }
775 
776  clear_buckets_on_exception.dismiss();
777  }
allocator_type::template rebind< raw_iterator >::other my_allocator
void check_range(raw_iterator first, raw_iterator last)
auto last(Container &c) -> decltype(begin(c))
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
void move(tbb_thread &t1, tbb_thread &t2)
Definition: tbb_thread.h:309
static nodeptr_t try_insert_atomic(nodeptr_t previous, nodeptr_t new_node, nodeptr_t current_node)
void set_bucket(size_type bucket, raw_iterator dummy_head)
T __TBB_ReverseBits(T src)
Definition: tbb_machine.h:971

◆ ~concurrent_unordered_base()

template<typename Traits>
tbb::interface5::internal::concurrent_unordered_base< Traits >::~concurrent_unordered_base ( )
inlineprotected

Definition at line 822 of file _concurrent_unordered_impl.h.

822  {
823  // Delete all node segments
824  internal_clear();
825  }

Member Function Documentation

◆ adjust_table_size()

template<typename Traits>
void tbb::interface5::internal::concurrent_unordered_base< Traits >::adjust_table_size ( size_type  total_elements,
size_type  current_size 
)
inlineprivate

Definition at line 1416 of file _concurrent_unordered_impl.h.

1417  {
1418  // Grow the table by a factor of 2 if possible and needed
1419  if ( ((float) total_elements / (float) current_size) > my_maximum_bucket_size )
1420  {
1421  // Double the size of the hash only if size has not changed in between loads
1422  my_number_of_buckets.compare_and_swap(2u*current_size, current_size);
1423  //Simple "my_number_of_buckets.compare_and_swap( current_size<<1, current_size );" does not work for VC8
1424  //due to overzealous compiler warnings in /Wp64 mode
1425  }
1426  }
value_type compare_and_swap(value_type value, value_type comparand)
Definition: atomic.h:289

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_insert().

Here is the caller graph for this function:

◆ begin() [1/2]

◆ begin() [2/2]

◆ cbegin()

template<typename Traits>
const_iterator tbb::interface5::internal::concurrent_unordered_base< Traits >::cbegin ( ) const
inline

◆ cend()

template<typename Traits>
const_iterator tbb::interface5::internal::concurrent_unordered_base< Traits >::cend ( ) const
inline

◆ clear()

template<typename Traits>
void tbb::interface5::internal::concurrent_unordered_base< Traits >::clear ( )
inline

Definition at line 1050 of file _concurrent_unordered_impl.h.

1050  {
1051  // Clear list
1052  my_solist.clear();
1053 
1054  // Clear buckets
1055  internal_clear();
1056 
1057  // Initialize bucket 0
1058  __TBB_ASSERT(my_buckets[0] == NULL, NULL);
1059  raw_iterator dummy_node = my_solist.raw_begin();
1060  set_bucket(0, dummy_node);
1061  }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
void set_bucket(size_type bucket, raw_iterator dummy_head)
atomic< raw_iterator * > my_buckets[pointers_per_table]

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_copy().

Here is the caller graph for this function:

◆ count()

template<typename Traits>
size_type tbb::interface5::internal::concurrent_unordered_base< Traits >::count ( const key_type key) const
inline

Definition at line 1072 of file _concurrent_unordered_impl.h.

1072  {
1073  if(allow_multimapping) {
1074  paircc_t answer = equal_range(key);
1075  size_type item_count = internal_distance(answer.first, answer.second);
1076  return item_count;
1077  } else {
1078  return const_cast<self_type*>(this)->internal_find(key) == end()?0:1;
1079  }
1080  }
std::pair< iterator, iterator > equal_range(const key_type &key)
std::pair< const_iterator, const_iterator > paircc_t
static size_type internal_distance(const_iterator first, const_iterator last)
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle * key

◆ emplace()

template<typename Traits>
template<typename... Args>
std::pair<iterator, bool> tbb::interface5::internal::concurrent_unordered_base< Traits >::emplace ( Args &&...  args)
inline

Definition at line 983 of file _concurrent_unordered_impl.h.

983  {
984  nodeptr_t pnode = my_solist.create_node_v(tbb::internal::forward<Args>(args)...);
985  const sokey_t hashed_element_key = (sokey_t) my_hash_compare(get_key(pnode->my_element));
986  const sokey_t order_key = split_order_key_regular(hashed_element_key);
987  pnode->init(order_key);
988 
989  return internal_insert</*AllowCreate=*/tbb::internal::false_type>(pnode->my_element, pnode);
990  }
nodeptr_t create_node_v(__TBB_FORWARDING_REF(Args) __TBB_PARAMETER_PACK args)
std::pair< iterator, bool > internal_insert(__TBB_FORWARDING_REF(ValueType) value, nodeptr_t pnode=NULL)

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::emplace_hint().

Here is the caller graph for this function:

◆ emplace_hint()

template<typename Traits>
template<typename... Args>
iterator tbb::interface5::internal::concurrent_unordered_base< Traits >::emplace_hint ( const_iterator  ,
Args &&...  args 
)
inline

Definition at line 993 of file _concurrent_unordered_impl.h.

993  {
994  // Ignore hint
995  return emplace(tbb::internal::forward<Args>(args)...).first;
996  }
std::pair< iterator, bool > emplace(Args &&... args)

◆ empty()

template<typename Traits>
bool tbb::interface5::internal::concurrent_unordered_base< Traits >::empty ( ) const
inline

◆ end() [1/2]

template<typename Traits>
iterator tbb::interface5::internal::concurrent_unordered_base< Traits >::end ( )
inline

Definition at line 854 of file _concurrent_unordered_impl.h.

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::count(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_copy(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_equal_range(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_erase(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_find(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::unsafe_begin(), and tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::unsafe_end().

Here is the caller graph for this function:

◆ end() [2/2]

◆ equal_range() [1/2]

template<typename Traits>
std::pair<iterator, iterator> tbb::interface5::internal::concurrent_unordered_base< Traits >::equal_range ( const key_type key)
inline

Definition at line 1082 of file _concurrent_unordered_impl.h.

1082  {
1083  return internal_equal_range(key);
1084  }
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle * key

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::count(), and tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::unsafe_erase().

Here is the caller graph for this function:

◆ equal_range() [2/2]

template<typename Traits>
std::pair<const_iterator, const_iterator> tbb::interface5::internal::concurrent_unordered_base< Traits >::equal_range ( const key_type key) const
inline

Definition at line 1086 of file _concurrent_unordered_impl.h.

1086  {
1087  return const_cast<self_type*>(this)->internal_equal_range(key);
1088  }
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle * key

◆ find() [1/2]

template<typename Traits>
iterator tbb::interface5::internal::concurrent_unordered_base< Traits >::find ( const key_type key)
inline

Definition at line 1064 of file _concurrent_unordered_impl.h.

1064  {
1065  return internal_find(key);
1066  }
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle * key

◆ find() [2/2]

template<typename Traits>
const_iterator tbb::interface5::internal::concurrent_unordered_base< Traits >::find ( const key_type key) const
inline

Definition at line 1068 of file _concurrent_unordered_impl.h.

1068  {
1069  return const_cast<self_type*>(this)->internal_find(key);
1070  }
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle * key

◆ get_allocator()

template<typename Traits>
allocator_type tbb::interface5::internal::concurrent_unordered_base< Traits >::get_allocator ( ) const
inline

◆ get_bucket()

template<typename Traits>
raw_iterator tbb::interface5::internal::concurrent_unordered_base< Traits >::get_bucket ( size_type  bucket) const
inlineprivate

Definition at line 1452 of file _concurrent_unordered_impl.h.

1452  {
1453  size_type segment = segment_index_of(bucket);
1454  bucket -= segment_base(segment);
1455  __TBB_ASSERT( my_buckets[segment], "bucket must be in an allocated segment" );
1456  return my_buckets[segment][bucket];
1457  }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
atomic< raw_iterator * > my_buckets[pointers_per_table]

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::init_bucket(), tbb::interface5::internal::concurrent_unordered_base< Traits >::const_range_type::set_midpoint(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::unsafe_begin(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::unsafe_bucket_size(), and tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::unsafe_end().

Here is the caller graph for this function:

◆ get_parent()

template<typename Traits>
size_type tbb::interface5::internal::concurrent_unordered_base< Traits >::get_parent ( size_type  bucket) const
inlineprivate

Definition at line 1428 of file _concurrent_unordered_impl.h.

1429  {
1430  // Unsets bucket's most significant turned-on bit
1431  size_type msb = __TBB_Log2((uintptr_t)bucket);
1432  return bucket & ~(size_type(1) << msb);
1433  }
intptr_t __TBB_Log2(uintptr_t x)
Definition: tbb_machine.h:864

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::init_bucket(), and tbb::interface5::internal::concurrent_unordered_base< Traits >::const_range_type::set_midpoint().

Here is the caller graph for this function:

◆ hash_function()

template<typename Traits>
hasher tbb::interface5::internal::concurrent_unordered_base< Traits >::hash_function ( ) const
inline

Definition at line 1042 of file _concurrent_unordered_impl.h.

1042  {
1043  return my_hash_compare.my_hash_object;
1044  }

◆ init_bucket()

template<typename Traits>
void tbb::interface5::internal::concurrent_unordered_base< Traits >::init_bucket ( size_type  bucket)
inlineprivate

Definition at line 1398 of file _concurrent_unordered_impl.h.

1399  {
1400  // Bucket 0 has no parent.
1401  __TBB_ASSERT( bucket != 0, "The first bucket must always be initialized");
1402 
1403  size_type parent_bucket = get_parent(bucket);
1404 
1405  // All parent_bucket buckets have to be initialized before this bucket is
1406  if (!is_initialized(parent_bucket))
1407  init_bucket(parent_bucket);
1408 
1409  raw_iterator parent = get_bucket(parent_bucket);
1410 
1411  // Create a dummy first node in this bucket
1413  set_bucket(bucket, dummy_node);
1414  }
raw_iterator insert_dummy(raw_iterator it, sokey_t order_key)
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id parent
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
void set_bucket(size_type bucket, raw_iterator dummy_head)

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::init_bucket(), and tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::prepare_bucket().

Here is the caller graph for this function:

◆ insert() [1/6]

template<typename Traits>
std::pair<iterator, bool> tbb::interface5::internal::concurrent_unordered_base< Traits >::insert ( const value_type value)
inline

Definition at line 962 of file _concurrent_unordered_impl.h.

962  {
963  return internal_insert</*AllowCreate=*/tbb::internal::true_type>(value);
964  }
std::pair< iterator, bool > internal_insert(__TBB_FORWARDING_REF(ValueType) value, nodeptr_t pnode=NULL)
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::insert(), and tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_copy().

Here is the caller graph for this function:

◆ insert() [2/6]

template<typename Traits>
iterator tbb::interface5::internal::concurrent_unordered_base< Traits >::insert ( const_iterator  ,
const value_type value 
)
inline

Definition at line 966 of file _concurrent_unordered_impl.h.

966  {
967  // Ignore hint
968  return insert(value).first;
969  }
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value
std::pair< iterator, bool > insert(const value_type &value)

◆ insert() [3/6]

template<typename Traits>
std::pair<iterator, bool> tbb::interface5::internal::concurrent_unordered_base< Traits >::insert ( value_type &&  value)
inline

Definition at line 972 of file _concurrent_unordered_impl.h.

972  {
973  return internal_insert</*AllowCreate=*/tbb::internal::true_type>(std::move(value));
974  }
std::pair< iterator, bool > internal_insert(__TBB_FORWARDING_REF(ValueType) value, nodeptr_t pnode=NULL)
void move(tbb_thread &t1, tbb_thread &t2)
Definition: tbb_thread.h:309
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value

◆ insert() [4/6]

template<typename Traits>
iterator tbb::interface5::internal::concurrent_unordered_base< Traits >::insert ( const_iterator  ,
value_type &&  value 
)
inline

Definition at line 976 of file _concurrent_unordered_impl.h.

976  {
977  // Ignore hint
978  return insert(std::move(value)).first;
979  }
void move(tbb_thread &t1, tbb_thread &t2)
Definition: tbb_thread.h:309
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value
std::pair< iterator, bool > insert(const value_type &value)

◆ insert() [5/6]

template<typename Traits>
template<class Iterator >
void tbb::interface5::internal::concurrent_unordered_base< Traits >::insert ( Iterator  first,
Iterator  last 
)
inline

Definition at line 1002 of file _concurrent_unordered_impl.h.

1002  {
1003  for (Iterator it = first; it != last; ++it)
1004  insert(*it);
1005  }
auto last(Container &c) -> decltype(begin(c))
auto first(Container &c) -> decltype(begin(c))
std::pair< iterator, bool > insert(const value_type &value)

◆ insert() [6/6]

template<typename Traits>
void tbb::interface5::internal::concurrent_unordered_base< Traits >::insert ( std::initializer_list< value_type il)
inline

Insert initializer list.

Definition at line 1009 of file _concurrent_unordered_impl.h.

1009  {
1010  insert(il.begin(), il.end());
1011  }
std::pair< iterator, bool > insert(const value_type &value)

◆ internal_clear()

template<typename Traits>
void tbb::interface5::internal::concurrent_unordered_base< Traits >::internal_clear ( )
inlineprivate

Definition at line 1214 of file _concurrent_unordered_impl.h.

1214  {
1215  for (size_type index = 0; index < pointers_per_table; ++index) {
1216  if (my_buckets[index] != NULL) {
1217  size_type sz = segment_size(index);
1218  for (size_type index2 = 0; index2 < sz; ++index2)
1219  my_allocator.destroy(&my_buckets[index][index2]);
1220  my_allocator.deallocate(my_buckets[index], sz);
1221  my_buckets[index] = 0;
1222  }
1223  }
1224  }
allocator_type::template rebind< raw_iterator >::other my_allocator
atomic< raw_iterator * > my_buckets[pointers_per_table]

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::clear(), tbb::interface5::internal::concurrent_unordered_base< Traits >::call_internal_clear_on_exit::~call_internal_clear_on_exit(), and tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::~concurrent_unordered_base().

Here is the caller graph for this function:

◆ internal_copy()

template<typename Traits>
void tbb::interface5::internal::concurrent_unordered_base< Traits >::internal_copy ( const self_type right)
inlineprivate

Definition at line 1226 of file _concurrent_unordered_impl.h.

1226  {
1227  clear();
1228 
1229  my_maximum_bucket_size = right.my_maximum_bucket_size;
1230  my_number_of_buckets = right.my_number_of_buckets;
1231 
1232  __TBB_TRY {
1233  insert(right.begin(), right.end());
1234  my_hash_compare = right.my_hash_compare;
1235  } __TBB_CATCH(...) {
1236  my_solist.clear();
1237  __TBB_RETHROW();
1238  }
1239  }
#define __TBB_CATCH(e)
Definition: tbb_stddef.h:288
#define __TBB_TRY
Definition: tbb_stddef.h:287
#define __TBB_RETHROW()
Definition: tbb_stddef.h:290
std::pair< iterator, bool > insert(const value_type &value)

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::concurrent_unordered_base(), and tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::operator=().

Here is the caller graph for this function:

◆ internal_distance()

template<typename Traits>
static size_type tbb::interface5::internal::concurrent_unordered_base< Traits >::internal_distance ( const_iterator  first,
const_iterator  last 
)
inlinestaticprivate

◆ internal_equal_range()

template<typename Traits>
pairii_t tbb::interface5::internal::concurrent_unordered_base< Traits >::internal_equal_range ( const key_type key)
inlineprivate

Definition at line 1371 of file _concurrent_unordered_impl.h.

1372  {
1373  sokey_t hash_key = (sokey_t) my_hash_compare(key);
1374  sokey_t order_key = split_order_key_regular(hash_key);
1375  raw_iterator end_it = my_solist.raw_end();
1376 
1377  for (raw_iterator it = prepare_bucket(hash_key); it != end_it; ++it)
1378  {
1379  if (solist_t::get_order_key(it) > order_key)
1380  {
1381  // There is no element with the given key
1382  return pairii_t(end(), end());
1383  }
1384  else if (solist_t::get_order_key(it) == order_key &&
1385  !my_hash_compare(get_key(*it), key)) // TODO: fix negation; also below
1386  {
1388  iterator last = first;
1389  do ++last; while( allow_multimapping && last != end() && !my_hash_compare(get_key(*last), key) );
1390  return pairii_t(first, last);
1391  }
1392  }
1393 
1394  return pairii_t(end(), end());
1395  }
auto last(Container &c) -> decltype(begin(c))
auto first(Container &c) -> decltype(begin(c))
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle * key

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::equal_range().

Here is the caller graph for this function:

◆ internal_erase()

template<typename Traits>
iterator tbb::interface5::internal::concurrent_unordered_base< Traits >::internal_erase ( const_iterator  it)
inlineprivate

Definition at line 1352 of file _concurrent_unordered_impl.h.

1353  {
1354  sokey_t hash_key = (sokey_t) my_hash_compare(get_key(*it));
1355  raw_iterator previous = prepare_bucket(hash_key);
1357  __TBB_ASSERT(previous != last, "Invalid head node");
1358 
1359  // First node is a dummy node
1360  for (raw_iterator where = previous; ; previous = where) {
1361  ++where;
1362  if (where == last)
1363  return end();
1364  else if (my_solist.get_iterator(where) == it)
1365  return my_solist.erase_node(previous, it);
1366  }
1367  }
auto last(Container &c) -> decltype(begin(c))
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
void erase_node(raw_iterator previous, raw_const_iterator &where)

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::unsafe_erase().

Here is the caller graph for this function:

◆ internal_find()

template<typename Traits>
iterator tbb::interface5::internal::concurrent_unordered_base< Traits >::internal_find ( const key_type key)
inlineprivate

Definition at line 1324 of file _concurrent_unordered_impl.h.

1325  {
1326  sokey_t hash_key = (sokey_t) my_hash_compare(key);
1327  sokey_t order_key = split_order_key_regular(hash_key);
1329 
1330  for (raw_iterator it = prepare_bucket(hash_key); it != last; ++it)
1331  {
1332  if (solist_t::get_order_key(it) > order_key)
1333  {
1334  // If the order key is smaller than the current order key, the element
1335  // is not in the hash.
1336  return end();
1337  }
1338  else if (solist_t::get_order_key(it) == order_key)
1339  {
1340  // The fact that order keys match does not mean that the element is found.
1341  // Key function comparison has to be performed to check whether this is the
1342  // right element. If not, keep searching while order key is the same.
1343  if (!my_hash_compare(get_key(*it), key)) // TODO: fix negation
1344  return my_solist.get_iterator(it);
1345  }
1346  }
1347 
1348  return end();
1349  }
auto last(Container &c) -> decltype(begin(c))
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle * key

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::find().

Here is the caller graph for this function:

◆ internal_init()

template<typename Traits>
void tbb::interface5::internal::concurrent_unordered_base< Traits >::internal_init ( )
inlineprivate

Definition at line 1205 of file _concurrent_unordered_impl.h.

1205  {
1206  // Initialize the array of segment pointers
1207  memset(my_buckets, 0, sizeof(my_buckets));
1208 
1209  // Initialize bucket 0
1210  raw_iterator dummy_node = my_solist.raw_begin();
1211  set_bucket(0, dummy_node);
1212  }
void set_bucket(size_type bucket, raw_iterator dummy_head)
atomic< raw_iterator * > my_buckets[pointers_per_table]

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::concurrent_unordered_base().

Here is the caller graph for this function:

◆ internal_insert()

template<typename Traits>
template<typename AllowCreate , typename ValueType >
std::pair<iterator, bool> tbb::interface5::internal::concurrent_unordered_base< Traits >::internal_insert ( __TBB_FORWARDING_REF(ValueType)  value,
nodeptr_t  pnode = NULL 
)
inlineprivate

Definition at line 1266 of file _concurrent_unordered_impl.h.

1267  {
1268  const key_type *pkey = &get_key(value);
1269  sokey_t hash_key = (sokey_t) my_hash_compare(*pkey);
1270  size_type new_count = 0;
1271  sokey_t order_key = split_order_key_regular(hash_key);
1272  raw_iterator previous = prepare_bucket(hash_key);
1274  __TBB_ASSERT(previous != last, "Invalid head node");
1275 
1276  // First node is a dummy node
1277  for (raw_iterator where = previous;;)
1278  {
1279  ++where;
1280  if (where == last || solist_t::get_order_key(where) > order_key ||
1281  // if multimapped, stop at the first item equal to us.
1282  (allow_multimapping && solist_t::get_order_key(where) == order_key &&
1283  !my_hash_compare(get_key(*where), *pkey))) // TODO: fix negation
1284  {
1285  if (!pnode) {
1286  pnode = my_solist.create_node(order_key, tbb::internal::forward<ValueType>(value), AllowCreate());
1287  // If the value was moved, the known reference to key might be invalid
1288  pkey = &get_key(pnode->my_element);
1289  }
1290 
1291  // Try to insert 'pnode' between 'previous' and 'where'
1292  std::pair<iterator, bool> result = my_solist.try_insert(previous, where, pnode, &new_count);
1293 
1294  if (result.second)
1295  {
1296  // Insertion succeeded, adjust the table size, if needed
1298  return result;
1299  }
1300  else
1301  {
1302  // Insertion failed: either the same node was inserted by another thread, or
1303  // another element was inserted at exactly the same place as this node.
1304  // Proceed with the search from the previous location where order key was
1305  // known to be larger (note: this is legal only because there is no safe
1306  // concurrent erase operation supported).
1307  where = previous;
1308  continue;
1309  }
1310  }
1311  else if (!allow_multimapping && solist_t::get_order_key(where) == order_key &&
1312  !my_hash_compare(get_key(*where), *pkey)) // TODO: fix negation
1313  { // Element already in the list, return it
1314  if (pnode)
1315  my_solist.destroy_node(pnode);
1316  return std::pair<iterator, bool>(my_solist.get_iterator(where), false);
1317  }
1318  // Move the iterator forward
1319  previous = where;
1320  }
1321  }
auto last(Container &c) -> decltype(begin(c))
std::pair< iterator, bool > try_insert(raw_iterator it, raw_iterator next, nodeptr_t pnode, size_type *new_count)
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
void adjust_table_size(size_type total_elements, size_type current_size)
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::emplace(), and tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::insert().

Here is the caller graph for this function:

◆ internal_swap_buckets()

template<typename Traits>
void tbb::interface5::internal::concurrent_unordered_base< Traits >::internal_swap_buckets ( concurrent_unordered_base< Traits > &  right)
inlineprivate

Definition at line 1241 of file _concurrent_unordered_impl.h.

1242  {
1243  // Swap all node segments
1244  for (size_type index = 0; index < pointers_per_table; ++index)
1245  {
1246  raw_iterator * iterator_pointer = my_buckets[index];
1247  my_buckets[index] = right.my_buckets[index];
1248  right.my_buckets[index] = iterator_pointer;
1249  }
1250  }
atomic< raw_iterator * > my_buckets[pointers_per_table]

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::swap().

Here is the caller graph for this function:

◆ is_initialized()

template<typename Traits>
bool tbb::interface5::internal::concurrent_unordered_base< Traits >::is_initialized ( size_type  bucket) const
inlineprivate

Definition at line 1484 of file _concurrent_unordered_impl.h.

1484  {
1485  size_type segment = segment_index_of(bucket);
1486  bucket -= segment_base(segment);
1487 
1488  if (my_buckets[segment] == NULL)
1489  return false;
1490 
1491  raw_iterator it = my_buckets[segment][bucket];
1492  return (it.get_node_ptr() != NULL);
1493  }
atomic< raw_iterator * > my_buckets[pointers_per_table]

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::init_bucket(), tbb::interface5::internal::concurrent_unordered_base< Traits >::const_range_type::set_midpoint(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::unsafe_begin(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::unsafe_bucket_size(), and tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::unsafe_end().

Here is the caller graph for this function:

◆ key_eq()

template<typename Traits>
key_equal tbb::interface5::internal::concurrent_unordered_base< Traits >::key_eq ( ) const
inline

Definition at line 1046 of file _concurrent_unordered_impl.h.

1046  {
1047  return my_hash_compare.my_key_compare_object;
1048  }

◆ load_factor()

template<typename Traits>
float tbb::interface5::internal::concurrent_unordered_base< Traits >::load_factor ( ) const
inline

Definition at line 1178 of file _concurrent_unordered_impl.h.

◆ max_load_factor() [1/2]

template<typename Traits>
float tbb::interface5::internal::concurrent_unordered_base< Traits >::max_load_factor ( ) const
inline

◆ max_load_factor() [2/2]

template<typename Traits>
void tbb::interface5::internal::concurrent_unordered_base< Traits >::max_load_factor ( float  newmax)
inline

Definition at line 1186 of file _concurrent_unordered_impl.h.

1186  {
1187  if (newmax != newmax || newmax < 0)
1189  my_maximum_bucket_size = newmax;
1190  }
void throw_exception(exception_id eid)
Versionless convenience wrapper for throw_exception_v4()

◆ max_size()

template<typename Traits>
size_type tbb::interface5::internal::concurrent_unordered_base< Traits >::max_size ( ) const
inline

◆ operator=() [1/3]

template<typename Traits>
concurrent_unordered_base& tbb::interface5::internal::concurrent_unordered_base< Traits >::operator= ( const concurrent_unordered_base< Traits > &  right)
inlineprotected

Definition at line 781 of file _concurrent_unordered_impl.h.

781  {
782  if (this != &right)
783  internal_copy(right);
784  return (*this);
785  }

◆ operator=() [2/3]

template<typename Traits>
concurrent_unordered_base& tbb::interface5::internal::concurrent_unordered_base< Traits >::operator= ( concurrent_unordered_base< Traits > &&  other)
inlineprotected

Definition at line 788 of file _concurrent_unordered_impl.h.

789  {
790  if(this != &other){
792  if(pocma_t::value || this->my_allocator == other.my_allocator) {
793  concurrent_unordered_base trash (std::move(*this));
794  swap(other);
795  if (pocma_t::value) {
796  using std::swap;
797  //TODO: swapping allocators here may be a problem, replace with single direction moving
798  swap(this->my_solist.my_node_allocator, other.my_solist.my_node_allocator);
799  swap(this->my_allocator, other.my_allocator);
800  }
801  } else {
802  concurrent_unordered_base moved_copy(std::move(other),this->my_allocator);
803  this->swap(moved_copy);
804  }
805  }
806  return *this;
807  }
concurrent_unordered_base(size_type n_of_buckets=initial_bucket_number, const hash_compare &hc=hash_compare(), const allocator_type &a=allocator_type())
allocator_type::template rebind< node >::other my_node_allocator
allocator_type::template rebind< raw_iterator >::other my_allocator
void move(tbb_thread &t1, tbb_thread &t2)
Definition: tbb_thread.h:309
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value
void swap(atomic< T > &lhs, atomic< T > &rhs)
Definition: atomic.h:539

◆ operator=() [3/3]

template<typename Traits>
concurrent_unordered_base& tbb::interface5::internal::concurrent_unordered_base< Traits >::operator= ( std::initializer_list< value_type il)
inlineprotected

assignment operator from initializer_list

Definition at line 813 of file _concurrent_unordered_impl.h.

814  {
815  this->clear();
816  this->insert(il.begin(),il.end());
817  return (*this);
818  }
std::pair< iterator, bool > insert(const value_type &value)

◆ prepare_bucket()

template<typename Traits>
raw_iterator tbb::interface5::internal::concurrent_unordered_base< Traits >::prepare_bucket ( sokey_t  hash_key)
inlineprivate

Definition at line 1459 of file _concurrent_unordered_impl.h.

1459  {
1460  size_type bucket = hash_key % my_number_of_buckets;
1461  size_type segment = segment_index_of(bucket);
1462  size_type index = bucket - segment_base(segment);
1463  if (my_buckets[segment] == NULL || my_buckets[segment][index].get_node_ptr() == NULL)
1464  init_bucket(bucket);
1465  return my_buckets[segment][index];
1466  }
atomic< raw_iterator * > my_buckets[pointers_per_table]

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_equal_range(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_erase(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_find(), and tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_insert().

Here is the caller graph for this function:

◆ range() [1/2]

template<typename Traits>
range_type tbb::interface5::internal::concurrent_unordered_base< Traits >::range ( )
inline

Definition at line 953 of file _concurrent_unordered_impl.h.

953  {
954  return range_type( *this );
955  }

◆ range() [2/2]

template<typename Traits>
const_range_type tbb::interface5::internal::concurrent_unordered_base< Traits >::range ( ) const
inline

Definition at line 957 of file _concurrent_unordered_impl.h.

957  {
958  return const_range_type( *this );
959  }

◆ rehash()

template<typename Traits>
void tbb::interface5::internal::concurrent_unordered_base< Traits >::rehash ( size_type  buckets)
inline

Definition at line 1195 of file _concurrent_unordered_impl.h.

1195  {
1196  size_type current_buckets = my_number_of_buckets;
1197  if (current_buckets >= buckets)
1198  return;
1199  my_number_of_buckets = size_type(1)<<__TBB_Log2((uintptr_t)buckets*2-1); // round up to power of 2
1200  }
intptr_t __TBB_Log2(uintptr_t x)
Definition: tbb_machine.h:864

◆ segment_base()

◆ segment_index_of()

◆ segment_size()

◆ set_bucket()

template<typename Traits>
void tbb::interface5::internal::concurrent_unordered_base< Traits >::set_bucket ( size_type  bucket,
raw_iterator  dummy_head 
)
inlineprivate

Definition at line 1468 of file _concurrent_unordered_impl.h.

1468  {
1469  size_type segment = segment_index_of(bucket);
1470  bucket -= segment_base(segment);
1471 
1472  if (my_buckets[segment] == NULL) {
1473  size_type sz = segment_size(segment);
1474  raw_iterator * new_segment = my_allocator.allocate(sz);
1475  std::memset(static_cast<void*>(new_segment), 0, sz*sizeof(raw_iterator));
1476 
1477  if (my_buckets[segment].compare_and_swap( new_segment, NULL) != NULL)
1478  my_allocator.deallocate(new_segment, sz);
1479  }
1480 
1481  my_buckets[segment][bucket] = dummy_head;
1482  }
allocator_type::template rebind< raw_iterator >::other my_allocator
atomic< raw_iterator * > my_buckets[pointers_per_table]

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::clear(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::concurrent_unordered_base(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::init_bucket(), and tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_init().

Here is the caller graph for this function:

◆ size()

◆ split_order_key_dummy()

template<typename Traits>
sokey_t tbb::interface5::internal::concurrent_unordered_base< Traits >::split_order_key_dummy ( sokey_t  order_key) const
inlineprivate

◆ split_order_key_regular()

◆ swap()

template<typename Traits>
void tbb::interface5::internal::concurrent_unordered_base< Traits >::swap ( concurrent_unordered_base< Traits > &  right)
inline

Definition at line 1031 of file _concurrent_unordered_impl.h.

1031  {
1032  if (this != &right) {
1033  std::swap(my_hash_compare, right.my_hash_compare); // TODO: check what ADL meant here
1034  my_solist.swap(right.my_solist);
1035  internal_swap_buckets(right);
1036  std::swap(my_number_of_buckets, right.my_number_of_buckets);
1037  std::swap(my_maximum_bucket_size, right.my_maximum_bucket_size);
1038  }
1039  }
void internal_swap_buckets(concurrent_unordered_base &right)
void swap(atomic< T > &lhs, atomic< T > &rhs)
Definition: atomic.h:539

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::concurrent_unordered_base(), and tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::operator=().

Here is the caller graph for this function:

◆ unsafe_begin() [1/2]

◆ unsafe_begin() [2/2]

◆ unsafe_bucket()

template<typename Traits>
size_type tbb::interface5::internal::concurrent_unordered_base< Traits >::unsafe_bucket ( const key_type key) const
inline

Definition at line 1110 of file _concurrent_unordered_impl.h.

1110  {
1111  sokey_t order_key = (sokey_t) my_hash_compare(key);
1112  size_type bucket = order_key % my_number_of_buckets;
1113  return bucket;
1114  }
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle * key

◆ unsafe_bucket_count()

◆ unsafe_bucket_size()

template<typename Traits>
size_type tbb::interface5::internal::concurrent_unordered_base< Traits >::unsafe_bucket_size ( size_type  bucket)
inline

Definition at line 1099 of file _concurrent_unordered_impl.h.

1099  {
1100  size_type item_count = 0;
1101  if (is_initialized(bucket)) {
1102  raw_iterator it = get_bucket(bucket);
1103  ++it;
1104  for (; it != my_solist.raw_end() && !it.get_node_ptr()->is_dummy(); ++it)
1105  ++item_count;
1106  }
1107  return item_count;
1108  }

◆ unsafe_cbegin()

template<typename Traits>
const_local_iterator tbb::interface5::internal::concurrent_unordered_base< Traits >::unsafe_cbegin ( size_type  bucket) const
inline

Definition at line 1169 of file _concurrent_unordered_impl.h.

1169  {
1170  return ((const self_type *) this)->unsafe_begin(bucket);
1171  }

◆ unsafe_cend()

template<typename Traits>
const_local_iterator tbb::interface5::internal::concurrent_unordered_base< Traits >::unsafe_cend ( size_type  bucket) const
inline

Definition at line 1173 of file _concurrent_unordered_impl.h.

1173  {
1174  return ((const self_type *) this)->unsafe_end(bucket);
1175  }

◆ unsafe_end() [1/2]

template<typename Traits>
local_iterator tbb::interface5::internal::concurrent_unordered_base< Traits >::unsafe_end ( size_type  bucket)
inline

Definition at line 1137 of file _concurrent_unordered_impl.h.

1138  {
1139  if (!is_initialized(bucket))
1140  return end();
1141 
1142  raw_iterator it = get_bucket(bucket);
1143 
1144  // Find the end of the bucket, denoted by the dummy element
1145  do ++it;
1146  while(it != my_solist.raw_end() && !it.get_node_ptr()->is_dummy());
1147 
1148  // Return the first real element past the end of the bucket
1149  return my_solist.first_real_iterator(it);
1150  }

◆ unsafe_end() [2/2]

template<typename Traits>
const_local_iterator tbb::interface5::internal::concurrent_unordered_base< Traits >::unsafe_end ( size_type  bucket) const
inline

Definition at line 1154 of file _concurrent_unordered_impl.h.

1155  {
1156  if (!is_initialized(bucket))
1157  return end();
1158 
1159  raw_const_iterator it = get_bucket(bucket);
1160 
1161  // Find the end of the bucket, denoted by the dummy element
1162  do ++it;
1163  while(it != my_solist.raw_end() && !it.get_node_ptr()->is_dummy());
1164 
1165  // Return the first real element past the end of the bucket
1166  return my_solist.first_real_iterator(it);
1167  }

◆ unsafe_erase() [1/3]

◆ unsafe_erase() [2/3]

template<typename Traits>
iterator tbb::interface5::internal::concurrent_unordered_base< Traits >::unsafe_erase ( const_iterator  first,
const_iterator  last 
)
inline

Definition at line 1018 of file _concurrent_unordered_impl.h.

1018  {
1019  while (first != last)
1020  unsafe_erase(first++);
1021  return my_solist.get_iterator(first);
1022  }
auto last(Container &c) -> decltype(begin(c))
auto first(Container &c) -> decltype(begin(c))

◆ unsafe_erase() [3/3]

template<typename Traits>
size_type tbb::interface5::internal::concurrent_unordered_base< Traits >::unsafe_erase ( const key_type key)
inline

Definition at line 1024 of file _concurrent_unordered_impl.h.

1024  {
1025  pairii_t where = equal_range(key);
1026  size_type item_count = internal_distance(where.first, where.second);
1027  unsafe_erase(where.first, where.second);
1028  return item_count;
1029  }
std::pair< iterator, iterator > equal_range(const key_type &key)
static size_type internal_distance(const_iterator first, const_iterator last)
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle * key

◆ unsafe_max_bucket_count()

template<typename Traits>
size_type tbb::interface5::internal::concurrent_unordered_base< Traits >::unsafe_max_bucket_count ( ) const
inline

Definition at line 1095 of file _concurrent_unordered_impl.h.

Member Data Documentation

◆ initial_bucket_load

◆ initial_bucket_number

◆ my_allocator

◆ my_buckets

template<typename Traits>
atomic<raw_iterator*> tbb::interface5::internal::concurrent_unordered_base< Traits >::my_buckets[pointers_per_table]
private

Definition at line 1512 of file _concurrent_unordered_impl.h.

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::clear(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::get_bucket(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_clear(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_init(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_swap_buckets(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::is_initialized(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::prepare_bucket(), and tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::set_bucket().

◆ my_maximum_bucket_size

◆ my_number_of_buckets

template<typename Traits>
atomic<size_type> tbb::interface5::internal::concurrent_unordered_base< Traits >::my_number_of_buckets
private

Definition at line 1508 of file _concurrent_unordered_impl.h.

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::adjust_table_size(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::concurrent_unordered_base(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_copy(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_insert(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::prepare_bucket(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::rehash(), tbb::interface5::internal::concurrent_unordered_base< Traits >::const_range_type::set_midpoint(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::swap(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::unsafe_bucket(), and tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::unsafe_bucket_count().

◆ my_solist

template<typename Traits>
solist_t tbb::interface5::internal::concurrent_unordered_base< Traits >::my_solist
private

Definition at line 1509 of file _concurrent_unordered_impl.h.

Referenced by tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::begin(), tbb::interface5::internal::concurrent_unordered_base< Traits >::const_range_type::begin(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::cbegin(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::cend(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::clear(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::concurrent_unordered_base(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::emplace(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::empty(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::end(), tbb::interface5::internal::concurrent_unordered_base< Traits >::const_range_type::end(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::get_allocator(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::init_bucket(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_copy(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_equal_range(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_erase(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_find(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_init(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::internal_insert(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::max_size(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::operator=(), tbb::interface5::internal::concurrent_unordered_base< Traits >::const_range_type::set_midpoint(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::size(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::swap(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::unsafe_begin(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::unsafe_bucket_size(), tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::unsafe_end(), and tbb::interface5::internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare< Key, Hasher, Key_equality >, Allocator, false > >::unsafe_erase().

◆ pointers_per_table


The documentation for this class was generated from the following file:

Copyright © 2005-2018 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.