b26d6748971d92dbe7ad64f4cf0c559b0acb8c49
[libcds.git] / test / stress / map / map_type_split_list.h
1 /*
2     This file is a part of libcds - Concurrent Data Structures library
3
4     (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017
5
6     Source code repo: http://github.com/khizmax/libcds/
7     Download: http://sourceforge.net/projects/libcds/files/
8
9     Redistribution and use in source and binary forms, with or without
10     modification, are permitted provided that the following conditions are met:
11
12     * Redistributions of source code must retain the above copyright notice, this
13       list of conditions and the following disclaimer.
14
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.
18
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.
29 */
30
31 #ifndef CDSUNIT_MAP_TYPE_SPLIT_LIST_H
32 #define CDSUNIT_MAP_TYPE_SPLIT_LIST_H
33
34 #include "map_type.h"
35
36 #include <cds/container/michael_kvlist_hp.h>
37 #include <cds/container/michael_kvlist_dhp.h>
38 #include <cds/container/michael_kvlist_rcu.h>
39 #include <cds/container/michael_kvlist_nogc.h>
40
41 #include <cds/container/lazy_kvlist_hp.h>
42 #include <cds/container/lazy_kvlist_dhp.h>
43 #include <cds/container/lazy_kvlist_rcu.h>
44 #include <cds/container/lazy_kvlist_nogc.h>
45
46 #include <cds/container/iterable_kvlist_hp.h>
47 #include <cds/container/iterable_kvlist_dhp.h>
48
49 #include <cds/container/split_list_map.h>
50 #include <cds/container/split_list_map_rcu.h>
51 #include <cds/container/split_list_map_nogc.h>
52
53 #include <cds_test/stat_splitlist_out.h>
54 #include <cds_test/stat_michael_list_out.h>
55 #include <cds_test/stat_lazy_list_out.h>
56 #include <cds_test/stat_iterable_list_out.h>
57
58 namespace map {
59
60     template <class GC, typename Key, typename T, typename Traits = cc::split_list::traits >
61     class SplitListMap : public cc::SplitListMap< GC, Key, T, Traits >
62     {
63         typedef cc::SplitListMap< GC, Key, T, Traits > base_class;
64     public:
65         template <typename Config>
66         SplitListMap( Config const& cfg)
67             : base_class( cfg.s_nMapSize, cfg.s_nLoadFactor )
68         {}
69
70         template <typename Iterator>
71         typename std::enable_if< std::is_same< Iterator, typename base_class::iterator>::value, Iterator>::type
72         get_begin()
73         {
74             return base_class::begin();
75         }
76
77         template <typename Iterator>
78         typename std::enable_if< std::is_same< Iterator, typename base_class::iterator>::value, Iterator>::type
79         get_end()
80         {
81             return base_class::end();
82         }
83
84         // for testing
85         static CDS_CONSTEXPR bool const c_bExtractSupported = true;
86         static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true;
87         static CDS_CONSTEXPR bool const c_bEraseExactKey = false;
88     };
89
90     template <typename Key, typename T, typename Traits >
91     class SplitListMap< cds::gc::nogc, Key, T, Traits> : public cc::SplitListMap< cds::gc::nogc, Key, T, Traits >
92     {
93         typedef cc::SplitListMap< cds::gc::nogc, Key, T, Traits > base_class;
94     public:
95         template <typename Config>
96         SplitListMap( Config const& cfg)
97             : base_class( cfg.s_nMapSize, cfg.s_nLoadFactor )
98         {}
99
100         template <typename K>
101         bool insert( K const& key )
102         {
103             return base_class::insert( key ) != base_class::end();
104         }
105
106         template <typename K, typename V>
107         bool insert( K const& key, V const& val )
108         {
109             return base_class::insert( key, val ) != base_class::end();
110         }
111
112         template <typename K, typename Func>
113         bool insert_with( K const& key, Func func )
114         {
115             return base_class::insert_with( key, func ) != base_class::end();
116         }
117
118         template <typename K>
119         bool find( K const& key )
120         {
121             return base_class::find( key ) != base_class::end();
122         }
123
124         void clear()
125         {}
126
127         // for testing
128         static CDS_CONSTEXPR bool const c_bExtractSupported = true;
129         static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true;
130     };
131
132     struct tag_SplitListMap;
133
134     template <typename Key, typename Value>
135     struct map_type< tag_SplitListMap, Key, Value >: public map_type_base< Key, Value >
136     {
137         typedef map_type_base< Key, Value >      base_class;
138         typedef typename base_class::key_compare compare;
139         typedef typename base_class::key_less    less;
140         typedef typename base_class::equal_to    equal_to;
141         typedef typename base_class::key_hash    hash;
142
143
144         // ***************************************************************************
145         // SplitListMap based on MichaelList
146         struct traits_SplitList_Michael_dyn_cmp: public cc::split_list::make_traits<
147                 cc::split_list::ordered_list<cc::michael_list_tag>
148                 ,co::hash< hash >
149                 ,cc::split_list::ordered_list_traits<
150                     typename cc::michael_list::make_traits<
151                         co::compare< compare >
152                     >::type
153                 >
154             >::type
155         {};
156         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_HP_dyn_cmp;
157         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_DHP_dyn_cmp;
158         typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_NOGC_dyn_cmp;
159         typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_GPI_dyn_cmp;
160         typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_GPB_dyn_cmp;
161         typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_GPT_dyn_cmp;
162 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
163         typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_SHB_dyn_cmp;
164         typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_SHT_dyn_cmp;
165 #endif
166
167         struct traits_SplitList_Michael_dyn_cmp_stat : public traits_SplitList_Michael_dyn_cmp
168         {
169             typedef cc::split_list::stat<> stat;
170             typedef typename cc::michael_list::make_traits<
171                 co::compare< compare >
172                 ,co::stat< cc::michael_list::stat<> >
173             >::type ordered_list_traits;
174         };
175         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_HP_dyn_cmp_stat;
176         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_DHP_dyn_cmp_stat;
177         typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_cmp_stat> SplitList_Michael_NOGC_dyn_cmp_stat;
178         typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_GPI_dyn_cmp_stat;
179         typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_GPB_dyn_cmp_stat;
180         typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_GPT_dyn_cmp_stat;
181 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
182         typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_SHB_dyn_cmp_stat;
183         typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_SHT_dyn_cmp_stat;
184 #endif
185
186         struct traits_SplitList_Michael_dyn_cmp_seqcst: public cc::split_list::make_traits<
187                 cc::split_list::ordered_list<cc::michael_list_tag>
188                 ,co::hash< hash >
189                 ,co::memory_model< co::v::sequential_consistent >
190                 ,cc::split_list::ordered_list_traits<
191                     typename cc::michael_list::make_traits<
192                         co::compare< compare >
193                         ,co::memory_model< co::v::sequential_consistent >
194                     >::type
195                 >
196             >::type
197         {};
198         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_HP_dyn_cmp_seqcst;
199         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_DHP_dyn_cmp_seqcst;
200         typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst> SplitList_Michael_NOGC_dyn_cmp_seqcst;
201         typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_GPI_dyn_cmp_seqcst;
202         typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_GPB_dyn_cmp_seqcst;
203         typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_GPT_dyn_cmp_seqcst;
204 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
205         typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_SHB_dyn_cmp_seqcst;
206         typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_SHT_dyn_cmp_seqcst;
207 #endif
208
209         struct traits_SplitList_Michael_st_cmp: public cc::split_list::make_traits<
210                 cc::split_list::ordered_list<cc::michael_list_tag>
211                 ,cc::split_list::dynamic_bucket_table< false >
212                 ,co::hash< hash >
213                 ,cc::split_list::ordered_list_traits<
214                     typename cc::michael_list::make_traits<
215                         co::compare< compare >
216                     >::type
217                 >
218             >::type
219         {};
220         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_HP_st_cmp;
221         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_DHP_st_cmp;
222         typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_cmp> SplitList_Michael_NOGC_st_cmp;
223         typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_GPI_st_cmp;
224         typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_GPB_st_cmp;
225         typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_GPT_st_cmp;
226 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
227         typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_SHB_st_cmp;
228         typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_SHT_st_cmp;
229 #endif
230
231         //HP + less
232         struct traits_SplitList_Michael_dyn_less: public cc::split_list::make_traits<
233                 cc::split_list::ordered_list<cc::michael_list_tag>
234                 ,co::hash< hash >
235                 ,cc::split_list::ordered_list_traits<
236                     typename cc::michael_list::make_traits<
237                         co::less< less >
238                     >::type
239                 >
240             >::type
241         {};
242         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_HP_dyn_less;
243         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_DHP_dyn_less;
244         typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_less> SplitList_Michael_NOGC_dyn_less;
245         typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_GPI_dyn_less;
246         typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_GPB_dyn_less;
247         typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_GPT_dyn_less;
248 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
249         typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_SHB_dyn_less;
250         typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_SHT_dyn_less;
251 #endif
252
253
254         struct traits_SplitList_Michael_st_less: public cc::split_list::make_traits<
255                 cc::split_list::ordered_list<cc::michael_list_tag>
256                 ,cc::split_list::dynamic_bucket_table< false >
257                 ,co::hash< hash >
258                 ,cc::split_list::ordered_list_traits<
259                     typename cc::michael_list::make_traits<
260                         co::less< less >
261                     >::type
262                 >
263             >::type
264         {};
265         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_HP_st_less;
266         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_DHP_st_less;
267         typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_less> SplitList_Michael_NOGC_st_less;
268         typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_GPI_st_less;
269         typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_GPB_st_less;
270         typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_GPT_st_less;
271 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
272         typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_SHB_st_less;
273         typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_SHT_st_less;
274 #endif
275
276         struct traits_SplitList_Michael_st_less_stat : traits_SplitList_Michael_st_less
277         {
278             typedef cc::split_list::stat<> stat;
279             typedef typename cc::michael_list::make_traits<
280                 co::less< less >
281                 , co::stat< cc::michael_list::stat<> >
282             >::type ordered_list_traits;
283
284         };
285         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_HP_st_less_stat;
286         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_DHP_st_less_stat;
287         typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_less_stat> SplitList_Michael_NOGC_st_less_stat;
288         typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_GPI_st_less_stat;
289         typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_GPB_st_less_stat;
290         typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_GPT_st_less_stat;
291 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
292         typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_SHB_st_less_stat;
293         typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_SHT_st_less_stat;
294 #endif
295
296
297         // ***************************************************************************
298         // SplitListMap based on LazyKVList
299
300         struct SplitList_Lazy_dyn_cmp :
301             public cc::split_list::make_traits<
302                 cc::split_list::ordered_list<cc::lazy_list_tag>
303                 ,co::hash< hash >
304                 ,cc::split_list::ordered_list_traits<
305                     typename cc::lazy_list::make_traits<
306                         co::compare< compare >
307                     >::type
308                 >
309             >::type
310         {};
311         typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_HP_dyn_cmp;
312         typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_DHP_dyn_cmp;
313         typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_cmp> SplitList_Lazy_NOGC_dyn_cmp;
314         typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_GPI_dyn_cmp;
315         typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_GPB_dyn_cmp;
316         typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_GPT_dyn_cmp;
317 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
318         typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_SHB_dyn_cmp;
319         typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_SHT_dyn_cmp;
320 #endif
321
322         struct SplitList_Lazy_dyn_cmp_stat : public SplitList_Lazy_dyn_cmp
323         {
324             typedef cc::split_list::stat<> stat;
325             typedef typename cc::lazy_list::make_traits<
326                 co::compare< compare >
327                 , co::stat< cc::lazy_list::stat<>>
328             >::type ordered_list_traits;
329         };
330         typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_HP_dyn_cmp_stat;
331         typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_DHP_dyn_cmp_stat;
332         typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_cmp_stat> SplitList_Lazy_NOGC_dyn_cmp_stat;
333         typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_GPI_dyn_cmp_stat;
334         typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_GPB_dyn_cmp_stat;
335         typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_GPT_dyn_cmp_stat;
336 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
337         typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_SHB_dyn_cmp_stat;
338         typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_SHT_dyn_cmp_stat;
339 #endif
340
341         struct SplitList_Lazy_dyn_cmp_seqcst :
342             public cc::split_list::make_traits<
343                 cc::split_list::ordered_list<cc::lazy_list_tag>
344                 ,co::hash< hash >
345                 ,co::memory_model< co::v::sequential_consistent >
346                 ,cc::split_list::ordered_list_traits<
347                     typename cc::lazy_list::make_traits<
348                         co::compare< compare >
349                         ,co::memory_model< co::v::sequential_consistent >
350                     >::type
351                 >
352             >::type
353         {};
354         typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_HP_dyn_cmp_seqcst;
355         typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_DHP_dyn_cmp_seqcst;
356         typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_cmp_seqcst> SplitList_Lazy_NOGC_dyn_cmp_seqcst;
357         typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_GPI_dyn_cmp_seqcst;
358         typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_GPB_dyn_cmp_seqcst;
359         typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_GPT_dyn_cmp_seqcst;
360 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
361         typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_SHB_dyn_cmp_seqcst;
362         typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_SHT_dyn_cmp_seqcst;
363 #endif
364
365         struct SplitList_Lazy_st_cmp :
366             public cc::split_list::make_traits<
367                 cc::split_list::ordered_list<cc::lazy_list_tag>
368                 ,cc::split_list::dynamic_bucket_table< false >
369                 ,co::hash< hash >
370                 ,cc::split_list::ordered_list_traits<
371                     typename cc::lazy_list::make_traits<
372                         co::compare< compare >
373                     >::type
374                 >
375             >::type
376         {};
377         typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_HP_st_cmp;
378         typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_DHP_st_cmp;
379         typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_cmp> SplitList_Lazy_NOGC_st_cmp;
380         typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_GPI_st_cmp;
381         typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_GPB_st_cmp;
382         typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_GPT_st_cmp;
383 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
384         typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_SHB_st_cmp;
385         typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_SHT_st_cmp;
386 #endif
387
388
389         struct SplitList_Lazy_dyn_less :
390             public cc::split_list::make_traits<
391                 cc::split_list::ordered_list<cc::lazy_list_tag>
392                 ,co::hash< hash >
393                 ,cc::split_list::ordered_list_traits<
394                     typename cc::lazy_list::make_traits<
395                         co::less< less >
396                     >::type
397                 >
398             >::type
399         {};
400         typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_HP_dyn_less;
401         typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_DHP_dyn_less;
402         typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_less> SplitList_Lazy_NOGC_dyn_less;
403         typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_GPI_dyn_less;
404         typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_GPB_dyn_less;
405         typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_GPT_dyn_less;
406 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
407         typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_SHB_dyn_less;
408         typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_SHT_dyn_less;
409 #endif
410
411         struct SplitList_Lazy_st_less :
412             public cc::split_list::make_traits<
413                 cc::split_list::ordered_list<cc::lazy_list_tag>
414                 ,cc::split_list::dynamic_bucket_table< false >
415                 ,co::hash< hash >
416                 ,cc::split_list::ordered_list_traits<
417                     typename cc::lazy_list::make_traits<
418                         co::less< less >
419                     >::type
420                 >
421             >::type
422         {};
423         typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_HP_st_less;
424         typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_DHP_st_less;
425         typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_less> SplitList_Lazy_NOGC_st_less;
426         typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_GPI_st_less;
427         typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_GPB_st_less;
428         typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_GPT_st_less;
429 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
430         typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_SHB_st_less;
431         typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_SHT_st_less;
432 #endif
433
434         struct SplitList_Lazy_st_less_stat : public SplitList_Lazy_st_less
435         {
436             typedef cc::split_list::stat<> stat;
437             typedef typename cc::lazy_list::make_traits<
438                 co::less< less >
439                 , co::stat< cc::lazy_list::stat<>>
440             >::type ordered_list_traits;
441         };
442         typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_HP_st_less_stat;
443         typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_DHP_st_less_stat;
444         typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_less_stat> SplitList_Lazy_NOGC_st_less_stat;
445         typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_GPI_st_less_stat;
446         typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_GPB_st_less_stat;
447         typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_GPT_st_less_stat;
448 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
449         typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_SHB_st_less_stat;
450         typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_SHT_st_less_stat;
451 #endif
452
453
454         // ***************************************************************************
455         // SplitListMap based on IterableList
456         struct traits_SplitList_Iterable_dyn_cmp: public cc::split_list::make_traits<
457                 cc::split_list::ordered_list<cc::iterable_list_tag>
458                 ,co::hash< hash >
459                 ,cc::split_list::ordered_list_traits<
460                     typename cc::iterable_list::make_traits<
461                         co::compare< compare >
462                     >::type
463                 >
464             >::type
465         {};
466         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Iterable_dyn_cmp > SplitList_Iterable_HP_dyn_cmp;
467         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Iterable_dyn_cmp > SplitList_Iterable_DHP_dyn_cmp;
468 #if 0
469         typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Iterable_dyn_cmp > SplitList_Iterable_NOGC_dyn_cmp;
470         typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Iterable_dyn_cmp > SplitList_Iterable_RCU_GPI_dyn_cmp;
471         typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Iterable_dyn_cmp > SplitList_Iterable_RCU_GPB_dyn_cmp;
472         typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Iterable_dyn_cmp > SplitList_Iterable_RCU_GPT_dyn_cmp;
473 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
474         typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Iterable_dyn_cmp > SplitList_Iterable_RCU_SHB_dyn_cmp;
475         typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Iterable_dyn_cmp > SplitList_Iterable_RCU_SHT_dyn_cmp;
476 #endif
477 #endif
478
479         struct traits_SplitList_Iterable_dyn_cmp_stat : public traits_SplitList_Iterable_dyn_cmp
480         {
481             typedef cc::split_list::stat<> stat;
482             typedef typename cc::iterable_list::make_traits<
483                 co::compare< compare >
484                 , co::stat< cc::iterable_list::stat<>>
485             >::type ordered_list_traits;
486         };
487         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Iterable_dyn_cmp_stat > SplitList_Iterable_HP_dyn_cmp_stat;
488         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Iterable_dyn_cmp_stat > SplitList_Iterable_DHP_dyn_cmp_stat;
489 #if 0
490         typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Iterable_dyn_cmp_stat> SplitList_Iterable_NOGC_dyn_cmp_stat;
491         typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Iterable_dyn_cmp_stat > SplitList_Iterable_RCU_GPI_dyn_cmp_stat;
492         typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Iterable_dyn_cmp_stat > SplitList_Iterable_RCU_GPB_dyn_cmp_stat;
493         typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Iterable_dyn_cmp_stat > SplitList_Iterable_RCU_GPT_dyn_cmp_stat;
494 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
495         typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Iterable_dyn_cmp_stat > SplitList_Iterable_RCU_SHB_dyn_cmp_stat;
496         typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Iterable_dyn_cmp_stat > SplitList_Iterable_RCU_SHT_dyn_cmp_stat;
497 #endif
498 #endif
499
500         struct traits_SplitList_Iterable_dyn_cmp_seqcst: public cc::split_list::make_traits<
501                 cc::split_list::ordered_list<cc::iterable_list_tag>
502                 ,co::hash< hash >
503                 ,co::memory_model< co::v::sequential_consistent >
504                 ,cc::split_list::ordered_list_traits<
505                     typename cc::iterable_list::make_traits<
506                         co::compare< compare >
507                         ,co::memory_model< co::v::sequential_consistent >
508                     >::type
509                 >
510             >::type
511         {};
512         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Iterable_dyn_cmp_seqcst > SplitList_Iterable_HP_dyn_cmp_seqcst;
513         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Iterable_dyn_cmp_seqcst > SplitList_Iterable_DHP_dyn_cmp_seqcst;
514 #if 0
515         typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Iterable_dyn_cmp_seqcst> SplitList_Iterable_NOGC_dyn_cmp_seqcst;
516         typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Iterable_dyn_cmp_seqcst > SplitList_Iterable_RCU_GPI_dyn_cmp_seqcst;
517         typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Iterable_dyn_cmp_seqcst > SplitList_Iterable_RCU_GPB_dyn_cmp_seqcst;
518         typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Iterable_dyn_cmp_seqcst > SplitList_Iterable_RCU_GPT_dyn_cmp_seqcst;
519 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
520         typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Iterable_dyn_cmp_seqcst > SplitList_Iterable_RCU_SHB_dyn_cmp_seqcst;
521         typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Iterable_dyn_cmp_seqcst > SplitList_Iterable_RCU_SHT_dyn_cmp_seqcst;
522 #endif
523 #endif
524
525         struct traits_SplitList_Iterable_st_cmp: public cc::split_list::make_traits<
526                 cc::split_list::ordered_list<cc::iterable_list_tag>
527                 ,cc::split_list::dynamic_bucket_table< false >
528                 ,co::hash< hash >
529                 ,cc::split_list::ordered_list_traits<
530                     typename cc::iterable_list::make_traits<
531                         co::compare< compare >
532                     >::type
533                 >
534             >::type
535         {};
536         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Iterable_st_cmp > SplitList_Iterable_HP_st_cmp;
537         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Iterable_st_cmp > SplitList_Iterable_DHP_st_cmp;
538 #if 0
539         typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Iterable_st_cmp> SplitList_Iterable_NOGC_st_cmp;
540         typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Iterable_st_cmp > SplitList_Iterable_RCU_GPI_st_cmp;
541         typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Iterable_st_cmp > SplitList_Iterable_RCU_GPB_st_cmp;
542         typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Iterable_st_cmp > SplitList_Iterable_RCU_GPT_st_cmp;
543 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
544         typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Iterable_st_cmp > SplitList_Iterable_RCU_SHB_st_cmp;
545         typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Iterable_st_cmp > SplitList_Iterable_RCU_SHT_st_cmp;
546 #endif
547 #endif
548
549         //HP + less
550         struct traits_SplitList_Iterable_dyn_less: public cc::split_list::make_traits<
551                 cc::split_list::ordered_list<cc::iterable_list_tag>
552                 ,co::hash< hash >
553                 ,cc::split_list::ordered_list_traits<
554                     typename cc::iterable_list::make_traits<
555                         co::less< less >
556                     >::type
557                 >
558             >::type
559         {};
560         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Iterable_dyn_less > SplitList_Iterable_HP_dyn_less;
561         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Iterable_dyn_less > SplitList_Iterable_DHP_dyn_less;
562 #if 0
563         typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Iterable_dyn_less> SplitList_Iterable_NOGC_dyn_less;
564         typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Iterable_dyn_less > SplitList_Iterable_RCU_GPI_dyn_less;
565         typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Iterable_dyn_less > SplitList_Iterable_RCU_GPB_dyn_less;
566         typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Iterable_dyn_less > SplitList_Iterable_RCU_GPT_dyn_less;
567 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
568         typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Iterable_dyn_less > SplitList_Iterable_RCU_SHB_dyn_less;
569         typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Iterable_dyn_less > SplitList_Iterable_RCU_SHT_dyn_less;
570 #endif
571 #endif
572
573
574         struct traits_SplitList_Iterable_st_less: public cc::split_list::make_traits<
575                 cc::split_list::ordered_list<cc::iterable_list_tag>
576                 ,cc::split_list::dynamic_bucket_table< false >
577                 ,co::hash< hash >
578                 ,cc::split_list::ordered_list_traits<
579                     typename cc::iterable_list::make_traits<
580                         co::less< less >
581                     >::type
582                 >
583             >::type
584         {};
585         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Iterable_st_less > SplitList_Iterable_HP_st_less;
586         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Iterable_st_less > SplitList_Iterable_DHP_st_less;
587 #if 0
588         typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Iterable_st_less> SplitList_Iterable_NOGC_st_less;
589         typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Iterable_st_less > SplitList_Iterable_RCU_GPI_st_less;
590         typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Iterable_st_less > SplitList_Iterable_RCU_GPB_st_less;
591         typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Iterable_st_less > SplitList_Iterable_RCU_GPT_st_less;
592 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
593         typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Iterable_st_less > SplitList_Iterable_RCU_SHB_st_less;
594         typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Iterable_st_less > SplitList_Iterable_RCU_SHT_st_less;
595 #endif
596 #endif
597
598         struct traits_SplitList_Iterable_st_less_stat : traits_SplitList_Iterable_st_less
599         {
600             typedef cc::split_list::stat<> stat;
601             typedef typename cc::iterable_list::make_traits<
602                 co::less< less >
603                 , co::stat< cc::iterable_list::stat<>>
604             >::type ordered_list_traits;
605         };
606         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Iterable_st_less_stat > SplitList_Iterable_HP_st_less_stat;
607         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Iterable_st_less_stat > SplitList_Iterable_DHP_st_less_stat;
608 #if 0
609         typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Iterable_st_less_stat> SplitList_Iterable_NOGC_st_less_stat;
610         typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Iterable_st_less_stat > SplitList_Iterable_RCU_GPI_st_less_stat;
611         typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Iterable_st_less_stat > SplitList_Iterable_RCU_GPB_st_less_stat;
612         typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Iterable_st_less_stat > SplitList_Iterable_RCU_GPT_st_less_stat;
613 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
614         typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Iterable_st_less_stat > SplitList_Iterable_RCU_SHB_st_less_stat;
615         typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Iterable_st_less_stat > SplitList_Iterable_RCU_SHT_st_less_stat;
616 #endif
617 #endif
618
619     };
620
621     template <typename GC, typename K, typename T, typename Traits >
622     static inline void print_stat( cds_test::property_stream& o, SplitListMap< GC, K, T, Traits > const& m )
623     {
624         o << m.statistics()
625           << cds_test::stat_prefix( "list_stat" )
626           << m.list_statistics()
627           << cds_test::stat_prefix( "" );
628     }
629
630 }   // namespace map
631
632 #define CDSSTRESS_SplitListMap_case( fixture, test_case, splitlist_map_type, key_type, value_type ) \
633     TEST_P( fixture, splitlist_map_type ) \
634     { \
635         typedef map::map_type< tag_SplitListMap, key_type, value_type >::splitlist_map_type map_type; \
636         test_case<map_type>(); \
637     }
638
639 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
640
641 #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL > 1
642 #   define CDSSTRESS_SplitListMap_SHRCU_2( fixture, test_case, key_type, value_type ) \
643         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHB_dyn_cmp_seqcst,  key_type, value_type ) \
644         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHT_dyn_cmp_seqcst,  key_type, value_type ) \
645
646 #else
647 #   define CDSSTRESS_SplitListMap_SHRCU_2( fixture, test_case, key_type, value_type )
648 #endif
649
650 #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL == 1
651 #   define CDSSTRESS_SplitListMap_SHRCU_1( fixture, test_case, key_type, value_type ) \
652         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHT_dyn_cmp,         key_type, value_type ) \
653         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHB_dyn_cmp_stat,    key_type, value_type ) \
654         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHB_st_cmp,          key_type, value_type ) \
655         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHT_st_cmp,          key_type, value_type ) \
656         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHB_dyn_less,        key_type, value_type ) \
657         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHT_st_less,         key_type, value_type ) \
658         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHB_st_less_stat,    key_type, value_type ) \
659         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHT_dyn_cmp,            key_type, value_type ) \
660         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHB_dyn_cmp_stat,       key_type, value_type ) \
661         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHB_st_cmp,             key_type, value_type ) \
662         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHT_st_cmp,             key_type, value_type ) \
663         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHB_dyn_less,           key_type, value_type ) \
664         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHT_st_less,            key_type, value_type ) \
665         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHB_st_less_stat,       key_type, value_type ) \
666
667 #else
668 #   define CDSSTRESS_SplitListMap_SHRCU_1( fixture, test_case, key_type, value_type )
669 #endif
670
671
672 #   define CDSSTRESS_SplitListMap_SHRCU( fixture, test_case, key_type, value_type ) \
673         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHB_dyn_cmp,         key_type, value_type ) \
674         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHT_dyn_cmp_stat,    key_type, value_type ) \
675         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHT_dyn_less,        key_type, value_type ) \
676         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHB_st_less,         key_type, value_type ) \
677         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHT_st_less_stat,    key_type, value_type ) \
678         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHB_dyn_cmp,            key_type, value_type ) \
679         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHT_dyn_cmp_stat,       key_type, value_type ) \
680         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHT_dyn_less,           key_type, value_type ) \
681         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHB_st_less,            key_type, value_type ) \
682         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHT_st_less_stat,       key_type, value_type ) \
683         CDSSTRESS_SplitListMap_SHRCU_1( fixture, test_case, key_type, value_type ) \
684         CDSSTRESS_SplitListMap_SHRCU_2( fixture, test_case, key_type, value_type ) \
685
686 #else
687 #   define CDSSTRESS_SplitListMap_SHRCU( fixture, test_case, key_type, value_type )
688 #endif
689
690 #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL > 1
691 #   define CDSSTRESS_SplitListMap_HP_2( fixture, test_case, key_type, value_type ) \
692         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_HP_dyn_cmp_seqcst,       key_type, value_type ) \
693         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_DHP_dyn_cmp_seqcst,      key_type, value_type ) \
694         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_HP_dyn_cmp_seqcst,          key_type, value_type ) \
695         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_DHP_dyn_cmp_seqcst,         key_type, value_type ) \
696
697 #   define CDSSTRESS_SplitListMap_RCU_2( fixture, test_case, key_type, value_type ) \
698         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPI_dyn_cmp_seqcst,  key_type, value_type ) \
699         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPB_dyn_cmp_seqcst,  key_type, value_type ) \
700         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPT_dyn_cmp_seqcst,  key_type, value_type ) \
701         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPI_dyn_cmp_seqcst,     key_type, value_type ) \
702         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPB_dyn_cmp_seqcst,     key_type, value_type ) \
703         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPT_dyn_cmp_seqcst,     key_type, value_type ) \
704
705 #   define CDSSTRESS_SplitListMap_2( fixture, test_case, key_type, value_type ) \
706         CDSSTRESS_SplitListMap_HP_2( fixture, test_case, key_type, value_type ) \
707         CDSSTRESS_SplitListMap_RCU_2( fixture, test_case, key_type, value_type ) \
708
709
710 #else
711 #   define CDSSTRESS_SplitListMap_HP_2( fixture, test_case, key_type, value_type )
712 #   define CDSSTRESS_SplitListMap_RCU_2( fixture, test_case, key_type, value_type )
713 #   define CDSSTRESS_SplitListMap_2( fixture, test_case, key_type, value_type )
714 #endif
715
716 #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL == 1
717 #   define CDSSTRESS_SplitListMap_HP_1( fixture, test_case, key_type, value_type ) \
718         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_DHP_dyn_cmp,             key_type, value_type ) \
719         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_HP_dyn_cmp_stat,         key_type, value_type ) \
720         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_HP_st_cmp,               key_type, value_type ) \
721         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_DHP_dyn_less,            key_type, value_type ) \
722         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_HP_st_less,              key_type, value_type ) \
723         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_DHP_st_less_stat,        key_type, value_type ) \
724         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_DHP_dyn_cmp,                key_type, value_type ) \
725         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_HP_dyn_cmp_stat,            key_type, value_type ) \
726         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_HP_st_cmp,                  key_type, value_type ) \
727         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_DHP_dyn_less,               key_type, value_type ) \
728         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_HP_st_less,                 key_type, value_type ) \
729         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_DHP_st_less_stat,           key_type, value_type ) \
730
731 #   define CDSSTRESS_SplitListMap_RCU_1( fixture, test_case, key_type, value_type ) \
732         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPB_dyn_cmp,         key_type, value_type ) \
733         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPI_dyn_cmp_stat,    key_type, value_type ) \
734         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPT_dyn_cmp_stat,    key_type, value_type ) \
735         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPI_st_cmp,          key_type, value_type ) \
736         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPT_st_cmp,          key_type, value_type ) \
737         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPB_dyn_less,        key_type, value_type ) \
738         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPI_st_less,         key_type, value_type ) \
739         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPT_st_less,         key_type, value_type ) \
740         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPB_st_less_stat,    key_type, value_type ) \
741         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPB_dyn_cmp,            key_type, value_type ) \
742         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPI_dyn_cmp_stat,       key_type, value_type ) \
743         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPT_dyn_cmp_stat,       key_type, value_type ) \
744         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPI_st_cmp,             key_type, value_type ) \
745         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPT_st_cmp,             key_type, value_type ) \
746         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPB_dyn_less,           key_type, value_type ) \
747         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPI_st_less,            key_type, value_type ) \
748         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPT_st_less,            key_type, value_type ) \
749         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPB_st_less_stat,       key_type, value_type ) \
750         CDSSTRESS_SplitListMap_SHRCU( fixture, test_case, key_type, value_type ) \
751
752 #   define CDSSTRESS_SplitListMap_1( fixture, test_case, key_type, value_type ) \
753         CDSSTRESS_SplitListMap_HP_1( fixture, test_case, key_type, value_type ) \
754         CDSSTRESS_SplitListMap_RCU_1( fixture, test_case, key_type, value_type ) \
755
756 #else
757 #   define CDSSTRESS_SplitListMap_HP_1( fixture, test_case, key_type, value_type )
758 #   define CDSSTRESS_SplitListMap_RCU_1( fixture, test_case, key_type, value_type )
759 #   define CDSSTRESS_SplitListMap_1( fixture, test_case, key_type, value_type )
760 #endif
761
762
763 #define CDSSTRESS_SplitListMap_HP( fixture, test_case, key_type, value_type ) \
764     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_HP_dyn_cmp,              key_type, value_type ) \
765     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_DHP_dyn_cmp_stat,        key_type, value_type ) \
766     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_DHP_st_cmp,              key_type, value_type ) \
767     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_HP_dyn_less,             key_type, value_type ) \
768     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_HP_st_less_stat,         key_type, value_type ) \
769     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_DHP_st_less,             key_type, value_type ) \
770     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_HP_dyn_cmp,                 key_type, value_type ) \
771     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_DHP_dyn_cmp_stat,           key_type, value_type ) \
772     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_DHP_st_cmp,                 key_type, value_type ) \
773     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_HP_dyn_less,                key_type, value_type ) \
774     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_DHP_st_less,                key_type, value_type ) \
775     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_HP_st_less_stat,            key_type, value_type ) \
776     CDSSTRESS_SplitListMap_HP_1( fixture, test_case, key_type, value_type ) \
777     CDSSTRESS_SplitListMap_HP_2( fixture, test_case, key_type, value_type ) \
778
779 #define CDSSTRESS_SplitListMap_RCU( fixture, test_case, key_type, value_type ) \
780     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPI_dyn_cmp,         key_type, value_type ) \
781     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPT_dyn_cmp,         key_type, value_type ) \
782     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPB_dyn_cmp_stat,    key_type, value_type ) \
783     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPB_st_cmp,          key_type, value_type ) \
784     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPI_dyn_less,        key_type, value_type ) \
785     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPT_dyn_less,        key_type, value_type ) \
786     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPB_st_less,         key_type, value_type ) \
787     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPI_st_less_stat,    key_type, value_type ) \
788     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPT_st_less_stat,    key_type, value_type ) \
789     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPI_dyn_cmp,            key_type, value_type ) \
790     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPT_dyn_cmp,            key_type, value_type ) \
791     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPB_dyn_cmp_stat,       key_type, value_type ) \
792     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPB_st_cmp,             key_type, value_type ) \
793     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPI_dyn_less,           key_type, value_type ) \
794     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPT_dyn_less,           key_type, value_type ) \
795     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPB_st_less,            key_type, value_type ) \
796     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPI_st_less_stat,       key_type, value_type ) \
797     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPT_st_less_stat,       key_type, value_type ) \
798     CDSSTRESS_SplitListMap_RCU_1( fixture, test_case, key_type, value_type ) \
799     CDSSTRESS_SplitListMap_RCU_2( fixture, test_case, key_type, value_type ) \
800
801 #define CDSSTRESS_SplitListMap( fixture, test_case, key_type, value_type ) \
802     CDSSTRESS_SplitListMap_HP( fixture, test_case, key_type, value_type ) \
803     CDSSTRESS_SplitListMap_RCU( fixture, test_case, key_type, value_type ) \
804
805 #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL > 0
806 #   define CDSSTRESS_SplitListIterableMap_1( fixture, test_case, key_type, value_type ) \
807         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_DHP_dyn_cmp,             key_type, value_type ) \
808         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_HP_dyn_cmp_stat,         key_type, value_type ) \
809         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_HP_st_cmp,               key_type, value_type ) \
810         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_DHP_dyn_less,            key_type, value_type ) \
811         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_HP_st_less,              key_type, value_type ) \
812         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_DHP_st_less_stat,        key_type, value_type ) \
813
814 #else
815 #   define CDSSTRESS_SplitListIterableMap_1( fixture, test_case, key_type, value_type )
816 #endif
817
818
819 #define CDSSTRESS_SplitListIterableMap( fixture, test_case, key_type, value_type ) \
820     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_HP_dyn_cmp,              key_type, value_type ) \
821     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_DHP_dyn_cmp_stat,        key_type, value_type ) \
822     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_DHP_st_cmp,              key_type, value_type ) \
823     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_HP_dyn_less,             key_type, value_type ) \
824     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_DHP_st_less,             key_type, value_type ) \
825     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_HP_st_less_stat,         key_type, value_type ) \
826     CDSSTRESS_SplitListIterableMap_1( fixture, test_case, key_type, value_type ) \
827
828
829 #define CDSSTRESS_SplitListMap_nogc( fixture, test_case, key_type, value_type ) \
830     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_NOGC_dyn_cmp,            key_type, value_type ) \
831     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_NOGC_dyn_cmp_stat,       key_type, value_type ) \
832     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_NOGC_st_cmp,             key_type, value_type ) \
833     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_NOGC_dyn_less,           key_type, value_type ) \
834     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_NOGC_st_less,            key_type, value_type ) \
835     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_NOGC_st_less_stat,       key_type, value_type ) \
836     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_NOGC_dyn_cmp,               key_type, value_type ) \
837     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_NOGC_dyn_cmp_stat,          key_type, value_type ) \
838     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_NOGC_st_cmp,                key_type, value_type ) \
839     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_NOGC_dyn_less,              key_type, value_type ) \
840     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_NOGC_st_less,               key_type, value_type ) \
841     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_NOGC_st_less_stat,          key_type, value_type ) \
842
843 #endif // ifndef CDSUNIT_MAP_TYPE_SPLIT_LIST_H