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_SKIP_LIST_H
32 #define CDSUNIT_MAP_TYPE_SKIP_LIST_H
36 #include <cds/container/skip_list_map_hp.h>
37 #include <cds/container/skip_list_map_dhp.h>
38 #include <cds/container/skip_list_map_rcu.h>
39 #include <cds/container/skip_list_map_nogc.h>
41 #include <cds_test/stat_skiplist_out.h>
45 template <class GC, typename Key, typename T, typename Traits = cc::skip_list::traits >
46 class SkipListMap : public cc::SkipListMap< GC, Key, T, Traits >
48 typedef cc::SkipListMap< GC, Key, T, Traits > base_class;
50 template <typename Config>
51 SkipListMap( Config const& /*cfg*/)
55 std::pair<Key, bool> extract_min_key()
57 auto xp = base_class::extract_min();
59 return std::make_pair( xp->first, true );
60 return std::make_pair( Key(), false );
63 std::pair<Key, bool> extract_max_key()
65 auto xp = base_class::extract_max();
67 return std::make_pair( xp->first, true );
68 return std::make_pair( Key(), false );
72 static CDS_CONSTEXPR bool const c_bExtractSupported = true;
73 static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
74 static CDS_CONSTEXPR bool const c_bEraseExactKey = false;
77 struct tag_SkipListMap;
79 template <typename Key, typename Value>
80 struct map_type< tag_SkipListMap, Key, Value >: public map_type_base< Key, Value >
82 typedef map_type_base< Key, Value > base_class;
83 typedef typename base_class::key_compare compare;
84 typedef typename base_class::key_less less;
86 class traits_SkipListMap_less_pascal: public cc::skip_list::make_traits <
88 ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
89 ,co::item_counter< cds::atomicity::item_counter >
92 typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_hp_less_pascal;
93 typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_dhp_less_pascal;
94 typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_nogc_less_pascal;
95 typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_gpi_less_pascal;
96 typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_gpb_less_pascal;
97 typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_gpt_less_pascal;
98 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
99 typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_shb_less_pascal;
100 typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_sht_less_pascal;
103 class traits_SkipListMap_less_pascal_seqcst: public cc::skip_list::make_traits <
105 ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
106 ,co::memory_model< co::v::sequential_consistent >
107 ,co::item_counter< cds::atomicity::item_counter >
110 typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_hp_less_pascal_seqcst;
111 typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_dhp_less_pascal_seqcst;
112 typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_nogc_less_pascal_seqcst;
113 typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_gpi_less_pascal_seqcst;
114 typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_gpb_less_pascal_seqcst;
115 typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_gpt_less_pascal_seqcst;
116 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
117 typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_shb_less_pascal_seqcst;
118 typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_sht_less_pascal_seqcst;
121 class traits_SkipListMap_less_pascal_stat: public cc::skip_list::make_traits <
123 ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
124 ,co::stat< cc::skip_list::stat<> >
125 ,co::item_counter< cds::atomicity::item_counter >
128 typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_hp_less_pascal_stat;
129 typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_dhp_less_pascal_stat;
130 typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_nogc_less_pascal_stat;
131 typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_gpi_less_pascal_stat;
132 typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_gpb_less_pascal_stat;
133 typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_gpt_less_pascal_stat;
134 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
135 typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_shb_less_pascal_stat;
136 typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_sht_less_pascal_stat;
139 class traits_SkipListMap_cmp_pascal: public cc::skip_list::make_traits <
140 co::compare< compare >
141 ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
142 ,co::item_counter< cds::atomicity::item_counter >
145 typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_hp_cmp_pascal;
146 typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_dhp_cmp_pascal;
147 typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_nogc_cmp_pascal;
148 typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_gpi_cmp_pascal;
149 typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_gpb_cmp_pascal;
150 typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_gpt_cmp_pascal;
151 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
152 typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_shb_cmp_pascal;
153 typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_sht_cmp_pascal;
156 class traits_SkipListMap_cmp_pascal_stat: public cc::skip_list::make_traits <
157 co::compare< compare >
158 ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
159 ,co::stat< cc::skip_list::stat<> >
160 ,co::item_counter< cds::atomicity::item_counter >
163 typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_hp_cmp_pascal_stat;
164 typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_dhp_cmp_pascal_stat;
165 typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_nogc_cmp_pascal_stat;
166 typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_gpi_cmp_pascal_stat;
167 typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_gpb_cmp_pascal_stat;
168 typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_gpt_cmp_pascal_stat;
169 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
170 typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_shb_cmp_pascal_stat;
171 typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_sht_cmp_pascal_stat;
174 class traits_SkipListMap_less_xorshift: public cc::skip_list::make_traits <
176 ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
177 ,co::item_counter< cds::atomicity::item_counter >
180 typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_hp_less_xorshift;
181 typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_dhp_less_xorshift;
182 typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_nogc_less_xorshift;
183 typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_gpi_less_xorshift;
184 typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_gpb_less_xorshift;
185 typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_gpt_less_xorshift;
186 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
187 typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_shb_less_xorshift;
188 typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_sht_less_xorshift;
191 class traits_SkipListMap_less_xorshift_stat: public cc::skip_list::make_traits <
193 ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
194 ,co::stat< cc::skip_list::stat<> >
195 ,co::item_counter< cds::atomicity::item_counter >
198 typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_hp_less_xorshift_stat;
199 typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_dhp_less_xorshift_stat;
200 typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_nogc_less_xorshift_stat;
201 typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_gpi_less_xorshift_stat;
202 typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_gpb_less_xorshift_stat;
203 typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_gpt_less_xorshift_stat;
204 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
205 typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_shb_less_xorshift_stat;
206 typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_sht_less_xorshift_stat;
209 class traits_SkipListMap_cmp_xorshift: public cc::skip_list::make_traits <
210 co::compare< compare >
211 ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
212 ,co::item_counter< cds::atomicity::item_counter >
215 typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_hp_cmp_xorshift;
216 typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_dhp_cmp_xorshift;
217 typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_nogc_cmp_xorshift;
218 typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_gpi_cmp_xorshift;
219 typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_gpb_cmp_xorshift;
220 typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_gpt_cmp_xorshift;
221 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
222 typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_shb_cmp_xorshift;
223 typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_sht_cmp_xorshift;
226 class traits_SkipListMap_cmp_xorshift_stat: public cc::skip_list::make_traits <
227 co::compare< compare >
228 ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
229 ,co::stat< cc::skip_list::stat<> >
230 ,co::item_counter< cds::atomicity::item_counter >
233 typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_hp_cmp_xorshift_stat;
234 typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_dhp_cmp_xorshift_stat;
235 typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_nogc_cmp_xorshift_stat;
236 typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_gpi_cmp_xorshift_stat;
237 typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_gpb_cmp_xorshift_stat;
238 typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_gpt_cmp_xorshift_stat;
239 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
240 typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_shb_cmp_xorshift_stat;
241 typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_sht_cmp_xorshift_stat;
246 template <typename GC, typename K, typename T, typename Traits >
247 static inline void print_stat( cds_test::property_stream& o, SkipListMap< GC, K, T, Traits > const& m )
254 #define CDSSTRESS_SkipListMap_case( fixture, test_case, skiplist_map_type, key_type, value_type ) \
255 TEST_F( fixture, skiplist_map_type ) \
257 typedef map::map_type< tag_SkipListMap, key_type, value_type >::skiplist_map_type map_type; \
258 test_case<map_type>(); \
261 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
263 #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL > 1
264 # define CDSSTRESS_SkipListMap_SHRCU_2( fixture, test_case, key_type, value_type ) \
265 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_less_pascal_seqcst, key_type, value_type ) \
266 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_sht_less_pascal_seqcst, key_type, value_type ) \
269 # define CDSSTRESS_SkipListMap_SHRCU_2( fixture, test_case, key_type, value_type )
272 #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL == 1
273 # define CDSSTRESS_SkipListMap_SHRCU_1( fixture, test_case, key_type, value_type ) \
274 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_sht_less_pascal, key_type, value_type ) \
275 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_less_pascal_stat, key_type, value_type ) \
276 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_cmp_pascal, key_type, value_type ) \
277 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_cmp_pascal_stat, key_type, value_type ) \
278 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_sht_less_xorshift, key_type, value_type ) \
279 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_less_xorshift_stat, key_type, value_type ) \
280 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_cmp_xorshift, key_type, value_type ) \
281 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_sht_cmp_xorshift_stat, key_type, value_type ) \
284 # define CDSSTRESS_SkipListMap_SHRCU_1( fixture, test_case, key_type, value_type )
288 # define CDSSTRESS_SkipListMap_SHRCU( fixture, test_case, key_type, value_type ) \
289 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_less_pascal, key_type, value_type ) \
290 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_sht_less_pascal_stat, key_type, value_type ) \
291 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_sht_cmp_pascal, key_type, value_type ) \
292 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_sht_cmp_pascal_stat, key_type, value_type ) \
293 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_less_xorshift, key_type, value_type ) \
294 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_sht_less_xorshift_stat, key_type, value_type ) \
295 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_sht_cmp_xorshift, key_type, value_type ) \
296 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_cmp_xorshift_stat, key_type, value_type ) \
297 CDSSTRESS_SkipListMap_SHRCU_1( fixture, test_case, key_type, value_type ) \
298 CDSSTRESS_SkipListMap_SHRCU_2( fixture, test_case, key_type, value_type ) \
301 # define CDSSTRESS_SkipListMap_SHRCU( fixture, test_case, key_type, value_type )
304 #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL > 1
305 # define CDSSTRESS_SkipListMap_HP_2( fixture, test_case, key_type, value_type ) \
306 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_pascal_seqcst, key_type, value_type ) \
307 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_pascal_seqcst, key_type, value_type ) \
309 # define CDSSTRESS_SkipListMap_RCU_2( fixture, test_case, key_type, value_type ) \
310 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_less_pascal_seqcst, key_type, value_type ) \
311 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_pascal_seqcst, key_type, value_type ) \
312 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_less_pascal_seqcst, key_type, value_type ) \
314 # define CDSSTRESS_SkipListMap_2( fixture, test_case, key_type, value_type ) \
315 CDSSTRESS_SkipListMap_HP_2( fixture, test_case, key_type, value_type ) \
316 CDSSTRESS_SkipListMap_RCU_2( fixture, test_case, key_type, value_type ) \
319 # define CDSSTRESS_SkipListMap_HP_2( fixture, test_case, key_type, value_type )
320 # define CDSSTRESS_SkipListMap_RCU_2( fixture, test_case, key_type, value_type )
321 # define CDSSTRESS_SkipListMap_2( fixture, test_case, key_type, value_type )
324 #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL == 1
325 # define CDSSTRESS_SkipListMap_HP_1( fixture, test_case, key_type, value_type ) \
326 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_pascal, key_type, value_type ) \
327 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_pascal_stat, key_type, value_type ) \
328 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_cmp_pascal, key_type, value_type ) \
329 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_cmp_pascal_stat, key_type, value_type ) \
330 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_xorshift, key_type, value_type ) \
331 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_xorshift_stat, key_type, value_type ) \
332 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_cmp_xorshift, key_type, value_type ) \
333 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_cmp_xorshift_stat, key_type, value_type ) \
335 # define CDSSTRESS_SkipListMap_RCU_1( fixture, test_case, key_type, value_type ) \
336 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_pascal, key_type, value_type ) \
337 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_less_pascal_stat, key_type, value_type ) \
338 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_less_pascal_stat, key_type, value_type ) \
339 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_cmp_pascal, key_type, value_type ) \
340 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_cmp_pascal, key_type, value_type ) \
341 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_cmp_pascal_stat, key_type, value_type ) \
342 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_xorshift, key_type, value_type ) \
343 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_less_xorshift_stat, key_type, value_type ) \
344 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_less_xorshift_stat, key_type, value_type ) \
345 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_cmp_xorshift, key_type, value_type ) \
346 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_cmp_xorshift, key_type, value_type ) \
347 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_cmp_xorshift_stat, key_type, value_type ) \
349 # define CDSSTRESS_SkipListMap_1( fixture, test_case, key_type, value_type ) \
350 CDSSTRESS_SkipListMap_HP_1( fixture, test_case, key_type, value_type ) \
351 CDSSTRESS_SkipListMap_RCU_1( fixture, test_case, key_type, value_type ) \
354 # define CDSSTRESS_SkipListMap_HP_1( fixture, test_case, key_type, value_type )
355 # define CDSSTRESS_SkipListMap_RCU_1( fixture, test_case, key_type, value_type )
356 # define CDSSTRESS_SkipListMap_1( fixture, test_case, key_type, value_type )
360 #define CDSSTRESS_SkipListMap_HP( fixture, test_case, key_type, value_type ) \
361 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_pascal, key_type, value_type ) \
362 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_pascal_stat, key_type, value_type ) \
363 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_cmp_pascal, key_type, value_type ) \
364 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_cmp_pascal_stat, key_type, value_type ) \
365 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_xorshift, key_type, value_type ) \
366 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_xorshift_stat, key_type, value_type ) \
367 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_cmp_xorshift, key_type, value_type ) \
368 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_cmp_xorshift_stat, key_type, value_type ) \
369 CDSSTRESS_SkipListMap_HP_1( fixture, test_case, key_type, value_type ) \
370 CDSSTRESS_SkipListMap_HP_2( fixture, test_case, key_type, value_type ) \
372 #define CDSSTRESS_SkipListMap_RCU( fixture, test_case, key_type, value_type ) \
373 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_less_pascal, key_type, value_type ) \
374 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_less_pascal, key_type, value_type ) \
375 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_pascal_stat, key_type, value_type ) \
376 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_cmp_pascal, key_type, value_type ) \
377 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_cmp_pascal_stat, key_type, value_type ) \
378 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_cmp_pascal_stat, key_type, value_type ) \
379 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_less_xorshift, key_type, value_type ) \
380 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_less_xorshift, key_type, value_type ) \
381 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_xorshift_stat, key_type, value_type ) \
382 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_cmp_xorshift, key_type, value_type ) \
383 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_cmp_xorshift_stat, key_type, value_type ) \
384 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_cmp_xorshift_stat, key_type, value_type ) \
385 CDSSTRESS_SkipListMap_RCU_1( fixture, test_case, key_type, value_type ) \
386 CDSSTRESS_SkipListMap_RCU_2( fixture, test_case, key_type, value_type ) \
387 CDSSTRESS_SkipListMap_SHRCU( fixture, test_case, key_type, value_type )
389 #define CDSSTRESS_SkipListMap( fixture, test_case, key_type, value_type ) \
390 CDSSTRESS_SkipListMap_HP( fixture, test_case, key_type, value_type ) \
391 CDSSTRESS_SkipListMap_RCU( fixture, test_case, key_type, value_type ) \
393 #define CDSSTRESS_SkipListMap_nogc( fixture, test_case, key_type, value_type ) \
394 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_pascal, key_type, value_type ) \
395 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_pascal_seqcst, key_type, value_type ) \
396 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_pascal_stat, key_type, value_type ) \
397 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_cmp_pascal, key_type, value_type ) \
398 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_cmp_pascal_stat, key_type, value_type ) \
399 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_xorshift, key_type, value_type ) \
400 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_xorshift_stat, key_type, value_type ) \
401 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_cmp_xorshift, key_type, value_type ) \
402 CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_cmp_xorshift_stat, key_type, value_type ) \
404 #endif // ifndef CDSUNIT_MAP_TYPE_SKIP_LIST_H