Added different bit_reversal algo to SplitListSet/Map stress test
[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_swar: public traits_SplitList_Michael_dyn_cmp
168         {
169             typedef cds::algo::bit_reversal::swar bit_reversal;
170         };
171         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_cmp_swar > SplitList_Michael_HP_dyn_cmp_swar;
172         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_cmp_swar > SplitList_Michael_DHP_dyn_cmp_swar;
173         typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_cmp_swar > SplitList_Michael_NOGC_dyn_cmp_swar;
174         typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_cmp_swar > SplitList_Michael_RCU_GPI_dyn_cmp_swar;
175         typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_cmp_swar > SplitList_Michael_RCU_GPB_dyn_cmp_swar;
176         typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_cmp_swar > SplitList_Michael_RCU_GPT_dyn_cmp_swar;
177 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
178         typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_cmp_swar > SplitList_Michael_RCU_SHB_dyn_cmp_swar;
179         typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_cmp_swar > SplitList_Michael_RCU_SHT_dyn_cmp_swar;
180 #endif
181
182         struct traits_SplitList_Michael_dyn_cmp_stat : public traits_SplitList_Michael_dyn_cmp
183         {
184             typedef cc::split_list::stat<> stat;
185             typedef typename cc::michael_list::make_traits<
186                 co::compare< compare >
187                 ,co::stat< cc::michael_list::stat<> >
188             >::type ordered_list_traits;
189         };
190         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_HP_dyn_cmp_stat;
191         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_DHP_dyn_cmp_stat;
192         typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_cmp_stat> SplitList_Michael_NOGC_dyn_cmp_stat;
193         typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_GPI_dyn_cmp_stat;
194         typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_GPB_dyn_cmp_stat;
195         typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_GPT_dyn_cmp_stat;
196 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
197         typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_SHB_dyn_cmp_stat;
198         typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_SHT_dyn_cmp_stat;
199 #endif
200
201         struct traits_SplitList_Michael_dyn_cmp_seqcst: public cc::split_list::make_traits<
202                 cc::split_list::ordered_list<cc::michael_list_tag>
203                 ,co::hash< hash >
204                 ,co::memory_model< co::v::sequential_consistent >
205                 ,cc::split_list::ordered_list_traits<
206                     typename cc::michael_list::make_traits<
207                         co::compare< compare >
208                         ,co::memory_model< co::v::sequential_consistent >
209                     >::type
210                 >
211             >::type
212         {};
213         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_HP_dyn_cmp_seqcst;
214         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_DHP_dyn_cmp_seqcst;
215         typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst> SplitList_Michael_NOGC_dyn_cmp_seqcst;
216         typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_GPI_dyn_cmp_seqcst;
217         typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_GPB_dyn_cmp_seqcst;
218         typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_GPT_dyn_cmp_seqcst;
219 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
220         typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_SHB_dyn_cmp_seqcst;
221         typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_SHT_dyn_cmp_seqcst;
222 #endif
223
224         struct traits_SplitList_Michael_st_cmp: public cc::split_list::make_traits<
225                 cc::split_list::ordered_list<cc::michael_list_tag>
226                 ,cc::split_list::dynamic_bucket_table< false >
227                 ,co::hash< hash >
228                 ,cc::split_list::ordered_list_traits<
229                     typename cc::michael_list::make_traits<
230                         co::compare< compare >
231                     >::type
232                 >
233             >::type
234         {};
235         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_HP_st_cmp;
236         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_DHP_st_cmp;
237         typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_cmp> SplitList_Michael_NOGC_st_cmp;
238         typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_GPI_st_cmp;
239         typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_GPB_st_cmp;
240         typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_GPT_st_cmp;
241 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
242         typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_SHB_st_cmp;
243         typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_SHT_st_cmp;
244 #endif
245
246         //HP + less
247         struct traits_SplitList_Michael_dyn_less: public cc::split_list::make_traits<
248                 cc::split_list::ordered_list<cc::michael_list_tag>
249                 ,co::hash< hash >
250                 ,cc::split_list::ordered_list_traits<
251                     typename cc::michael_list::make_traits<
252                         co::less< less >
253                     >::type
254                 >
255             >::type
256         {};
257         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_HP_dyn_less;
258         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_DHP_dyn_less;
259         typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_less> SplitList_Michael_NOGC_dyn_less;
260         typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_GPI_dyn_less;
261         typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_GPB_dyn_less;
262         typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_GPT_dyn_less;
263 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
264         typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_SHB_dyn_less;
265         typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_SHT_dyn_less;
266 #endif
267
268
269         struct traits_SplitList_Michael_st_less: public cc::split_list::make_traits<
270                 cc::split_list::ordered_list<cc::michael_list_tag>
271                 ,cc::split_list::dynamic_bucket_table< false >
272                 ,co::hash< hash >
273                 ,cc::split_list::ordered_list_traits<
274                     typename cc::michael_list::make_traits<
275                         co::less< less >
276                     >::type
277                 >
278             >::type
279         {};
280         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_HP_st_less;
281         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_DHP_st_less;
282         typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_less> SplitList_Michael_NOGC_st_less;
283         typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_GPI_st_less;
284         typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_GPB_st_less;
285         typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_GPT_st_less;
286 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
287         typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_SHB_st_less;
288         typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_SHT_st_less;
289 #endif
290
291         struct traits_SplitList_Michael_st_less_stat : traits_SplitList_Michael_st_less
292         {
293             typedef cc::split_list::stat<> stat;
294             typedef typename cc::michael_list::make_traits<
295                 co::less< less >
296                 , co::stat< cc::michael_list::stat<> >
297             >::type ordered_list_traits;
298
299         };
300         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_HP_st_less_stat;
301         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_DHP_st_less_stat;
302         typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_less_stat> SplitList_Michael_NOGC_st_less_stat;
303         typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_GPI_st_less_stat;
304         typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_GPB_st_less_stat;
305         typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_GPT_st_less_stat;
306 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
307         typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_SHB_st_less_stat;
308         typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_SHT_st_less_stat;
309 #endif
310
311
312         // ***************************************************************************
313         // SplitListMap based on LazyKVList
314
315         struct SplitList_Lazy_dyn_cmp :
316             public cc::split_list::make_traits<
317                 cc::split_list::ordered_list<cc::lazy_list_tag>
318                 ,co::hash< hash >
319                 ,cc::split_list::ordered_list_traits<
320                     typename cc::lazy_list::make_traits<
321                         co::compare< compare >
322                     >::type
323                 >
324             >::type
325         {};
326         typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_HP_dyn_cmp;
327         typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_DHP_dyn_cmp;
328         typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_cmp> SplitList_Lazy_NOGC_dyn_cmp;
329         typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_GPI_dyn_cmp;
330         typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_GPB_dyn_cmp;
331         typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_GPT_dyn_cmp;
332 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
333         typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_SHB_dyn_cmp;
334         typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_SHT_dyn_cmp;
335 #endif
336
337         struct SplitList_Lazy_dyn_cmp_stat : public SplitList_Lazy_dyn_cmp
338         {
339             typedef cc::split_list::stat<> stat;
340             typedef typename cc::lazy_list::make_traits<
341                 co::compare< compare >
342                 , co::stat< cc::lazy_list::stat<>>
343             >::type ordered_list_traits;
344         };
345         typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_HP_dyn_cmp_stat;
346         typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_DHP_dyn_cmp_stat;
347         typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_cmp_stat> SplitList_Lazy_NOGC_dyn_cmp_stat;
348         typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_GPI_dyn_cmp_stat;
349         typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_GPB_dyn_cmp_stat;
350         typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_GPT_dyn_cmp_stat;
351 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
352         typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_SHB_dyn_cmp_stat;
353         typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_SHT_dyn_cmp_stat;
354 #endif
355
356         struct SplitList_Lazy_dyn_cmp_seqcst :
357             public cc::split_list::make_traits<
358                 cc::split_list::ordered_list<cc::lazy_list_tag>
359                 ,co::hash< hash >
360                 ,co::memory_model< co::v::sequential_consistent >
361                 ,cc::split_list::ordered_list_traits<
362                     typename cc::lazy_list::make_traits<
363                         co::compare< compare >
364                         ,co::memory_model< co::v::sequential_consistent >
365                     >::type
366                 >
367             >::type
368         {};
369         typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_HP_dyn_cmp_seqcst;
370         typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_DHP_dyn_cmp_seqcst;
371         typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_cmp_seqcst> SplitList_Lazy_NOGC_dyn_cmp_seqcst;
372         typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_GPI_dyn_cmp_seqcst;
373         typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_GPB_dyn_cmp_seqcst;
374         typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_GPT_dyn_cmp_seqcst;
375 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
376         typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_SHB_dyn_cmp_seqcst;
377         typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_SHT_dyn_cmp_seqcst;
378 #endif
379
380         struct SplitList_Lazy_st_cmp :
381             public cc::split_list::make_traits<
382                 cc::split_list::ordered_list<cc::lazy_list_tag>
383                 ,cc::split_list::dynamic_bucket_table< false >
384                 ,co::hash< hash >
385                 ,cc::split_list::ordered_list_traits<
386                     typename cc::lazy_list::make_traits<
387                         co::compare< compare >
388                     >::type
389                 >
390             >::type
391         {};
392         typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_HP_st_cmp;
393         typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_DHP_st_cmp;
394         typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_cmp> SplitList_Lazy_NOGC_st_cmp;
395         typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_GPI_st_cmp;
396         typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_GPB_st_cmp;
397         typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_GPT_st_cmp;
398 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
399         typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_SHB_st_cmp;
400         typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_SHT_st_cmp;
401 #endif
402
403
404         struct SplitList_Lazy_dyn_less :
405             public cc::split_list::make_traits<
406                 cc::split_list::ordered_list<cc::lazy_list_tag>
407                 ,co::hash< hash >
408                 ,cc::split_list::ordered_list_traits<
409                     typename cc::lazy_list::make_traits<
410                         co::less< less >
411                     >::type
412                 >
413             >::type
414         {};
415         typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_HP_dyn_less;
416         typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_DHP_dyn_less;
417         typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_less> SplitList_Lazy_NOGC_dyn_less;
418         typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_GPI_dyn_less;
419         typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_GPB_dyn_less;
420         typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_GPT_dyn_less;
421 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
422         typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_SHB_dyn_less;
423         typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_SHT_dyn_less;
424 #endif
425
426         struct SplitList_Lazy_st_less :
427             public cc::split_list::make_traits<
428                 cc::split_list::ordered_list<cc::lazy_list_tag>
429                 ,cc::split_list::dynamic_bucket_table< false >
430                 ,co::hash< hash >
431                 ,cc::split_list::ordered_list_traits<
432                     typename cc::lazy_list::make_traits<
433                         co::less< less >
434                     >::type
435                 >
436             >::type
437         {};
438         typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_HP_st_less;
439         typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_DHP_st_less;
440         typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_less> SplitList_Lazy_NOGC_st_less;
441         typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_GPI_st_less;
442         typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_GPB_st_less;
443         typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_GPT_st_less;
444 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
445         typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_SHB_st_less;
446         typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_SHT_st_less;
447 #endif
448
449         struct SplitList_Lazy_st_less_stat : public SplitList_Lazy_st_less
450         {
451             typedef cc::split_list::stat<> stat;
452             typedef typename cc::lazy_list::make_traits<
453                 co::less< less >
454                 , co::stat< cc::lazy_list::stat<>>
455             >::type ordered_list_traits;
456         };
457         typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_HP_st_less_stat;
458         typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_DHP_st_less_stat;
459         typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_less_stat> SplitList_Lazy_NOGC_st_less_stat;
460         typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_GPI_st_less_stat;
461         typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_GPB_st_less_stat;
462         typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_GPT_st_less_stat;
463 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
464         typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_SHB_st_less_stat;
465         typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_SHT_st_less_stat;
466 #endif
467
468
469         // ***************************************************************************
470         // SplitListMap based on IterableList
471         struct traits_SplitList_Iterable_dyn_cmp: public cc::split_list::make_traits<
472                 cc::split_list::ordered_list<cc::iterable_list_tag>
473                 ,co::hash< hash >
474                 ,cc::split_list::ordered_list_traits<
475                     typename cc::iterable_list::make_traits<
476                         co::compare< compare >
477                     >::type
478                 >
479             >::type
480         {};
481         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Iterable_dyn_cmp > SplitList_Iterable_HP_dyn_cmp;
482         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Iterable_dyn_cmp > SplitList_Iterable_DHP_dyn_cmp;
483
484         struct traits_SplitList_Iterable_dyn_cmp_stat : public traits_SplitList_Iterable_dyn_cmp
485         {
486             typedef cc::split_list::stat<> stat;
487             typedef typename cc::iterable_list::make_traits<
488                 co::compare< compare >
489                 , co::stat< cc::iterable_list::stat<>>
490             >::type ordered_list_traits;
491         };
492         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Iterable_dyn_cmp_stat > SplitList_Iterable_HP_dyn_cmp_stat;
493         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Iterable_dyn_cmp_stat > SplitList_Iterable_DHP_dyn_cmp_stat;
494
495         struct traits_SplitList_Iterable_dyn_cmp_seqcst: public cc::split_list::make_traits<
496                 cc::split_list::ordered_list<cc::iterable_list_tag>
497                 ,co::hash< hash >
498                 ,co::memory_model< co::v::sequential_consistent >
499                 ,cc::split_list::ordered_list_traits<
500                     typename cc::iterable_list::make_traits<
501                         co::compare< compare >
502                         ,co::memory_model< co::v::sequential_consistent >
503                     >::type
504                 >
505             >::type
506         {};
507         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Iterable_dyn_cmp_seqcst > SplitList_Iterable_HP_dyn_cmp_seqcst;
508         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Iterable_dyn_cmp_seqcst > SplitList_Iterable_DHP_dyn_cmp_seqcst;
509
510         struct traits_SplitList_Iterable_st_cmp: public cc::split_list::make_traits<
511                 cc::split_list::ordered_list<cc::iterable_list_tag>
512                 ,cc::split_list::dynamic_bucket_table< false >
513                 ,co::hash< hash >
514                 ,cc::split_list::ordered_list_traits<
515                     typename cc::iterable_list::make_traits<
516                         co::compare< compare >
517                     >::type
518                 >
519             >::type
520         {};
521         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Iterable_st_cmp > SplitList_Iterable_HP_st_cmp;
522         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Iterable_st_cmp > SplitList_Iterable_DHP_st_cmp;
523
524         //HP + less
525         struct traits_SplitList_Iterable_dyn_less: public cc::split_list::make_traits<
526                 cc::split_list::ordered_list<cc::iterable_list_tag>
527                 ,co::hash< hash >
528                 ,cc::split_list::ordered_list_traits<
529                     typename cc::iterable_list::make_traits<
530                         co::less< less >
531                     >::type
532                 >
533             >::type
534         {};
535         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Iterable_dyn_less > SplitList_Iterable_HP_dyn_less;
536         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Iterable_dyn_less > SplitList_Iterable_DHP_dyn_less;
537
538         struct traits_SplitList_Iterable_st_less: public cc::split_list::make_traits<
539                 cc::split_list::ordered_list<cc::iterable_list_tag>
540                 ,cc::split_list::dynamic_bucket_table< false >
541                 ,co::hash< hash >
542                 ,cc::split_list::ordered_list_traits<
543                     typename cc::iterable_list::make_traits<
544                         co::less< less >
545                     >::type
546                 >
547             >::type
548         {};
549         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Iterable_st_less > SplitList_Iterable_HP_st_less;
550         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Iterable_st_less > SplitList_Iterable_DHP_st_less;
551
552         struct traits_SplitList_Iterable_st_less_stat : traits_SplitList_Iterable_st_less
553         {
554             typedef cc::split_list::stat<> stat;
555             typedef typename cc::iterable_list::make_traits<
556                 co::less< less >
557                 , co::stat< cc::iterable_list::stat<>>
558             >::type ordered_list_traits;
559         };
560         typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Iterable_st_less_stat > SplitList_Iterable_HP_st_less_stat;
561         typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Iterable_st_less_stat > SplitList_Iterable_DHP_st_less_stat;
562     };
563
564     template <typename GC, typename K, typename T, typename Traits >
565     static inline void print_stat( cds_test::property_stream& o, SplitListMap< GC, K, T, Traits > const& m )
566     {
567         o << m.statistics()
568           << cds_test::stat_prefix( "list_stat" )
569           << m.list_statistics()
570           << cds_test::stat_prefix( "" );
571     }
572
573 }   // namespace map
574
575 #define CDSSTRESS_SplitListMap_case( fixture, test_case, splitlist_map_type, key_type, value_type ) \
576     TEST_P( fixture, splitlist_map_type ) \
577     { \
578         typedef map::map_type< tag_SplitListMap, key_type, value_type >::splitlist_map_type map_type; \
579         test_case<map_type>(); \
580     }
581
582 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
583
584 #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL > 1
585 #   define CDSSTRESS_SplitListMap_SHRCU_2( fixture, test_case, key_type, value_type ) \
586         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHB_dyn_cmp_seqcst,  key_type, value_type ) \
587         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHT_dyn_cmp_seqcst,  key_type, value_type ) \
588
589 #else
590 #   define CDSSTRESS_SplitListMap_SHRCU_2( fixture, test_case, key_type, value_type )
591 #endif
592
593 #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL == 1
594 #   define CDSSTRESS_SplitListMap_SHRCU_1( fixture, test_case, key_type, value_type ) \
595         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHT_dyn_cmp,         key_type, value_type ) \
596         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHB_dyn_cmp_stat,    key_type, value_type ) \
597         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHB_st_cmp,          key_type, value_type ) \
598         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHT_st_cmp,          key_type, value_type ) \
599         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHB_dyn_less,        key_type, value_type ) \
600         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHT_st_less,         key_type, value_type ) \
601         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHB_st_less_stat,    key_type, value_type ) \
602         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHT_dyn_cmp,            key_type, value_type ) \
603         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHB_dyn_cmp_stat,       key_type, value_type ) \
604         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHB_st_cmp,             key_type, value_type ) \
605         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHT_st_cmp,             key_type, value_type ) \
606         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHB_dyn_less,           key_type, value_type ) \
607         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHT_st_less,            key_type, value_type ) \
608         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHB_st_less_stat,       key_type, value_type ) \
609
610 #else
611 #   define CDSSTRESS_SplitListMap_SHRCU_1( fixture, test_case, key_type, value_type )
612 #endif
613
614
615 #   define CDSSTRESS_SplitListMap_SHRCU( fixture, test_case, key_type, value_type ) \
616         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHB_dyn_cmp,         key_type, value_type ) \
617         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHT_dyn_cmp_stat,    key_type, value_type ) \
618         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHT_dyn_less,        key_type, value_type ) \
619         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHB_st_less,         key_type, value_type ) \
620         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_SHT_st_less_stat,    key_type, value_type ) \
621         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHB_dyn_cmp,            key_type, value_type ) \
622         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHT_dyn_cmp_stat,       key_type, value_type ) \
623         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHT_dyn_less,           key_type, value_type ) \
624         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHB_st_less,            key_type, value_type ) \
625         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_SHT_st_less_stat,       key_type, value_type ) \
626         CDSSTRESS_SplitListMap_SHRCU_1( fixture, test_case, key_type, value_type ) \
627         CDSSTRESS_SplitListMap_SHRCU_2( fixture, test_case, key_type, value_type ) \
628
629 #else
630 #   define CDSSTRESS_SplitListMap_SHRCU( fixture, test_case, key_type, value_type )
631 #endif
632
633 #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL > 1
634 #   define CDSSTRESS_SplitListMap_HP_2( fixture, test_case, key_type, value_type ) \
635         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_HP_dyn_cmp_seqcst,       key_type, value_type ) \
636         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_DHP_dyn_cmp_seqcst,      key_type, value_type ) \
637         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_HP_dyn_cmp_seqcst,          key_type, value_type ) \
638         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_DHP_dyn_cmp_seqcst,         key_type, value_type ) \
639
640 #   define CDSSTRESS_SplitListMap_RCU_2( fixture, test_case, key_type, value_type ) \
641         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPI_dyn_cmp_seqcst,  key_type, value_type ) \
642         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPB_dyn_cmp_seqcst,  key_type, value_type ) \
643         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPT_dyn_cmp_seqcst,  key_type, value_type ) \
644         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPI_dyn_cmp_seqcst,     key_type, value_type ) \
645         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPB_dyn_cmp_seqcst,     key_type, value_type ) \
646         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPT_dyn_cmp_seqcst,     key_type, value_type ) \
647
648 #   define CDSSTRESS_SplitListMap_2( fixture, test_case, key_type, value_type ) \
649         CDSSTRESS_SplitListMap_HP_2( fixture, test_case, key_type, value_type ) \
650         CDSSTRESS_SplitListMap_RCU_2( fixture, test_case, key_type, value_type ) \
651
652
653 #else
654 #   define CDSSTRESS_SplitListMap_HP_2( fixture, test_case, key_type, value_type )
655 #   define CDSSTRESS_SplitListMap_RCU_2( fixture, test_case, key_type, value_type )
656 #   define CDSSTRESS_SplitListMap_2( fixture, test_case, key_type, value_type )
657 #endif
658
659 #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL == 1
660 #   define CDSSTRESS_SplitListMap_HP_1( fixture, test_case, key_type, value_type ) \
661         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_DHP_dyn_cmp,             key_type, value_type ) \
662         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_DHP_dyn_cmp_swar,        key_type, value_type ) \
663         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_HP_dyn_cmp_stat,         key_type, value_type ) \
664         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_HP_st_cmp,               key_type, value_type ) \
665         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_DHP_dyn_less,            key_type, value_type ) \
666         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_HP_st_less,              key_type, value_type ) \
667         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_DHP_st_less_stat,        key_type, value_type ) \
668         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_DHP_dyn_cmp,                key_type, value_type ) \
669         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_HP_dyn_cmp_stat,            key_type, value_type ) \
670         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_HP_st_cmp,                  key_type, value_type ) \
671         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_DHP_dyn_less,               key_type, value_type ) \
672         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_HP_st_less,                 key_type, value_type ) \
673         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_DHP_st_less_stat,           key_type, value_type ) \
674
675 #   define CDSSTRESS_SplitListMap_RCU_1( fixture, test_case, key_type, value_type ) \
676         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPI_dyn_cmp_stat,    key_type, value_type ) \
677         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPT_dyn_cmp,         key_type, value_type ) \
678         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPT_dyn_cmp_stat,    key_type, value_type ) \
679         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPI_st_cmp,          key_type, value_type ) \
680         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPT_st_cmp,          key_type, value_type ) \
681         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPB_dyn_less,        key_type, value_type ) \
682         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPI_st_less,         key_type, value_type ) \
683         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPT_st_less,         key_type, value_type ) \
684         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPB_st_less_stat,    key_type, value_type ) \
685         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPB_dyn_cmp,            key_type, value_type ) \
686         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPI_dyn_cmp_stat,       key_type, value_type ) \
687         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPT_dyn_cmp_stat,       key_type, value_type ) \
688         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPI_st_cmp,             key_type, value_type ) \
689         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPT_st_cmp,             key_type, value_type ) \
690         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPB_dyn_less,           key_type, value_type ) \
691         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPI_st_less,            key_type, value_type ) \
692         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPT_st_less,            key_type, value_type ) \
693         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPB_st_less_stat,       key_type, value_type ) \
694         CDSSTRESS_SplitListMap_SHRCU( fixture, test_case, key_type, value_type ) \
695
696 #   define CDSSTRESS_SplitListMap_1( fixture, test_case, key_type, value_type ) \
697         CDSSTRESS_SplitListMap_HP_1( fixture, test_case, key_type, value_type ) \
698         CDSSTRESS_SplitListMap_RCU_1( fixture, test_case, key_type, value_type ) \
699
700 #else
701 #   define CDSSTRESS_SplitListMap_HP_1( fixture, test_case, key_type, value_type )
702 #   define CDSSTRESS_SplitListMap_RCU_1( fixture, test_case, key_type, value_type )
703 #   define CDSSTRESS_SplitListMap_1( fixture, test_case, key_type, value_type )
704 #endif
705
706
707 #define CDSSTRESS_SplitListMap_HP( fixture, test_case, key_type, value_type ) \
708     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_HP_dyn_cmp,              key_type, value_type ) \
709     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_HP_dyn_cmp_swar,         key_type, value_type ) \
710     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_DHP_dyn_cmp_stat,        key_type, value_type ) \
711     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_DHP_st_cmp,              key_type, value_type ) \
712     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_HP_dyn_less,             key_type, value_type ) \
713     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_HP_st_less_stat,         key_type, value_type ) \
714     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_DHP_st_less,             key_type, value_type ) \
715     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_HP_dyn_cmp,                 key_type, value_type ) \
716     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_DHP_dyn_cmp_stat,           key_type, value_type ) \
717     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_DHP_st_cmp,                 key_type, value_type ) \
718     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_HP_dyn_less,                key_type, value_type ) \
719     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_DHP_st_less,                key_type, value_type ) \
720     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_HP_st_less_stat,            key_type, value_type ) \
721     CDSSTRESS_SplitListMap_HP_1( fixture, test_case, key_type, value_type ) \
722     CDSSTRESS_SplitListMap_HP_2( fixture, test_case, key_type, value_type ) \
723
724 #define CDSSTRESS_SplitListMap_RCU( fixture, test_case, key_type, value_type ) \
725     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPI_dyn_cmp,         key_type, value_type ) \
726     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPB_dyn_cmp,         key_type, value_type ) \
727     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPB_dyn_cmp_swar,    key_type, value_type ) \
728     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPB_dyn_cmp_stat,    key_type, value_type ) \
729     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPB_st_cmp,          key_type, value_type ) \
730     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPI_dyn_less,        key_type, value_type ) \
731     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPT_dyn_less,        key_type, value_type ) \
732     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPB_st_less,         key_type, value_type ) \
733     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPI_st_less_stat,    key_type, value_type ) \
734     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_RCU_GPT_st_less_stat,    key_type, value_type ) \
735     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPI_dyn_cmp,            key_type, value_type ) \
736     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPT_dyn_cmp,            key_type, value_type ) \
737     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPB_dyn_cmp_stat,       key_type, value_type ) \
738     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPB_st_cmp,             key_type, value_type ) \
739     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPI_dyn_less,           key_type, value_type ) \
740     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPT_dyn_less,           key_type, value_type ) \
741     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPB_st_less,            key_type, value_type ) \
742     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPI_st_less_stat,       key_type, value_type ) \
743     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_RCU_GPT_st_less_stat,       key_type, value_type ) \
744     CDSSTRESS_SplitListMap_RCU_1( fixture, test_case, key_type, value_type ) \
745     CDSSTRESS_SplitListMap_RCU_2( fixture, test_case, key_type, value_type ) \
746
747 #define CDSSTRESS_SplitListMap( fixture, test_case, key_type, value_type ) \
748     CDSSTRESS_SplitListMap_HP( fixture, test_case, key_type, value_type ) \
749     CDSSTRESS_SplitListMap_RCU( fixture, test_case, key_type, value_type ) \
750
751 #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL > 0
752 #   define CDSSTRESS_SplitListIterableMap_1( fixture, test_case, key_type, value_type ) \
753         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_DHP_dyn_cmp,             key_type, value_type ) \
754         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_HP_dyn_cmp_stat,         key_type, value_type ) \
755         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_HP_st_cmp,               key_type, value_type ) \
756         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_DHP_dyn_less,            key_type, value_type ) \
757         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_HP_st_less,              key_type, value_type ) \
758         CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_DHP_st_less_stat,        key_type, value_type ) \
759
760 #else
761 #   define CDSSTRESS_SplitListIterableMap_1( fixture, test_case, key_type, value_type )
762 #endif
763
764
765 #define CDSSTRESS_SplitListIterableMap( fixture, test_case, key_type, value_type ) \
766     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_HP_dyn_cmp,              key_type, value_type ) \
767     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_DHP_dyn_cmp_stat,        key_type, value_type ) \
768     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_DHP_st_cmp,              key_type, value_type ) \
769     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_HP_dyn_less,             key_type, value_type ) \
770     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_DHP_st_less,             key_type, value_type ) \
771     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Iterable_HP_st_less_stat,         key_type, value_type ) \
772     CDSSTRESS_SplitListIterableMap_1( fixture, test_case, key_type, value_type ) \
773
774
775 #define CDSSTRESS_SplitListMap_nogc( fixture, test_case, key_type, value_type ) \
776     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_NOGC_dyn_cmp,            key_type, value_type ) \
777     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_NOGC_dyn_cmp_stat,       key_type, value_type ) \
778     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_NOGC_st_cmp,             key_type, value_type ) \
779     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_NOGC_dyn_less,           key_type, value_type ) \
780     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_NOGC_st_less,            key_type, value_type ) \
781     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Michael_NOGC_st_less_stat,       key_type, value_type ) \
782     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_NOGC_dyn_cmp,               key_type, value_type ) \
783     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_NOGC_dyn_cmp_stat,          key_type, value_type ) \
784     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_NOGC_st_cmp,                key_type, value_type ) \
785     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_NOGC_dyn_less,              key_type, value_type ) \
786     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_NOGC_st_less,               key_type, value_type ) \
787     CDSSTRESS_SplitListMap_case( fixture, test_case, SplitList_Lazy_NOGC_st_less_stat,          key_type, value_type ) \
788
789 #endif // ifndef CDSUNIT_MAP_TYPE_SPLIT_LIST_H