3 #include "set/hdr_intrusive_set.h"
4 #include <cds/urcu/signal_threaded.h>
5 #include <cds/intrusive/michael_list_rcu.h>
6 #include <cds/intrusive/split_list_rcu.h>
9 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
11 typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type;
15 void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_base_cmp()
17 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
18 typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
19 typedef ci::MichaelList< rcu_type
21 ,ci::michael_list::make_traits<
22 ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
23 ,co::compare< cmp<item> >
24 ,ci::opt::disposer< faked_disposer >
28 typedef ci::SplitListSet< rcu_type, ord_list,
29 ci::split_list::make_traits<
31 ,ci::split_list::dynamic_bucket_table<true>
32 ,co::memory_model<co::v::relaxed_ordering>
35 static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
41 void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_base_less()
43 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
44 typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
45 typedef ci::MichaelList< rcu_type
47 ,ci::michael_list::make_traits<
48 ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
49 ,co::less< less<item> >
50 ,ci::opt::disposer< faked_disposer >
54 typedef ci::SplitListSet< rcu_type, ord_list,
55 ci::split_list::make_traits<
57 ,co::memory_model<co::v::sequential_consistent>
60 static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
66 void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_base_cmpmix()
68 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
69 typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
70 typedef ci::MichaelList< rcu_type
72 ,ci::michael_list::make_traits<
73 ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
74 ,co::less< less<item> >
75 ,co::compare< cmp<item> >
76 ,ci::opt::disposer< faked_disposer >
80 typedef ci::SplitListSet< rcu_type, ord_list,
81 ci::split_list::make_traits<
83 ,co::item_counter< simple_item_counter >
84 ,ci::split_list::dynamic_bucket_table<true>
87 static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
93 void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_member_cmp()
95 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
96 typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
97 typedef ci::MichaelList< rcu_type
99 ,ci::michael_list::make_traits<
100 ci::opt::hook< ci::michael_list::member_hook<
101 offsetof( item, hMember ),
104 ,co::compare< cmp<item> >
105 ,ci::opt::disposer< faked_disposer >
109 typedef ci::SplitListSet< rcu_type, ord_list,
110 ci::split_list::make_traits<
114 static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
120 void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_member_less()
122 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
123 typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
124 typedef ci::MichaelList< rcu_type
126 ,ci::michael_list::make_traits<
127 ci::opt::hook< ci::michael_list::member_hook<
128 offsetof( item, hMember ),
131 ,co::less< less<item> >
132 ,ci::opt::disposer< faked_disposer >
136 typedef ci::SplitListSet< rcu_type, ord_list,
137 ci::split_list::make_traits<
139 ,co::memory_model<co::v::relaxed_ordering>
142 static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
148 void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_member_cmpmix()
150 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
151 typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
152 typedef ci::MichaelList< rcu_type
154 ,ci::michael_list::make_traits<
155 ci::opt::hook< ci::michael_list::member_hook<
156 offsetof( item, hMember ),
159 ,co::compare< cmp<item> >
160 ,co::less< less<item> >
161 ,ci::opt::disposer< faked_disposer >
165 typedef ci::SplitListSet< rcu_type, ord_list,
166 ci::split_list::make_traits<
168 ,co::item_counter< simple_item_counter >
169 ,co::memory_model<co::v::sequential_consistent>
172 static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
179 // Static bucket table
180 void IntrusiveHashSetHdrTest::split_st_RCU_SHT_base_cmp()
182 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
183 typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
184 typedef ci::MichaelList< rcu_type
186 ,ci::michael_list::make_traits<
187 ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
188 ,co::compare< cmp<item> >
189 ,ci::opt::disposer< faked_disposer >
193 typedef ci::SplitListSet< rcu_type, ord_list,
194 ci::split_list::make_traits<
196 ,ci::split_list::dynamic_bucket_table<false>
197 ,co::memory_model<co::v::relaxed_ordering>
200 static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
206 void IntrusiveHashSetHdrTest::split_st_RCU_SHT_base_less()
208 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
209 typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
210 typedef ci::MichaelList< rcu_type
212 ,ci::michael_list::make_traits<
213 ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
214 ,co::less< less<item> >
215 ,ci::opt::disposer< faked_disposer >
219 typedef ci::SplitListSet< rcu_type, ord_list,
220 ci::split_list::make_traits<
222 ,ci::split_list::dynamic_bucket_table<false>
223 ,co::memory_model<co::v::sequential_consistent>
226 static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
232 void IntrusiveHashSetHdrTest::split_st_RCU_SHT_base_cmpmix()
234 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
235 typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
236 typedef ci::MichaelList< rcu_type
238 ,ci::michael_list::make_traits<
239 ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
240 ,co::less< less<item> >
241 ,co::compare< cmp<item> >
242 ,ci::opt::disposer< faked_disposer >
246 typedef ci::SplitListSet< rcu_type, ord_list,
247 ci::split_list::make_traits<
249 ,co::item_counter< simple_item_counter >
250 ,ci::split_list::dynamic_bucket_table<false>
253 static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
259 void IntrusiveHashSetHdrTest::split_st_RCU_SHT_member_cmp()
261 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
262 typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
263 typedef ci::MichaelList< rcu_type
265 ,ci::michael_list::make_traits<
266 ci::opt::hook< ci::michael_list::member_hook<
267 offsetof( item, hMember ),
270 ,co::compare< cmp<item> >
271 ,ci::opt::disposer< faked_disposer >
275 typedef ci::SplitListSet< rcu_type, ord_list,
276 ci::split_list::make_traits<
278 ,ci::split_list::dynamic_bucket_table<false>
279 ,co::memory_model<co::v::relaxed_ordering>
282 static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
288 void IntrusiveHashSetHdrTest::split_st_RCU_SHT_member_less()
290 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
291 typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
292 typedef ci::MichaelList< rcu_type
294 ,ci::michael_list::make_traits<
295 ci::opt::hook< ci::michael_list::member_hook<
296 offsetof( item, hMember ),
299 ,co::less< less<item> >
300 ,ci::opt::disposer< faked_disposer >
304 typedef ci::SplitListSet< rcu_type, ord_list,
305 ci::split_list::make_traits<
306 ci::split_list::dynamic_bucket_table<false>
307 ,co::hash< hash_int >
308 ,co::memory_model<co::v::sequential_consistent>
311 static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
317 void IntrusiveHashSetHdrTest::split_st_RCU_SHT_member_cmpmix()
319 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
320 typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
321 typedef ci::MichaelList< rcu_type
323 ,ci::michael_list::make_traits<
324 ci::opt::hook< ci::michael_list::member_hook<
325 offsetof( item, hMember ),
328 ,co::compare< cmp<item> >
329 ,co::less< less<item> >
330 ,ci::opt::disposer< faked_disposer >
334 typedef ci::SplitListSet< rcu_type, ord_list,
335 ci::split_list::make_traits<
337 ,co::item_counter< simple_item_counter >
338 ,ci::split_list::dynamic_bucket_table<false>
341 static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
347 void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_base_cmpmix_stat()
349 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
350 typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
351 struct list_traits : public ci::michael_list::traits
353 typedef ci::michael_list::base_hook< co::gc<rcu_type> > hook;
354 typedef IntrusiveHashSetHdrTest::less<item> less;
355 typedef cmp<item> compare;
356 typedef faked_disposer disposer;
358 typedef ci::MichaelList< rcu_type, item, list_traits > ord_list;
360 struct set_traits : public ci::split_list::make_traits<ci::split_list::dynamic_bucket_table<true> >::type
362 typedef hash_int hash;
363 typedef simple_item_counter item_counter;
364 typedef ci::split_list::stat<> stat;
366 typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set;
368 static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
374 void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_member_cmpmix_stat()
376 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
377 typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
379 public ci::michael_list::make_traits<
380 ci::opt::hook< ci::michael_list::member_hook<
381 offsetof( item, hMember ),
384 ,co::compare< cmp<item> >
385 ,co::less< less<item> >
386 ,ci::opt::disposer< faked_disposer >
389 typedef ci::MichaelList< rcu_type, item, list_traits > ord_list;
392 public ci::split_list::make_traits<
394 ,co::item_counter< simple_item_counter >
395 ,co::memory_model<co::v::sequential_consistent>
396 ,co::stat< ci::split_list::stat<>>
399 typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set;
400 static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
406 void IntrusiveHashSetHdrTest::split_st_RCU_SHT_base_cmpmix_stat()
408 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
409 typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
410 typedef ci::MichaelList< rcu_type
412 ,ci::michael_list::make_traits<
413 ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
414 ,co::less< less<item> >
415 ,co::compare< cmp<item> >
416 ,ci::opt::disposer< faked_disposer >
420 typedef ci::SplitListSet< rcu_type, ord_list,
421 ci::split_list::make_traits<
423 ,co::item_counter< simple_item_counter >
424 ,ci::split_list::dynamic_bucket_table<false>
425 ,co::stat< ci::split_list::stat<>>
428 static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
434 void IntrusiveHashSetHdrTest::split_st_RCU_SHT_member_cmpmix_stat()
436 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
437 typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
438 typedef ci::MichaelList< rcu_type
440 ,ci::michael_list::make_traits<
441 ci::opt::hook< ci::michael_list::member_hook<
442 offsetof( item, hMember ),
445 ,co::compare< cmp<item> >
446 ,co::less< less<item> >
447 ,ci::opt::disposer< faked_disposer >
451 typedef ci::SplitListSet< rcu_type, ord_list,
452 ci::split_list::make_traits<
454 ,co::item_counter< simple_item_counter >
455 ,ci::split_list::dynamic_bucket_table<false>
456 ,co::stat< ci::split_list::stat<> >
459 static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );