2 This file is a part of libcds - Concurrent Data Structures library
4 (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
6 Source code repo: http://github.com/khizmax/libcds/
7 Download: http://sourceforge.net/projects/libcds/files/
9 Redistribution and use in source and binary forms, with or without
10 modification, are permitted provided that the following conditions are met:
12 * Redistributions of source code must retain the above copyright notice, this
13 list of conditions and the following disclaimer.
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.
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.
31 #include "set/hdr_intrusive_set.h"
32 #include <cds/intrusive/lazy_list_dhp.h>
33 #include <cds/intrusive/michael_set.h>
37 void IntrusiveHashSetHdrTest::DHP_base_cmp_lazy()
39 typedef base_int_item< ci::lazy_list::node<cds::gc::DHP> > item;
40 typedef ci::LazyList< cds::gc::DHP
42 ,ci::lazy_list::make_traits<
43 ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::DHP> > >
44 ,co::compare< cmp<item> >
45 ,ci::opt::disposer< faked_disposer >
49 typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type,
50 ci::michael_set::make_traits<
58 void IntrusiveHashSetHdrTest::DHP_base_less_lazy()
60 typedef base_int_item< ci::lazy_list::node<cds::gc::DHP> > item;
61 typedef ci::LazyList< cds::gc::DHP
63 ,ci::lazy_list::make_traits<
64 ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::DHP> > >
65 ,co::less< less<item> >
66 ,ci::opt::disposer< faked_disposer >
70 typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type,
71 ci::michael_set::make_traits<
79 void IntrusiveHashSetHdrTest::DHP_base_cmpmix_lazy()
81 typedef base_int_item< ci::lazy_list::node<cds::gc::DHP> > item;
82 typedef ci::LazyList< cds::gc::DHP
84 ,ci::lazy_list::make_traits<
85 ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::DHP> > >
86 ,co::less< less<item> >
87 ,co::compare< cmp<item> >
88 ,ci::opt::disposer< faked_disposer >
92 typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type,
93 ci::michael_set::make_traits<
95 ,co::item_counter< simple_item_counter >
102 void IntrusiveHashSetHdrTest::DHP_member_cmp_lazy()
104 typedef member_int_item< ci::lazy_list::node<cds::gc::DHP> > item;
105 typedef ci::LazyList< cds::gc::DHP
107 ,ci::lazy_list::make_traits<
108 ci::opt::hook< ci::lazy_list::member_hook<
109 offsetof( item, hMember ),
112 ,co::compare< cmp<item> >
113 ,ci::opt::disposer< faked_disposer >
117 typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type,
118 ci::michael_set::make_traits<
126 void IntrusiveHashSetHdrTest::DHP_member_less_lazy()
128 typedef member_int_item< ci::lazy_list::node<cds::gc::DHP> > item;
129 typedef ci::LazyList< cds::gc::DHP
131 ,ci::lazy_list::make_traits<
132 ci::opt::hook< ci::lazy_list::member_hook<
133 offsetof( item, hMember ),
136 ,co::less< less<item> >
137 ,ci::opt::disposer< faked_disposer >
141 typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type,
142 ci::michael_set::make_traits<
150 void IntrusiveHashSetHdrTest::DHP_member_cmpmix_lazy()
152 typedef member_int_item< ci::lazy_list::node<cds::gc::DHP> > item;
153 typedef ci::LazyList< cds::gc::DHP
155 ,ci::lazy_list::make_traits<
156 ci::opt::hook< ci::lazy_list::member_hook<
157 offsetof( item, hMember ),
160 ,co::compare< cmp<item> >
161 ,co::less< less<item> >
162 ,ci::opt::disposer< faked_disposer >
166 typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type,
167 ci::michael_set::make_traits<
169 ,co::item_counter< simple_item_counter >