Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::interface5::internal::hash_map_base Class Reference

base class of concurrent_hash_map More...

#include <concurrent_hash_map.h>

Inheritance diagram for tbb::interface5::internal::hash_map_base:
Collaboration diagram for tbb::interface5::internal::hash_map_base:

Classes

struct  bucket
 Bucket type. More...
 
struct  enable_segment_failsafe
 Exception safety helper. More...
 

Public Types

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 bucketsegment_ptr_t
 Segment pointer. More...
 
typedef segment_ptr_t segments_table_t[pointers_per_table]
 Segment pointers table type. More...
 

Public Member Functions

 hash_map_base ()
 Constructor. More...
 
void enable_segment (segment_index_t k, bool is_initial=false)
 Enable segment. More...
 
bucketget_bucket (hashcode_t h) const throw ()
 Get bucket by (masked) hashcode. More...
 
void mark_rehashed_levels (hashcode_t h) throw ()
 
bool check_mask_race (const hashcode_t h, hashcode_t &m) const
 Check for mask race. More...
 
bool check_rehashing_collision (const hashcode_t h, hashcode_t m_old, hashcode_t m) const
 Process mask race, check for rehashing collision. More...
 
segment_index_t insert_new_node (bucket *b, node_base *n, hashcode_t mask)
 Insert a node and check for load factor. More...
 
void reserve (size_type buckets)
 Prepare enough segments for number of buckets. More...
 
void internal_swap (hash_map_base &table)
 Swap hash_map_bases. More...
 

Static Public Member Functions

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...
 

Public Attributes

atomic< hashcode_tmy_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_typemy_size
 Size of container in stored items. More...
 
bucket my_embedded_segment [embedded_buckets]
 Zero segment. More...
 

Static Public Attributes

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...
 

Detailed Description

base class of concurrent_hash_map

Definition at line 78 of file concurrent_hash_map.h.

Member Typedef Documentation

◆ hashcode_t

Type of a hash code.

Definition at line 83 of file concurrent_hash_map.h.

◆ node_base

◆ segment_index_t

Segment index type.

Definition at line 85 of file concurrent_hash_map.h.

◆ segment_ptr_t

Segment pointer.

Definition at line 106 of file concurrent_hash_map.h.

◆ segments_table_t

typedef segment_ptr_t tbb::interface5::internal::hash_map_base::segments_table_t[pointers_per_table]

Segment pointers table type.

Definition at line 108 of file concurrent_hash_map.h.

◆ size_type

Size type.

Definition at line 81 of file concurrent_hash_map.h.

Constructor & Destructor Documentation

◆ hash_map_base()

tbb::interface5::internal::hash_map_base::hash_map_base ( )
inline

Constructor.

Definition at line 123 of file concurrent_hash_map.h.

123  {
124  std::memset( this, 0, pointers_per_table*sizeof(segment_ptr_t) // 32*4=128 or 64*8=512
125  + sizeof(my_size) + sizeof(my_mask) // 4+4 or 8+8
126  + embedded_buckets*sizeof(bucket) ); // n*8 or n*16
127  for( size_type i = 0; i < embedded_block; i++ ) // fill the table
130  __TBB_ASSERT( embedded_block <= first_block, "The first block number must include embedded blocks");
131 #if __TBB_STATISTICS
132  my_info_resizes = 0; // concurrent ones
133  my_info_restarts = 0; // race collisions
134  my_info_rehashes = 0; // invocations of rehash_bucket
135 #endif
136  }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
static size_type const first_block
Count of segments in the first block.
static size_type const pointers_per_table
Size of a pointer / table size.
atomic< size_type > my_size
Size of container in stored items.
bucket my_embedded_segment[embedded_buckets]
Zero segment.
atomic< hashcode_t > my_mask
Hash mask = sum of allocated segment sizes - 1.
segments_table_t my_table
Segment pointers table. Also prevents false sharing between my_mask and my_size.
static size_type const embedded_buckets
Count of segments in the first block.
static segment_index_t segment_base(segment_index_t k)
static size_type const embedded_block
Count of segments in the first block.

