3 #include "set/hdr_intrusive_set.h"
4 #include <cds/intrusive/michael_list_dhp.h>
5 #include <cds/intrusive/split_list.h>
9 void IntrusiveHashSetHdrTest::split_dyn_DHP_base_cmp()
11 typedef base_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::DHP> > > item;
12 typedef ci::MichaelList< cds::gc::DHP
14 ,ci::michael_list::make_traits<
15 ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::DHP> > >
16 ,co::compare< cmp<item> >
17 ,ci::opt::disposer< faked_disposer >
21 typedef ci::SplitListSet< cds::gc::DHP, ord_list,
22 ci::split_list::make_traits<
24 ,ci::split_list::dynamic_bucket_table<true>
25 ,co::memory_model<co::v::relaxed_ordering>
28 static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
33 void IntrusiveHashSetHdrTest::split_dyn_DHP_base_less()
35 typedef base_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::DHP> > > item;
36 typedef ci::MichaelList< cds::gc::DHP
38 ,ci::michael_list::make_traits<
39 ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::DHP> > >
40 ,co::less< less<item> >
41 ,ci::opt::disposer< faked_disposer >
45 typedef ci::SplitListSet< cds::gc::DHP, ord_list,
46 ci::split_list::make_traits<
48 ,co::memory_model<co::v::sequential_consistent>
51 static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
56 void IntrusiveHashSetHdrTest::split_dyn_DHP_base_cmpmix()
58 typedef base_int_item< ci::split_list::node<ci::michael_list::node<cds::gc::DHP> > > item;
59 typedef ci::MichaelList< cds::gc::DHP
61 ,ci::michael_list::make_traits<
62 ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::DHP> > >
63 ,co::less< less<item> >
64 ,co::compare< cmp<item> >
65 ,ci::opt::disposer< faked_disposer >
69 typedef ci::SplitListSet< cds::gc::DHP, ord_list,
70 ci::split_list::make_traits<
72 ,co::item_counter< simple_item_counter >
73 ,ci::split_list::dynamic_bucket_table<true>
76 static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
81 void IntrusiveHashSetHdrTest::split_dyn_DHP_member_cmp()
83 typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::DHP> > > item;
84 typedef ci::MichaelList< cds::gc::DHP
86 ,ci::michael_list::make_traits<
87 ci::opt::hook< ci::michael_list::member_hook<
88 offsetof( item, hMember ),
91 ,co::compare< cmp<item> >
92 ,ci::opt::disposer< faked_disposer >
96 typedef ci::SplitListSet< cds::gc::DHP, ord_list,
97 ci::split_list::make_traits<
101 static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
106 void IntrusiveHashSetHdrTest::split_dyn_DHP_member_less()
108 typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::DHP> > > item;
109 typedef ci::MichaelList< cds::gc::DHP
111 ,ci::michael_list::make_traits<
112 ci::opt::hook< ci::michael_list::member_hook<
113 offsetof( item, hMember ),
116 ,co::less< less<item> >
117 ,ci::opt::disposer< faked_disposer >
121 typedef ci::SplitListSet< cds::gc::DHP, ord_list,
122 ci::split_list::make_traits<
124 ,co::memory_model<co::v::relaxed_ordering>
127 static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
132 void IntrusiveHashSetHdrTest::split_dyn_DHP_member_cmpmix()
134 typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::DHP> > > item;
135 typedef ci::MichaelList< cds::gc::DHP
137 ,ci::michael_list::make_traits<
138 ci::opt::hook< ci::michael_list::member_hook<
139 offsetof( item, hMember ),
142 ,co::compare< cmp<item> >
143 ,co::less< less<item> >
144 ,ci::opt::disposer< faked_disposer >
148 typedef ci::SplitListSet< cds::gc::DHP, ord_list,
149 ci::split_list::make_traits<
151 ,co::item_counter< simple_item_counter >
152 ,co::memory_model<co::v::sequential_consistent>
155 static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
161 // Static bucket table
162 void IntrusiveHashSetHdrTest::split_st_DHP_base_cmp()
164 typedef base_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::DHP> > > item;
165 typedef ci::MichaelList< cds::gc::DHP
167 ,ci::michael_list::make_traits<
168 ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::DHP> > >
169 ,co::compare< cmp<item> >
170 ,ci::opt::disposer< faked_disposer >
174 typedef ci::SplitListSet< cds::gc::DHP, ord_list,
175 ci::split_list::make_traits<
177 ,ci::split_list::dynamic_bucket_table<false>
178 ,co::memory_model<co::v::relaxed_ordering>
181 static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
186 void IntrusiveHashSetHdrTest::split_st_DHP_base_less()
188 typedef base_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::DHP> > > item;
189 typedef ci::MichaelList< cds::gc::DHP
191 ,ci::michael_list::make_traits<
192 ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::DHP> > >
193 ,co::less< less<item> >
194 ,ci::opt::disposer< faked_disposer >
198 typedef ci::SplitListSet< cds::gc::DHP, ord_list,
199 ci::split_list::make_traits<
201 ,ci::split_list::dynamic_bucket_table<false>
202 ,co::memory_model<co::v::sequential_consistent>
205 static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
210 void IntrusiveHashSetHdrTest::split_st_DHP_base_cmpmix()
212 typedef base_int_item< ci::split_list::node<ci::michael_list::node<cds::gc::DHP> > > item;
213 typedef ci::MichaelList< cds::gc::DHP
215 ,ci::michael_list::make_traits<
216 ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::DHP> > >
217 ,co::less< less<item> >
218 ,co::compare< cmp<item> >
219 ,ci::opt::disposer< faked_disposer >
223 typedef ci::SplitListSet< cds::gc::DHP, ord_list,
224 ci::split_list::make_traits<
226 ,co::item_counter< simple_item_counter >
227 ,ci::split_list::dynamic_bucket_table<false>
230 static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
235 void IntrusiveHashSetHdrTest::split_st_DHP_member_cmp()
237 typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::DHP> > > item;
238 typedef ci::MichaelList< cds::gc::DHP
240 ,ci::michael_list::make_traits<
241 ci::opt::hook< ci::michael_list::member_hook<
242 offsetof( item, hMember ),
245 ,co::compare< cmp<item> >
246 ,ci::opt::disposer< faked_disposer >
250 typedef ci::SplitListSet< cds::gc::DHP, ord_list,
251 ci::split_list::make_traits<
253 ,ci::split_list::dynamic_bucket_table<false>
254 ,co::memory_model<co::v::relaxed_ordering>
257 static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
262 void IntrusiveHashSetHdrTest::split_st_DHP_member_less()
264 typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::DHP> > > item;
265 typedef ci::MichaelList< cds::gc::DHP
267 ,ci::michael_list::make_traits<
268 ci::opt::hook< ci::michael_list::member_hook<
269 offsetof( item, hMember ),
272 ,co::less< less<item> >
273 ,ci::opt::disposer< faked_disposer >
277 typedef ci::SplitListSet< cds::gc::DHP, ord_list,
278 ci::split_list::make_traits<
279 ci::split_list::dynamic_bucket_table<false>
280 ,co::hash< hash_int >
281 ,co::memory_model<co::v::sequential_consistent>
284 static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
289 void IntrusiveHashSetHdrTest::split_st_DHP_member_cmpmix()
291 typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::DHP> > > item;
292 typedef ci::MichaelList< cds::gc::DHP
294 ,ci::michael_list::make_traits<
295 ci::opt::hook< ci::michael_list::member_hook<
296 offsetof( item, hMember ),
299 ,co::compare< cmp<item> >
300 ,co::less< less<item> >
301 ,ci::opt::disposer< faked_disposer >
305 typedef ci::SplitListSet< cds::gc::DHP, ord_list,
306 ci::split_list::make_traits<
308 ,co::item_counter< simple_item_counter >
309 ,ci::split_list::dynamic_bucket_table<false>
312 static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );