From 67a6bb5db285dfad9272ab8703a6cf8bcd339122 Mon Sep 17 00:00:00 2001 From: khizmax Date: Thu, 23 Oct 2014 19:21:01 +0400 Subject: [PATCH] SkipList: replace gc::PTB with gc::DHP --- cds/container/impl/skip_list_map.h | 4 +- cds/container/impl/skip_list_set.h | 4 +- cds/container/skip_list_map_dhp.h | 11 + cds/container/skip_list_map_ptb.h | 11 - ...kip_list_set_ptb.h => skip_list_set_dhp.h} | 2 +- cds/intrusive/impl/skip_list.h | 4 +- cds/intrusive/skip_list_dhp.h | 9 + cds/intrusive/skip_list_ptb.h | 9 - projects/Win/vc12/cds.vcxproj | 4 +- projects/Win/vc12/cds.vcxproj.filters | 12 +- projects/Win/vc12/hdr-test-map.vcxproj | 2 - .../Win/vc12/hdr-test-map.vcxproj.filters | 6 - tests/test-hdr/map/hdr_map.h | 16 - tests/test-hdr/map/hdr_skiplist_map.h | 50 --- tests/test-hdr/map/hdr_skiplist_map_hrc.cpp | 311 ------------------ tests/test-hdr/map/hdr_skiplist_map_ptb.cpp | 2 +- .../map/hdr_splitlist_map_lazy_hrc.cpp | 131 -------- .../set/hdr_intrusive_skiplist_ptb.cpp | 2 +- .../set/hdr_intrusive_skiplist_ptb_member.cpp | 2 +- tests/test-hdr/set/hdr_skiplist_set_ptb.cpp | 2 +- tests/unit/map2/map_types.h | 2 +- tests/unit/pqueue/skiplist_pqueue.h | 3 +- tests/unit/set2/set_types.h | 2 +- 23 files changed, 42 insertions(+), 559 deletions(-) create mode 100644 cds/container/skip_list_map_dhp.h delete mode 100644 cds/container/skip_list_map_ptb.h rename cds/container/{skip_list_set_ptb.h => skip_list_set_dhp.h} (88%) create mode 100644 cds/intrusive/skip_list_dhp.h delete mode 100644 cds/intrusive/skip_list_ptb.h delete mode 100644 tests/test-hdr/map/hdr_skiplist_map_hrc.cpp delete mode 100644 tests/test-hdr/map/hdr_splitlist_map_lazy_hrc.cpp diff --git a/cds/container/impl/skip_list_map.h b/cds/container/impl/skip_list_map.h index dac53ed5..303ea953 100644 --- a/cds/container/impl/skip_list_map.h +++ b/cds/container/impl/skip_list_map.h @@ -62,8 +62,8 @@ namespace cds { namespace container { when you try to create skip-list object. \note There are several specializations of \p %SkipListMap for each \p GC. You should include: - - for gc::HP garbage collector - - for gc::PTB garbage collector + - for \p gc::HP garbage collector + - for \p gc::DHP garbage collector - for \ref cds_nonintrusive_SkipListMap_rcu "RCU type" - for \ref cds_nonintrusive_SkipListMap_nogc "non-deletable SkipListMap" diff --git a/cds/container/impl/skip_list_set.h b/cds/container/impl/skip_list_set.h index 33612c6a..83252f80 100644 --- a/cds/container/impl/skip_list_set.h +++ b/cds/container/impl/skip_list_set.h @@ -60,8 +60,8 @@ namespace cds { namespace container { when you try to create skip-list object. \note There are several specializations of \p %SkipListSet for each \p GC. You should include: - - for gc::HP garbage collector - - for gc::PTB garbage collector + - for \p gc::HP garbage collector + - for \p gc::DHP garbage collector - for \ref cds_nonintrusive_SkipListSet_rcu "RCU type" - for \ref cds_nonintrusive_SkipListSet_nogc "non-deletable SkipListSet" diff --git a/cds/container/skip_list_map_dhp.h b/cds/container/skip_list_map_dhp.h new file mode 100644 index 00000000..0050f9c6 --- /dev/null +++ b/cds/container/skip_list_map_dhp.h @@ -0,0 +1,11 @@ +//$$CDS-header$$ + +#ifndef __CDS_CONTAINER_SKIP_LIST_SET_DHP_H +#define __CDS_CONTAINER_SKIP_LIST_SET_DHP_H + +#include +#include +#include +#include + +#endif // #ifndef __CDS_CONTAINER_SKIP_LIST_SET_DHP_H diff --git a/cds/container/skip_list_map_ptb.h b/cds/container/skip_list_map_ptb.h deleted file mode 100644 index dd6dbb8e..00000000 --- a/cds/container/skip_list_map_ptb.h +++ /dev/null @@ -1,11 +0,0 @@ -//$$CDS-header$$ - -#ifndef __CDS_CONTAINER_SKIP_LIST_SET_PTB_H -#define __CDS_CONTAINER_SKIP_LIST_SET_PTB_H - -#include -#include -#include -#include - -#endif // #ifndef __CDS_CONTAINER_SKIP_LIST_SET_PTB_H diff --git a/cds/container/skip_list_set_ptb.h b/cds/container/skip_list_set_dhp.h similarity index 88% rename from cds/container/skip_list_set_ptb.h rename to cds/container/skip_list_set_dhp.h index 99918c65..3e0d26e9 100644 --- a/cds/container/skip_list_set_ptb.h +++ b/cds/container/skip_list_set_dhp.h @@ -4,7 +4,7 @@ #define __CDS_CONTAINER_SKIP_LIST_MAP_PTB_H #include -#include +#include #include #include diff --git a/cds/intrusive/impl/skip_list.h b/cds/intrusive/impl/skip_list.h index ddce8e53..4a4c761e 100644 --- a/cds/intrusive/impl/skip_list.h +++ b/cds/intrusive/impl/skip_list.h @@ -215,8 +215,8 @@ namespace cds { namespace intrusive { when you try to create skip-list object. \note There are several specializations of \p %SkipListSet for each \p GC. You should include: - - for gc::HP garbage collector - - for gc::PTB garbage collector + - for \p gc::HP garbage collector + - for \p gc::DHP garbage collector - for \ref cds_intrusive_SkipListSet_nogc for persistent set - for \ref cds_intrusive_SkipListSet_rcu "RCU type" diff --git a/cds/intrusive/skip_list_dhp.h b/cds/intrusive/skip_list_dhp.h new file mode 100644 index 00000000..01539506 --- /dev/null +++ b/cds/intrusive/skip_list_dhp.h @@ -0,0 +1,9 @@ +//$$CDS-header$$ + +#ifndef __CDS_INTRUSIVE_SKIP_LIST_DHP_H +#define __CDS_INTRUSIVE_SKIP_LIST_DHP_H + +#include +#include + +#endif // __CDS_INTRUSIVE_SKIP_LIST_DHP_H diff --git a/cds/intrusive/skip_list_ptb.h b/cds/intrusive/skip_list_ptb.h deleted file mode 100644 index 87a5f9aa..00000000 --- a/cds/intrusive/skip_list_ptb.h +++ /dev/null @@ -1,9 +0,0 @@ -//$$CDS-header$$ - -#ifndef __CDS_INTRUSIVE_SKIP_LIST_PTB_H -#define __CDS_INTRUSIVE_SKIP_LIST_PTB_H - -#include -#include - -#endif diff --git a/projects/Win/vc12/cds.vcxproj b/projects/Win/vc12/cds.vcxproj index 5f2d1285..736b7bd2 100644 --- a/projects/Win/vc12/cds.vcxproj +++ b/projects/Win/vc12/cds.vcxproj @@ -697,9 +697,9 @@ + - @@ -771,9 +771,9 @@ + - diff --git a/projects/Win/vc12/cds.vcxproj.filters b/projects/Win/vc12/cds.vcxproj.filters index e5ae6fa2..2503c601 100644 --- a/projects/Win/vc12/cds.vcxproj.filters +++ b/projects/Win/vc12/cds.vcxproj.filters @@ -872,15 +872,9 @@ Header Files\cds\intrusive - - Header Files\cds\intrusive - Header Files\cds\container - - Header Files\cds\container - Header Files\cds\container\details @@ -1232,5 +1226,11 @@ Header Files\cds\container + + Header Files\cds\intrusive + + + Header Files\cds\container + \ No newline at end of file diff --git a/projects/Win/vc12/hdr-test-map.vcxproj b/projects/Win/vc12/hdr-test-map.vcxproj index e4846fcb..a7b44c84 100644 --- a/projects/Win/vc12/hdr-test-map.vcxproj +++ b/projects/Win/vc12/hdr-test-map.vcxproj @@ -570,7 +570,6 @@ - @@ -580,7 +579,6 @@ - diff --git a/projects/Win/vc12/hdr-test-map.vcxproj.filters b/projects/Win/vc12/hdr-test-map.vcxproj.filters index bd549070..43021b3d 100644 --- a/projects/Win/vc12/hdr-test-map.vcxproj.filters +++ b/projects/Win/vc12/hdr-test-map.vcxproj.filters @@ -52,9 +52,6 @@ skip_list - - skip_list - skip_list @@ -64,9 +61,6 @@ split_list - - split_list - split_list diff --git a/tests/test-hdr/map/hdr_map.h b/tests/test-hdr/map/hdr_map.h index 10b196aa..a0ac48d4 100644 --- a/tests/test-hdr/map/hdr_map.h +++ b/tests/test-hdr/map/hdr_map.h @@ -668,10 +668,6 @@ namespace map { void Lazy_PTB_less(); void Lazy_PTB_cmpmix(); - void Lazy_HRC_cmp(); - void Lazy_HRC_less(); - void Lazy_HRC_cmpmix(); - void Lazy_RCU_GPI_cmp(); void Lazy_RCU_GPI_less(); void Lazy_RCU_GPI_cmpmix(); @@ -736,10 +732,6 @@ namespace map { void Split_Lazy_PTB_less(); void Split_Lazy_PTB_cmpmix(); - void Split_Lazy_HRC_cmp(); - void Split_Lazy_HRC_less(); - void Split_Lazy_HRC_cmpmix(); - void Split_Lazy_RCU_GPI_cmp(); void Split_Lazy_RCU_GPI_less(); void Split_Lazy_RCU_GPI_cmpmix(); @@ -805,10 +797,6 @@ namespace map { CPPUNIT_TEST(Lazy_PTB_less) CPPUNIT_TEST(Lazy_PTB_cmpmix) - CPPUNIT_TEST(Lazy_HRC_cmp) - CPPUNIT_TEST(Lazy_HRC_less) - CPPUNIT_TEST(Lazy_HRC_cmpmix) - CPPUNIT_TEST(Lazy_RCU_GPI_cmp) CPPUNIT_TEST(Lazy_RCU_GPI_less) CPPUNIT_TEST(Lazy_RCU_GPI_cmpmix) @@ -873,10 +861,6 @@ namespace map { CPPUNIT_TEST(Split_Lazy_PTB_less) CPPUNIT_TEST(Split_Lazy_PTB_cmpmix) - CPPUNIT_TEST(Split_Lazy_HRC_cmp) - CPPUNIT_TEST(Split_Lazy_HRC_less) - CPPUNIT_TEST(Split_Lazy_HRC_cmpmix) - CPPUNIT_TEST(Split_Lazy_RCU_GPI_cmp) CPPUNIT_TEST(Split_Lazy_RCU_GPI_less) CPPUNIT_TEST(Split_Lazy_RCU_GPI_cmpmix) diff --git a/tests/test-hdr/map/hdr_skiplist_map.h b/tests/test-hdr/map/hdr_skiplist_map.h index 7c6f6a4d..7b00054d 100644 --- a/tests/test-hdr/map/hdr_skiplist_map.h +++ b/tests/test-hdr/map/hdr_skiplist_map.h @@ -394,31 +394,6 @@ namespace map { void SkipList_HP_michaelalloc_cmp_stat(); void SkipList_HP_michaelalloc_cmpless_stat(); - void SkipList_HRC_less(); - void SkipList_HRC_cmp(); - void SkipList_HRC_cmpless(); - void SkipList_HRC_less_stat(); - void SkipList_HRC_cmp_stat(); - void SkipList_HRC_cmpless_stat(); - void SkipList_HRC_xorshift_less(); - void SkipList_HRC_xorshift_cmp(); - void SkipList_HRC_xorshift_cmpless(); - void SkipList_HRC_xorshift_less_stat(); - void SkipList_HRC_xorshift_cmp_stat(); - void SkipList_HRC_xorshift_cmpless_stat(); - void SkipList_HRC_turbopas_less(); - void SkipList_HRC_turbopas_cmp(); - void SkipList_HRC_turbopas_cmpless(); - void SkipList_HRC_turbopas_less_stat(); - void SkipList_HRC_turbopas_cmp_stat(); - void SkipList_HRC_turbopas_cmpless_stat(); - void SkipList_HRC_michaelalloc_less(); - void SkipList_HRC_michaelalloc_cmp(); - void SkipList_HRC_michaelalloc_cmpless(); - void SkipList_HRC_michaelalloc_less_stat(); - void SkipList_HRC_michaelalloc_cmp_stat(); - void SkipList_HRC_michaelalloc_cmpless_stat(); - void SkipList_PTB_less(); void SkipList_PTB_cmp(); void SkipList_PTB_cmpless(); @@ -495,31 +470,6 @@ namespace map { CPPUNIT_TEST(SkipList_HP_michaelalloc_cmp_stat) CPPUNIT_TEST(SkipList_HP_michaelalloc_cmpless_stat) - CPPUNIT_TEST(SkipList_HRC_less) - CPPUNIT_TEST(SkipList_HRC_cmp) - CPPUNIT_TEST(SkipList_HRC_cmpless) - CPPUNIT_TEST(SkipList_HRC_less_stat) - CPPUNIT_TEST(SkipList_HRC_cmp_stat) - CPPUNIT_TEST(SkipList_HRC_cmpless_stat) - CPPUNIT_TEST(SkipList_HRC_xorshift_less) - CPPUNIT_TEST(SkipList_HRC_xorshift_cmp) - CPPUNIT_TEST(SkipList_HRC_xorshift_cmpless) - CPPUNIT_TEST(SkipList_HRC_xorshift_less_stat) - CPPUNIT_TEST(SkipList_HRC_xorshift_cmp_stat) - CPPUNIT_TEST(SkipList_HRC_xorshift_cmpless_stat) - CPPUNIT_TEST(SkipList_HRC_turbopas_less) - CPPUNIT_TEST(SkipList_HRC_turbopas_cmp) - CPPUNIT_TEST(SkipList_HRC_turbopas_cmpless) - CPPUNIT_TEST(SkipList_HRC_turbopas_less_stat) - CPPUNIT_TEST(SkipList_HRC_turbopas_cmp_stat) - CPPUNIT_TEST(SkipList_HRC_turbopas_cmpless_stat) - CPPUNIT_TEST(SkipList_HRC_michaelalloc_less) - CPPUNIT_TEST(SkipList_HRC_michaelalloc_cmp) - CPPUNIT_TEST(SkipList_HRC_michaelalloc_cmpless) - CPPUNIT_TEST(SkipList_HRC_michaelalloc_less_stat) - CPPUNIT_TEST(SkipList_HRC_michaelalloc_cmp_stat) - CPPUNIT_TEST(SkipList_HRC_michaelalloc_cmpless_stat) - CPPUNIT_TEST(SkipList_PTB_less) CPPUNIT_TEST(SkipList_PTB_cmp) CPPUNIT_TEST(SkipList_PTB_cmpless) diff --git a/tests/test-hdr/map/hdr_skiplist_map_hrc.cpp b/tests/test-hdr/map/hdr_skiplist_map_hrc.cpp deleted file mode 100644 index 9ad246c8..00000000 --- a/tests/test-hdr/map/hdr_skiplist_map_hrc.cpp +++ /dev/null @@ -1,311 +0,0 @@ -//$$CDS-header$$ - -#include "map/hdr_skiplist_map.h" -#include -#include "unit/michael_alloc.h" -#include "map/print_skiplist_stat.h" - -namespace map { - - void SkipListMapHdrTest::SkipList_HRC_less() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_cmp() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_cmpless() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_less_stat() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_cmp_stat() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_cmpless_stat() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_xorshift_less() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_xorshift_cmp() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_xorshift_cmpless() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_xorshift_less_stat() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_xorshift_cmp_stat() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_xorshift_cmpless_stat() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_turbopas_less() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_turbopas_cmp() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_turbopas_cmpless() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_turbopas_less_stat() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_turbopas_cmp_stat() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_turbopas_cmpless_stat() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_michaelalloc_less() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_michaelalloc_cmp() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_michaelalloc_cmpless() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_michaelalloc_less_stat() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::less< less > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_michaelalloc_cmp_stat() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } - - void SkipListMapHdrTest::SkipList_HRC_michaelalloc_cmpless_stat() - { - typedef cc::SkipListMap< cds::gc::HRC, key_type, value_type, - cc::skip_list::make_traits< - co::less< less > - ,co::compare< cmp > - ,co::item_counter< simple_item_counter > - ,co::stat< cc::skip_list::stat<> > - ,co::allocator< memory::MichaelAllocator > - >::type - > set; - test< set, misc::print_skiplist_stat >(); - } -} // namespace map diff --git a/tests/test-hdr/map/hdr_skiplist_map_ptb.cpp b/tests/test-hdr/map/hdr_skiplist_map_ptb.cpp index 994e4fbd..7405d776 100644 --- a/tests/test-hdr/map/hdr_skiplist_map_ptb.cpp +++ b/tests/test-hdr/map/hdr_skiplist_map_ptb.cpp @@ -1,7 +1,7 @@ //$$CDS-header$$ #include "map/hdr_skiplist_map.h" -#include +#include #include "unit/michael_alloc.h" #include "map/print_skiplist_stat.h" diff --git a/tests/test-hdr/map/hdr_splitlist_map_lazy_hrc.cpp b/tests/test-hdr/map/hdr_splitlist_map_lazy_hrc.cpp deleted file mode 100644 index 7da2ec48..00000000 --- a/tests/test-hdr/map/hdr_splitlist_map_lazy_hrc.cpp +++ /dev/null @@ -1,131 +0,0 @@ -//$$CDS-header$$ - -#include "map/hdr_map.h" -#include -#include - -namespace map { - - namespace { - struct HRC_cmp_traits: public cc::split_list::type_traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashMapHdrTest::hash_int hash; - typedef HashMapHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::relaxed_ordering memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::lazy_list::type_traits - { - typedef HashMapHdrTest::cmp compare; - }; - }; - - struct HRC_less_traits: public cc::split_list::type_traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashMapHdrTest::hash_int hash; - typedef HashMapHdrTest::simple_item_counter item_counter; - typedef cc::opt::v::sequential_consistent memory_model; - enum { dynamic_bucket_table = false }; - - struct ordered_list_traits: public cc::lazy_list::type_traits - { - typedef HashMapHdrTest::less less; - }; - }; - - struct HRC_cmpmix_traits: public cc::split_list::type_traits - { - typedef cc::lazy_list_tag ordered_list; - typedef HashMapHdrTest::hash_int hash; - typedef HashMapHdrTest::simple_item_counter item_counter; - - struct ordered_list_traits: public cc::lazy_list::type_traits - { - typedef HashMapHdrTest::cmp compare; - typedef std::less less; - }; - }; - } - - void HashMapHdrTest::Split_Lazy_HRC_cmp() - { - // traits-based version - typedef cc::SplitListMap< cds::gc::HRC, key_type, value_type, HRC_cmp_traits > map_type; - test_int< map_type >(); - - // option-based version - typedef cc::SplitListMap< cds::gc::HRC, - key_type, - value_type, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::relaxed_ordering > - ,cc::split_list::dynamic_bucket_table< true > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::compare< cmp > - >::type - > - >::type - > opt_map; - test_int< opt_map >(); - } - - void HashMapHdrTest::Split_Lazy_HRC_less() - { - // traits-based version - typedef cc::SplitListMap< cds::gc::HRC, key_type, value_type, HRC_less_traits > map_type; - test_int< map_type >(); - - // option-based version - typedef cc::SplitListMap< cds::gc::HRC, - key_type, - value_type, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::opt::memory_model< cc::opt::v::relaxed_ordering > - ,cc::split_list::dynamic_bucket_table< false > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< less > - >::type - > - >::type - > opt_map; - test_int< opt_map >(); - } - - void HashMapHdrTest::Split_Lazy_HRC_cmpmix() - { - // traits-based version - typedef cc::SplitListMap< cds::gc::HRC, key_type, value_type, HRC_cmpmix_traits > map_type; - test_int< map_type >(); - - // option-based version - typedef cc::SplitListMap< cds::gc::HRC, - key_type, - value_type, - cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::opt::hash< hash_int > - ,cc::opt::item_counter< simple_item_counter > - ,cc::split_list::ordered_list_traits< - cc::lazy_list::make_traits< - cc::opt::less< std::less > - ,cc::opt::compare< cmp > - >::type - > - >::type - > opt_map; - test_int< opt_map >(); - } - - -} // namespace map - diff --git a/tests/test-hdr/set/hdr_intrusive_skiplist_ptb.cpp b/tests/test-hdr/set/hdr_intrusive_skiplist_ptb.cpp index 3b87ace4..2ea52b97 100644 --- a/tests/test-hdr/set/hdr_intrusive_skiplist_ptb.cpp +++ b/tests/test-hdr/set/hdr_intrusive_skiplist_ptb.cpp @@ -2,7 +2,7 @@ #include "set/hdr_intrusive_skiplist_set.h" -#include +#include #include "map/print_skiplist_stat.h" namespace set { diff --git a/tests/test-hdr/set/hdr_intrusive_skiplist_ptb_member.cpp b/tests/test-hdr/set/hdr_intrusive_skiplist_ptb_member.cpp index c8126964..f628dfba 100644 --- a/tests/test-hdr/set/hdr_intrusive_skiplist_ptb_member.cpp +++ b/tests/test-hdr/set/hdr_intrusive_skiplist_ptb_member.cpp @@ -2,7 +2,7 @@ #include "set/hdr_intrusive_skiplist_set.h" -#include +#include #include "map/print_skiplist_stat.h" namespace set { diff --git a/tests/test-hdr/set/hdr_skiplist_set_ptb.cpp b/tests/test-hdr/set/hdr_skiplist_set_ptb.cpp index 22fea867..60366f8f 100644 --- a/tests/test-hdr/set/hdr_skiplist_set_ptb.cpp +++ b/tests/test-hdr/set/hdr_skiplist_set_ptb.cpp @@ -1,7 +1,7 @@ //$$CDS-header$$ #include "set/hdr_skiplist_set.h" -#include +#include #include "unit/michael_alloc.h" #include "map/print_skiplist_stat.h" diff --git a/tests/unit/map2/map_types.h b/tests/unit/map2/map_types.h index 0974bc0a..6dbf1d98 100644 --- a/tests/unit/map2/map_types.h +++ b/tests/unit/map2/map_types.h @@ -33,7 +33,7 @@ #include #include -#include +#include #include #include diff --git a/tests/unit/pqueue/skiplist_pqueue.h b/tests/unit/pqueue/skiplist_pqueue.h index 99bd9c21..68a816e9 100644 --- a/tests/unit/pqueue/skiplist_pqueue.h +++ b/tests/unit/pqueue/skiplist_pqueue.h @@ -4,8 +4,7 @@ #define __CDSUNIT_SKIPLIST_PQUEUE_H #include -#include -#include +#include #include #include #include diff --git a/tests/unit/set2/set_types.h b/tests/unit/set2/set_types.h index 6f27685f..36800dd5 100644 --- a/tests/unit/set2/set_types.h +++ b/tests/unit/set2/set_types.h @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include -- 2.34.1