Member Function Documentation

◆ add_to_bucket()

static void tbb::interface5::internal::hash_map_base::add_to_bucket ( bucket b,
node_base n 
)
inlinestatic

Add node.

  • n to bucket
  • b

Definition at line 168 of file concurrent_hash_map.h.

References __TBB_ASSERT, tbb::interface5::internal::hash_map_node_base::next, and tbb::interface5::internal::hash_map_base::bucket::node_list.

168  {
169  __TBB_ASSERT(b->node_list != rehash_req, NULL);
170  n->next = b->node_list;
171  b->node_list = n; // its under lock and flag is set
172  }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
static hash_map_node_base *const rehash_req
Incompleteness flag value.

◆ check_mask_race()

bool tbb::interface5::internal::hash_map_base::check_mask_race ( const hashcode_t  h,
hashcode_t m 
) const
inline

Check for mask race.

Definition at line 230 of file concurrent_hash_map.h.

References tbb::internal::itt_load_word_with_acquire().

230  {
231  hashcode_t m_now, m_old = m;
233  if( m_old != m_now )
234  return check_rehashing_collision( h, m_old, m = m_now );
235  return false;
236  }
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 h
T itt_load_word_with_acquire(const tbb::atomic< T > &src)
atomic< hashcode_t > my_mask
Hash mask = sum of allocated segment sizes - 1.
bool check_rehashing_collision(const hashcode_t h, hashcode_t m_old, hashcode_t m) const
Process mask race, check for rehashing collision.
Here is the call graph for this function:

◆ check_rehashing_collision()

bool tbb::interface5::internal::hash_map_base::check_rehashing_collision ( const hashcode_t  h,
hashcode_t  m_old,
hashcode_t  m 
) const
inline

Process mask race, check for rehashing collision.

Definition at line 239 of file concurrent_hash_map.h.

References __TBB_ASSERT, and tbb::internal::itt_load_word_with_acquire().

239  {
240  __TBB_ASSERT(m_old != m, NULL); // TODO?: m arg could be optimized out by passing h = h&m
241  if( (h & m_old) != (h & m) ) { // mask changed for this hashcode, rare event
242  // condition above proves that 'h' has some other bits set beside 'm_old'
243  // find next applicable mask after m_old //TODO: look at bsl instruction
244  for( ++m_old; !(h & m_old); m_old <<= 1 ) // at maximum few rounds depending on the first block size
245  ;
246  m_old = (m_old<<1) - 1; // get full mask from a bit
247  __TBB_ASSERT((m_old&(m_old+1))==0 && m_old <= m, NULL);
248  // check whether it is rehashing/ed
249  if( itt_load_word_with_acquire(get_bucket(h & m_old)->node_list) != rehash_req )
250  {
251 #if __TBB_STATISTICS
252  my_info_restarts++; // race collisions
253 #endif
254  return true;
255  }
256  }
257  return false;
258  }
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 h
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
T itt_load_word_with_acquire(const tbb::atomic< T > &src)
static hash_map_node_base *const rehash_req
Incompleteness flag value.
bucket * get_bucket(hashcode_t h) const
Get bucket by (masked) hashcode.
Here is the call graph for this function:

◆ enable_segment()

void tbb::interface5::internal::hash_map_base::enable_segment ( segment_index_t  k,
bool  is_initial = false 
)
inline

Enable segment.

Definition at line 184 of file concurrent_hash_map.h.

References __TBB_ASSERT, tbb::cache_aligned_allocator< T >::allocate(), tbb::internal::itt_hide_store_word(), tbb::internal::itt_store_word_with_release(), and tbb::interface5::internal::hash_map_base::enable_segment_failsafe::my_segment_ptr.

