Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
concurrent_hash_map.cpp
Go to the documentation of this file.
1 /*
2  Copyright (c) 2005-2020 Intel Corporation
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 */
16 
18 
19 namespace tbb {
20 
21 namespace internal {
22 #if !TBB_NO_LEGACY
26  typedef size_t hashcode_t;
28  static const size_t n_segment_bits = 6;
30  static const size_t max_physical_size = size_t(1)<<(8*sizeof(hashcode_t)-n_segment_bits);
33  // Number of nodes
34  atomic<size_t> my_logical_size;
35  // Size of chains
39 
41 };
42 
44  // Intel(R) Thread Checker considers the following reads to be races, so we hide them in the
45  // library so that Intel(R) Thread Checker will ignore them. The reads are used in a double-check
46  // context, so the program is nonetheless correct despite the race.
48 }
49 #endif
50 
51 } // namespace internal
52 
53 } // namespace tbb
54 
segment_mutex_t my_mutex
Mutex that protects this segment.
bool __TBB_EXPORTED_METHOD internal_grow_predicate() const
True if my_logical_size>=my_physical_size.
Fast, unfair, spinning reader-writer lock with backoff and writer-preference.
Definition: spin_rw_mutex.h:38
static const size_t max_physical_size
Maximum size of array of chains.
#define __TBB_EXPORTED_METHOD
Definition: tbb_stddef.h:98
static const size_t n_segment_bits
Log2 of n_segment.
The graph class.

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.