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 
internal
Definition: _flow_graph_async_msg_impl.h:24
tbb::internal::hash_map_segment_base
Definition: concurrent_hash_map.cpp:23
tbb::internal::hash_map_segment_base::my_mutex
segment_mutex_t my_mutex
Mutex that protects this segment.
Definition: concurrent_hash_map.cpp:32
tbb::internal::hash_map_segment_base::hashcode_t
size_t hashcode_t
Type of a hash code.
Definition: concurrent_hash_map.cpp:26
tbb
The graph class.
Definition: serial/tbb/parallel_for.h:46
tbb::internal::hash_map_segment_base::segment_mutex_t
spin_rw_mutex segment_mutex_t
Definition: concurrent_hash_map.cpp:24
concurrent_hash_map.h
tbb::internal::hash_map_segment_base::my_physical_size
size_t my_physical_size
Definition: concurrent_hash_map.cpp:37
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::spin_rw_mutex_v3
Fast, unfair, spinning reader-writer lock with backoff and writer-preference.
Definition: spin_rw_mutex.h:38
tbb::internal::hash_map_segment_base::internal_grow_predicate
bool __TBB_EXPORTED_METHOD internal_grow_predicate() const
True if my_logical_size>=my_physical_size.
Definition: concurrent_hash_map.cpp:43
tbb::internal::hash_map_segment_base::my_logical_size
atomic< size_t > my_logical_size
Definition: concurrent_hash_map.cpp:34
__TBB_EXPORTED_METHOD
#define __TBB_EXPORTED_METHOD
Definition: tbb_stddef.h:98
tbb::internal::hash_map_segment_base::n_segment_bits
static const size_t n_segment_bits
Log2 of n_segment.
Definition: concurrent_hash_map.cpp:28

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.