184  {
185  __TBB_ASSERT( k, "Zero segment must be embedded" );
186  enable_segment_failsafe watchdog( my_table, k );
187  cache_aligned_allocator<bucket> alloc;
188  size_type sz;
189  __TBB_ASSERT( !is_valid(my_table[k]), "Wrong concurrent assignment");
190  if( k >= first_block ) {
191  sz = segment_size( k );
192  segment_ptr_t ptr = alloc.allocate( sz );
193  init_buckets( ptr, sz, is_initial );
194  itt_hide_store_word( my_table[k], ptr );
195  sz <<= 1;// double it to get entire capacity of the container
196  } else { // the first block
197  __TBB_ASSERT( k == embedded_block, "Wrong segment index" );
198  sz = segment_size( first_block );
199  segment_ptr_t ptr = alloc.allocate( sz - embedded_buckets );
200  init_buckets( ptr, sz - embedded_buckets, is_initial );
202  for(segment_index_t i = embedded_block; i < first_block; i++) // calc the offsets
203  itt_hide_store_word( my_table[i], ptr + segment_base(i) );
204  }
206  watchdog.my_segment_ptr = 0;
207  }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
void itt_store_word_with_release(tbb::atomic< T > &dst, U src)
static size_type const first_block
Count of segments in the first block.
static size_type segment_size(segment_index_t k)
size_t segment_index_t
Segment index type.
atomic< hashcode_t > my_mask
Hash mask = sum of allocated segment sizes - 1.
static void init_buckets(segment_ptr_t ptr, size_type sz, bool is_initial)
Initialize buckets.
segments_table_t my_table
Segment pointers table. Also prevents false sharing between my_mask and my_size.
void itt_hide_store_word(T &dst, T src)
static size_type const embedded_buckets
Count of segments in the first block.
static segment_index_t segment_base(segment_index_t k)
static size_type const embedded_block
Count of segments in the first block.
Here is the call graph for this function:

◆ get_bucket()

bucket* tbb::interface5::internal::hash_map_base::get_bucket ( hashcode_t  h) const
throw (
)
inline

Get bucket by (masked) hashcode.

Definition at line 210 of file concurrent_hash_map.h.

References __TBB_ASSERT, h, and s.

Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::bucket_accessor::acquire(), and tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::internal_copy().

210  { // TODO: add throw() everywhere?
212  h -= segment_base(s);
213  segment_ptr_t seg = my_table[s];
214  __TBB_ASSERT( is_valid(seg), "hashcode must be cut by valid mask for allocated segments" );
215  return &seg[h];
216  }
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 h
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
size_t segment_index_t
Segment index type.
segments_table_t my_table
Segment pointers table. Also prevents false sharing between my_mask and my_size.
void const char const char int ITT_FORMAT __itt_group_sync s
static segment_index_t segment_base(segment_index_t k)
static segment_index_t segment_index_of(size_type index)
Here is the caller graph for this function:

◆ init_buckets()

static void tbb::interface5::internal::hash_map_base::init_buckets ( segment_ptr_t  ptr,
size_type  sz,
bool  is_initial 
)
inlinestatic

Initialize buckets.

Definition at line 159 of file concurrent_hash_map.h.

References tbb::interface5::internal::hash_map_base::bucket::mutex, tbb::interface5::internal::hash_map_base::bucket::node_list, and tbb::interface5::internal::rehash_req.

159  {
160  if( is_initial ) std::memset( static_cast<void*>(ptr), 0, sz*sizeof(bucket) );
161  else for(size_type i = 0; i < sz; i++, ptr++) {
162  *reinterpret_cast<intptr_t*>(&ptr->mutex) = 0;
163  ptr->node_list = rehash_req;
164  }
165  }
static hash_map_node_base *const rehash_req
Incompleteness flag value.

◆ insert_new_node()

segment_index_t tbb::interface5::internal::hash_map_base::insert_new_node ( bucket b,
node_base n,
hashcode_t  mask 
)
inline

Insert a node and check for load factor.

Returns
segment index to enable.

Definition at line 261 of file concurrent_hash_map.h.

References __TBB_ASSERT, __TBB_Log2(), tbb::internal::as_atomic(), and tbb::internal::itt_hide_load_word().

