3 #include "set/hdr_set.h"
4 #include <cds/urcu/general_threaded.h>
5 #include <cds/container/michael_list_rcu.h>
6 #include <cds/container/michael_set_rcu.h>
11 typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type;
13 struct set_traits: public cc::michael_set::traits
15 typedef HashSetHdrTest::hash_int hash;
16 typedef HashSetHdrTest::simple_item_counter item_counter;
19 struct RCU_GPT_cmp_traits: public cc::michael_list::traits
21 typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
24 struct RCU_GPT_less_traits: public cc::michael_list::traits
26 typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
29 struct RCU_GPT_cmpmix_traits: public cc::michael_list::traits
31 typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
32 typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
36 void HashSetHdrTest::Michael_RCU_GPT_cmp()
38 typedef cc::MichaelList< rcu_type, item, RCU_GPT_cmp_traits > list;
40 // traits-based version
41 typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
42 test_int_rcu< set >();
44 // option-based version
45 typedef cc::MichaelHashSet< rcu_type, list,
46 cc::michael_set::make_traits<
47 cc::opt::hash< hash_int >
48 ,cc::opt::item_counter< simple_item_counter >
51 test_int_rcu< opt_set >();
54 void HashSetHdrTest::Michael_RCU_GPT_less()
56 typedef cc::MichaelList< rcu_type, item, RCU_GPT_less_traits > list;
58 // traits-based version
59 typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
60 test_int_rcu< set >();
62 // option-based version
63 typedef cc::MichaelHashSet< rcu_type, list,
64 cc::michael_set::make_traits<
65 cc::opt::hash< hash_int >
66 ,cc::opt::item_counter< simple_item_counter >
69 test_int_rcu< opt_set >();
72 void HashSetHdrTest::Michael_RCU_GPT_cmpmix()
74 typedef cc::MichaelList< rcu_type, item, RCU_GPT_cmpmix_traits > list;
76 // traits-based version
77 typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
78 test_int_rcu< set >();
80 // option-based version
81 typedef cc::MichaelHashSet< rcu_type, list,
82 cc::michael_set::make_traits<
83 cc::opt::hash< hash_int >
84 ,cc::opt::item_counter< simple_item_counter >
87 test_int_rcu< opt_set >();