before end of the set. Therefore, such iteration is more suitable for debugging purpose only
Remember, each iterator object requires an additional hazard pointer, that may be
- a limited resource for \p GC like as gc::HP and gc::HRC (for gc::PTB the count of
+ a limited resource for \p GC like \p gc::HP (for gc::PTB the count of
guards is unlimited).
The iterator class supports the following minimalistic interface:
before end of the set. Therefore, such iteration is more suitable for debugging purpose only
Remember, each iterator object requires an additional hazard pointer, that may be
- a limited resource for \p GC like as gc::HP and gc::HRC (for gc::PTB the count of
+ a limited resource for \p GC like \p gc::HP (for gc::PTB the count of
guards is unlimited).
The iterator class supports the following minimalistic interface:
There are several specializations of \p %MichaelHashSet for each GC. You should include:
- <tt><cds/intrusive/michael_set_rcu.h></tt> for \ref cds_intrusive_MichaelHashSet_rcu "RCU type"
- <tt><cds/intrusive/michael_set_nogc.h></tt> for \ref cds_intrusive_MichaelHashSet_nogc for persistent set
- - <tt><cds/intrusive/michael_set.h></tt> for other GC (gc::HP, gc::HRC, gc::PTB)
+ - <tt><cds/intrusive/michael_set.h></tt> for other GC (gc::HP, gc::PTB)
<b>Hash functor</b>
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_cuckoo_map.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_michael_map_hp.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_michael_map_lazy_hp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\map\hdr_michael_map_lazy_hrc.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_michael_map_lazy_nogc.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_michael_map_lazy_ptb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_michael_map_lazy_rcu_gpb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_michael_map_lazy_hp.cpp">\r
<Filter>michael</Filter>\r
</ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\map\hdr_michael_map_lazy_hrc.cpp">\r
- <Filter>michael</Filter>\r
- </ClCompile>\r
<ClCompile Include="..\..\..\tests\test-hdr\map\hdr_michael_map_lazy_nogc.cpp">\r
<Filter>michael</Filter>\r
</ClCompile>\r
<ItemGroup>\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_hp.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_hp_lazy.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_hrc_lazy.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_nogc.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_nogc_lazy.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_ptb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_sht_lazy.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_hp.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_hp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_hrc.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_nogc.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_ptb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_rcu_gpb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_hp_lazy.cpp">\r
<Filter>intrusive\michael_set</Filter>\r
</ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_hrc_lazy.cpp">\r
- <Filter>intrusive\michael_set</Filter>\r
- </ClCompile>\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_nogc.cpp">\r
<Filter>intrusive\michael_set</Filter>\r
</ClCompile>\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_hp.cpp">\r
<Filter>container\michael_set</Filter>\r
</ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_hrc.cpp">\r
- <Filter>container\michael_set</Filter>\r
- </ClCompile>\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_nogc.cpp">\r
<Filter>container\michael_set</Filter>\r
</ClCompile>\r
+++ /dev/null
-//$$CDS-header$$
-
-#include "map/hdr_map.h"
-#include <cds/container/lazy_kvlist_hrc.h>
-#include <cds/container/michael_map.h>
-
-namespace map {
- namespace {
- struct map_traits: public cc::michael_map::type_traits
- {
- typedef HashMapHdrTest::hash_int hash;
- typedef HashMapHdrTest::simple_item_counter item_counter;
- };
- struct HRC_cmp_traits: public cc::lazy_list::type_traits
- {
- typedef HashMapHdrTest::cmp compare;
- };
-
- struct HRC_less_traits: public cc::lazy_list::type_traits
- {
- typedef HashMapHdrTest::less less;
- };
-
- struct HRC_cmpmix_traits: public cc::lazy_list::type_traits
- {
- typedef HashMapHdrTest::cmp compare;
- typedef HashMapHdrTest::less less;
- };
- }
-
- void HashMapHdrTest::Lazy_HRC_cmp()
- {
- typedef cc::LazyKVList< cds::gc::HRC, int, HashMapHdrTest::value_type, HRC_cmp_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashMap< cds::gc::HRC, list, map_traits > map;
- test_int< map >();
-
- // option-based version
- typedef cc::MichaelHashMap< cds::gc::HRC, list,
- cc::michael_map::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_map;
- test_int< opt_map >();
- }
-
- void HashMapHdrTest::Lazy_HRC_less()
- {
- typedef cc::LazyKVList< cds::gc::HRC, int, HashMapHdrTest::value_type, HRC_less_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashMap< cds::gc::HRC, list, map_traits > map;
- test_int< map >();
-
- // option-based version
- typedef cc::MichaelHashMap< cds::gc::HRC, list,
- cc::michael_map::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_map;
- test_int< opt_map >();
- }
-
- void HashMapHdrTest::Lazy_HRC_cmpmix()
- {
- typedef cc::LazyKVList< cds::gc::HRC, int, HashMapHdrTest::value_type, HRC_cmpmix_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashMap< cds::gc::HRC, list, map_traits > map;
- test_int< map >();
-
- // option-based version
- typedef cc::MichaelHashMap< cds::gc::HRC, list,
- cc::michael_map::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_map;
- test_int< opt_map >();
- }
-
-
-} // namespace map
-
+++ /dev/null
-//$$CDS-header$$
-
-#include "set/hdr_intrusive_set.h"
-#include <cds/intrusive/lazy_list_hrc.h>
-#include <cds/intrusive/michael_set.h>
-
-namespace set {
-
- void IntrusiveHashSetHdrTest::HRC_base_cmp_lazy()
- {
- typedef base_int_item< ci::lazy_list::node<cds::gc::HRC> > item;
- typedef ci::LazyList< cds::gc::HRC
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::HRC, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::HRC_base_less_lazy()
- {
- typedef base_int_item< ci::lazy_list::node<cds::gc::HRC> > item;
- typedef ci::LazyList< cds::gc::HRC
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::HRC, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::HRC_base_cmpmix_lazy()
- {
- typedef base_int_item< ci::lazy_list::node<cds::gc::HRC> > item;
- typedef ci::LazyList< cds::gc::HRC
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::HRC, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_int<set>();
- }
-
-} // namespace set
+++ /dev/null
-//$$CDS-header$$
-
-#include "set/hdr_set.h"
-#include <cds/container/lazy_list_hrc.h>
-#include <cds/container/michael_set.h>
-
-namespace set {
-
- namespace {
- struct set_traits: public cc::michael_set::type_traits
- {
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- };
-
- struct HRC_cmp_traits: public cc::lazy_list::type_traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
-
- struct HRC_less_traits: public cc::lazy_list::type_traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
-
- struct HRC_cmpmix_traits: public cc::lazy_list::type_traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- }
-
- void HashSetHdrTest::Lazy_HRC_cmp()
- {
- typedef cc::LazyList< cds::gc::HRC, item, HRC_cmp_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::HRC, list, set_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::HRC, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Lazy_HRC_less()
- {
- typedef cc::LazyList< cds::gc::HRC, item, HRC_less_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::HRC, list, set_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::HRC, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Lazy_HRC_cmpmix()
- {
- typedef cc::LazyList< cds::gc::HRC, item, HRC_cmpmix_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::HRC, list, set_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::HRC, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
-
-} // namespace set