261  {
262  size_type sz = ++my_size; // prefix form is to enforce allocation after the first item inserted
263  add_to_bucket( b, n );
264  // check load factor
265  if( sz >= mask ) { // TODO: add custom load_factor
266  segment_index_t new_seg = __TBB_Log2( mask+1 ); //optimized segment_index_of
267  __TBB_ASSERT( is_valid(my_table[new_seg-1]), "new allocations must not publish new mask until segment has allocated");
268  static const segment_ptr_t is_allocating = (segment_ptr_t)2;
269  if( !itt_hide_load_word(my_table[new_seg])
270  && as_atomic(my_table[new_seg]).compare_and_swap(is_allocating, NULL) == NULL )
271  return new_seg; // The value must be processed
272  }
273  return 0;
274  }
T itt_hide_load_word(const T &src)
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
static void add_to_bucket(bucket *b, node_base *n)
Add node.
intptr_t __TBB_Log2(uintptr_t x)
Definition: tbb_machine.h:867
atomic< size_type > my_size
Size of container in stored items.
size_t segment_index_t
Segment index type.
segments_table_t my_table
Segment pointers table. Also prevents false sharing between my_mask and my_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 mask
atomic< T > & as_atomic(T &t)
Definition: atomic.h:547
Here is the call graph for this function:

◆ internal_swap()

void tbb::interface5::internal::hash_map_base::internal_swap ( hash_map_base table)
inline

Swap hash_map_bases.

Definition at line 284 of file concurrent_hash_map.h.

References my_embedded_segment, my_mask, my_size, my_table, tbb::interface5::internal::hash_map_base::bucket::node_list, and tbb::swap().

284  {
285  using std::swap;
286  swap(this->my_mask, table.my_mask);
287  swap(this->my_size, table.my_size);
288  for(size_type i = 0; i < embedded_buckets; i++)
289  swap(this->my_embedded_segment[i].node_list, table.my_embedded_segment[i].node_list);
290  for(size_type i = embedded_block; i < pointers_per_table; i++)
291  swap(this->my_table[i], table.my_table[i]);
292  }
static size_type const pointers_per_table
Size of a pointer / table size.
atomic< size_type > my_size
Size of container in stored items.
void swap(concurrent_hash_map< Key, T, HashCompare, A > &a, concurrent_hash_map< Key, T, HashCompare, A > &b)
bucket my_embedded_segment[embedded_buckets]
Zero segment.
atomic< hashcode_t > my_mask
Hash mask = sum of allocated segment sizes - 1.
segments_table_t my_table
Segment pointers table. Also prevents false sharing between my_mask and my_size.
static size_type const embedded_buckets
Count of segments in the first block.
static size_type const embedded_block
Count of segments in the first block.
Here is the call graph for this function:

◆ is_valid()

static bool tbb::interface5::internal::hash_map_base::is_valid ( void ptr)
inlinestatic
Returns
true if
  • ptr is valid pointer

Definition at line 154 of file concurrent_hash_map.h.

Referenced by tbb::interface5::internal::hash_map_iterator< Container, Value >::advance_to_next_bucket(), tbb::interface5::internal::hash_map_iterator< Container, Value >::hash_map_iterator(), and tbb::interface5::internal::hash_map_iterator< Container, Value >::operator*().

154  {
155  return reinterpret_cast<uintptr_t>(ptr) > uintptr_t(63);
156  }
Here is the caller graph for this function:

◆ mark_rehashed_levels()

void tbb::interface5::internal::hash_map_base::mark_rehashed_levels ( hashcode_t  h)
throw (
)
inline

Definition at line 219 of file concurrent_hash_map.h.

References tbb::interface5::internal::empty_rehashed, h, and s.

219  {
221  while( segment_ptr_t seg = my_table[++s] )
222  if( seg[h].node_list == rehash_req ) {
223  seg[h].node_list = empty_rehashed;
224  mark_rehashed_levels( h + ((hashcode_t)1<<s) ); // optimized segment_base(s)
225  }
226  }
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 h
static hash_map_node_base *const empty_rehashed
Rehashed empty bucket flag.
size_t segment_index_t
Segment index type.
static hash_map_node_base *const rehash_req
Incompleteness flag value.
segments_table_t my_table
Segment pointers table. Also prevents false sharing between my_mask and my_size.
void const char const char int ITT_FORMAT __itt_group_sync s
static segment_index_t segment_index_of(size_type index)

