From 4422e69d0ad6fe825b9ab2ad5941b694895425f0 Mon Sep 17 00:00:00 2001 From: khizmax Date: Thu, 23 Oct 2014 18:41:18 +0400 Subject: [PATCH] Remove MichaelMap specializations --- cds/container/michael_map.h | 2 +- cds/container/michael_set.h | 2 +- cds/intrusive/michael_set.h | 2 +- projects/Win/vc12/hdr-test-map.vcxproj | 1 - .../Win/vc12/hdr-test-map.vcxproj.filters | 3 - projects/Win/vc12/hdr-test-set.vcxproj | 2 - .../Win/vc12/hdr-test-set.vcxproj.filters | 6 -- .../test-hdr/map/hdr_michael_map_lazy_hrc.cpp | 87 ------------------ .../hdr_intrusive_michael_set_hrc_lazy.cpp | 74 ---------------- .../test-hdr/set/hdr_michael_set_lazy_hrc.cpp | 88 ------------------- 10 files changed, 3 insertions(+), 264 deletions(-) delete mode 100644 tests/test-hdr/map/hdr_michael_map_lazy_hrc.cpp delete mode 100644 tests/test-hdr/set/hdr_intrusive_michael_set_hrc_lazy.cpp delete mode 100644 tests/test-hdr/set/hdr_michael_set_lazy_hrc.cpp diff --git a/cds/container/michael_map.h b/cds/container/michael_map.h index 791492a7..17cb80c4 100644 --- a/cds/container/michael_map.h +++ b/cds/container/michael_map.h @@ -64,7 +64,7 @@ namespace cds { namespace container { 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: diff --git a/cds/container/michael_set.h b/cds/container/michael_set.h index acc62719..0fe47dca 100644 --- a/cds/container/michael_set.h +++ b/cds/container/michael_set.h @@ -85,7 +85,7 @@ namespace cds { namespace container { 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: diff --git a/cds/intrusive/michael_set.h b/cds/intrusive/michael_set.h index be8cf1d0..d8d92292 100644 --- a/cds/intrusive/michael_set.h +++ b/cds/intrusive/michael_set.h @@ -32,7 +32,7 @@ namespace cds { namespace intrusive { There are several specializations of \p %MichaelHashSet for each GC. You should include: - for \ref cds_intrusive_MichaelHashSet_rcu "RCU type" - for \ref cds_intrusive_MichaelHashSet_nogc for persistent set - - for other GC (gc::HP, gc::HRC, gc::PTB) + - for other GC (gc::HP, gc::PTB) Hash functor diff --git a/projects/Win/vc12/hdr-test-map.vcxproj b/projects/Win/vc12/hdr-test-map.vcxproj index 105cd735..e4846fcb 100644 --- a/projects/Win/vc12/hdr-test-map.vcxproj +++ b/projects/Win/vc12/hdr-test-map.vcxproj @@ -546,7 +546,6 @@ - diff --git a/projects/Win/vc12/hdr-test-map.vcxproj.filters b/projects/Win/vc12/hdr-test-map.vcxproj.filters index 8a6d7865..bd549070 100644 --- a/projects/Win/vc12/hdr-test-map.vcxproj.filters +++ b/projects/Win/vc12/hdr-test-map.vcxproj.filters @@ -10,9 +10,6 @@ michael - - michael - michael diff --git a/projects/Win/vc12/hdr-test-set.vcxproj b/projects/Win/vc12/hdr-test-set.vcxproj index b83074ce..d2f8b602 100644 --- a/projects/Win/vc12/hdr-test-set.vcxproj +++ b/projects/Win/vc12/hdr-test-set.vcxproj @@ -545,7 +545,6 @@ - @@ -594,7 +593,6 @@ - diff --git a/projects/Win/vc12/hdr-test-set.vcxproj.filters b/projects/Win/vc12/hdr-test-set.vcxproj.filters index 53055b9d..1d53f3e6 100644 --- a/projects/Win/vc12/hdr-test-set.vcxproj.filters +++ b/projects/Win/vc12/hdr-test-set.vcxproj.filters @@ -53,9 +53,6 @@ intrusive\michael_set - - intrusive\michael_set - intrusive\michael_set @@ -140,9 +137,6 @@ container\michael_set - - container\michael_set - container\michael_set diff --git a/tests/test-hdr/map/hdr_michael_map_lazy_hrc.cpp b/tests/test-hdr/map/hdr_michael_map_lazy_hrc.cpp deleted file mode 100644 index 122db9d9..00000000 --- a/tests/test-hdr/map/hdr_michael_map_lazy_hrc.cpp +++ /dev/null @@ -1,87 +0,0 @@ -//$$CDS-header$$ - -#include "map/hdr_map.h" -#include -#include - -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 - diff --git a/tests/test-hdr/set/hdr_intrusive_michael_set_hrc_lazy.cpp b/tests/test-hdr/set/hdr_intrusive_michael_set_hrc_lazy.cpp deleted file mode 100644 index 66926eec..00000000 --- a/tests/test-hdr/set/hdr_intrusive_michael_set_hrc_lazy.cpp +++ /dev/null @@ -1,74 +0,0 @@ -//$$CDS-header$$ - -#include "set/hdr_intrusive_set.h" -#include -#include - -namespace set { - - void IntrusiveHashSetHdrTest::HRC_base_cmp_lazy() - { - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< cds::gc::HRC - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::compare< cmp > - ,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(); - } - - void IntrusiveHashSetHdrTest::HRC_base_less_lazy() - { - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< cds::gc::HRC - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,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(); - } - - void IntrusiveHashSetHdrTest::HRC_base_cmpmix_lazy() - { - typedef base_int_item< ci::lazy_list::node > item; - typedef ci::LazyList< cds::gc::HRC - ,item - ,ci::lazy_list::make_traits< - ci::opt::hook< ci::lazy_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,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(); - } - -} // namespace set diff --git a/tests/test-hdr/set/hdr_michael_set_lazy_hrc.cpp b/tests/test-hdr/set/hdr_michael_set_lazy_hrc.cpp deleted file mode 100644 index a7e35eb4..00000000 --- a/tests/test-hdr/set/hdr_michael_set_lazy_hrc.cpp +++ /dev/null @@ -1,88 +0,0 @@ -//$$CDS-header$$ - -#include "set/hdr_set.h" -#include -#include - -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 compare; - }; - - struct HRC_less_traits: public cc::lazy_list::type_traits - { - typedef HashSetHdrTest::less less; - }; - - struct HRC_cmpmix_traits: public cc::lazy_list::type_traits - { - typedef HashSetHdrTest::cmp compare; - typedef HashSetHdrTest::less 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 -- 2.34.1