2 This file is a part of libcds - Concurrent Data Structures library
4 (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017
6 Source code repo: http://github.com/khizmax/libcds/
7 Download: http://sourceforge.net/projects/libcds/files/
9 Redistribution and use in source and binary forms, with or without
10 modification, are permitted provided that the following conditions are met:
12 * Redistributions of source code must retain the above copyright notice, this
13 list of conditions and the following disclaimer.
15 * Redistributions in binary form must reproduce the above copyright notice,
16 this list of conditions and the following disclaimer in the documentation
17 and/or other materials provided with the distribution.
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 #ifndef CDSUNIT_MAP_TYPE_MICHAEL_H
32 #define CDSUNIT_MAP_TYPE_MICHAEL_H
34 #include "map_type_michael_list.h"
35 #include "map_type_lazy_list.h"
36 #include "map_type_iterable_list.h"
38 #include <cds/container/michael_map.h>
39 #include <cds/container/michael_map_rcu.h>
40 #include <cds/container/michael_map_nogc.h>
44 template <class GC, typename List, typename Traits = cc::michael_map::traits>
45 class MichaelHashMap : public cc::MichaelHashMap< GC, List, Traits >
47 typedef cc::MichaelHashMap< GC, List, Traits > base_class;
49 template <typename Config>
50 MichaelHashMap( Config const& cfg)
51 : base_class( cfg.s_nMapSize, cfg.s_nLoadFactor )
55 static CDS_CONSTEXPR bool const c_bExtractSupported = true;
56 static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true;
57 static CDS_CONSTEXPR bool const c_bEraseExactKey = false;
60 struct tag_MichaelHashMap;
62 template <typename Key, typename Value>
63 struct map_type< tag_MichaelHashMap, Key, Value >: public map_type_base< Key, Value >
65 typedef map_type_base< Key, Value > base_class;
66 typedef typename base_class::key_compare compare;
67 typedef typename base_class::key_less less;
68 typedef typename base_class::equal_to equal_to;
69 typedef typename base_class::key_hash hash;
71 struct traits_MichaelMap_hash :
72 public cc::michael_map::make_traits<
77 // ***************************************************************************
78 // MichaelHashMap based on MichaelKVList
79 typedef michael_list_type< Key, Value > ml;
81 typedef MichaelHashMap< cds::gc::HP, typename ml::MichaelList_HP_cmp, traits_MichaelMap_hash > MichaelMap_HP_cmp;
82 typedef MichaelHashMap< cds::gc::DHP, typename ml::MichaelList_DHP_cmp, traits_MichaelMap_hash > MichaelMap_DHP_cmp;
83 typedef MichaelHashMap< cds::gc::nogc, typename ml::MichaelList_NOGC_cmp, traits_MichaelMap_hash > MichaelMap_NOGC_cmp;
84 typedef MichaelHashMap< rcu_gpi, typename ml::MichaelList_RCU_GPI_cmp, traits_MichaelMap_hash > MichaelMap_RCU_GPI_cmp;
85 typedef MichaelHashMap< rcu_gpb, typename ml::MichaelList_RCU_GPB_cmp, traits_MichaelMap_hash > MichaelMap_RCU_GPB_cmp;
86 typedef MichaelHashMap< rcu_gpt, typename ml::MichaelList_RCU_GPT_cmp, traits_MichaelMap_hash > MichaelMap_RCU_GPT_cmp;
87 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
88 typedef MichaelHashMap< rcu_shb, typename ml::MichaelList_RCU_SHB_cmp, traits_MichaelMap_hash > MichaelMap_RCU_SHB_cmp;
89 typedef MichaelHashMap< rcu_sht, typename ml::MichaelList_RCU_SHT_cmp, traits_MichaelMap_hash > MichaelMap_RCU_SHT_cmp;
92 typedef MichaelHashMap< cds::gc::HP, typename ml::MichaelList_HP_cmp_stat, traits_MichaelMap_hash > MichaelMap_HP_cmp_stat;
93 typedef MichaelHashMap< cds::gc::DHP, typename ml::MichaelList_DHP_cmp_stat, traits_MichaelMap_hash > MichaelMap_DHP_cmp_stat;
94 typedef MichaelHashMap< cds::gc::nogc, typename ml::MichaelList_NOGC_cmp_stat, traits_MichaelMap_hash > MichaelMap_NOGC_cmp_stat;
95 typedef MichaelHashMap< rcu_gpi, typename ml::MichaelList_RCU_GPI_cmp_stat, traits_MichaelMap_hash > MichaelMap_RCU_GPI_cmp_stat;
96 typedef MichaelHashMap< rcu_gpb, typename ml::MichaelList_RCU_GPB_cmp_stat, traits_MichaelMap_hash > MichaelMap_RCU_GPB_cmp_stat;
97 typedef MichaelHashMap< rcu_gpt, typename ml::MichaelList_RCU_GPT_cmp_stat, traits_MichaelMap_hash > MichaelMap_RCU_GPT_cmp_stat;
98 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
99 typedef MichaelHashMap< rcu_shb, typename ml::MichaelList_RCU_SHB_cmp_stat, traits_MichaelMap_hash > MichaelMap_RCU_SHB_cmp_stat;
100 typedef MichaelHashMap< rcu_sht, typename ml::MichaelList_RCU_SHT_cmp_stat, traits_MichaelMap_hash > MichaelMap_RCU_SHT_cmp_stat;
103 typedef MichaelHashMap< cds::gc::HP, typename ml::MichaelList_HP_less, traits_MichaelMap_hash > MichaelMap_HP_less;
104 typedef MichaelHashMap< cds::gc::DHP, typename ml::MichaelList_DHP_less, traits_MichaelMap_hash > MichaelMap_DHP_less;
105 typedef MichaelHashMap< cds::gc::nogc, typename ml::MichaelList_NOGC_less, traits_MichaelMap_hash > MichaelMap_NOGC_less;
106 typedef MichaelHashMap< rcu_gpi, typename ml::MichaelList_RCU_GPI_less, traits_MichaelMap_hash > MichaelMap_RCU_GPI_less;
107 typedef MichaelHashMap< rcu_gpb, typename ml::MichaelList_RCU_GPB_less, traits_MichaelMap_hash > MichaelMap_RCU_GPB_less;
108 typedef MichaelHashMap< rcu_gpt, typename ml::MichaelList_RCU_GPT_less, traits_MichaelMap_hash > MichaelMap_RCU_GPT_less;
109 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
110 typedef MichaelHashMap< rcu_shb, typename ml::MichaelList_RCU_SHB_less, traits_MichaelMap_hash > MichaelMap_RCU_SHB_less;
111 typedef MichaelHashMap< rcu_sht, typename ml::MichaelList_RCU_SHT_less, traits_MichaelMap_hash > MichaelMap_RCU_SHT_less;
114 typedef MichaelHashMap< cds::gc::HP, typename ml::MichaelList_HP_less_stat, traits_MichaelMap_hash > MichaelMap_HP_less_stat;
115 typedef MichaelHashMap< cds::gc::DHP, typename ml::MichaelList_DHP_less_stat, traits_MichaelMap_hash > MichaelMap_DHP_less_stat;
116 typedef MichaelHashMap< cds::gc::nogc, typename ml::MichaelList_NOGC_less_stat, traits_MichaelMap_hash > MichaelMap_NOGC_less_stat;
117 typedef MichaelHashMap< rcu_gpi, typename ml::MichaelList_RCU_GPI_less_stat, traits_MichaelMap_hash > MichaelMap_RCU_GPI_less_stat;
118 typedef MichaelHashMap< rcu_gpb, typename ml::MichaelList_RCU_GPB_less_stat, traits_MichaelMap_hash > MichaelMap_RCU_GPB_less_stat;
119 typedef MichaelHashMap< rcu_gpt, typename ml::MichaelList_RCU_GPT_less_stat, traits_MichaelMap_hash > MichaelMap_RCU_GPT_less_stat;
120 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
121 typedef MichaelHashMap< rcu_shb, typename ml::MichaelList_RCU_SHB_less_stat, traits_MichaelMap_hash > MichaelMap_RCU_SHB_less_stat;
122 typedef MichaelHashMap< rcu_sht, typename ml::MichaelList_RCU_SHT_less_stat, traits_MichaelMap_hash > MichaelMap_RCU_SHT_less_stat;
125 typedef MichaelHashMap< cds::gc::HP, typename ml::MichaelList_HP_cmp_seqcst, traits_MichaelMap_hash > MichaelMap_HP_cmp_seqcst;
126 typedef MichaelHashMap< cds::gc::DHP, typename ml::MichaelList_DHP_cmp_seqcst, traits_MichaelMap_hash > MichaelMap_DHP_cmp_seqcst;
127 typedef MichaelHashMap< cds::gc::nogc, typename ml::MichaelList_NOGC_cmp_seqcst, traits_MichaelMap_hash > MichaelMap_NOGC_cmp_seqcst;
128 typedef MichaelHashMap< rcu_gpi, typename ml::MichaelList_RCU_GPI_cmp_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPI_cmp_seqcst;
129 typedef MichaelHashMap< rcu_gpb, typename ml::MichaelList_RCU_GPB_cmp_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPB_cmp_seqcst;
130 typedef MichaelHashMap< rcu_gpt, typename ml::MichaelList_RCU_GPT_cmp_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPT_cmp_seqcst;
131 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
132 typedef MichaelHashMap< rcu_shb, typename ml::MichaelList_RCU_SHB_cmp_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_SHB_cmp_seqcst;
133 typedef MichaelHashMap< rcu_sht, typename ml::MichaelList_RCU_SHT_cmp_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_SHT_cmp_seqcst;
136 typedef MichaelHashMap< cds::gc::HP, typename ml::MichaelList_HP_less_seqcst, traits_MichaelMap_hash > MichaelMap_HP_less_seqcst;
137 typedef MichaelHashMap< cds::gc::DHP, typename ml::MichaelList_DHP_less_seqcst, traits_MichaelMap_hash > MichaelMap_DHP_less_seqcst;
138 typedef MichaelHashMap< cds::gc::nogc, typename ml::MichaelList_NOGC_less_seqcst, traits_MichaelMap_hash > MichaelMap_NOGC_less_seqcst;
139 typedef MichaelHashMap< rcu_gpi, typename ml::MichaelList_RCU_GPI_less_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPI_less_seqcst;
140 typedef MichaelHashMap< rcu_gpb, typename ml::MichaelList_RCU_GPB_less_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPB_less_seqcst;
141 typedef MichaelHashMap< rcu_gpt, typename ml::MichaelList_RCU_GPT_less_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPT_less_seqcst;
142 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
143 typedef MichaelHashMap< rcu_shb, typename ml::MichaelList_RCU_SHB_less_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_SHB_less_seqcst;
144 typedef MichaelHashMap< rcu_sht, typename ml::MichaelList_RCU_SHT_less_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_SHT_less_seqcst;
148 // ***************************************************************************
149 // MichaelHashMap based on LazyKVList
150 typedef lazy_list_type< Key, Value > ll;
152 typedef MichaelHashMap< cds::gc::HP, typename ll::LazyList_HP_cmp, traits_MichaelMap_hash > MichaelMap_Lazy_HP_cmp;
153 typedef MichaelHashMap< cds::gc::DHP, typename ll::LazyList_DHP_cmp, traits_MichaelMap_hash > MichaelMap_Lazy_DHP_cmp;
154 typedef MichaelHashMap< cds::gc::nogc, typename ll::LazyList_NOGC_cmp, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_cmp;
155 typedef MichaelHashMap< rcu_gpi, typename ll::LazyList_RCU_GPI_cmp, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPI_cmp;
156 typedef MichaelHashMap< rcu_gpb, typename ll::LazyList_RCU_GPB_cmp, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPB_cmp;
157 typedef MichaelHashMap< rcu_gpt, typename ll::LazyList_RCU_GPT_cmp, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPT_cmp;
158 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
159 typedef MichaelHashMap< rcu_shb, typename ll::LazyList_RCU_SHB_cmp, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHB_cmp;
160 typedef MichaelHashMap< rcu_sht, typename ll::LazyList_RCU_SHT_cmp, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHT_cmp;
163 typedef MichaelHashMap< cds::gc::HP, typename ll::LazyList_HP_cmp_stat, traits_MichaelMap_hash > MichaelMap_Lazy_HP_cmp_stat;
164 typedef MichaelHashMap< cds::gc::DHP, typename ll::LazyList_DHP_cmp_stat, traits_MichaelMap_hash > MichaelMap_Lazy_DHP_cmp_stat;
165 typedef MichaelHashMap< cds::gc::nogc, typename ll::LazyList_NOGC_cmp_stat, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_cmp_stat;
166 typedef MichaelHashMap< rcu_gpi, typename ll::LazyList_RCU_GPI_cmp_stat, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPI_cmp_stat;
167 typedef MichaelHashMap< rcu_gpb, typename ll::LazyList_RCU_GPB_cmp_stat, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPB_cmp_stat;
168 typedef MichaelHashMap< rcu_gpt, typename ll::LazyList_RCU_GPT_cmp_stat, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPT_cmp_stat;
169 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
170 typedef MichaelHashMap< rcu_shb, typename ll::LazyList_RCU_SHB_cmp_stat, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHB_cmp_stat;
171 typedef MichaelHashMap< rcu_sht, typename ll::LazyList_RCU_SHT_cmp_stat, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHT_cmp_stat;
174 typedef MichaelHashMap< cds::gc::nogc, typename ll::LazyList_NOGC_unord, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_unord;
176 typedef MichaelHashMap< cds::gc::HP, typename ll::LazyList_HP_less, traits_MichaelMap_hash > MichaelMap_Lazy_HP_less;
177 typedef MichaelHashMap< cds::gc::DHP, typename ll::LazyList_DHP_less, traits_MichaelMap_hash > MichaelMap_Lazy_DHP_less;
178 typedef MichaelHashMap< cds::gc::nogc, typename ll::LazyList_NOGC_less, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_less;
179 typedef MichaelHashMap< rcu_gpi, typename ll::LazyList_RCU_GPI_less, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPI_less;
180 typedef MichaelHashMap< rcu_gpb, typename ll::LazyList_RCU_GPB_less, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPB_less;
181 typedef MichaelHashMap< rcu_gpt, typename ll::LazyList_RCU_GPT_less, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPT_less;
182 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
183 typedef MichaelHashMap< rcu_shb, typename ll::LazyList_RCU_SHB_less, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHB_less;
184 typedef MichaelHashMap< rcu_sht, typename ll::LazyList_RCU_SHT_less, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHT_less;
187 typedef MichaelHashMap< cds::gc::HP, typename ll::LazyList_HP_less_stat, traits_MichaelMap_hash > MichaelMap_Lazy_HP_less_stat;
188 typedef MichaelHashMap< cds::gc::DHP, typename ll::LazyList_DHP_less_stat, traits_MichaelMap_hash > MichaelMap_Lazy_DHP_less_stat;
189 typedef MichaelHashMap< cds::gc::nogc, typename ll::LazyList_NOGC_less_stat, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_less_stat;
190 typedef MichaelHashMap< rcu_gpi, typename ll::LazyList_RCU_GPI_less_stat, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPI_less_stat;
191 typedef MichaelHashMap< rcu_gpb, typename ll::LazyList_RCU_GPB_less_stat, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPB_less_stat;
192 typedef MichaelHashMap< rcu_gpt, typename ll::LazyList_RCU_GPT_less_stat, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPT_less_stat;
193 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
194 typedef MichaelHashMap< rcu_shb, typename ll::LazyList_RCU_SHB_less_stat, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHB_less_stat;
195 typedef MichaelHashMap< rcu_sht, typename ll::LazyList_RCU_SHT_less_stat, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHT_less_stat;
198 typedef MichaelHashMap< cds::gc::HP, typename ll::LazyList_HP_cmp_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_HP_cmp_seqcst;
199 typedef MichaelHashMap< cds::gc::DHP, typename ll::LazyList_DHP_cmp_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_DHP_cmp_seqcst;
200 typedef MichaelHashMap< cds::gc::nogc, typename ll::LazyList_NOGC_cmp_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_cmp_seqcst;
201 typedef MichaelHashMap< rcu_gpi, typename ll::LazyList_RCU_GPI_cmp_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPI_cmp_seqcst;
202 typedef MichaelHashMap< rcu_gpb, typename ll::LazyList_RCU_GPB_cmp_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPB_cmp_seqcst;
203 typedef MichaelHashMap< rcu_gpt, typename ll::LazyList_RCU_GPT_cmp_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPT_cmp_seqcst;
204 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
205 typedef MichaelHashMap< rcu_shb, typename ll::LazyList_RCU_SHB_cmp_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHB_cmp_seqcst;
206 typedef MichaelHashMap< rcu_sht, typename ll::LazyList_RCU_SHT_cmp_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHT_cmp_seqcst;
209 typedef MichaelHashMap< cds::gc::HP, typename ll::LazyList_HP_less_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_HP_less_seqcst;
210 typedef MichaelHashMap< cds::gc::DHP, typename ll::LazyList_DHP_less_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_DHP_less_seqcst;
211 typedef MichaelHashMap< cds::gc::nogc, typename ll::LazyList_NOGC_less_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_less_seqcst;
212 typedef MichaelHashMap< rcu_gpi, typename ll::LazyList_RCU_GPI_less_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPI_less_seqcst;
213 typedef MichaelHashMap< rcu_gpb, typename ll::LazyList_RCU_GPB_less_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPB_less_seqcst;
214 typedef MichaelHashMap< rcu_gpt, typename ll::LazyList_RCU_GPT_less_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPT_less_seqcst;
215 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
216 typedef MichaelHashMap< rcu_shb, typename ll::LazyList_RCU_SHB_less_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHB_less_seqcst;
217 typedef MichaelHashMap< rcu_sht, typename ll::LazyList_RCU_SHT_less_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHT_less_seqcst;
221 // ***************************************************************************
222 // MichaelHashMap based on IterableKVList
223 typedef iterable_list_type< Key, Value > il;
225 typedef MichaelHashMap< cds::gc::HP, typename il::IterableList_HP_cmp, traits_MichaelMap_hash > MichaelMap_Iterable_HP_cmp;
226 typedef MichaelHashMap< cds::gc::DHP, typename il::IterableList_DHP_cmp, traits_MichaelMap_hash > MichaelMap_Iterable_DHP_cmp;
228 typedef MichaelHashMap< cds::gc::HP, typename il::IterableList_HP_cmp_stat, traits_MichaelMap_hash > MichaelMap_Iterable_HP_cmp_stat;
229 typedef MichaelHashMap< cds::gc::DHP, typename il::IterableList_DHP_cmp_stat, traits_MichaelMap_hash > MichaelMap_Iterable_DHP_cmp_stat;
231 typedef MichaelHashMap< cds::gc::HP, typename il::IterableList_HP_less, traits_MichaelMap_hash > MichaelMap_Iterable_HP_less;
232 typedef MichaelHashMap< cds::gc::DHP, typename il::IterableList_DHP_less, traits_MichaelMap_hash > MichaelMap_Iterable_DHP_less;
234 typedef MichaelHashMap< cds::gc::HP, typename il::IterableList_HP_less_stat, traits_MichaelMap_hash > MichaelMap_Iterable_HP_less_stat;
235 typedef MichaelHashMap< cds::gc::DHP, typename il::IterableList_DHP_less_stat, traits_MichaelMap_hash > MichaelMap_Iterable_DHP_less_stat;
237 typedef MichaelHashMap< cds::gc::HP, typename il::IterableList_HP_cmp_seqcst, traits_MichaelMap_hash > MichaelMap_Iterable_HP_cmp_seqcst;
238 typedef MichaelHashMap< cds::gc::DHP, typename il::IterableList_DHP_cmp_seqcst, traits_MichaelMap_hash > MichaelMap_Iterable_DHP_cmp_seqcst;
243 #define CDSSTRESS_MichaelMap_case( fixture, test_case, michael_map_type, key_type, value_type, level ) \
244 TEST_P( fixture, michael_map_type ) \
246 if ( !check_detail_level( level )) return; \
247 typedef map::map_type< tag_MichaelHashMap, key_type, value_type >::michael_map_type map_type; \
248 test_case<map_type>(); \
251 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
252 # define CDSSTRESS_MichaelMap_SHRCU( fixture, test_case, key_type, value_type ) \
253 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_SHB_cmp, key_type, value_type, 0 ) \
254 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_SHT_cmp, key_type, value_type, 1 ) \
255 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_SHB_less, key_type, value_type, 1 ) \
256 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_SHT_less, key_type, value_type, 0 ) \
257 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_SHB_cmp_seqcst, key_type, value_type, 2 ) \
258 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_SHT_cmp_seqcst, key_type, value_type, 2 ) \
259 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_SHB_less_seqcst, key_type, value_type, 2 ) \
260 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_SHT_less_seqcst, key_type, value_type, 2 ) \
261 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_SHB_cmp, key_type, value_type, 0 ) \
262 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_SHT_cmp, key_type, value_type, 1 ) \
263 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_SHB_less, key_type, value_type, 1 ) \
264 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_SHT_less, key_type, value_type, 0 ) \
265 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_SHB_cmp_seqcst, key_type, value_type, 2 ) \
266 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_SHT_cmp_seqcst, key_type, value_type, 2 ) \
267 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_SHB_less_seqcst, key_type, value_type, 2 ) \
268 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_SHT_less_seqcst, key_type, value_type, 2 ) \
271 # define CDSSTRESS_MichaelMap_SHRCU( fixture, test_case, key_type, value_type )
274 #define CDSSTRESS_MichaelMap( fixture, test_case, key_type, value_type ) \
275 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_HP_cmp, key_type, value_type, 0 ) \
276 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_DHP_cmp, key_type, value_type, 1 ) \
277 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_HP_cmp_stat, key_type, value_type, 1 ) \
278 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_DHP_cmp_stat, key_type, value_type, 0 ) \
279 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_GPI_cmp, key_type, value_type, 0 ) \
280 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_GPB_cmp, key_type, value_type, 1 ) \
281 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_GPT_cmp, key_type, value_type, 0 ) \
282 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_HP_less, key_type, value_type, 1 ) \
283 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_DHP_less, key_type, value_type, 0 ) \
284 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_HP_less_stat, key_type, value_type, 0 ) \
285 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_DHP_less_stat, key_type, value_type, 1 ) \
286 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_GPI_less, key_type, value_type, 1 ) \
287 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_GPB_less, key_type, value_type, 0 ) \
288 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_GPT_less, key_type, value_type, 1 ) \
289 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_HP_cmp_seqcst, key_type, value_type, 2 ) \
290 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_DHP_cmp_seqcst, key_type, value_type, 2 ) \
291 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_GPI_cmp_seqcst, key_type, value_type, 2 ) \
292 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_GPB_cmp_seqcst, key_type, value_type, 2 ) \
293 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_GPT_cmp_seqcst, key_type, value_type, 2 ) \
294 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_HP_less_seqcst, key_type, value_type, 2 ) \
295 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_DHP_less_seqcst, key_type, value_type, 2 ) \
296 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_GPI_less_seqcst, key_type, value_type, 2 ) \
297 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_GPB_less_seqcst, key_type, value_type, 2 ) \
298 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_GPT_less_seqcst, key_type, value_type, 2 ) \
300 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_HP_cmp, key_type, value_type, 0 ) \
301 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_DHP_cmp, key_type, value_type, 1 ) \
302 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_HP_cmp_stat, key_type, value_type, 1 ) \
303 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_DHP_cmp_stat, key_type, value_type, 0 ) \
304 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_GPI_cmp, key_type, value_type, 0 ) \
305 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_GPB_cmp, key_type, value_type, 1 ) \
306 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_GPT_cmp, key_type, value_type, 0 ) \
307 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_HP_less, key_type, value_type, 1 ) \
308 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_DHP_less, key_type, value_type, 0 ) \
309 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_HP_less_stat, key_type, value_type, 0 ) \
310 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_DHP_less_stat, key_type, value_type, 1 ) \
311 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_GPI_less, key_type, value_type, 1 ) \
312 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_GPB_less, key_type, value_type, 0 ) \
313 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_GPT_less, key_type, value_type, 1 ) \
314 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_HP_cmp_seqcst, key_type, value_type, 2 ) \
315 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_DHP_cmp_seqcst, key_type, value_type, 2 ) \
316 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_GPI_cmp_seqcst, key_type, value_type, 2 ) \
317 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_GPB_cmp_seqcst, key_type, value_type, 2 ) \
318 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_GPT_cmp_seqcst, key_type, value_type, 2 ) \
319 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_HP_less_seqcst, key_type, value_type, 2 ) \
320 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_DHP_less_seqcst, key_type, value_type, 2 ) \
321 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_GPI_less_seqcst, key_type, value_type, 2 ) \
322 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_GPB_less_seqcst, key_type, value_type, 2 ) \
323 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_GPT_less_seqcst, key_type, value_type, 2 ) \
325 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Iterable_HP_cmp, key_type, value_type, 0 ) \
326 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Iterable_DHP_cmp, key_type, value_type, 1 ) \
327 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Iterable_HP_cmp_stat, key_type, value_type, 1 ) \
328 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Iterable_DHP_cmp_stat, key_type, value_type, 0 ) \
329 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Iterable_HP_less, key_type, value_type, 1 ) \
330 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Iterable_DHP_less, key_type, value_type, 0 ) \
331 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Iterable_HP_less_stat, key_type, value_type, 0 ) \
332 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Iterable_DHP_less_stat, key_type, value_type, 1 ) \
333 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Iterable_HP_cmp_seqcst, key_type, value_type, 2 ) \
334 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Iterable_DHP_cmp_seqcst, key_type, value_type, 2 ) \
335 CDSSTRESS_MichaelMap_SHRCU( fixture, test_case, key_type, value_type )
337 #define CDSSTRESS_MichaelMap_nogc( fixture, test_case, key_type, value_type ) \
338 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_NOGC_cmp, key_type, value_type, 0 ) \
339 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_NOGC_less, key_type, value_type, 0 ) \
340 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_NOGC_cmp_seqcst, key_type, value_type, 2 ) \
341 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_NOGC_less_seqcst, key_type, value_type, 2 ) \
342 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_NOGC_cmp, key_type, value_type, 0 ) \
343 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_NOGC_unord, key_type, value_type, 0 ) \
344 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_NOGC_less, key_type, value_type, 0 ) \
345 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_NOGC_cmp_seqcst, key_type, value_type, 2 ) \
346 CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_NOGC_less_seqcst, key_type, value_type, 2 ) \
349 #endif // ifndef CDSUNIT_MAP_TYPE_MICHAEL_H