◆ reserve()

void tbb::interface5::internal::hash_map_base::reserve ( size_type  buckets)
inline

Prepare enough segments for number of buckets.

Definition at line 277 of file concurrent_hash_map.h.

277  {
278  if( !buckets-- ) return;
279  bool is_initial = !my_size;
280  for( size_type m = my_mask; buckets > m; m = my_mask )
281  enable_segment( segment_index_of( m+1 ), is_initial );
282  }
atomic< size_type > my_size
Size of container in stored items.
atomic< hashcode_t > my_mask
Hash mask = sum of allocated segment sizes - 1.
static segment_index_t segment_index_of(size_type index)
void enable_segment(segment_index_t k, bool is_initial=false)
Enable segment.

◆ segment_base()

static segment_index_t tbb::interface5::internal::hash_map_base::segment_base ( segment_index_t  k)
inlinestatic
Returns
the first array index of given segment

Definition at line 144 of file concurrent_hash_map.h.

144  {
145  return (segment_index_t(1)<<k & ~segment_index_t(1));
146  }
size_t segment_index_t
Segment index type.

◆ segment_index_of()

static segment_index_t tbb::interface5::internal::hash_map_base::segment_index_of ( size_type  index)
inlinestatic
Returns
segment index of given index in the array

Definition at line 139 of file concurrent_hash_map.h.

References __TBB_Log2().

139  {
140  return segment_index_t( __TBB_Log2( index|1 ) );
141  }
intptr_t __TBB_Log2(uintptr_t x)
Definition: tbb_machine.h:867
size_t segment_index_t
Segment index type.
Here is the call graph for this function:

◆ segment_size()

static size_type tbb::interface5::internal::hash_map_base::segment_size ( segment_index_t  k)
inlinestatic
Returns
segment size except for
  • k == 0

Definition at line 149 of file concurrent_hash_map.h.

149  {
150  return size_type(1)<<k; // fake value for k==0
151  }

Member Data Documentation

◆ embedded_block

size_type const tbb::interface5::internal::hash_map_base::embedded_block = 1
static

Count of segments in the first block.

Definition at line 98 of file concurrent_hash_map.h.

◆ embedded_buckets

size_type const tbb::interface5::internal::hash_map_base::embedded_buckets = 1<<embedded_block
static

Count of segments in the first block.

Definition at line 100 of file concurrent_hash_map.h.

◆ first_block

size_type const tbb::interface5::internal::hash_map_base::first_block = 8
static

Count of segments in the first block.

Definition at line 102 of file concurrent_hash_map.h.

◆ my_embedded_segment

bucket tbb::interface5::internal::hash_map_base::my_embedded_segment[embedded_buckets]

Zero segment.

Definition at line 116 of file concurrent_hash_map.h.

Referenced by internal_swap().

◆ my_mask

atomic<hashcode_t> tbb::interface5::internal::hash_map_base::my_mask

Hash mask = sum of allocated segment sizes - 1.

Definition at line 110 of file concurrent_hash_map.h.

Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::internal_copy(), and internal_swap().

◆ my_size

atomic<size_type> tbb::interface5::internal::hash_map_base::my_size

Size of container in stored items.

Definition at line 114 of file concurrent_hash_map.h.

Referenced by tbb::interface5::concurrent_hash_map< Key, T, HashCompare, Allocator >::internal_copy(), and internal_swap().

◆ my_table

segments_table_t tbb::interface5::internal::hash_map_base::my_table

Segment pointers table. Also prevents false sharing between my_mask and my_size.

Definition at line 112 of file concurrent_hash_map.h.

Referenced by internal_swap().

◆ pointers_per_table

size_type const tbb::interface5::internal::hash_map_base::pointers_per_table = sizeof(segment_index_t) * 8
static

Size of a pointer / table size.

Definition at line 104 of file concurrent_hash_map.h.


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

Copyright © 2005-2019 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.