tbb::internal::hash_map_segment_base Struct Reference
Collaboration diagram for tbb::internal::hash_map_segment_base:

## Public Types

typedef spin_rw_mutex | segment_mutex_t
typedef size_t | hashcode_t
| Type of a hash code. More...

## Public Member Functions

bool __TBB_EXPORTED_METHOD | internal_grow_predicate () const
| True if my_logical_size>=my_physical_size. More...

## Public Attributes

segment_mutex_t | my_mutex
| Mutex that protects this segment. More...
atomic< size_t > | my_logical_size
size_t | my_physical_size

## Static Public Attributes

static const size_t | n_segment_bits = 6
| Log2 of n_segment. More...
static const size_t | max_physical_size = size_t(1)<<(8*sizeof(hashcode_t)-n_segment_bits)
| Maximum size of array of chains. More...

## Detailed Description

Definition at line 23 of file concurrent_hash_map.cpp.

## Member Typedef Documentation

## hashcode_t

typedef size_t tbb::internal::hash_map_segment_base::hashcode_t

Type of a hash code.

Definition at line 26 of file concurrent_hash_map.cpp.

## segment_mutex_t

typedef spin_rw_mutex tbb::internal::hash_map_segment_base::segment_mutex_t

Definition at line 24 of file concurrent_hash_map.cpp.

## Member Function Documentation

## internal_grow_predicate()

bool tbb::internal::hash_map_segment_base::internal_grow_predicate | ( |  | ) | const

True if my_logical_size>=my_physical_size.

Used to support Intel(R) Thread Checker.

Definition at line 43 of file concurrent_hash_map.cpp.

{
// Intel(R) Thread Checker considers the following reads to be races, so we hide them in the
// library so that Intel(R) Thread Checker will ignore them. The reads are used in a double-check
// context, so the program is nonetheless correct despite the race.
return my_logical_size >= my_physical_size && my_physical_size < max_physical_size;
}
tbb::internal::hash_map_segment_base::my_logical_size
atomic< size_t > my_logical_size
Definition: concurrent_hash_map.cpp:34
tbb::internal::hash_map_segment_base::max_physical_size
static const size_t max_physical_size
Maximum size of array of chains.
Definition: concurrent_hash_map.cpp:30
tbb::internal::hash_map_segment_base::my_physical_size
size_t my_physical_size
Definition: concurrent_hash_map.cpp:37

References max_physical_size, my_logical_size, and my_physical_size.

## Member Data Documentation

## max_physical_size

const size_t tbb::internal::hash_map_segment_base::max_physical_size = size_t(1)<<(8*sizeof(hashcode_t)-n_segment_bits)

static

Maximum size of array of chains.

Definition at line 30 of file concurrent_hash_map.cpp.

Referenced by internal_grow_predicate().

## my_logical_size

atomic<size_t> tbb::internal::hash_map_segment_base::my_logical_size

Definition at line 34 of file concurrent_hash_map.cpp.

Referenced by internal_grow_predicate().

## my_mutex

segment_mutex_t tbb::internal::hash_map_segment_base::my_mutex

Mutex that protects this segment.

Definition at line 32 of file concurrent_hash_map.cpp.

## my_physical_size

size_t tbb::internal::hash_map_segment_base::my_physical_size

Always zero or a power of two

Definition at line 37 of file concurrent_hash_map.cpp.

Referenced by internal_grow_predicate().

## n_segment_bits

const size_t tbb::internal::hash_map_segment_base::n_segment_bits = 6

static

Log2 of n_segment.

Definition at line 28 of file concurrent_hash_map.cpp.

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

- concurrent_hash_map.cpp

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