From 6bdcea974fa3d68ae3548fbe4440c09da4711868 Mon Sep 17 00:00:00 2001 From: khizmax Date: Tue, 7 Apr 2015 15:58:12 +0300 Subject: [PATCH] Reorganized map2 unit test to reduce compiling time and memory --- cds/container/details/bronson_avltree_base.h | 3 + projects/Win/vc12/cds.sln | 12 +- tests/unit/map2/map_defs.h | 827 ++++--- tests/unit/map2/map_delodd.h | 11 +- tests/unit/map2/map_delodd_bronsonavltree.cpp | 3 + tests/unit/map2/map_delodd_cuckoo.cpp | 3 + tests/unit/map2/map_delodd_ellentree.cpp | 3 + tests/unit/map2/map_delodd_michael.cpp | 3 + tests/unit/map2/map_delodd_skip.cpp | 3 + tests/unit/map2/map_delodd_split.cpp | 3 + tests/unit/map2/map_find_int.h | 10 +- .../unit/map2/map_find_int_bronsonavltree.cpp | 3 + tests/unit/map2/map_find_int_cuckoo.cpp | 3 + tests/unit/map2/map_find_int_ellentree.cpp | 3 + tests/unit/map2/map_find_int_michael.cpp | 4 + tests/unit/map2/map_find_int_refinable.cpp | 3 + tests/unit/map2/map_find_int_skip.cpp | 4 + tests/unit/map2/map_find_int_split.cpp | 4 + tests/unit/map2/map_find_int_std.cpp | 3 + tests/unit/map2/map_find_int_striped.cpp | 3 + tests/unit/map2/map_find_string.h | 10 +- .../map2/map_find_string_bronsonavltree.cpp | 3 + tests/unit/map2/map_find_string_cuckoo.cpp | 3 + tests/unit/map2/map_find_string_ellentree.cpp | 3 + tests/unit/map2/map_find_string_michael.cpp | 4 + tests/unit/map2/map_find_string_refinable.cpp | 3 + tests/unit/map2/map_find_string_skip.cpp | 4 + tests/unit/map2/map_find_string_split.cpp | 4 + tests/unit/map2/map_find_string_std.cpp | 3 + tests/unit/map2/map_find_string_striped.cpp | 3 + tests/unit/map2/map_insdel_func.h | 10 +- .../map2/map_insdel_func_bronsonavltree.cpp | 3 + tests/unit/map2/map_insdel_func_cuckoo.cpp | 3 + tests/unit/map2/map_insdel_func_ellentree.cpp | 3 + tests/unit/map2/map_insdel_func_michael.cpp | 3 + tests/unit/map2/map_insdel_func_refinable.cpp | 3 + tests/unit/map2/map_insdel_func_skip.cpp | 3 + tests/unit/map2/map_insdel_func_split.cpp | 3 + tests/unit/map2/map_insdel_func_striped.cpp | 3 + tests/unit/map2/map_insdel_int.h | 10 +- .../map2/map_insdel_int_bronsonavltree.cpp | 3 + tests/unit/map2/map_insdel_int_cuckoo.cpp | 3 + tests/unit/map2/map_insdel_int_ellentree.cpp | 3 + tests/unit/map2/map_insdel_int_michael.cpp | 3 + tests/unit/map2/map_insdel_int_refinable.cpp | 3 + tests/unit/map2/map_insdel_int_skip.cpp | 3 + tests/unit/map2/map_insdel_int_split.cpp | 3 + tests/unit/map2/map_insdel_int_striped.cpp | 3 + tests/unit/map2/map_insdel_item_int.h | 10 +- .../map_insdel_item_int_bronsonavltree.cpp | 3 + .../unit/map2/map_insdel_item_int_cuckoo.cpp | 3 + .../map2/map_insdel_item_int_ellentree.cpp | 3 + .../unit/map2/map_insdel_item_int_michael.cpp | 3 + .../map2/map_insdel_item_int_refinable.cpp | 3 + tests/unit/map2/map_insdel_item_int_skip.cpp | 3 + tests/unit/map2/map_insdel_item_int_split.cpp | 3 + .../unit/map2/map_insdel_item_int_striped.cpp | 3 + tests/unit/map2/map_insdel_item_string.h | 10 +- .../map_insdel_item_string_bronsonavltree.cpp | 3 + .../map2/map_insdel_item_string_cuckoo.cpp | 3 + .../map2/map_insdel_item_string_ellentree.cpp | 3 + .../map2/map_insdel_item_string_michael.cpp | 3 + .../map2/map_insdel_item_string_refinable.cpp | 3 + .../unit/map2/map_insdel_item_string_skip.cpp | 3 + .../map2/map_insdel_item_string_split.cpp | 3 + .../map2/map_insdel_item_string_striped.cpp | 3 + tests/unit/map2/map_insdel_string.h | 10 +- .../map2/map_insdel_string_bronsonavltree.cpp | 3 + tests/unit/map2/map_insdel_string_cuckoo.cpp | 3 + .../unit/map2/map_insdel_string_ellentree.cpp | 3 + tests/unit/map2/map_insdel_string_michael.cpp | 3 + .../unit/map2/map_insdel_string_refinable.cpp | 3 + tests/unit/map2/map_insdel_string_skip.cpp | 3 + tests/unit/map2/map_insdel_string_split.cpp | 3 + tests/unit/map2/map_insdel_string_std.cpp | 3 + tests/unit/map2/map_insdel_string_striped.cpp | 3 + tests/unit/map2/map_insdelfind.cpp | 1 + tests/unit/map2/map_insdelfind.h | 10 +- .../map2/map_insdelfind_bronsonavltree.cpp | 3 + tests/unit/map2/map_insdelfind_cuckoo.cpp | 3 + tests/unit/map2/map_insdelfind_ellentree.cpp | 3 + tests/unit/map2/map_insdelfind_michael.cpp | 3 + tests/unit/map2/map_insdelfind_refinable.cpp | 3 + tests/unit/map2/map_insdelfind_skip.cpp | 3 + tests/unit/map2/map_insdelfind_split.cpp | 3 + tests/unit/map2/map_insdelfind_std.cpp | 3 + tests/unit/map2/map_insdelfind_striped.cpp | 3 + tests/unit/map2/map_insfind_int.h | 10 +- .../map2/map_insfind_int_bronsonavltree.cpp | 3 + tests/unit/map2/map_insfind_int_cuckoo.cpp | 3 + tests/unit/map2/map_insfind_int_ellentree.cpp | 3 + tests/unit/map2/map_insfind_int_michael.cpp | 4 + tests/unit/map2/map_insfind_int_refinable.cpp | 3 + tests/unit/map2/map_insfind_int_skip.cpp | 4 + tests/unit/map2/map_insfind_int_split.cpp | 4 + tests/unit/map2/map_insfind_int_std.cpp | 3 + tests/unit/map2/map_insfind_int_striped.cpp | 3 + tests/unit/map2/map_type.h | 135 ++ tests/unit/map2/map_type_bronson_avltree.h | 153 ++ tests/unit/map2/map_type_cuckoo.h | 168 ++ tests/unit/map2/map_type_ellen_bintree.h | 233 ++ tests/unit/map2/map_type_lazy_list.h | 134 ++ tests/unit/map2/map_type_michael.h | 180 ++ tests/unit/map2/map_type_michael_list.h | 126 ++ tests/unit/map2/map_type_skip_list.h | 192 ++ tests/unit/map2/map_type_split_list.h | 523 +++++ tests/unit/map2/map_type_std.h | 32 + tests/unit/map2/map_type_striped.h | 234 ++ tests/unit/map2/map_types.h | 1966 ----------------- 109 files changed, 3004 insertions(+), 2274 deletions(-) create mode 100644 tests/unit/map2/map_type.h create mode 100644 tests/unit/map2/map_type_bronson_avltree.h create mode 100644 tests/unit/map2/map_type_cuckoo.h create mode 100644 tests/unit/map2/map_type_ellen_bintree.h create mode 100644 tests/unit/map2/map_type_lazy_list.h create mode 100644 tests/unit/map2/map_type_michael.h create mode 100644 tests/unit/map2/map_type_michael_list.h create mode 100644 tests/unit/map2/map_type_skip_list.h create mode 100644 tests/unit/map2/map_type_split_list.h create mode 100644 tests/unit/map2/map_type_std.h create mode 100644 tests/unit/map2/map_type_striped.h delete mode 100644 tests/unit/map2/map_types.h diff --git a/cds/container/details/bronson_avltree_base.h b/cds/container/details/bronson_avltree_base.h index fa784e71..cf52bda2 100644 --- a/cds/container/details/bronson_avltree_base.h +++ b/cds/container/details/bronson_avltree_base.h @@ -13,6 +13,9 @@ namespace cds { namespace container { /// BronsonAVLTree related declarations namespace bronson_avltree { + //@cond + struct implementation_tag; + //@endcond template struct node; diff --git a/projects/Win/vc12/cds.sln b/projects/Win/vc12/cds.sln index a6a447da..3f7bde00 100644 --- a/projects/Win/vc12/cds.sln +++ b/projects/Win/vc12/cds.sln @@ -72,7 +72,17 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "map", "map", "{6BB7A27F-FC59-4267-B6FA-D034176D1459}" ProjectSection(SolutionItems) = preProject ..\..\..\tests\unit\map2\map_defs.h = ..\..\..\tests\unit\map2\map_defs.h - ..\..\..\tests\unit\map2\map_types.h = ..\..\..\tests\unit\map2\map_types.h + ..\..\..\tests\unit\map2\map_type.h = ..\..\..\tests\unit\map2\map_type.h + ..\..\..\tests\unit\map2\map_type_bronson_avltree.h = ..\..\..\tests\unit\map2\map_type_bronson_avltree.h + ..\..\..\tests\unit\map2\map_type_cuckoo.h = ..\..\..\tests\unit\map2\map_type_cuckoo.h + ..\..\..\tests\unit\map2\map_type_ellen_bintree.h = ..\..\..\tests\unit\map2\map_type_ellen_bintree.h + ..\..\..\tests\unit\map2\map_type_lazy_list.h = ..\..\..\tests\unit\map2\map_type_lazy_list.h + ..\..\..\tests\unit\map2\map_type_michael.h = ..\..\..\tests\unit\map2\map_type_michael.h + ..\..\..\tests\unit\map2\map_type_michael_list.h = ..\..\..\tests\unit\map2\map_type_michael_list.h + ..\..\..\tests\unit\map2\map_type_skip_list.h = ..\..\..\tests\unit\map2\map_type_skip_list.h + ..\..\..\tests\unit\map2\map_type_split_list.h = ..\..\..\tests\unit\map2\map_type_split_list.h + ..\..\..\tests\unit\map2\map_type_std.h = ..\..\..\tests\unit\map2\map_type_std.h + ..\..\..\tests\unit\map2\map_type_striped.h = ..\..\..\tests\unit\map2\map_type_striped.h ..\..\..\tests\unit\map2\std_hash_map.h = ..\..\..\tests\unit\map2\std_hash_map.h ..\..\..\tests\unit\map2\std_map.h = ..\..\..\tests\unit\map2\std_map.h EndProjectSection diff --git a/tests/unit/map2/map_defs.h b/tests/unit/map2/map_defs.h index f5bb2e6b..dcfb329f 100644 --- a/tests/unit/map2/map_defs.h +++ b/tests/unit/map2/map_defs.h @@ -4,22 +4,35 @@ #define CDSUNIT_MAP_DEFS_H #define CDSUNIT_DECLARE_StdMap \ - TEST_MAP(StdMap_Spin) \ - TEST_MAP(StdHashMap_Spin) + CDSUNIT_DECLARE_TEST(StdMap_Spin) \ + CDSUNIT_DECLARE_TEST(StdHashMap_Spin) +#define CDSUNIT_DEFINE_StdMap(IMPL, C) \ + TEST_MAP(IMPL, C, StdMap_Spin) \ + TEST_MAP(IMPL, C, StdHashMap_Spin) #define CDSUNIT_TEST_StdMap \ CPPUNIT_TEST(StdMap_Spin) \ CPPUNIT_TEST(StdHashMap_Spin) \ #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED # define CDSUNIT_DECLARE_MichaelMap_RCU_signal \ - TEST_MAP_EXTRACT(MichaelMap_RCU_SHB_cmp_stdAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_RCU_SHB_less_michaelAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_RCU_SHT_cmp_stdAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_RCU_SHT_less_michaelAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_Lazy_RCU_SHB_cmp_stdAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_Lazy_RCU_SHB_less_michaelAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_Lazy_RCU_SHT_cmp_stdAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_Lazy_RCU_SHT_less_michaelAlloc) + CDSUNIT_DECLARE_TEST(MichaelMap_RCU_SHB_cmp_stdAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_RCU_SHB_less_michaelAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_RCU_SHT_cmp_stdAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_RCU_SHT_less_michaelAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_Lazy_RCU_SHB_cmp_stdAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_Lazy_RCU_SHB_less_michaelAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_Lazy_RCU_SHT_cmp_stdAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_Lazy_RCU_SHT_less_michaelAlloc) + +# define CDSUNIT_DEFINE_MichaelMap_RCU_signal(IMPL, C) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_RCU_SHB_cmp_stdAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_RCU_SHB_less_michaelAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_RCU_SHT_cmp_stdAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_RCU_SHT_less_michaelAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_Lazy_RCU_SHB_cmp_stdAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_Lazy_RCU_SHB_less_michaelAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_Lazy_RCU_SHT_cmp_stdAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_Lazy_RCU_SHT_less_michaelAlloc) # define CDSUNIT_TEST_MichaelMap_RCU_signal \ CPPUNIT_TEST(MichaelMap_RCU_SHB_cmp_stdAlloc) \ @@ -33,33 +46,57 @@ #else # define CDSUNIT_DECLARE_MichaelMap_RCU_signal +# define CDSUNIT_DEFINE_MichaelMap_RCU_signal(IMPL, C) # define CDSUNIT_TEST_MichaelMap_RCU_signal #endif #define CDSUNIT_DECLARE_MichaelMap \ - TEST_MAP_EXTRACT(MichaelMap_HP_cmp_stdAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_HP_less_michaelAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_DHP_cmp_stdAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_DHP_less_michaelAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_RCU_GPI_cmp_stdAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_RCU_GPI_less_michaelAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_RCU_GPB_cmp_stdAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_RCU_GPB_less_michaelAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_RCU_GPT_cmp_stdAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_RCU_GPT_less_michaelAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_Lazy_HP_cmp_stdAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_Lazy_HP_less_michaelAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_Lazy_DHP_cmp_stdAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_Lazy_DHP_less_michaelAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_Lazy_RCU_GPI_cmp_stdAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_Lazy_RCU_GPI_less_michaelAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_Lazy_RCU_GPB_cmp_stdAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_Lazy_RCU_GPB_less_michaelAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_Lazy_RCU_GPT_cmp_stdAlloc) \ - TEST_MAP_EXTRACT(MichaelMap_Lazy_RCU_GPT_less_michaelAlloc)\ + CDSUNIT_DECLARE_TEST(MichaelMap_HP_cmp_stdAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_HP_less_michaelAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_DHP_cmp_stdAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_DHP_less_michaelAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_RCU_GPI_cmp_stdAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_RCU_GPI_less_michaelAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_RCU_GPB_cmp_stdAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_RCU_GPB_less_michaelAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_RCU_GPT_cmp_stdAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_RCU_GPT_less_michaelAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_Lazy_HP_cmp_stdAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_Lazy_HP_less_michaelAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_Lazy_DHP_cmp_stdAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_Lazy_DHP_less_michaelAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_Lazy_RCU_GPI_cmp_stdAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_Lazy_RCU_GPI_less_michaelAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_Lazy_RCU_GPB_cmp_stdAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_Lazy_RCU_GPB_less_michaelAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_Lazy_RCU_GPT_cmp_stdAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_Lazy_RCU_GPT_less_michaelAlloc)\ CDSUNIT_DECLARE_MichaelMap_RCU_signal +#define CDSUNIT_DEFINE_MichaelMap( IMPL, C ) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_HP_cmp_stdAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_HP_less_michaelAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_DHP_cmp_stdAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_DHP_less_michaelAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_RCU_GPI_cmp_stdAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_RCU_GPI_less_michaelAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_RCU_GPB_cmp_stdAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_RCU_GPB_less_michaelAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_RCU_GPT_cmp_stdAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_RCU_GPT_less_michaelAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_Lazy_HP_cmp_stdAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_Lazy_HP_less_michaelAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_Lazy_DHP_cmp_stdAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_Lazy_DHP_less_michaelAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_Lazy_RCU_GPI_cmp_stdAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_Lazy_RCU_GPI_less_michaelAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_Lazy_RCU_GPB_cmp_stdAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_Lazy_RCU_GPB_less_michaelAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_Lazy_RCU_GPT_cmp_stdAlloc) \ + TEST_MAP_EXTRACT(IMPL, C, MichaelMap_Lazy_RCU_GPT_less_michaelAlloc)\ + CDSUNIT_DEFINE_MichaelMap_RCU_signal( IMPL, C ) + #define CDSUNIT_TEST_MichaelMap \ CPPUNIT_TEST(MichaelMap_HP_cmp_stdAlloc) \ CPPUNIT_TEST(MichaelMap_HP_less_michaelAlloc) \ @@ -84,11 +121,18 @@ CDSUNIT_TEST_MichaelMap_RCU_signal #define CDSUNIT_DECLARE_MichaelMap_nogc \ - TEST_MAP(MichaelMap_NOGC_cmp_stdAlloc) \ - TEST_MAP(MichaelMap_NOGC_less_michaelAlloc) \ - TEST_MAP(MichaelMap_Lazy_NOGC_cmp_stdAlloc) \ - TEST_MAP(MichaelMap_Lazy_NOGC_unord_stdAlloc) \ - TEST_MAP(MichaelMap_Lazy_NOGC_less_michaelAlloc) + CDSUNIT_DECLARE_TEST(MichaelMap_NOGC_cmp_stdAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_NOGC_less_michaelAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_Lazy_NOGC_cmp_stdAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_Lazy_NOGC_unord_stdAlloc) \ + CDSUNIT_DECLARE_TEST(MichaelMap_Lazy_NOGC_less_michaelAlloc) + +#define CDSUNIT_DEFINE_MichaelMap_nogc( IMPL, C ) \ + TEST_MAP(IMPL, C, MichaelMap_NOGC_cmp_stdAlloc) \ + TEST_MAP(IMPL, C, MichaelMap_NOGC_less_michaelAlloc) \ + TEST_MAP(IMPL, C, MichaelMap_Lazy_NOGC_cmp_stdAlloc) \ + TEST_MAP(IMPL, C, MichaelMap_Lazy_NOGC_unord_stdAlloc) \ + TEST_MAP(IMPL, C, MichaelMap_Lazy_NOGC_less_michaelAlloc) #define CDSUNIT_TEST_MichaelMap_nogc \ CPPUNIT_TEST(MichaelMap_NOGC_cmp_stdAlloc) \ @@ -99,30 +143,56 @@ #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED # define CDSUNIT_DECLARE_SplitList_RCU_signal \ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_SHB_dyn_cmp)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_SHB_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_SHB_st_cmp)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_SHB_dyn_less)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_SHB_st_less)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_SHB_st_less_stat)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_SHT_dyn_cmp)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_SHT_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_SHT_st_cmp)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_SHT_dyn_less)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_SHT_st_less)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_SHT_st_less_stat)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHB_dyn_cmp)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHB_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHB_st_cmp)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHB_dyn_less)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHB_st_less)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHB_st_less_stat)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_dyn_cmp)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_cmp)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_dyn_less)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less)\ -TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less_stat) + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHB_dyn_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHB_dyn_cmp_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHB_st_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHB_dyn_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHB_st_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHB_st_less_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHT_dyn_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHT_dyn_cmp_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHT_st_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHT_dyn_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHT_st_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHT_st_less_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHB_dyn_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHB_dyn_cmp_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHB_st_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHB_dyn_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHB_st_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHB_st_less_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHT_dyn_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHT_dyn_cmp_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHT_st_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHT_dyn_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHT_st_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHT_st_less_stat) + +# define CDSUNIT_DEFINE_SplitList_RCU_signal( IMPL, C ) \ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHB_dyn_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHB_dyn_cmp_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHB_st_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHB_dyn_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHB_st_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHB_st_less_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHT_dyn_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHT_dyn_cmp_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHT_st_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHT_dyn_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHT_st_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHT_st_less_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHB_dyn_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHB_dyn_cmp_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHB_st_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHB_dyn_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHB_st_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHB_st_less_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHT_dyn_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHT_dyn_cmp_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHT_st_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHT_dyn_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHT_st_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHT_st_less_stat) # define CDSUNIT_TEST_SplitList_RCU_signal \ CPPUNIT_TEST(SplitList_Michael_RCU_SHB_dyn_cmp)\ @@ -152,72 +222,136 @@ TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less_stat) #else # define CDSUNIT_DECLARE_SplitList_RCU_signal +# define CDSUNIT_DEFINE_SplitList_RCU_signal( IMPL, C ) # define CDSUNIT_TEST_SplitList_RCU_signal #endif -#define CDSUNIT_DECLARE_SplitList \ - TEST_MAP_EXTRACT(SplitList_Michael_HP_dyn_cmp)\ - TEST_MAP_EXTRACT(SplitList_Michael_HP_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(SplitList_Michael_HP_st_cmp)\ - TEST_MAP_EXTRACT(SplitList_Michael_HP_dyn_less)\ - TEST_MAP_EXTRACT(SplitList_Michael_HP_st_less)\ - TEST_MAP_EXTRACT(SplitList_Michael_HP_st_less_stat)\ - TEST_MAP_EXTRACT(SplitList_Michael_DHP_dyn_cmp)\ - TEST_MAP_EXTRACT(SplitList_Michael_DHP_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(SplitList_Michael_DHP_st_cmp)\ - TEST_MAP_EXTRACT(SplitList_Michael_DHP_dyn_less)\ - TEST_MAP_EXTRACT(SplitList_Michael_DHP_st_less)\ - TEST_MAP_EXTRACT(SplitList_Michael_DHP_st_less_stat)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_GPI_dyn_cmp)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_GPI_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_GPI_st_cmp)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_GPI_dyn_less)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_GPI_st_less)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_GPI_st_less_stat)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_GPB_dyn_cmp)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_GPB_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_GPB_st_cmp)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_GPB_dyn_less)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_GPB_st_less)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_GPB_st_less_stat)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_GPT_dyn_cmp)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_GPT_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_GPT_st_cmp)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_GPT_dyn_less)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_GPT_st_less)\ - TEST_MAP_EXTRACT(SplitList_Michael_RCU_GPT_st_less_stat)\ - TEST_MAP_EXTRACT(SplitList_Lazy_HP_dyn_cmp)\ - TEST_MAP_EXTRACT(SplitList_Lazy_HP_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(SplitList_Lazy_HP_st_cmp)\ - TEST_MAP_EXTRACT(SplitList_Lazy_HP_dyn_less)\ - TEST_MAP_EXTRACT(SplitList_Lazy_HP_st_less)\ - TEST_MAP_EXTRACT(SplitList_Lazy_HP_st_less_stat)\ - TEST_MAP_EXTRACT(SplitList_Lazy_DHP_dyn_cmp)\ - TEST_MAP_EXTRACT(SplitList_Lazy_DHP_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(SplitList_Lazy_DHP_st_cmp)\ - TEST_MAP_EXTRACT(SplitList_Lazy_DHP_dyn_less)\ - TEST_MAP_EXTRACT(SplitList_Lazy_DHP_st_less)\ - TEST_MAP_EXTRACT(SplitList_Lazy_DHP_st_less_stat)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_GPI_dyn_cmp)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_GPI_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_GPI_st_cmp)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_GPI_dyn_less)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_GPI_st_less)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_GPI_st_less_stat)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_GPB_dyn_cmp)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_GPB_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_GPB_st_cmp)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_GPB_dyn_less)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_GPB_st_less)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_GPB_st_less_stat)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_GPT_dyn_cmp)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_GPT_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_GPT_st_cmp)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_GPT_dyn_less)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_GPT_st_less)\ - TEST_MAP_EXTRACT(SplitList_Lazy_RCU_GPT_st_less_stat)\ +#define CDSUNIT_DECLARE_SplitList \ + CDSUNIT_DECLARE_TEST(SplitList_Michael_HP_dyn_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_HP_dyn_cmp_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_HP_st_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_HP_dyn_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_HP_st_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_HP_st_less_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_DHP_dyn_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_DHP_dyn_cmp_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_DHP_st_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_DHP_dyn_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_DHP_st_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_DHP_st_less_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPI_dyn_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPI_dyn_cmp_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPI_st_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPI_dyn_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPI_st_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPI_st_less_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPB_dyn_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPB_dyn_cmp_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPB_st_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPB_dyn_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPB_st_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPB_st_less_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPT_dyn_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPT_dyn_cmp_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPT_st_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPT_dyn_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPT_st_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPT_st_less_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_HP_dyn_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_HP_dyn_cmp_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_HP_st_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_HP_dyn_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_HP_st_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_HP_st_less_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_DHP_dyn_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_DHP_dyn_cmp_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_DHP_st_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_DHP_dyn_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_DHP_st_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_DHP_st_less_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPI_dyn_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPI_dyn_cmp_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPI_st_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPI_dyn_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPI_st_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPI_st_less_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPB_dyn_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPB_dyn_cmp_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPB_st_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPB_dyn_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPB_st_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPB_st_less_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPT_dyn_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPT_dyn_cmp_stat)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPT_st_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPT_dyn_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPT_st_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPT_st_less_stat)\ CDSUNIT_DECLARE_SplitList_RCU_signal +#define CDSUNIT_DEFINE_SplitList( IMPL, C ) \ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_HP_dyn_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_HP_dyn_cmp_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_HP_st_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_HP_dyn_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_HP_st_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_HP_st_less_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_DHP_dyn_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_DHP_dyn_cmp_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_DHP_st_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_DHP_dyn_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_DHP_st_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_DHP_st_less_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPI_dyn_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPI_dyn_cmp_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPI_st_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPI_dyn_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPI_st_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPI_st_less_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPB_dyn_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPB_dyn_cmp_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPB_st_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPB_dyn_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPB_st_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPB_st_less_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPT_dyn_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPT_dyn_cmp_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPT_st_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPT_dyn_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPT_st_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPT_st_less_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_HP_dyn_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_HP_dyn_cmp_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_HP_st_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_HP_dyn_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_HP_st_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_HP_st_less_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_DHP_dyn_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_DHP_dyn_cmp_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_DHP_st_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_DHP_dyn_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_DHP_st_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_DHP_st_less_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPI_dyn_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPI_dyn_cmp_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPI_st_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPI_dyn_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPI_st_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPI_st_less_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPB_dyn_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPB_dyn_cmp_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPB_st_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPB_dyn_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPB_st_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPB_st_less_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPT_dyn_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPT_dyn_cmp_stat)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPT_st_cmp)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPT_dyn_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPT_st_less)\ + TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPT_st_less_stat)\ + CDSUNIT_DEFINE_SplitList_RCU_signal( IMPL, C ) + #define CDSUNIT_TEST_SplitList \ CPPUNIT_TEST(SplitList_Michael_HP_dyn_cmp)\ CPPUNIT_TEST(SplitList_Michael_HP_dyn_cmp_stat)\ @@ -282,14 +416,24 @@ TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less_stat) CDSUNIT_TEST_SplitList_RCU_signal #define CDSUNIT_DECLARE_SplitList_nogc \ - TEST_MAP(SplitList_Michael_NOGC_dyn_cmp)\ - TEST_MAP(SplitList_Michael_NOGC_st_cmp)\ - TEST_MAP(SplitList_Michael_NOGC_dyn_less)\ - TEST_MAP(SplitList_Michael_NOGC_st_less)\ - TEST_MAP(SplitList_Lazy_NOGC_dyn_cmp)\ - TEST_MAP(SplitList_Lazy_NOGC_st_cmp)\ - TEST_MAP(SplitList_Lazy_NOGC_dyn_less)\ - TEST_MAP(SplitList_Lazy_NOGC_st_less) + CDSUNIT_DECLARE_TEST(SplitList_Michael_NOGC_dyn_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_NOGC_st_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_NOGC_dyn_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Michael_NOGC_st_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_NOGC_dyn_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_NOGC_st_cmp)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_NOGC_dyn_less)\ + CDSUNIT_DECLARE_TEST(SplitList_Lazy_NOGC_st_less) + +#define CDSUNIT_DEFINE_SplitList_nogc( IMPL, C ) \ + TEST_MAP(IMPL, C, SplitList_Michael_NOGC_dyn_cmp)\ + TEST_MAP(IMPL, C, SplitList_Michael_NOGC_st_cmp)\ + TEST_MAP(IMPL, C, SplitList_Michael_NOGC_dyn_less)\ + TEST_MAP(IMPL, C, SplitList_Michael_NOGC_st_less)\ + TEST_MAP(IMPL, C, SplitList_Lazy_NOGC_dyn_cmp)\ + TEST_MAP(IMPL, C, SplitList_Lazy_NOGC_st_cmp)\ + TEST_MAP(IMPL, C, SplitList_Lazy_NOGC_dyn_less)\ + TEST_MAP(IMPL, C, SplitList_Lazy_NOGC_st_less) #define CDSUNIT_TEST_SplitList_nogc \ CPPUNIT_TEST(SplitList_Michael_NOGC_dyn_cmp)\ @@ -303,14 +447,24 @@ TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less_stat) #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED # define CDSUNIT_DECLARE_SkipListMap_RCU_signal \ - TEST_MAP_NOLF_EXTRACT(SkipListMap_rcu_shb_less_pascal)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_rcu_shb_cmp_pascal_stat)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_rcu_shb_less_xorshift)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_rcu_shb_cmp_xorshift_stat)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_rcu_sht_less_pascal)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_rcu_sht_cmp_pascal_stat)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_rcu_sht_less_xorshift)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_rcu_sht_cmp_xorshift_stat) + CDSUNIT_DECLARE_TEST(SkipListMap_rcu_shb_less_pascal)\ + CDSUNIT_DECLARE_TEST(SkipListMap_rcu_shb_cmp_pascal_stat)\ + CDSUNIT_DECLARE_TEST(SkipListMap_rcu_shb_less_xorshift)\ + CDSUNIT_DECLARE_TEST(SkipListMap_rcu_shb_cmp_xorshift_stat)\ + CDSUNIT_DECLARE_TEST(SkipListMap_rcu_sht_less_pascal)\ + CDSUNIT_DECLARE_TEST(SkipListMap_rcu_sht_cmp_pascal_stat)\ + CDSUNIT_DECLARE_TEST(SkipListMap_rcu_sht_less_xorshift)\ + CDSUNIT_DECLARE_TEST(SkipListMap_rcu_sht_cmp_xorshift_stat) + +# define CDSUNIT_DEFINE_SkipListMap_RCU_signal( IMPL, C ) \ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_shb_less_pascal)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_shb_cmp_pascal_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_shb_less_xorshift)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_shb_cmp_xorshift_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_sht_less_pascal)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_sht_cmp_pascal_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_sht_less_xorshift)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_sht_cmp_xorshift_stat) # define CDSUNIT_TEST_SkipListMap_RCU_signal \ CPPUNIT_TEST(SkipListMap_rcu_shb_less_pascal)\ @@ -324,32 +478,55 @@ TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less_stat) #else # define CDSUNIT_DECLARE_SkipListMap_RCU_signal +# define CDSUNIT_DEFINE_SkipListMap_RCU_signal( IMPL, C ) # define CDSUNIT_TEST_SkipListMap_RCU_signal #endif #define CDSUNIT_DECLARE_SkipListMap \ - TEST_MAP_NOLF_EXTRACT(SkipListMap_hp_less_pascal)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_hp_cmp_pascal_stat)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_hp_less_xorshift)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_hp_cmp_xorshift_stat)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_dhp_less_pascal)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_dhp_cmp_pascal_stat)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_dhp_less_xorshift)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_dhp_cmp_xorshift_stat)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_rcu_gpi_less_pascal)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_rcu_gpi_cmp_pascal_stat)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_rcu_gpi_less_xorshift)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_rcu_gpi_cmp_xorshift_stat)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_rcu_gpb_less_pascal)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_rcu_gpb_cmp_pascal_stat)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_rcu_gpb_less_xorshift)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_rcu_gpb_cmp_xorshift_stat)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_rcu_gpt_less_pascal)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_rcu_gpt_cmp_pascal_stat)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_rcu_gpt_less_xorshift)\ - TEST_MAP_NOLF_EXTRACT(SkipListMap_rcu_gpt_cmp_xorshift_stat)\ + CDSUNIT_DECLARE_TEST(SkipListMap_hp_less_pascal)\ + CDSUNIT_DECLARE_TEST(SkipListMap_hp_cmp_pascal_stat)\ + CDSUNIT_DECLARE_TEST(SkipListMap_hp_less_xorshift)\ + CDSUNIT_DECLARE_TEST(SkipListMap_hp_cmp_xorshift_stat)\ + CDSUNIT_DECLARE_TEST(SkipListMap_dhp_less_pascal)\ + CDSUNIT_DECLARE_TEST(SkipListMap_dhp_cmp_pascal_stat)\ + CDSUNIT_DECLARE_TEST(SkipListMap_dhp_less_xorshift)\ + CDSUNIT_DECLARE_TEST(SkipListMap_dhp_cmp_xorshift_stat)\ + CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpi_less_pascal)\ + CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpi_cmp_pascal_stat)\ + CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpi_less_xorshift)\ + CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpi_cmp_xorshift_stat)\ + CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpb_less_pascal)\ + CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpb_cmp_pascal_stat)\ + CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpb_less_xorshift)\ + CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpb_cmp_xorshift_stat)\ + CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpt_less_pascal)\ + CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpt_cmp_pascal_stat)\ + CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpt_less_xorshift)\ + CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpt_cmp_xorshift_stat)\ CDSUNIT_DECLARE_SkipListMap_RCU_signal +#define CDSUNIT_DEFINE_SkipListMap( IMPL, C ) \ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_hp_less_pascal)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_hp_cmp_pascal_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_hp_less_xorshift)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_hp_cmp_xorshift_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_dhp_less_pascal)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_dhp_cmp_pascal_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_dhp_less_xorshift)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_dhp_cmp_xorshift_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpi_less_pascal)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpi_cmp_pascal_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpi_less_xorshift)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpi_cmp_xorshift_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpb_less_pascal)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpb_cmp_pascal_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpb_less_xorshift)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpb_cmp_xorshift_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpt_less_pascal)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpt_cmp_pascal_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpt_less_xorshift)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpt_cmp_xorshift_stat)\ + CDSUNIT_DEFINE_SkipListMap_RCU_signal( IMPL, C ) #define CDSUNIT_TEST_SkipListMap \ CPPUNIT_TEST(SkipListMap_hp_less_pascal)\ @@ -375,10 +552,16 @@ TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less_stat) CDSUNIT_TEST_SkipListMap_RCU_signal #define CDSUNIT_DECLARE_SkipListMap_nogc \ - TEST_MAP_NOLF(SkipListMap_nogc_less_pascal)\ - TEST_MAP_NOLF(SkipListMap_nogc_cmp_pascal_stat)\ - TEST_MAP_NOLF(SkipListMap_nogc_less_xorshift)\ - TEST_MAP_NOLF(SkipListMap_nogc_cmp_xorshift_stat) + CDSUNIT_DECLARE_TEST(SkipListMap_nogc_less_pascal)\ + CDSUNIT_DECLARE_TEST(SkipListMap_nogc_cmp_pascal_stat)\ + CDSUNIT_DECLARE_TEST(SkipListMap_nogc_less_xorshift)\ + CDSUNIT_DECLARE_TEST(SkipListMap_nogc_cmp_xorshift_stat) + +#define CDSUNIT_DEFINE_SkipListMap_nogc( IMPL, C ) \ + TEST_MAP_NOLF(IMPL, C, SkipListMap_nogc_less_pascal)\ + TEST_MAP_NOLF(IMPL, C, SkipListMap_nogc_cmp_pascal_stat)\ + TEST_MAP_NOLF(IMPL, C, SkipListMap_nogc_less_xorshift)\ + TEST_MAP_NOLF(IMPL, C, SkipListMap_nogc_cmp_xorshift_stat) #define CDSUNIT_TEST_SkipListMap_nogc \ CPPUNIT_TEST(SkipListMap_nogc_less_pascal)\ @@ -388,10 +571,16 @@ TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less_stat) #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED # define CDSUNIT_DECLARE_EllenBinTreeMap_RCU_signal \ - TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_rcu_shb)\ - TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_rcu_shb_stat)\ - TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_rcu_sht)\ - TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_rcu_sht_stat) + CDSUNIT_DECLARE_TEST(EllenBinTreeMap_rcu_shb)\ + CDSUNIT_DECLARE_TEST(EllenBinTreeMap_rcu_shb_stat)\ + CDSUNIT_DECLARE_TEST(EllenBinTreeMap_rcu_sht)\ + CDSUNIT_DECLARE_TEST(EllenBinTreeMap_rcu_sht_stat) + +# define CDSUNIT_DEFINE_EllenBinTreeMap_RCU_signal( IMPL, C ) \ + TEST_MAP_NOLF_EXTRACT(IMPL, C, EllenBinTreeMap_rcu_shb)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, EllenBinTreeMap_rcu_shb_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, EllenBinTreeMap_rcu_sht)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, EllenBinTreeMap_rcu_sht_stat) # define CDSUNIT_TEST_EllenBinTreeMap_RCU_signal \ CPPUNIT_TEST(EllenBinTreeMap_rcu_shb)\ @@ -400,25 +589,42 @@ TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less_stat) CPPUNIT_TEST(EllenBinTreeMap_rcu_sht_stat) #else # define CDSUNIT_DECLARE_EllenBinTreeMap_RCU_signal +# define CDSUNIT_DEFINE_EllenBinTreeMap_RCU_signal( IMPL, C ) # define CDSUNIT_TEST_EllenBinTreeMap_RCU_signal #endif #define CDSUNIT_DECLARE_EllenBinTreeMap \ - TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_hp)\ - TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_hp_yield)\ - TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_hp_stat)\ - TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_dhp)\ - TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_dhp_yield)\ - TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_dhp_stat)\ - TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_rcu_gpi)\ - TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_rcu_gpi_stat)\ - TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_rcu_gpb)\ - TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_rcu_gpb_yield)\ - TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_rcu_gpb_stat)\ - TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_rcu_gpt)\ - TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_rcu_gpt_stat)\ + CDSUNIT_DECLARE_TEST(EllenBinTreeMap_hp)\ + CDSUNIT_DECLARE_TEST(EllenBinTreeMap_hp_yield)\ + CDSUNIT_DECLARE_TEST(EllenBinTreeMap_hp_stat)\ + CDSUNIT_DECLARE_TEST(EllenBinTreeMap_dhp)\ + CDSUNIT_DECLARE_TEST(EllenBinTreeMap_dhp_yield)\ + CDSUNIT_DECLARE_TEST(EllenBinTreeMap_dhp_stat)\ + CDSUNIT_DECLARE_TEST(EllenBinTreeMap_rcu_gpi)\ + CDSUNIT_DECLARE_TEST(EllenBinTreeMap_rcu_gpi_stat)\ + CDSUNIT_DECLARE_TEST(EllenBinTreeMap_rcu_gpb)\ + CDSUNIT_DECLARE_TEST(EllenBinTreeMap_rcu_gpb_yield)\ + CDSUNIT_DECLARE_TEST(EllenBinTreeMap_rcu_gpb_stat)\ + CDSUNIT_DECLARE_TEST(EllenBinTreeMap_rcu_gpt)\ + CDSUNIT_DECLARE_TEST(EllenBinTreeMap_rcu_gpt_stat)\ CDSUNIT_DECLARE_EllenBinTreeMap_RCU_signal +#define CDSUNIT_DEFINE_EllenBinTreeMap( IMPL, C ) \ + TEST_MAP_NOLF_EXTRACT(IMPL, C, EllenBinTreeMap_hp)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, EllenBinTreeMap_hp_yield)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, EllenBinTreeMap_hp_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, EllenBinTreeMap_dhp)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, EllenBinTreeMap_dhp_yield)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, EllenBinTreeMap_dhp_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, EllenBinTreeMap_rcu_gpi)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, EllenBinTreeMap_rcu_gpi_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, EllenBinTreeMap_rcu_gpb)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, EllenBinTreeMap_rcu_gpb_yield)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, EllenBinTreeMap_rcu_gpb_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, EllenBinTreeMap_rcu_gpt)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, EllenBinTreeMap_rcu_gpt_stat)\ + CDSUNIT_DEFINE_EllenBinTreeMap_RCU_signal( IMPL, C ) + #define CDSUNIT_TEST_EllenBinTreeMap \ CPPUNIT_TEST(EllenBinTreeMap_hp)\ CPPUNIT_TEST(EllenBinTreeMap_hp_yield)\ @@ -437,22 +643,40 @@ TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less_stat) #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED # define CDSUNIT_DECLARE_BronsonAVLTreeMap_RCU_signal \ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_less) \ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_less) \ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_cmp_stat) \ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_cmp_stat) \ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_less_pool_simple) \ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_less_pool_simple) \ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_less_pool_simple_stat) \ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_less_pool_simple_stat) \ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_less_pool_lazy) \ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_less_pool_lazy) \ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_less_pool_lazy_stat) \ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_less_pool_lazy_stat) \ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_less_pool_bounded) \ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_less_pool_bounded) \ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_shb_less_pool_bounded_stat) \ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_sht_less_pool_bounded_stat) \ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_shb_less) \ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_sht_less) \ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_shb_cmp_stat) \ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_sht_cmp_stat) \ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_shb_less_pool_simple) \ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_sht_less_pool_simple) \ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_shb_less_pool_simple_stat) \ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_sht_less_pool_simple_stat) \ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_shb_less_pool_lazy) \ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_sht_less_pool_lazy) \ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_shb_less_pool_lazy_stat) \ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_sht_less_pool_lazy_stat) \ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_shb_less_pool_bounded) \ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_sht_less_pool_bounded) \ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_shb_less_pool_bounded_stat) \ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_sht_less_pool_bounded_stat) \ + +# define CDSUNIT_DEFINE_BronsonAVLTreeMap_RCU_signal(IMPL, C) \ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_shb_less) \ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_sht_less) \ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_shb_cmp_stat) \ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_sht_cmp_stat) \ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_shb_less_pool_simple) \ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_sht_less_pool_simple) \ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_shb_less_pool_simple_stat) \ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_sht_less_pool_simple_stat) \ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_shb_less_pool_lazy) \ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_sht_less_pool_lazy) \ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_shb_less_pool_lazy_stat) \ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_sht_less_pool_lazy_stat) \ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_shb_less_pool_bounded) \ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_sht_less_pool_bounded) \ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_shb_less_pool_bounded_stat) \ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_sht_less_pool_bounded_stat) \ # define CDSUNIT_TEST_BronsonAVLTreeMap_RCU_signal \ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_shb_less) \ @@ -474,36 +698,64 @@ TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less_stat) #else # define CDSUNIT_DECLARE_BronsonAVLTreeMap_RCU_signal +# define CDSUNIT_DEFINE_BronsonAVLTreeMap_RCU_signal(IMPL, C) # define CDSUNIT_TEST_BronsonAVLTreeMap_RCU_signal #endif #define CDSUNIT_DECLARE_BronsonAVLTreeMap \ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_less)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_less)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_less)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_cmp_stat)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_cmp_stat)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_cmp_stat)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_less_pool_simple)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_less_pool_simple)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_less_pool_simple)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_less_pool_simple_stat)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_less_pool_simple_stat)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_less_pool_simple_stat)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_less_pool_lazy)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_less_pool_lazy)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_less_pool_lazy)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_less_pool_lazy_stat)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_less_pool_lazy_stat)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_less_pool_lazy_stat)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_less_pool_bounded)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_less_pool_bounded)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_less_pool_bounded)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpi_less_pool_bounded_stat)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpb_less_pool_bounded_stat)\ - TEST_MAP_NOLF_EXTRACT(BronsonAVLTreeMap_rcu_gpt_less_pool_bounded_stat)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpi_less)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpb_less)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpt_less)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpi_cmp_stat)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpb_cmp_stat)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpt_cmp_stat)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpi_less_pool_simple)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpb_less_pool_simple)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpt_less_pool_simple)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpi_less_pool_simple_stat)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpb_less_pool_simple_stat)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpt_less_pool_simple_stat)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpi_less_pool_lazy)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpb_less_pool_lazy)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpt_less_pool_lazy)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpi_less_pool_lazy_stat)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpb_less_pool_lazy_stat)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpt_less_pool_lazy_stat)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpi_less_pool_bounded)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpb_less_pool_bounded)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpt_less_pool_bounded)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpi_less_pool_bounded_stat)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpb_less_pool_bounded_stat)\ + CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpt_less_pool_bounded_stat)\ CDSUNIT_DECLARE_BronsonAVLTreeMap_RCU_signal +#define CDSUNIT_DEFINE_BronsonAVLTreeMap( IMPL, C ) \ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpi_less)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpb_less)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpt_less)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpi_cmp_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpb_cmp_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpt_cmp_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpi_less_pool_simple)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpb_less_pool_simple)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpt_less_pool_simple)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpi_less_pool_simple_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpb_less_pool_simple_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpt_less_pool_simple_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpi_less_pool_lazy)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpb_less_pool_lazy)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpt_less_pool_lazy)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpi_less_pool_lazy_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpb_less_pool_lazy_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpt_less_pool_lazy_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpi_less_pool_bounded)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpb_less_pool_bounded)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpt_less_pool_bounded)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpi_less_pool_bounded_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpb_less_pool_bounded_stat)\ + TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpt_less_pool_bounded_stat)\ + CDSUNIT_DEFINE_BronsonAVLTreeMap_RCU_signal( IMPL, C ) + #define CDSUNIT_TEST_BronsonAVLTreeMap \ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpi_less)\ CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpi_cmp_stat)\ @@ -532,10 +784,16 @@ TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less_stat) CDSUNIT_TEST_BronsonAVLTreeMap_RCU_signal #define CDSUNIT_DECLARE_StripedMap_common \ - TEST_MAP(StripedMap_list) \ - TEST_MAP(StripedMap_map) \ - TEST_MAP(StripedMap_hashmap) \ - TEST_MAP(StripedMap_boost_unordered_map) + CDSUNIT_DECLARE_TEST(StripedMap_list) \ + CDSUNIT_DECLARE_TEST(StripedMap_map) \ + CDSUNIT_DECLARE_TEST(StripedMap_hashmap) \ + CDSUNIT_DECLARE_TEST(StripedMap_boost_unordered_map) + +#define CDSUNIT_DEFINE_StripedMap_common( IMPL, C ) \ + TEST_MAP(IMPL, C, StripedMap_list) \ + TEST_MAP(IMPL, C, StripedMap_map) \ + TEST_MAP(IMPL, C, StripedMap_hashmap) \ + TEST_MAP(IMPL, C, StripedMap_boost_unordered_map) #define CDSUNIT_TEST_StripedMap_common \ CPPUNIT_TEST(StripedMap_list) \ @@ -545,25 +803,33 @@ TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less_stat) #if BOOST_VERSION >= 104800 # define CDSUNIT_DECLARE_StripedMap_boost_container \ - TEST_MAP(StripedMap_boost_list) \ - TEST_MAP(StripedMap_slist) \ - TEST_MAP(StripedMap_boost_map) + CDSUNIT_DECLARE_TEST(StripedMap_boost_list) \ + CDSUNIT_DECLARE_TEST(StripedMap_slist) \ + CDSUNIT_DECLARE_TEST(StripedMap_boost_map) +# define CDSUNIT_DEFINE_StripedMap_boost_container( IMPL, C ) \ + TEST_MAP(IMPL, C, StripedMap_boost_list) \ + TEST_MAP(IMPL, C, StripedMap_slist) \ + TEST_MAP(IMPL, C, StripedMap_boost_map) # define CDSUNIT_TEST_StripedMap_boost_container \ CPPUNIT_TEST(StripedMap_boost_list) \ CPPUNIT_TEST(StripedMap_slist) \ CPPUNIT_TEST(StripedMap_boost_map) #else # define CDSUNIT_DECLARE_StripedMap_boost_container +# define CDSUNIT_DEFINE_StripedMap_boost_container( IMPL, C ) # define CDSUNIT_TEST_StripedMap_boost_container #endif #if BOOST_VERSION >= 104800 && defined(CDS_UNIT_MAP_TYPES_ENABLE_BOOST_FLAT_CONTAINERS) # define CDSUNIT_DECLARE_StripedMap_boost_flat_container \ - TEST_MAP(StripedMap_boost_flat_map) + CDSUNIT_DECLARE_TEST(StripedMap_boost_flat_map) +# define CDSUNIT_DEFINE_StripedMap_boost_flat_container( IMPL, C ) \ + TEST_MAP(IMPL, C, StripedMap_boost_flat_map) # define CDSUNIT_TEST_StripedMap_boost_flat_container \ CPPUNIT_TEST(StripedMap_boost_flat_map) #else # define CDSUNIT_DECLARE_StripedMap_boost_flat_container +# define CDSUNIT_DEFINE_StripedMap_boost_flat_container( IMPL, C ) # define CDSUNIT_TEST_StripedMap_boost_flat_container #endif @@ -571,6 +837,10 @@ TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less_stat) CDSUNIT_DECLARE_StripedMap_common \ CDSUNIT_DECLARE_StripedMap_boost_container \ CDSUNIT_DECLARE_StripedMap_boost_flat_container +#define CDSUNIT_DEFINE_StripedMap( IMPL, C ) \ + CDSUNIT_DEFINE_StripedMap_common( IMPL, C ) \ + CDSUNIT_DEFINE_StripedMap_boost_container( IMPL, C ) \ + CDSUNIT_DEFINE_StripedMap_boost_flat_container( IMPL, C ) #define CDSUNIT_TEST_StripedMap \ CDSUNIT_TEST_StripedMap_common \ CDSUNIT_TEST_StripedMap_boost_container \ @@ -579,10 +849,15 @@ TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less_stat) #define CDSUNIT_DECLARE_RefinableMap_common \ - TEST_MAP(RefinableMap_list) \ - TEST_MAP(RefinableMap_map) \ - TEST_MAP(RefinableMap_hashmap) \ - TEST_MAP(RefinableMap_boost_unordered_map) + CDSUNIT_DECLARE_TEST(RefinableMap_list) \ + CDSUNIT_DECLARE_TEST(RefinableMap_map) \ + CDSUNIT_DECLARE_TEST(RefinableMap_hashmap) \ + CDSUNIT_DECLARE_TEST(RefinableMap_boost_unordered_map) +#define CDSUNIT_DEFINE_RefinableMap_common( IMPL, C ) \ + TEST_MAP(IMPL, C, RefinableMap_list) \ + TEST_MAP(IMPL, C, RefinableMap_map) \ + TEST_MAP(IMPL, C, RefinableMap_hashmap) \ + TEST_MAP(IMPL, C, RefinableMap_boost_unordered_map) #define CDSUNIT_TEST_RefinableMap_common \ CPPUNIT_TEST(RefinableMap_list) \ CPPUNIT_TEST(RefinableMap_map) \ @@ -591,25 +866,33 @@ TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less_stat) #if BOOST_VERSION >= 104800 # define CDSUNIT_DECLARE_RefinableMap_boost_container \ - TEST_MAP(RefinableMap_boost_list) \ - TEST_MAP(RefinableMap_slist) \ - TEST_MAP(RefinableMap_boost_map) + CDSUNIT_DECLARE_TEST(RefinableMap_boost_list) \ + CDSUNIT_DECLARE_TEST(RefinableMap_slist) \ + CDSUNIT_DECLARE_TEST(RefinableMap_boost_map) +# define CDSUNIT_DEFINE_RefinableMap_boost_container( IMPL, C ) \ + TEST_MAP(IMPL, C, RefinableMap_boost_list) \ + TEST_MAP(IMPL, C, RefinableMap_slist) \ + TEST_MAP(IMPL, C, RefinableMap_boost_map) # define CDSUNIT_TEST_RefinableMap_boost_container \ CPPUNIT_TEST(RefinableMap_boost_list) \ CPPUNIT_TEST(RefinableMap_slist) \ CPPUNIT_TEST(RefinableMap_boost_map) #else # define CDSUNIT_DECLARE_RefinableMap_boost_container +# define CDSUNIT_DEFINE_RefinableMap_boost_container( IMPL, C ) # define CDSUNIT_TEST_RefinableMap_boost_container #endif #if BOOST_VERSION >= 104800 && defined(CDS_UNIT_MAP_TYPES_ENABLE_BOOST_FLAT_CONTAINERS) # define CDSUNIT_DECLARE_RefinableMap_boost_flat_container \ - TEST_MAP(RefinableMap_boost_flat_map) + CDSUNIT_DECLARE_TEST(RefinableMap_boost_flat_map) +# define CDSUNIT_DEFINE_RefinableMap_boost_flat_container( IMPL, C ) \ + TEST_MAP( IMPL, C, RefinableMap_boost_flat_map) # define CDSUNIT_TEST_RefinableMap_boost_flat_container \ CPPUNIT_TEST(RefinableMap_boost_flat_map) #else # define CDSUNIT_DECLARE_RefinableMap_boost_flat_container +# define CDSUNIT_DEFINE_RefinableMap_boost_flat_container( IMPL, C ) # define CDSUNIT_TEST_RefinableMap_boost_flat_container #endif @@ -617,36 +900,66 @@ TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less_stat) CDSUNIT_DECLARE_RefinableMap_common \ CDSUNIT_DECLARE_RefinableMap_boost_container \ CDSUNIT_DECLARE_RefinableMap_boost_flat_container +#define CDSUNIT_DEFINE_RefinableMap( IMPL, C ) \ + CDSUNIT_DEFINE_RefinableMap_common( IMPL, C ) \ + CDSUNIT_DEFINE_RefinableMap_boost_container( IMPL, C ) \ + CDSUNIT_DEFINE_RefinableMap_boost_flat_container( IMPL, C ) #define CDSUNIT_TEST_RefinableMap \ CDSUNIT_TEST_RefinableMap_common \ CDSUNIT_TEST_RefinableMap_boost_container \ CDSUNIT_TEST_RefinableMap_boost_flat_container #define CDSUNIT_DECLARE_CuckooMap \ - TEST_MAP(CuckooStripedMap_list_unord)\ - TEST_MAP(CuckooStripedMap_list_ord)\ - TEST_MAP(CuckooStripedMap_vector_unord)\ - TEST_MAP(CuckooStripedMap_vector_ord)\ - TEST_MAP(CuckooStripedMap_list_unord_stat)\ - TEST_MAP(CuckooStripedMap_list_ord_stat)\ - TEST_MAP(CuckooStripedMap_vector_unord_stat)\ - TEST_MAP(CuckooStripedMap_vector_ord_stat)\ - TEST_MAP(CuckooRefinableMap_list_unord)\ - TEST_MAP(CuckooRefinableMap_list_ord)\ - TEST_MAP(CuckooRefinableMap_vector_unord)\ - TEST_MAP(CuckooRefinableMap_vector_ord) \ - TEST_MAP(CuckooRefinableMap_list_unord_stat)\ - TEST_MAP(CuckooRefinableMap_list_ord_stat)\ - TEST_MAP(CuckooRefinableMap_vector_unord_stat)\ - TEST_MAP(CuckooRefinableMap_vector_ord_stat) \ - TEST_MAP(CuckooStripedMap_list_unord_storehash)\ - TEST_MAP(CuckooStripedMap_list_ord_storehash)\ - TEST_MAP(CuckooStripedMap_vector_unord_storehash)\ - TEST_MAP(CuckooStripedMap_vector_ord_storehash)\ - TEST_MAP(CuckooRefinableMap_list_unord_storehash)\ - TEST_MAP(CuckooRefinableMap_list_ord_storehash)\ - TEST_MAP(CuckooRefinableMap_vector_unord_storehash)\ - TEST_MAP(CuckooRefinableMap_vector_ord_storehash) + CDSUNIT_DECLARE_TEST(CuckooStripedMap_list_unord)\ + CDSUNIT_DECLARE_TEST(CuckooStripedMap_list_ord)\ + CDSUNIT_DECLARE_TEST(CuckooStripedMap_vector_unord)\ + CDSUNIT_DECLARE_TEST(CuckooStripedMap_vector_ord)\ + CDSUNIT_DECLARE_TEST(CuckooStripedMap_list_unord_stat)\ + CDSUNIT_DECLARE_TEST(CuckooStripedMap_list_ord_stat)\ + CDSUNIT_DECLARE_TEST(CuckooStripedMap_vector_unord_stat)\ + CDSUNIT_DECLARE_TEST(CuckooStripedMap_vector_ord_stat)\ + CDSUNIT_DECLARE_TEST(CuckooRefinableMap_list_unord)\ + CDSUNIT_DECLARE_TEST(CuckooRefinableMap_list_ord)\ + CDSUNIT_DECLARE_TEST(CuckooRefinableMap_vector_unord)\ + CDSUNIT_DECLARE_TEST(CuckooRefinableMap_vector_ord) \ + CDSUNIT_DECLARE_TEST(CuckooRefinableMap_list_unord_stat)\ + CDSUNIT_DECLARE_TEST(CuckooRefinableMap_list_ord_stat)\ + CDSUNIT_DECLARE_TEST(CuckooRefinableMap_vector_unord_stat)\ + CDSUNIT_DECLARE_TEST(CuckooRefinableMap_vector_ord_stat) \ + CDSUNIT_DECLARE_TEST(CuckooStripedMap_list_unord_storehash)\ + CDSUNIT_DECLARE_TEST(CuckooStripedMap_list_ord_storehash)\ + CDSUNIT_DECLARE_TEST(CuckooStripedMap_vector_unord_storehash)\ + CDSUNIT_DECLARE_TEST(CuckooStripedMap_vector_ord_storehash)\ + CDSUNIT_DECLARE_TEST(CuckooRefinableMap_list_unord_storehash)\ + CDSUNIT_DECLARE_TEST(CuckooRefinableMap_list_ord_storehash)\ + CDSUNIT_DECLARE_TEST(CuckooRefinableMap_vector_unord_storehash)\ + CDSUNIT_DECLARE_TEST(CuckooRefinableMap_vector_ord_storehash) + +#define CDSUNIT_DEFINE_CuckooMap( IMPL, C ) \ + TEST_MAP(IMPL, C, CuckooStripedMap_list_unord)\ + TEST_MAP(IMPL, C, CuckooStripedMap_list_ord)\ + TEST_MAP(IMPL, C, CuckooStripedMap_vector_unord)\ + TEST_MAP(IMPL, C, CuckooStripedMap_vector_ord)\ + TEST_MAP(IMPL, C, CuckooStripedMap_list_unord_stat)\ + TEST_MAP(IMPL, C, CuckooStripedMap_list_ord_stat)\ + TEST_MAP(IMPL, C, CuckooStripedMap_vector_unord_stat)\ + TEST_MAP(IMPL, C, CuckooStripedMap_vector_ord_stat)\ + TEST_MAP(IMPL, C, CuckooRefinableMap_list_unord)\ + TEST_MAP(IMPL, C, CuckooRefinableMap_list_ord)\ + TEST_MAP(IMPL, C, CuckooRefinableMap_vector_unord)\ + TEST_MAP(IMPL, C, CuckooRefinableMap_vector_ord) \ + TEST_MAP(IMPL, C, CuckooRefinableMap_list_unord_stat)\ + TEST_MAP(IMPL, C, CuckooRefinableMap_list_ord_stat)\ + TEST_MAP(IMPL, C, CuckooRefinableMap_vector_unord_stat)\ + TEST_MAP(IMPL, C, CuckooRefinableMap_vector_ord_stat) \ + TEST_MAP(IMPL, C, CuckooStripedMap_list_unord_storehash)\ + TEST_MAP(IMPL, C, CuckooStripedMap_list_ord_storehash)\ + TEST_MAP(IMPL, C, CuckooStripedMap_vector_unord_storehash)\ + TEST_MAP(IMPL, C, CuckooStripedMap_vector_ord_storehash)\ + TEST_MAP(IMPL, C, CuckooRefinableMap_list_unord_storehash)\ + TEST_MAP(IMPL, C, CuckooRefinableMap_list_ord_storehash)\ + TEST_MAP(IMPL, C, CuckooRefinableMap_vector_unord_storehash)\ + TEST_MAP(IMPL, C, CuckooRefinableMap_vector_ord_storehash) #define CDSUNIT_TEST_CuckooMap \ CPPUNIT_TEST(CuckooStripedMap_list_unord)\ diff --git a/tests/unit/map2/map_delodd.h b/tests/unit/map2/map_delodd.h index 661571a7..cd1e2707 100644 --- a/tests/unit/map2/map_delodd.h +++ b/tests/unit/map2/map_delodd.h @@ -1,15 +1,16 @@ //$$CDS-header$$ #include "cppunit/thread.h" -#include "map2/map_types.h" +#include "map2/map_type.h" #include // random_shuffle +#include namespace map2 { -# define TEST_MAP(X) void X() { test::X >(); } -# define TEST_MAP_EXTRACT(X) void X() { test_extract::X >(); } -# define TEST_MAP_NOLF(X) void X() { test_nolf::X >(); } -# define TEST_MAP_NOLF_EXTRACT(X) void X() { test_nolf_extract::X >(); } +# define TEST_MAP(IMPL, C, X) void C::X() { test::X >(); } +# define TEST_MAP_EXTRACT(IMPL, C, X) void C::X() { test_extract::X >(); } +# define TEST_MAP_NOLF(IMPL, C, X) void C::X() { test_nolf::X >(); } +# define TEST_MAP_NOLF_EXTRACT(IMPL, C, X) void C::X() { test_nolf_extract::X >(); } namespace { struct key_thread diff --git a/tests/unit/map2/map_delodd_bronsonavltree.cpp b/tests/unit/map2/map_delodd_bronsonavltree.cpp index 0448891b..2d2df6ad 100644 --- a/tests/unit/map2/map_delodd_bronsonavltree.cpp +++ b/tests/unit/map2/map_delodd_bronsonavltree.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_delodd.h" +#include "map2/map_type_bronson_avltree.h" namespace map2 { + CDSUNIT_DEFINE_BronsonAVLTreeMap( cc::bronson_avltree::implementation_tag, Map_DelOdd) + CPPUNIT_TEST_SUITE_PART( Map_DelOdd, run_BronsonAVLTreeMap ) CDSUNIT_TEST_BronsonAVLTreeMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_delodd_cuckoo.cpp b/tests/unit/map2/map_delodd_cuckoo.cpp index 191d35a9..3d314b5f 100644 --- a/tests/unit/map2/map_delodd_cuckoo.cpp +++ b/tests/unit/map2/map_delodd_cuckoo.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_delodd.h" +#include "map2/map_type_cuckoo.h" namespace map2 { + CDSUNIT_DEFINE_CuckooMap(cds::intrusive::cuckoo::implementation_tag, Map_DelOdd) + CPPUNIT_TEST_SUITE_PART( Map_DelOdd, run_CuckooMap ) CDSUNIT_TEST_CuckooMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_delodd_ellentree.cpp b/tests/unit/map2/map_delodd_ellentree.cpp index e6883aa4..fdeab825 100644 --- a/tests/unit/map2/map_delodd_ellentree.cpp +++ b/tests/unit/map2/map_delodd_ellentree.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_delodd.h" +#include "map2/map_type_ellen_bintree.h" namespace map2 { + CDSUNIT_DEFINE_EllenBinTreeMap( cc::ellen_bintree::implementation_tag, Map_DelOdd) + CPPUNIT_TEST_SUITE_PART( Map_DelOdd, run_EllenBinTreeMap ) CDSUNIT_TEST_EllenBinTreeMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_delodd_michael.cpp b/tests/unit/map2/map_delodd_michael.cpp index c114aed0..de5a6f64 100644 --- a/tests/unit/map2/map_delodd_michael.cpp +++ b/tests/unit/map2/map_delodd_michael.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_delodd.h" +#include "map2/map_type_michael.h" namespace map2 { + CDSUNIT_DEFINE_MichaelMap( cc::michael_map::implementation_tag, Map_DelOdd ) + CPPUNIT_TEST_SUITE_PART( Map_DelOdd, run_MichaelMap ) CDSUNIT_TEST_MichaelMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_delodd_skip.cpp b/tests/unit/map2/map_delodd_skip.cpp index bb92b6d7..255f0784 100644 --- a/tests/unit/map2/map_delodd_skip.cpp +++ b/tests/unit/map2/map_delodd_skip.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_delodd.h" +#include "map2/map_type_skip_list.h" namespace map2 { + CDSUNIT_DEFINE_SkipListMap( cc::skip_list::implementation_tag, Map_DelOdd) + CPPUNIT_TEST_SUITE_PART( Map_DelOdd, run_SkipListMap ) CDSUNIT_TEST_SkipListMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_delodd_split.cpp b/tests/unit/map2/map_delodd_split.cpp index b8895cb7..e1e916f2 100644 --- a/tests/unit/map2/map_delodd_split.cpp +++ b/tests/unit/map2/map_delodd_split.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_delodd.h" +#include "map2/map_type_split_list.h" namespace map2 { + CDSUNIT_DEFINE_SplitList( cc::split_list::implementation_tag, Map_DelOdd ) + CPPUNIT_TEST_SUITE_PART( Map_DelOdd, run_SplitList ) CDSUNIT_TEST_SplitList CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_find_int.h b/tests/unit/map2/map_find_int.h index cc4c12ee..77bbb81d 100644 --- a/tests/unit/map2/map_find_int.h +++ b/tests/unit/map2/map_find_int.h @@ -2,7 +2,7 @@ // defines concurrent access to map::nonconcurrent_iterator::Sequence::TValue::nAccess field -#include "map2/map_types.h" +#include "map2/map_type.h" #include "cppunit/thread.h" #include @@ -11,10 +11,10 @@ // find int test in map in mutithreaded mode namespace map2 { -# define TEST_MAP(X) void X() { test::X >() ; } -# define TEST_MAP_NOLF(X) void X() { test_nolf::X >() ; } -# define TEST_MAP_EXTRACT(X) TEST_MAP(X) -# define TEST_MAP_NOLF_EXTRACT(X) TEST_MAP_NOLF(X) +# define TEST_MAP(IMPL, C, X) void C::X() { test::X >(); } +# define TEST_MAP_NOLF(IMPL, C, X) void C::X() { test_nolf::X >(); } +# define TEST_MAP_EXTRACT(IMPL, C, X) TEST_MAP(IMPL, C, X) +# define TEST_MAP_NOLF_EXTRACT(IMPL, C, X) TEST_MAP_NOLF(IMPL, C, X) class Map_find_int: public CppUnitMini::TestCase { diff --git a/tests/unit/map2/map_find_int_bronsonavltree.cpp b/tests/unit/map2/map_find_int_bronsonavltree.cpp index 2c915a6e..6cd051c0 100644 --- a/tests/unit/map2/map_find_int_bronsonavltree.cpp +++ b/tests/unit/map2/map_find_int_bronsonavltree.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_find_int.h" +#include "map2/map_type_bronson_avltree.h" namespace map2 { + CDSUNIT_DEFINE_BronsonAVLTreeMap( cc::bronson_avltree::implementation_tag, Map_find_int) + CPPUNIT_TEST_SUITE_PART( Map_find_int, run_BronsonAVLTreeMap ) CDSUNIT_TEST_BronsonAVLTreeMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_find_int_cuckoo.cpp b/tests/unit/map2/map_find_int_cuckoo.cpp index b397fcac..3bdc562e 100644 --- a/tests/unit/map2/map_find_int_cuckoo.cpp +++ b/tests/unit/map2/map_find_int_cuckoo.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_find_int.h" +#include "map2/map_type_cuckoo.h" namespace map2 { + CDSUNIT_DEFINE_CuckooMap(cds::intrusive::cuckoo::implementation_tag, Map_find_int) + CPPUNIT_TEST_SUITE_PART( Map_find_int, run_CuckooMap ) CDSUNIT_TEST_CuckooMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_find_int_ellentree.cpp b/tests/unit/map2/map_find_int_ellentree.cpp index 3f5e9ffe..6d930f83 100644 --- a/tests/unit/map2/map_find_int_ellentree.cpp +++ b/tests/unit/map2/map_find_int_ellentree.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_find_int.h" +#include "map2/map_type_ellen_bintree.h" namespace map2 { + CDSUNIT_DEFINE_EllenBinTreeMap( cc::ellen_bintree::implementation_tag, Map_find_int) + CPPUNIT_TEST_SUITE_PART( Map_find_int, run_EllenBinTreeMap ) CDSUNIT_TEST_EllenBinTreeMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_find_int_michael.cpp b/tests/unit/map2/map_find_int_michael.cpp index 6ab77021..137951a5 100644 --- a/tests/unit/map2/map_find_int_michael.cpp +++ b/tests/unit/map2/map_find_int_michael.cpp @@ -1,8 +1,12 @@ //$$CDS-header$$ #include "map2/map_find_int.h" +#include "map2/map_type_michael.h" namespace map2 { + CDSUNIT_DEFINE_MichaelMap( cc::michael_map::implementation_tag, Map_find_int ) + CDSUNIT_DEFINE_MichaelMap_nogc( cc::michael_map::implementation_tag, Map_find_int ) + CPPUNIT_TEST_SUITE_PART( Map_find_int, run_MichaelMap ) CDSUNIT_TEST_MichaelMap CDSUNIT_TEST_MichaelMap_nogc diff --git a/tests/unit/map2/map_find_int_refinable.cpp b/tests/unit/map2/map_find_int_refinable.cpp index d047537c..710576c5 100644 --- a/tests/unit/map2/map_find_int_refinable.cpp +++ b/tests/unit/map2/map_find_int_refinable.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_find_int.h" +#include "map2/map_type_striped.h" namespace map2 { + CDSUNIT_DEFINE_RefinableMap(cc::striped_set::implementation_tag, Map_find_int) + CPPUNIT_TEST_SUITE_PART( Map_find_int, run_RefinableMap ) CDSUNIT_TEST_RefinableMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_find_int_skip.cpp b/tests/unit/map2/map_find_int_skip.cpp index edfcc410..6ede5c51 100644 --- a/tests/unit/map2/map_find_int_skip.cpp +++ b/tests/unit/map2/map_find_int_skip.cpp @@ -1,8 +1,12 @@ //$$CDS-header$$ #include "map2/map_find_int.h" +#include "map2/map_type_skip_list.h" namespace map2 { + CDSUNIT_DEFINE_SkipListMap( cc::skip_list::implementation_tag, Map_find_int) + CDSUNIT_DEFINE_SkipListMap_nogc( cc::skip_list::implementation_tag, Map_find_int) + CPPUNIT_TEST_SUITE_PART( Map_find_int, run_SkipListMap ) CDSUNIT_TEST_SkipListMap CDSUNIT_TEST_SkipListMap_nogc diff --git a/tests/unit/map2/map_find_int_split.cpp b/tests/unit/map2/map_find_int_split.cpp index b565e3e6..08b71fa2 100644 --- a/tests/unit/map2/map_find_int_split.cpp +++ b/tests/unit/map2/map_find_int_split.cpp @@ -1,8 +1,12 @@ //$$CDS-header$$ #include "map2/map_find_int.h" +#include "map2/map_type_split_list.h" namespace map2 { + CDSUNIT_DEFINE_SplitList( cc::split_list::implementation_tag, Map_find_int ) + CDSUNIT_DEFINE_SplitList_nogc( cc::split_list::implementation_tag, Map_find_int ) + CPPUNIT_TEST_SUITE_PART( Map_find_int, run_SplitList ) CDSUNIT_TEST_SplitList CDSUNIT_TEST_SplitList_nogc diff --git a/tests/unit/map2/map_find_int_std.cpp b/tests/unit/map2/map_find_int_std.cpp index bcb759e0..c310c474 100644 --- a/tests/unit/map2/map_find_int_std.cpp +++ b/tests/unit/map2/map_find_int_std.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_find_int.h" +#include "map2/map_type_std.h" namespace map2 { + CDSUNIT_DEFINE_StdMap( map2::std_implementation_tag, Map_find_int) + CPPUNIT_TEST_SUITE_PART( Map_find_int, run_StdMap ) CDSUNIT_TEST_StdMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_find_int_striped.cpp b/tests/unit/map2/map_find_int_striped.cpp index d93dbf1a..23b1c393 100644 --- a/tests/unit/map2/map_find_int_striped.cpp +++ b/tests/unit/map2/map_find_int_striped.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_find_int.h" +#include "map2/map_type_striped.h" namespace map2 { + CDSUNIT_DEFINE_StripedMap(cc::striped_set::implementation_tag, Map_find_int) + CPPUNIT_TEST_SUITE_PART( Map_find_int, run_StripedMap ) CDSUNIT_TEST_StripedMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_find_string.h b/tests/unit/map2/map_find_string.h index 8796698e..31d3fe43 100644 --- a/tests/unit/map2/map_find_string.h +++ b/tests/unit/map2/map_find_string.h @@ -1,16 +1,16 @@ //$$CDS-header$$ -#include "map2/map_types.h" +#include "map2/map_type.h" #include "cppunit/thread.h" #include namespace map2 { -# define TEST_MAP(X) void X() { test::X >() ; } -# define TEST_MAP_NOLF(X) void X() { test_nolf::X >() ; } -# define TEST_MAP_EXTRACT(X) TEST_MAP(X) -# define TEST_MAP_NOLF_EXTRACT(X) TEST_MAP_NOLF(X) +# define TEST_MAP(IMPL, C, X) void C::X() { test::X >(); } +# define TEST_MAP_NOLF(IMPL, C, X) void C::X() { test_nolf::X >(); } +# define TEST_MAP_EXTRACT(IMPL, C, X) TEST_MAP(IMPL, C, X) +# define TEST_MAP_NOLF_EXTRACT(IMPL, C, X) TEST_MAP_NOLF(IMPL, C, X) class Map_find_string: public CppUnitMini::TestCase { diff --git a/tests/unit/map2/map_find_string_bronsonavltree.cpp b/tests/unit/map2/map_find_string_bronsonavltree.cpp index b74d0177..5f4fb3c5 100644 --- a/tests/unit/map2/map_find_string_bronsonavltree.cpp +++ b/tests/unit/map2/map_find_string_bronsonavltree.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_find_string.h" +#include "map2/map_type_bronson_avltree.h" namespace map2 { + CDSUNIT_DEFINE_BronsonAVLTreeMap( cc::bronson_avltree::implementation_tag, Map_find_string) + CPPUNIT_TEST_SUITE_PART( Map_find_string, run_BronsonAVLTreeMap ) CDSUNIT_TEST_BronsonAVLTreeMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_find_string_cuckoo.cpp b/tests/unit/map2/map_find_string_cuckoo.cpp index c5085126..6bb73158 100644 --- a/tests/unit/map2/map_find_string_cuckoo.cpp +++ b/tests/unit/map2/map_find_string_cuckoo.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_find_string.h" +#include "map2/map_type_cuckoo.h" namespace map2 { + CDSUNIT_DEFINE_CuckooMap(cds::intrusive::cuckoo::implementation_tag, Map_find_string) + CPPUNIT_TEST_SUITE_PART( Map_find_string, run_CuckooMap ) CDSUNIT_TEST_CuckooMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_find_string_ellentree.cpp b/tests/unit/map2/map_find_string_ellentree.cpp index 9539c7d1..6dfe5172 100644 --- a/tests/unit/map2/map_find_string_ellentree.cpp +++ b/tests/unit/map2/map_find_string_ellentree.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_find_string.h" +#include "map2/map_type_ellen_bintree.h" namespace map2 { + CDSUNIT_DEFINE_EllenBinTreeMap( cc::ellen_bintree::implementation_tag, Map_find_string) + CPPUNIT_TEST_SUITE_PART( Map_find_string, run_EllenBinTreeMap ) CDSUNIT_TEST_EllenBinTreeMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_find_string_michael.cpp b/tests/unit/map2/map_find_string_michael.cpp index 5e9f61b2..9cb59f50 100644 --- a/tests/unit/map2/map_find_string_michael.cpp +++ b/tests/unit/map2/map_find_string_michael.cpp @@ -1,8 +1,12 @@ //$$CDS-header$$ #include "map2/map_find_string.h" +#include "map2/map_type_michael.h" namespace map2 { + CDSUNIT_DEFINE_MichaelMap( cc::michael_map::implementation_tag, Map_find_string ) + CDSUNIT_DEFINE_MichaelMap_nogc( cc::michael_map::implementation_tag, Map_find_string ) + CPPUNIT_TEST_SUITE_PART( Map_find_string, run_MichaelMap ) CDSUNIT_TEST_MichaelMap CDSUNIT_TEST_MichaelMap_nogc diff --git a/tests/unit/map2/map_find_string_refinable.cpp b/tests/unit/map2/map_find_string_refinable.cpp index dd9a91f1..3f708edb 100644 --- a/tests/unit/map2/map_find_string_refinable.cpp +++ b/tests/unit/map2/map_find_string_refinable.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_find_string.h" +#include "map2/map_type_striped.h" namespace map2 { + CDSUNIT_DEFINE_RefinableMap(cc::striped_set::implementation_tag, Map_find_string) + CPPUNIT_TEST_SUITE_PART( Map_find_string, run_RefinableMap ) CDSUNIT_TEST_RefinableMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_find_string_skip.cpp b/tests/unit/map2/map_find_string_skip.cpp index 47671c11..ae9f27fa 100644 --- a/tests/unit/map2/map_find_string_skip.cpp +++ b/tests/unit/map2/map_find_string_skip.cpp @@ -1,8 +1,12 @@ //$$CDS-header$$ #include "map2/map_find_string.h" +#include "map2/map_type_skip_list.h" namespace map2 { + CDSUNIT_DEFINE_SkipListMap( cc::skip_list::implementation_tag, Map_find_string) + CDSUNIT_DEFINE_SkipListMap_nogc( cc::skip_list::implementation_tag, Map_find_string) + CPPUNIT_TEST_SUITE_PART( Map_find_string, run_SkipListMap ) CDSUNIT_TEST_SkipListMap CDSUNIT_TEST_SkipListMap_nogc diff --git a/tests/unit/map2/map_find_string_split.cpp b/tests/unit/map2/map_find_string_split.cpp index d2095b1d..ee236aa5 100644 --- a/tests/unit/map2/map_find_string_split.cpp +++ b/tests/unit/map2/map_find_string_split.cpp @@ -1,8 +1,12 @@ //$$CDS-header$$ #include "map2/map_find_string.h" +#include "map2/map_type_split_list.h" namespace map2 { + CDSUNIT_DEFINE_SplitList( cc::split_list::implementation_tag, Map_find_string ) + CDSUNIT_DEFINE_SplitList_nogc( cc::split_list::implementation_tag, Map_find_string ) + CPPUNIT_TEST_SUITE_PART( Map_find_string, run_SplitList ) CDSUNIT_TEST_SplitList CDSUNIT_TEST_SplitList_nogc diff --git a/tests/unit/map2/map_find_string_std.cpp b/tests/unit/map2/map_find_string_std.cpp index d268977a..6f2a645c 100644 --- a/tests/unit/map2/map_find_string_std.cpp +++ b/tests/unit/map2/map_find_string_std.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_find_string.h" +#include "map2/map_type_std.h" namespace map2 { + CDSUNIT_DEFINE_StdMap( map2::std_implementation_tag, Map_find_string) + CPPUNIT_TEST_SUITE_PART( Map_find_string, run_StdMap ) CDSUNIT_TEST_StdMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_find_string_striped.cpp b/tests/unit/map2/map_find_string_striped.cpp index 1d8280bc..afba7b67 100644 --- a/tests/unit/map2/map_find_string_striped.cpp +++ b/tests/unit/map2/map_find_string_striped.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_find_string.h" +#include "map2/map_type_striped.h" namespace map2 { + CDSUNIT_DEFINE_StripedMap(cc::striped_set::implementation_tag, Map_find_string) + CPPUNIT_TEST_SUITE_PART( Map_find_string, run_StripedMap ) CDSUNIT_TEST_StripedMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_func.h b/tests/unit/map2/map_insdel_func.h index 9621e06a..92f88f2d 100644 --- a/tests/unit/map2/map_insdel_func.h +++ b/tests/unit/map2/map_insdel_func.h @@ -2,7 +2,7 @@ #include #include //unique_lock -#include "map2/map_types.h" +#include "map2/map_type.h" #include "cppunit/thread.h" #include @@ -11,10 +11,10 @@ namespace map2 { -# define TEST_MAP(X) void X() { test::X >() ; } -# define TEST_MAP_EXTRACT(X) TEST_MAP(X) -# define TEST_MAP_NOLF(X) void X() { test_nolf::X >() ; } -# define TEST_MAP_NOLF_EXTRACT(X) TEST_MAP_NOLF(X) +# define TEST_MAP(IMPL, C, X) void C::X() { test::X >() ; } +# define TEST_MAP_EXTRACT(IMPL, C, X) TEST_MAP(IMPL, C, X) +# define TEST_MAP_NOLF(IMPL, C, X) void C::X() { test_nolf::X >() ; } +# define TEST_MAP_NOLF_EXTRACT(IMPL, C, X) TEST_MAP_NOLF(IMPL, C, X) class Map_InsDel_func: public CppUnitMini::TestCase { diff --git a/tests/unit/map2/map_insdel_func_bronsonavltree.cpp b/tests/unit/map2/map_insdel_func_bronsonavltree.cpp index 30d277d3..0c03dfc7 100644 --- a/tests/unit/map2/map_insdel_func_bronsonavltree.cpp +++ b/tests/unit/map2/map_insdel_func_bronsonavltree.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_func.h" +#include "map2/map_type_bronson_avltree.h" namespace map2 { + CDSUNIT_DEFINE_BronsonAVLTreeMap( cc::bronson_avltree::implementation_tag, Map_InsDel_func) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_func, run_BronsonAVLTreeMap ) CDSUNIT_TEST_BronsonAVLTreeMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_func_cuckoo.cpp b/tests/unit/map2/map_insdel_func_cuckoo.cpp index b8901950..272e46af 100644 --- a/tests/unit/map2/map_insdel_func_cuckoo.cpp +++ b/tests/unit/map2/map_insdel_func_cuckoo.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_func.h" +#include "map2/map_type_cuckoo.h" namespace map2 { + CDSUNIT_DEFINE_CuckooMap(cds::intrusive::cuckoo::implementation_tag, Map_InsDel_func) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_func, run_CuckooMap ) CDSUNIT_TEST_CuckooMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_func_ellentree.cpp b/tests/unit/map2/map_insdel_func_ellentree.cpp index 1533d352..3eca4dc2 100644 --- a/tests/unit/map2/map_insdel_func_ellentree.cpp +++ b/tests/unit/map2/map_insdel_func_ellentree.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_func.h" +#include "map2/map_type_ellen_bintree.h" namespace map2 { + CDSUNIT_DEFINE_EllenBinTreeMap( cc::ellen_bintree::implementation_tag, Map_InsDel_func) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_func, run_EllenBinTreeMap ) CDSUNIT_TEST_EllenBinTreeMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_func_michael.cpp b/tests/unit/map2/map_insdel_func_michael.cpp index 41e1a7cf..7ef1c982 100644 --- a/tests/unit/map2/map_insdel_func_michael.cpp +++ b/tests/unit/map2/map_insdel_func_michael.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_func.h" +#include "map2/map_type_michael.h" namespace map2 { + CDSUNIT_DEFINE_MichaelMap( cc::michael_map::implementation_tag, Map_InsDel_func ) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_func, run_MichaelMap ) CDSUNIT_TEST_MichaelMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_func_refinable.cpp b/tests/unit/map2/map_insdel_func_refinable.cpp index 10fdfad6..9203731d 100644 --- a/tests/unit/map2/map_insdel_func_refinable.cpp +++ b/tests/unit/map2/map_insdel_func_refinable.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_func.h" +#include "map2/map_type_striped.h" namespace map2 { + CDSUNIT_DEFINE_RefinableMap(cc::striped_set::implementation_tag, Map_InsDel_func) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_func, run_RefinableMap ) CDSUNIT_TEST_RefinableMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_func_skip.cpp b/tests/unit/map2/map_insdel_func_skip.cpp index 9cec610e..d0ba0670 100644 --- a/tests/unit/map2/map_insdel_func_skip.cpp +++ b/tests/unit/map2/map_insdel_func_skip.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_func.h" +#include "map2/map_type_skip_list.h" namespace map2 { + CDSUNIT_DEFINE_SkipListMap( cc::skip_list::implementation_tag, Map_InsDel_func) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_func, run_SkipListMap ) CDSUNIT_TEST_SkipListMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_func_split.cpp b/tests/unit/map2/map_insdel_func_split.cpp index da1c3fac..d7761456 100644 --- a/tests/unit/map2/map_insdel_func_split.cpp +++ b/tests/unit/map2/map_insdel_func_split.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_func.h" +#include "map2/map_type_split_list.h" namespace map2 { + CDSUNIT_DEFINE_SplitList( cc::split_list::implementation_tag, Map_InsDel_func ) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_func, run_SplitList ) CDSUNIT_TEST_SplitList CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_func_striped.cpp b/tests/unit/map2/map_insdel_func_striped.cpp index f6841183..424184ce 100644 --- a/tests/unit/map2/map_insdel_func_striped.cpp +++ b/tests/unit/map2/map_insdel_func_striped.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_func.h" +#include "map2/map_type_striped.h" namespace map2 { + CDSUNIT_DEFINE_StripedMap(cc::striped_set::implementation_tag, Map_InsDel_func) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_func, run_StripedMap ) CDSUNIT_TEST_StripedMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_int.h b/tests/unit/map2/map_insdel_int.h index c1b825db..51a3c7dc 100644 --- a/tests/unit/map2/map_insdel_int.h +++ b/tests/unit/map2/map_insdel_int.h @@ -1,16 +1,16 @@ //$$CDS-header$$ -#include "map2/map_types.h" +#include "map2/map_type.h" #include "cppunit/thread.h" #include namespace map2 { -# define TEST_MAP(X) void X() { test::X >(); } -# define TEST_MAP_EXTRACT(X) TEST_MAP(X) -# define TEST_MAP_NOLF(X) void X() { test_nolf::X >(); } -# define TEST_MAP_NOLF_EXTRACT(X) TEST_MAP_NOLF(X) +# define TEST_MAP(IMPL, C, X) void C::X() { test::X >(); } +# define TEST_MAP_EXTRACT(IMPL, C, X) TEST_MAP(IMPL, C, X) +# define TEST_MAP_NOLF(IMPL, C, X) void C::X() { test_nolf::X >(); } +# define TEST_MAP_NOLF_EXTRACT(IMPL, C, X) TEST_MAP_NOLF(IMPL, C, X) class Map_InsDel_int: public CppUnitMini::TestCase { diff --git a/tests/unit/map2/map_insdel_int_bronsonavltree.cpp b/tests/unit/map2/map_insdel_int_bronsonavltree.cpp index e2c4c33e..520be6c2 100644 --- a/tests/unit/map2/map_insdel_int_bronsonavltree.cpp +++ b/tests/unit/map2/map_insdel_int_bronsonavltree.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_int.h" +#include "map2/map_type_bronson_avltree.h" namespace map2 { + CDSUNIT_DEFINE_BronsonAVLTreeMap( cc::bronson_avltree::implementation_tag, Map_InsDel_int) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_int, run_BronsonAVLTreeMap ) CDSUNIT_TEST_BronsonAVLTreeMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_int_cuckoo.cpp b/tests/unit/map2/map_insdel_int_cuckoo.cpp index f18faff9..b9e399dc 100644 --- a/tests/unit/map2/map_insdel_int_cuckoo.cpp +++ b/tests/unit/map2/map_insdel_int_cuckoo.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_int.h" +#include "map2/map_type_cuckoo.h" namespace map2 { + CDSUNIT_DEFINE_CuckooMap(cds::intrusive::cuckoo::implementation_tag, Map_InsDel_int) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_int, run_CuckooMap ) CDSUNIT_TEST_CuckooMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_int_ellentree.cpp b/tests/unit/map2/map_insdel_int_ellentree.cpp index d026cca4..3288eb5a 100644 --- a/tests/unit/map2/map_insdel_int_ellentree.cpp +++ b/tests/unit/map2/map_insdel_int_ellentree.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_int.h" +#include "map2/map_type_ellen_bintree.h" namespace map2 { + CDSUNIT_DEFINE_EllenBinTreeMap( cc::ellen_bintree::implementation_tag, Map_InsDel_int) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_int, run_EllenBinTreeMap ) CDSUNIT_TEST_EllenBinTreeMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_int_michael.cpp b/tests/unit/map2/map_insdel_int_michael.cpp index 1f523d47..45f54824 100644 --- a/tests/unit/map2/map_insdel_int_michael.cpp +++ b/tests/unit/map2/map_insdel_int_michael.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_int.h" +#include "map2/map_type_michael.h" namespace map2 { + CDSUNIT_DEFINE_MichaelMap( cc::michael_map::implementation_tag, Map_InsDel_int ) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_int, run_MichaelMap ) CDSUNIT_TEST_MichaelMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_int_refinable.cpp b/tests/unit/map2/map_insdel_int_refinable.cpp index 956eb423..78c490f3 100644 --- a/tests/unit/map2/map_insdel_int_refinable.cpp +++ b/tests/unit/map2/map_insdel_int_refinable.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_int.h" +#include "map2/map_type_striped.h" namespace map2 { + CDSUNIT_DEFINE_RefinableMap(cc::striped_set::implementation_tag, Map_InsDel_int) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_int, run_RefinableMap ) CDSUNIT_TEST_RefinableMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_int_skip.cpp b/tests/unit/map2/map_insdel_int_skip.cpp index c0b44058..7c5e6d90 100644 --- a/tests/unit/map2/map_insdel_int_skip.cpp +++ b/tests/unit/map2/map_insdel_int_skip.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_int.h" +#include "map2/map_type_skip_list.h" namespace map2 { + CDSUNIT_DEFINE_SkipListMap( cc::skip_list::implementation_tag, Map_InsDel_int) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_int, run_SkipListMap ) CDSUNIT_TEST_SkipListMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_int_split.cpp b/tests/unit/map2/map_insdel_int_split.cpp index b28f0d6a..1c8e3e20 100644 --- a/tests/unit/map2/map_insdel_int_split.cpp +++ b/tests/unit/map2/map_insdel_int_split.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_int.h" +#include "map2/map_type_split_list.h" namespace map2 { + CDSUNIT_DEFINE_SplitList( cc::split_list::implementation_tag, Map_InsDel_int ) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_int, run_SplitList ) CDSUNIT_TEST_SplitList CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_int_striped.cpp b/tests/unit/map2/map_insdel_int_striped.cpp index fc4644ff..4bcb09bc 100644 --- a/tests/unit/map2/map_insdel_int_striped.cpp +++ b/tests/unit/map2/map_insdel_int_striped.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_int.h" +#include "map2/map_type_striped.h" namespace map2 { + CDSUNIT_DEFINE_StripedMap(cc::striped_set::implementation_tag, Map_InsDel_int) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_int, run_StripedMap ) CDSUNIT_TEST_StripedMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_item_int.h b/tests/unit/map2/map_insdel_item_int.h index cc117768..fc7a2db4 100644 --- a/tests/unit/map2/map_insdel_item_int.h +++ b/tests/unit/map2/map_insdel_item_int.h @@ -1,6 +1,6 @@ //$$CDS-header$$ -#include "map2/map_types.h" +#include "map2/map_type.h" #include "cppunit/thread.h" #include @@ -8,10 +8,10 @@ namespace map2 { -# define TEST_MAP(X) void X() { test::X >() ; } -# define TEST_MAP_NOLF(X) void X() { test_nolf::X >() ; } -# define TEST_MAP_EXTRACT(X) TEST_MAP(X) -# define TEST_MAP_NOLF_EXTRACT(X) TEST_MAP_NOLF(X) +# define TEST_MAP(IMPL, C, X) void C::X() { test::X >(); } +# define TEST_MAP_NOLF(IMPL, C, X) void C::X() { test_nolf::X >(); } +# define TEST_MAP_EXTRACT(IMPL, C, X) TEST_MAP(IMPL, C, X) +# define TEST_MAP_NOLF_EXTRACT(IMPL, C, X) TEST_MAP_NOLF(IMPL, C, X) class Map_InsDel_Item_int: public CppUnitMini::TestCase { diff --git a/tests/unit/map2/map_insdel_item_int_bronsonavltree.cpp b/tests/unit/map2/map_insdel_item_int_bronsonavltree.cpp index a2be151e..2146deeb 100644 --- a/tests/unit/map2/map_insdel_item_int_bronsonavltree.cpp +++ b/tests/unit/map2/map_insdel_item_int_bronsonavltree.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_item_int.h" +#include "map2/map_type_bronson_avltree.h" namespace map2 { + CDSUNIT_DEFINE_BronsonAVLTreeMap( cc::bronson_avltree::implementation_tag, Map_InsDel_Item_int) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_Item_int, run_BronsonAVLTreeMap ) CDSUNIT_TEST_BronsonAVLTreeMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_item_int_cuckoo.cpp b/tests/unit/map2/map_insdel_item_int_cuckoo.cpp index 6213c6fb..a0dd6d6a 100644 --- a/tests/unit/map2/map_insdel_item_int_cuckoo.cpp +++ b/tests/unit/map2/map_insdel_item_int_cuckoo.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_item_int.h" +#include "map2/map_type_cuckoo.h" namespace map2 { + CDSUNIT_DEFINE_CuckooMap(cds::intrusive::cuckoo::implementation_tag, Map_InsDel_Item_int) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_Item_int, run_CuckooMap ) CDSUNIT_TEST_CuckooMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_item_int_ellentree.cpp b/tests/unit/map2/map_insdel_item_int_ellentree.cpp index dc810aed..6790ec19 100644 --- a/tests/unit/map2/map_insdel_item_int_ellentree.cpp +++ b/tests/unit/map2/map_insdel_item_int_ellentree.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_item_int.h" +#include "map2/map_type_ellen_bintree.h" namespace map2 { + CDSUNIT_DEFINE_EllenBinTreeMap( cc::ellen_bintree::implementation_tag, Map_InsDel_Item_int) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_Item_int, run_EllenBinTreeMap ) CDSUNIT_TEST_EllenBinTreeMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_item_int_michael.cpp b/tests/unit/map2/map_insdel_item_int_michael.cpp index 578462f8..487af6b2 100644 --- a/tests/unit/map2/map_insdel_item_int_michael.cpp +++ b/tests/unit/map2/map_insdel_item_int_michael.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_item_int.h" +#include "map2/map_type_michael.h" namespace map2 { + CDSUNIT_DEFINE_MichaelMap( cc::michael_map::implementation_tag, Map_InsDel_Item_int ) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_Item_int, run_MichaelMap ) CDSUNIT_TEST_MichaelMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_item_int_refinable.cpp b/tests/unit/map2/map_insdel_item_int_refinable.cpp index 5fc0aee1..d05b6af0 100644 --- a/tests/unit/map2/map_insdel_item_int_refinable.cpp +++ b/tests/unit/map2/map_insdel_item_int_refinable.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_item_int.h" +#include "map2/map_type_striped.h" namespace map2 { + CDSUNIT_DEFINE_RefinableMap(cc::striped_set::implementation_tag, Map_InsDel_Item_int) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_Item_int, run_RefinableMap ) CDSUNIT_TEST_RefinableMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_item_int_skip.cpp b/tests/unit/map2/map_insdel_item_int_skip.cpp index 97bb844d..0a9dd244 100644 --- a/tests/unit/map2/map_insdel_item_int_skip.cpp +++ b/tests/unit/map2/map_insdel_item_int_skip.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_item_int.h" +#include "map2/map_type_skip_list.h" namespace map2 { + CDSUNIT_DEFINE_SkipListMap( cc::skip_list::implementation_tag, Map_InsDel_Item_int) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_Item_int, run_SkipListMap ) CDSUNIT_TEST_SkipListMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_item_int_split.cpp b/tests/unit/map2/map_insdel_item_int_split.cpp index 8d6b5fc6..40c48aea 100644 --- a/tests/unit/map2/map_insdel_item_int_split.cpp +++ b/tests/unit/map2/map_insdel_item_int_split.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_item_int.h" +#include "map2/map_type_split_list.h" namespace map2 { + CDSUNIT_DEFINE_SplitList( cc::split_list::implementation_tag, Map_InsDel_Item_int ) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_Item_int, run_SplitList ) CDSUNIT_TEST_SplitList CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_item_int_striped.cpp b/tests/unit/map2/map_insdel_item_int_striped.cpp index 6c7ce65a..e59cc314 100644 --- a/tests/unit/map2/map_insdel_item_int_striped.cpp +++ b/tests/unit/map2/map_insdel_item_int_striped.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_item_int.h" +#include "map2/map_type_striped.h" namespace map2 { + CDSUNIT_DEFINE_StripedMap(cc::striped_set::implementation_tag, Map_InsDel_Item_int) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_Item_int, run_StripedMap ) CDSUNIT_TEST_StripedMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_item_string.h b/tests/unit/map2/map_insdel_item_string.h index b42450c4..532ab5c4 100644 --- a/tests/unit/map2/map_insdel_item_string.h +++ b/tests/unit/map2/map_insdel_item_string.h @@ -1,16 +1,16 @@ //$$CDS-header$$ -#include "map2/map_types.h" +#include "map2/map_type.h" #include "cppunit/thread.h" #include namespace map2 { -# define TEST_MAP(X) void X() { test::X >() ; } -# define TEST_MAP_NOLF(X) void X() { test_nolf::X >() ; } -# define TEST_MAP_EXTRACT(X) TEST_MAP(X) -# define TEST_MAP_NOLF_EXTRACT(X) TEST_MAP_NOLF(X) +# define TEST_MAP(IMPL, C, X) void C::X() { test::X >(); } +# define TEST_MAP_NOLF(IMPL, C, X) void C::X() { test_nolf::X >(); } +# define TEST_MAP_EXTRACT(IMPL, C, X) TEST_MAP(IMPL, C, X) +# define TEST_MAP_NOLF_EXTRACT(IMPL, C, X) TEST_MAP_NOLF(IMPL, C, X) class Map_InsDel_Item_string: public CppUnitMini::TestCase { diff --git a/tests/unit/map2/map_insdel_item_string_bronsonavltree.cpp b/tests/unit/map2/map_insdel_item_string_bronsonavltree.cpp index 57c5e82b..3e159558 100644 --- a/tests/unit/map2/map_insdel_item_string_bronsonavltree.cpp +++ b/tests/unit/map2/map_insdel_item_string_bronsonavltree.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_item_string.h" +#include "map2/map_type_bronson_avltree.h" namespace map2 { + CDSUNIT_DEFINE_BronsonAVLTreeMap( cc::bronson_avltree::implementation_tag, Map_InsDel_Item_string) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_Item_string, run_BronsonAVLTreeMap ) CDSUNIT_TEST_BronsonAVLTreeMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_item_string_cuckoo.cpp b/tests/unit/map2/map_insdel_item_string_cuckoo.cpp index a7ec0dd0..e05b6069 100644 --- a/tests/unit/map2/map_insdel_item_string_cuckoo.cpp +++ b/tests/unit/map2/map_insdel_item_string_cuckoo.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_item_string.h" +#include "map2/map_type_cuckoo.h" namespace map2 { + CDSUNIT_DEFINE_CuckooMap(cds::intrusive::cuckoo::implementation_tag, Map_InsDel_Item_string) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_Item_string, run_CuckooMap ) CDSUNIT_TEST_CuckooMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_item_string_ellentree.cpp b/tests/unit/map2/map_insdel_item_string_ellentree.cpp index c2fff3fc..1ab79951 100644 --- a/tests/unit/map2/map_insdel_item_string_ellentree.cpp +++ b/tests/unit/map2/map_insdel_item_string_ellentree.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_item_string.h" +#include "map2/map_type_ellen_bintree.h" namespace map2 { + CDSUNIT_DEFINE_EllenBinTreeMap( cc::ellen_bintree::implementation_tag, Map_InsDel_Item_string) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_Item_string, run_EllenBinTreeMap ) CDSUNIT_TEST_EllenBinTreeMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_item_string_michael.cpp b/tests/unit/map2/map_insdel_item_string_michael.cpp index e2a17a29..3e35739a 100644 --- a/tests/unit/map2/map_insdel_item_string_michael.cpp +++ b/tests/unit/map2/map_insdel_item_string_michael.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_item_string.h" +#include "map2/map_type_michael.h" namespace map2 { + CDSUNIT_DEFINE_MichaelMap( cc::michael_map::implementation_tag, Map_InsDel_Item_string ) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_Item_string, run_MichaelMap ) CDSUNIT_TEST_MichaelMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_item_string_refinable.cpp b/tests/unit/map2/map_insdel_item_string_refinable.cpp index 2d5819c7..44bac2db 100644 --- a/tests/unit/map2/map_insdel_item_string_refinable.cpp +++ b/tests/unit/map2/map_insdel_item_string_refinable.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_item_string.h" +#include "map2/map_type_striped.h" namespace map2 { + CDSUNIT_DEFINE_RefinableMap(cc::striped_set::implementation_tag, Map_InsDel_Item_string) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_Item_string, run_RefinableMap ) CDSUNIT_TEST_RefinableMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_item_string_skip.cpp b/tests/unit/map2/map_insdel_item_string_skip.cpp index 4a3fa18a..60235a71 100644 --- a/tests/unit/map2/map_insdel_item_string_skip.cpp +++ b/tests/unit/map2/map_insdel_item_string_skip.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_item_string.h" +#include "map2/map_type_skip_list.h" namespace map2 { + CDSUNIT_DEFINE_SkipListMap( cc::skip_list::implementation_tag, Map_InsDel_Item_string) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_Item_string, run_SkipListMap ) CDSUNIT_TEST_SkipListMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_item_string_split.cpp b/tests/unit/map2/map_insdel_item_string_split.cpp index ebb2bf00..1efdd6b8 100644 --- a/tests/unit/map2/map_insdel_item_string_split.cpp +++ b/tests/unit/map2/map_insdel_item_string_split.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_item_string.h" +#include "map2/map_type_split_list.h" namespace map2 { + CDSUNIT_DEFINE_SplitList( cc::split_list::implementation_tag, Map_InsDel_Item_string ) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_Item_string, run_SplitList ) CDSUNIT_TEST_SplitList CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_item_string_striped.cpp b/tests/unit/map2/map_insdel_item_string_striped.cpp index be0ba3df..2ae3b6df 100644 --- a/tests/unit/map2/map_insdel_item_string_striped.cpp +++ b/tests/unit/map2/map_insdel_item_string_striped.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_item_string.h" +#include "map2/map_type_striped.h" namespace map2 { + CDSUNIT_DEFINE_StripedMap(cc::striped_set::implementation_tag, Map_InsDel_Item_string) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_Item_string, run_StripedMap ) CDSUNIT_TEST_StripedMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_string.h b/tests/unit/map2/map_insdel_string.h index 334b2912..d7b5096c 100644 --- a/tests/unit/map2/map_insdel_string.h +++ b/tests/unit/map2/map_insdel_string.h @@ -1,16 +1,16 @@ //$$CDS-header$$ -#include "map2/map_types.h" +#include "map2/map_type.h" #include "cppunit/thread.h" #include namespace map2 { -# define TEST_MAP(X) void X() { test::X >() ; } -# define TEST_MAP_NOLF(X) void X() { test_nolf::X >() ; } -# define TEST_MAP_EXTRACT(X) TEST_MAP(X) -# define TEST_MAP_NOLF_EXTRACT(X) TEST_MAP_NOLF(X) +# define TEST_MAP(IMPL, C, X) void C::X() { test::X >(); } +# define TEST_MAP_NOLF(IMPL, C, X) void C::X() { test_nolf::X >(); } +# define TEST_MAP_EXTRACT(IMPL, C, X) TEST_MAP(IMPL, C, X) +# define TEST_MAP_NOLF_EXTRACT(IMPL, C, X) TEST_MAP_NOLF(IMPL, C, X) class Map_InsDel_string: public CppUnitMini::TestCase { diff --git a/tests/unit/map2/map_insdel_string_bronsonavltree.cpp b/tests/unit/map2/map_insdel_string_bronsonavltree.cpp index 89fe877c..8ba8b414 100644 --- a/tests/unit/map2/map_insdel_string_bronsonavltree.cpp +++ b/tests/unit/map2/map_insdel_string_bronsonavltree.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_string.h" +#include "map2/map_type_bronson_avltree.h" namespace map2 { + CDSUNIT_DEFINE_BronsonAVLTreeMap( cc::bronson_avltree::implementation_tag, Map_InsDel_string) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_string, run_BronsonAVLTreeMap ) CDSUNIT_TEST_BronsonAVLTreeMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_string_cuckoo.cpp b/tests/unit/map2/map_insdel_string_cuckoo.cpp index a6b218b3..92e8c79c 100644 --- a/tests/unit/map2/map_insdel_string_cuckoo.cpp +++ b/tests/unit/map2/map_insdel_string_cuckoo.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_string.h" +#include "map2/map_type_cuckoo.h" namespace map2 { + CDSUNIT_DEFINE_CuckooMap(cds::intrusive::cuckoo::implementation_tag, Map_InsDel_string) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_string, run_CuckooMap ) CDSUNIT_TEST_CuckooMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_string_ellentree.cpp b/tests/unit/map2/map_insdel_string_ellentree.cpp index 8fbeeb24..cd00f031 100644 --- a/tests/unit/map2/map_insdel_string_ellentree.cpp +++ b/tests/unit/map2/map_insdel_string_ellentree.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_string.h" +#include "map2/map_type_ellen_bintree.h" namespace map2 { + CDSUNIT_DEFINE_EllenBinTreeMap( cc::ellen_bintree::implementation_tag, Map_InsDel_string) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_string, run_EllenBinTreeMap ) CDSUNIT_TEST_EllenBinTreeMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_string_michael.cpp b/tests/unit/map2/map_insdel_string_michael.cpp index b679209e..6a205ea0 100644 --- a/tests/unit/map2/map_insdel_string_michael.cpp +++ b/tests/unit/map2/map_insdel_string_michael.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_string.h" +#include "map2/map_type_michael.h" namespace map2 { + CDSUNIT_DEFINE_MichaelMap( cc::michael_map::implementation_tag, Map_InsDel_string ) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_string, run_MichaelMap ) CDSUNIT_TEST_MichaelMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_string_refinable.cpp b/tests/unit/map2/map_insdel_string_refinable.cpp index 0dcd44f0..74448fbf 100644 --- a/tests/unit/map2/map_insdel_string_refinable.cpp +++ b/tests/unit/map2/map_insdel_string_refinable.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_string.h" +#include "map2/map_type_striped.h" namespace map2 { + CDSUNIT_DEFINE_RefinableMap(cc::striped_set::implementation_tag, Map_InsDel_string) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_string, run_RefinableMap ) CDSUNIT_TEST_RefinableMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_string_skip.cpp b/tests/unit/map2/map_insdel_string_skip.cpp index 2cfcbf6a..ba047749 100644 --- a/tests/unit/map2/map_insdel_string_skip.cpp +++ b/tests/unit/map2/map_insdel_string_skip.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_string.h" +#include "map2/map_type_skip_list.h" namespace map2 { + CDSUNIT_DEFINE_SkipListMap( cc::skip_list::implementation_tag, Map_InsDel_string) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_string, run_SkipListMap ) CDSUNIT_TEST_SkipListMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_string_split.cpp b/tests/unit/map2/map_insdel_string_split.cpp index be6342d3..1ab66aae 100644 --- a/tests/unit/map2/map_insdel_string_split.cpp +++ b/tests/unit/map2/map_insdel_string_split.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_string.h" +#include "map2/map_type_split_list.h" namespace map2 { + CDSUNIT_DEFINE_SplitList( cc::split_list::implementation_tag, Map_InsDel_string ) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_string, run_SplitList ) CDSUNIT_TEST_SplitList CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_string_std.cpp b/tests/unit/map2/map_insdel_string_std.cpp index f7a7e2b8..5ec09658 100644 --- a/tests/unit/map2/map_insdel_string_std.cpp +++ b/tests/unit/map2/map_insdel_string_std.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_string.h" +#include "map2/map_type_std.h" namespace map2 { + CDSUNIT_DEFINE_StdMap( map2::std_implementation_tag, Map_InsDel_string) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_string, run_StdMap ) CDSUNIT_TEST_StdMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdel_string_striped.cpp b/tests/unit/map2/map_insdel_string_striped.cpp index 2c772fc6..f24df486 100644 --- a/tests/unit/map2/map_insdel_string_striped.cpp +++ b/tests/unit/map2/map_insdel_string_striped.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdel_string.h" +#include "map2/map_type_striped.h" namespace map2 { + CDSUNIT_DEFINE_StripedMap(cc::striped_set::implementation_tag, Map_InsDel_string) + CPPUNIT_TEST_SUITE_PART( Map_InsDel_string, run_StripedMap ) CDSUNIT_TEST_StripedMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdelfind.cpp b/tests/unit/map2/map_insdelfind.cpp index 28df1fac..e5d56bb5 100644 --- a/tests/unit/map2/map_insdelfind.cpp +++ b/tests/unit/map2/map_insdelfind.cpp @@ -1,6 +1,7 @@ //$$CDS-header$$ #include "map2/map_insdelfind.h" +#include namespace map2 { CPPUNIT_TEST_SUITE_REGISTRATION( Map_InsDelFind ); diff --git a/tests/unit/map2/map_insdelfind.h b/tests/unit/map2/map_insdelfind.h index c5e36f1a..1b689c6c 100644 --- a/tests/unit/map2/map_insdelfind.h +++ b/tests/unit/map2/map_insdelfind.h @@ -1,16 +1,16 @@ //$$CDS-header$$ -#include "map2/map_types.h" +#include "map2/map_type.h" #include "cppunit/thread.h" #include // random_shuffle #include namespace map2 { -# define TEST_MAP(X) void X() { test::X >() ; } -# define TEST_MAP_NOLF(X) void X() { test_nolf::X >() ; } -# define TEST_MAP_EXTRACT(X) TEST_MAP(X) -# define TEST_MAP_NOLF_EXTRACT(X) TEST_MAP_NOLF(X) +# define TEST_MAP(IMPL, C, X) void C::X() { test::X >(); } +# define TEST_MAP_NOLF(IMPL, C, X) void C::X() { test_nolf::X >(); } +# define TEST_MAP_EXTRACT(IMPL, C, X) TEST_MAP(IMPL, C, X) +# define TEST_MAP_NOLF_EXTRACT(IMPL, C, X) TEST_MAP_NOLF(IMPL, C, X) class Map_InsDelFind: public CppUnitMini::TestCase { diff --git a/tests/unit/map2/map_insdelfind_bronsonavltree.cpp b/tests/unit/map2/map_insdelfind_bronsonavltree.cpp index 7d1731e8..30f63afa 100644 --- a/tests/unit/map2/map_insdelfind_bronsonavltree.cpp +++ b/tests/unit/map2/map_insdelfind_bronsonavltree.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdelfind.h" +#include "map2/map_type_bronson_avltree.h" namespace map2 { + CDSUNIT_DEFINE_BronsonAVLTreeMap( cc::bronson_avltree::implementation_tag, Map_InsDelFind) + CPPUNIT_TEST_SUITE_PART( Map_InsDelFind, run_BronsonAVLTreeMap ) CDSUNIT_TEST_BronsonAVLTreeMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdelfind_cuckoo.cpp b/tests/unit/map2/map_insdelfind_cuckoo.cpp index 10e17494..de5d5a1e 100644 --- a/tests/unit/map2/map_insdelfind_cuckoo.cpp +++ b/tests/unit/map2/map_insdelfind_cuckoo.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdelfind.h" +#include "map2/map_type_cuckoo.h" namespace map2 { + CDSUNIT_DEFINE_CuckooMap(cds::intrusive::cuckoo::implementation_tag, Map_InsDelFind) + CPPUNIT_TEST_SUITE_PART( Map_InsDelFind, run_CuckooMap ) CDSUNIT_TEST_CuckooMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdelfind_ellentree.cpp b/tests/unit/map2/map_insdelfind_ellentree.cpp index 22b66951..43dc8109 100644 --- a/tests/unit/map2/map_insdelfind_ellentree.cpp +++ b/tests/unit/map2/map_insdelfind_ellentree.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdelfind.h" +#include "map2/map_type_ellen_bintree.h" namespace map2 { + CDSUNIT_DEFINE_EllenBinTreeMap( cc::ellen_bintree::implementation_tag, Map_InsDelFind) + CPPUNIT_TEST_SUITE_PART( Map_InsDelFind, run_EllenBinTreeMap ) CDSUNIT_TEST_EllenBinTreeMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdelfind_michael.cpp b/tests/unit/map2/map_insdelfind_michael.cpp index dbc0487b..45b25894 100644 --- a/tests/unit/map2/map_insdelfind_michael.cpp +++ b/tests/unit/map2/map_insdelfind_michael.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdelfind.h" +#include "map2/map_type_michael.h" namespace map2 { + CDSUNIT_DEFINE_MichaelMap( cc::michael_map::implementation_tag, Map_InsDelFind ) + CPPUNIT_TEST_SUITE_PART( Map_InsDelFind, run_MichaelMap ) CDSUNIT_TEST_MichaelMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdelfind_refinable.cpp b/tests/unit/map2/map_insdelfind_refinable.cpp index a1bbde45..e6c1ae98 100644 --- a/tests/unit/map2/map_insdelfind_refinable.cpp +++ b/tests/unit/map2/map_insdelfind_refinable.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdelfind.h" +#include "map2/map_type_striped.h" namespace map2 { + CDSUNIT_DEFINE_RefinableMap(cc::striped_set::implementation_tag, Map_InsDelFind) + CPPUNIT_TEST_SUITE_PART( Map_InsDelFind, run_RefinableMap ) CDSUNIT_TEST_RefinableMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdelfind_skip.cpp b/tests/unit/map2/map_insdelfind_skip.cpp index 861ffaef..d407482e 100644 --- a/tests/unit/map2/map_insdelfind_skip.cpp +++ b/tests/unit/map2/map_insdelfind_skip.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdelfind.h" +#include "map2/map_type_skip_list.h" namespace map2 { + CDSUNIT_DEFINE_SkipListMap( cc::skip_list::implementation_tag, Map_InsDelFind) + CPPUNIT_TEST_SUITE_PART( Map_InsDelFind, run_SkipListMap ) CDSUNIT_TEST_SkipListMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdelfind_split.cpp b/tests/unit/map2/map_insdelfind_split.cpp index c5b3c7c1..f96c8839 100644 --- a/tests/unit/map2/map_insdelfind_split.cpp +++ b/tests/unit/map2/map_insdelfind_split.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdelfind.h" +#include "map2/map_type_split_list.h" namespace map2 { + CDSUNIT_DEFINE_SplitList( cc::split_list::implementation_tag, Map_InsDelFind ) + CPPUNIT_TEST_SUITE_PART( Map_InsDelFind, run_SplitList ) CDSUNIT_TEST_SplitList CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdelfind_std.cpp b/tests/unit/map2/map_insdelfind_std.cpp index b608a9bb..4607f3c4 100644 --- a/tests/unit/map2/map_insdelfind_std.cpp +++ b/tests/unit/map2/map_insdelfind_std.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdelfind.h" +#include "map2/map_type_std.h" namespace map2 { + CDSUNIT_DEFINE_StdMap( map2::std_implementation_tag, Map_InsDelFind) + CPPUNIT_TEST_SUITE_PART( Map_InsDelFind, run_StdMap ) CDSUNIT_TEST_StdMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insdelfind_striped.cpp b/tests/unit/map2/map_insdelfind_striped.cpp index 9384ffd8..db8d2658 100644 --- a/tests/unit/map2/map_insdelfind_striped.cpp +++ b/tests/unit/map2/map_insdelfind_striped.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insdelfind.h" +#include "map2/map_type_striped.h" namespace map2 { + CDSUNIT_DEFINE_StripedMap(cc::striped_set::implementation_tag, Map_InsDelFind) + CPPUNIT_TEST_SUITE_PART( Map_InsDelFind, run_StripedMap ) CDSUNIT_TEST_StripedMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insfind_int.h b/tests/unit/map2/map_insfind_int.h index 2003896a..0eb0fc2f 100644 --- a/tests/unit/map2/map_insfind_int.h +++ b/tests/unit/map2/map_insfind_int.h @@ -1,6 +1,6 @@ //$$CDS-header$$ -#include "map2/map_types.h" +#include "map2/map_type.h" #include "cppunit/thread.h" #include @@ -9,10 +9,10 @@ namespace map2 { -# define TEST_MAP(X) void X() { test::X >() ; } -# define TEST_MAP_NOLF(X) void X() { test_nolf::X >() ; } -# define TEST_MAP_EXTRACT(X) TEST_MAP(X) -# define TEST_MAP_NOLF_EXTRACT(X) TEST_MAP_NOLF(X) +# define TEST_MAP(IMPL, C, X) void C::X() { test::X >(); } +# define TEST_MAP_NOLF(IMPL, C, X) void C::X() { test_nolf::X >(); } +# define TEST_MAP_EXTRACT(IMPL, C, X) TEST_MAP(IMPL, C, X) +# define TEST_MAP_NOLF_EXTRACT(IMPL, C, X) TEST_MAP_NOLF(IMPL, C, X) class Map_InsFind_int: public CppUnitMini::TestCase { diff --git a/tests/unit/map2/map_insfind_int_bronsonavltree.cpp b/tests/unit/map2/map_insfind_int_bronsonavltree.cpp index 520b785a..b1f0d92f 100644 --- a/tests/unit/map2/map_insfind_int_bronsonavltree.cpp +++ b/tests/unit/map2/map_insfind_int_bronsonavltree.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insfind_int.h" +#include "map2/map_type_bronson_avltree.h" namespace map2 { + CDSUNIT_DEFINE_BronsonAVLTreeMap( cc::bronson_avltree::implementation_tag, Map_InsFind_int) + CPPUNIT_TEST_SUITE_PART( Map_InsFind_int, run_BronsonAVLTreeMap ) CDSUNIT_TEST_BronsonAVLTreeMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insfind_int_cuckoo.cpp b/tests/unit/map2/map_insfind_int_cuckoo.cpp index b1fa8559..8d79acf6 100644 --- a/tests/unit/map2/map_insfind_int_cuckoo.cpp +++ b/tests/unit/map2/map_insfind_int_cuckoo.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insfind_int.h" +#include "map2/map_type_cuckoo.h" namespace map2 { + CDSUNIT_DEFINE_CuckooMap(cds::intrusive::cuckoo::implementation_tag, Map_InsFind_int) + CPPUNIT_TEST_SUITE_PART( Map_InsFind_int, run_CuckooMap ) CDSUNIT_TEST_CuckooMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insfind_int_ellentree.cpp b/tests/unit/map2/map_insfind_int_ellentree.cpp index 17b5d0e4..29a66dff 100644 --- a/tests/unit/map2/map_insfind_int_ellentree.cpp +++ b/tests/unit/map2/map_insfind_int_ellentree.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insfind_int.h" +#include "map2/map_type_ellen_bintree.h" namespace map2 { + CDSUNIT_DEFINE_EllenBinTreeMap( cc::ellen_bintree::implementation_tag, Map_InsFind_int) + CPPUNIT_TEST_SUITE_PART( Map_InsFind_int, run_EllenBinTreeMap ) CDSUNIT_TEST_EllenBinTreeMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insfind_int_michael.cpp b/tests/unit/map2/map_insfind_int_michael.cpp index 8703e061..fbe64b1a 100644 --- a/tests/unit/map2/map_insfind_int_michael.cpp +++ b/tests/unit/map2/map_insfind_int_michael.cpp @@ -1,8 +1,12 @@ //$$CDS-header$$ #include "map2/map_insfind_int.h" +#include "map2/map_type_michael.h" namespace map2 { + CDSUNIT_DEFINE_MichaelMap( cc::michael_map::implementation_tag, Map_InsFind_int ) + CDSUNIT_DEFINE_MichaelMap_nogc( cc::michael_map::implementation_tag, Map_InsFind_int ) + CPPUNIT_TEST_SUITE_PART( Map_InsFind_int, run_MichaelMap ) CDSUNIT_TEST_MichaelMap CDSUNIT_TEST_MichaelMap_nogc diff --git a/tests/unit/map2/map_insfind_int_refinable.cpp b/tests/unit/map2/map_insfind_int_refinable.cpp index 8926de27..6ead2563 100644 --- a/tests/unit/map2/map_insfind_int_refinable.cpp +++ b/tests/unit/map2/map_insfind_int_refinable.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insfind_int.h" +#include "map2/map_type_striped.h" namespace map2 { + CDSUNIT_DEFINE_RefinableMap(cc::striped_set::implementation_tag, Map_InsFind_int) + CPPUNIT_TEST_SUITE_PART( Map_InsFind_int, run_RefinableMap ) CDSUNIT_TEST_RefinableMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insfind_int_skip.cpp b/tests/unit/map2/map_insfind_int_skip.cpp index 930ccf1d..18ab54ae 100644 --- a/tests/unit/map2/map_insfind_int_skip.cpp +++ b/tests/unit/map2/map_insfind_int_skip.cpp @@ -1,8 +1,12 @@ //$$CDS-header$$ #include "map2/map_insfind_int.h" +#include "map2/map_type_skip_list.h" namespace map2 { + CDSUNIT_DEFINE_SkipListMap( cc::skip_list::implementation_tag, Map_InsFind_int) + CDSUNIT_DEFINE_SkipListMap_nogc( cc::skip_list::implementation_tag, Map_InsFind_int) + CPPUNIT_TEST_SUITE_PART( Map_InsFind_int, run_SkipListMap ) CDSUNIT_TEST_SkipListMap CDSUNIT_TEST_SkipListMap_nogc diff --git a/tests/unit/map2/map_insfind_int_split.cpp b/tests/unit/map2/map_insfind_int_split.cpp index 4af7722e..48dbfa7d 100644 --- a/tests/unit/map2/map_insfind_int_split.cpp +++ b/tests/unit/map2/map_insfind_int_split.cpp @@ -1,8 +1,12 @@ //$$CDS-header$$ #include "map2/map_insfind_int.h" +#include "map2/map_type_split_list.h" namespace map2 { + CDSUNIT_DEFINE_SplitList( cc::split_list::implementation_tag, Map_InsFind_int ) + CDSUNIT_DEFINE_SplitList_nogc( cc::split_list::implementation_tag, Map_InsFind_int ) + CPPUNIT_TEST_SUITE_PART( Map_InsFind_int, run_SplitList ) CDSUNIT_TEST_SplitList CDSUNIT_TEST_SplitList_nogc diff --git a/tests/unit/map2/map_insfind_int_std.cpp b/tests/unit/map2/map_insfind_int_std.cpp index 473fb746..378cdc13 100644 --- a/tests/unit/map2/map_insfind_int_std.cpp +++ b/tests/unit/map2/map_insfind_int_std.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insfind_int.h" +#include "map2/map_type_std.h" namespace map2 { + CDSUNIT_DEFINE_StdMap( map2::std_implementation_tag, Map_InsFind_int) + CPPUNIT_TEST_SUITE_PART( Map_InsFind_int, run_StdMap ) CDSUNIT_TEST_StdMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_insfind_int_striped.cpp b/tests/unit/map2/map_insfind_int_striped.cpp index 392ca36d..cffe5ba8 100644 --- a/tests/unit/map2/map_insfind_int_striped.cpp +++ b/tests/unit/map2/map_insfind_int_striped.cpp @@ -1,8 +1,11 @@ //$$CDS-header$$ #include "map2/map_insfind_int.h" +#include "map2/map_type_striped.h" namespace map2 { + CDSUNIT_DEFINE_StripedMap(cc::striped_set::implementation_tag, Map_InsFind_int) + CPPUNIT_TEST_SUITE_PART( Map_InsFind_int, run_StripedMap ) CDSUNIT_TEST_StripedMap CPPUNIT_TEST_SUITE_END_PART() diff --git a/tests/unit/map2/map_type.h b/tests/unit/map2/map_type.h new file mode 100644 index 00000000..5d973929 --- /dev/null +++ b/tests/unit/map2/map_type.h @@ -0,0 +1,135 @@ +//$$CDS-header$$ + +#ifndef CDSUNIT_MAP_TYPE_H +#define CDSUNIT_MAP_TYPE_H + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "cppunit/cppunit_mini.h" + +namespace map2 { + namespace cc = cds::container; + namespace co = cds::opt; + + typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_gpi; + typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_gpb; + typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_gpt; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_shb; + typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_sht; +#endif + + template + struct cmp { + int operator ()(Key const& k1, Key const& k2) const + { + if ( std::less( k1, k2 ) ) + return -1; + return std::less( k2, k1 ) ? 1 : 0; + } + }; + +#define CDSUNIT_INT_COMPARE(t) template <> struct cmp { int operator()( t k1, t k2 ){ return (int)(k1 - k2); } } + CDSUNIT_INT_COMPARE(char); + CDSUNIT_INT_COMPARE(unsigned char); + CDSUNIT_INT_COMPARE(int); + CDSUNIT_INT_COMPARE(unsigned int); + CDSUNIT_INT_COMPARE(long); + CDSUNIT_INT_COMPARE(unsigned long); + CDSUNIT_INT_COMPARE(long long); + CDSUNIT_INT_COMPARE(unsigned long long); +#undef CDSUNIT_INT_COMPARE + + template <> + struct cmp + { + int operator()(std::string const& s1, std::string const& s2) + { + return s1.compare( s2 ); + } + int operator()(std::string const& s1, char const * s2) + { + return s1.compare( s2 ); + } + int operator()(char const * s1, std::string const& s2) + { + return -s2.compare( s1 ); + } + }; + + // forward + template + struct map_type; + + template + struct map_type_base + { + typedef co::v::hash key_hash; + typedef std::less less; + typedef cmp compare; + + struct equal_to { + bool operator()( Key const& k1, Key const& k2 ) const + { + return compare()( k1, k2 ) == 0; + } + }; + + struct hash: public key_hash + { + size_t operator()( Key const& k ) const + { + return key_hash::operator()( k ); + } + template + size_t operator()( Q const& k ) const + { + return key_hash::operator()( k ); + } + }; + + struct hash2: public key_hash + { + size_t operator()( Key const& k ) const + { + size_t seed = ~key_hash::operator ()( k ); + boost::hash_combine( seed, k ); + return seed; + } + template + size_t operator()( Q const& k ) const + { + size_t seed = ~key_hash::operator()( k ); + boost::hash_combine( seed, k ); + return seed; + } + }; + }; + + template + static inline void print_stat( Map const& /*m*/ ) + {} + + template + static inline void check_before_cleanup( Map& /*m*/ ) + {} + + template + static inline void additional_cleanup( Map& /*m*/ ) + {} + + template + static inline void additional_check( Map& /*m*/ ) + {} + +} // namespace map2 + +#endif // ifndef CDSUNIT_MAP_TYPE_H diff --git a/tests/unit/map2/map_type_bronson_avltree.h b/tests/unit/map2/map_type_bronson_avltree.h new file mode 100644 index 00000000..f765abb6 --- /dev/null +++ b/tests/unit/map2/map_type_bronson_avltree.h @@ -0,0 +1,153 @@ +//$$CDS-header$$ + +#ifndef CDSUNIT_MAP_TYPE_BRONSON_AVLTREE_H +#define CDSUNIT_MAP_TYPE_BRONSON_AVLTREE_H + +#include "map2/map_type.h" + +#include +#include +#include + +#include "print_bronsonavltree_stat.h" +#include "print_sync_monitor_stat.h" + +namespace map2 { + + template + struct map_type< cc::bronson_avltree::implementation_tag, Key, Value >: public map_type_base< Key, Value > + { + typedef map_type_base< Key, Value > base_class; + typedef typename base_class::compare compare; + typedef typename base_class::less less; + + typedef cds::memory::vyukov_queue_pool< std::mutex > BronsonAVLTreeMap_simple_pool; + typedef cds::memory::lazy_vyukov_queue_pool< std::mutex > BronsonAVLTreeMap_lazy_pool; + typedef cds::memory::bounded_vyukov_queue_pool< std::mutex > BronsonAVLTreeMap_bounded_pool; + + struct BronsonAVLTreeMap_less: public + cc::bronson_avltree::make_traits< + co::less< less > + ,cc::bronson_avltree::relaxed_insert< false > + ,co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_gpi_less; + typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_gpb_less; + typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_gpt_less; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_shb_less; + typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_sht_less; +#endif + struct BronsonAVLTreeMap_cmp_stat: public + cc::bronson_avltree::make_traits< + co::compare< compare > + ,cc::bronson_avltree::relaxed_insert< false > + ,co::item_counter< cds::atomicity::item_counter > + ,co::stat< cc::bronson_avltree::stat<>> + >::type + {}; + typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_gpi_cmp_stat; + typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_gpb_cmp_stat; + typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_gpt_cmp_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_shb_cmp_stat; + typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_sht_cmp_stat; +#endif + + struct BronsonAVLTreeMap_less_pool_simple: public BronsonAVLTreeMap_less + { + typedef cds::sync::pool_monitor sync_monitor; + }; + typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_gpi_less_pool_simple; + typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_gpb_less_pool_simple; + typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_gpt_less_pool_simple; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_shb_less_pool_simple; + typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_sht_less_pool_simple; +#endif + struct BronsonAVLTreeMap_less_pool_simple_stat : public BronsonAVLTreeMap_less + { + typedef cc::bronson_avltree::stat<> stat; + typedef cds::sync::pool_monitor sync_monitor; + }; + typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_gpi_less_pool_simple_stat; + typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_gpb_less_pool_simple_stat; + typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_gpt_less_pool_simple_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_shb_less_pool_simple_stat; + typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_sht_less_pool_simple_stat; +#endif + struct BronsonAVLTreeMap_less_pool_lazy: public BronsonAVLTreeMap_less + { + typedef cds::sync::pool_monitor sync_monitor; + static CDS_CONSTEXPR bool const relaxed_insert = true; + }; + typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_gpi_less_pool_lazy; + typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_gpb_less_pool_lazy; + typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_gpt_less_pool_lazy; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_shb_less_pool_lazy; + typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_sht_less_pool_lazy; +#endif + struct BronsonAVLTreeMap_less_pool_lazy_stat : public BronsonAVLTreeMap_less + { + typedef cc::bronson_avltree::stat<> stat; + typedef cds::sync::pool_monitor sync_monitor; + static CDS_CONSTEXPR bool const relaxed_insert = true; + }; + typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_gpi_less_pool_lazy_stat; + typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_gpb_less_pool_lazy_stat; + typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_gpt_less_pool_lazy_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_shb_less_pool_lazy_stat; + typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_sht_less_pool_lazy_stat; +#endif + struct BronsonAVLTreeMap_less_pool_bounded: public BronsonAVLTreeMap_less + { + typedef cds::sync::pool_monitor sync_monitor; + static CDS_CONSTEXPR bool const relaxed_insert = true; + }; + typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_gpi_less_pool_bounded; + typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_gpb_less_pool_bounded; + typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_gpt_less_pool_bounded; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_shb_less_pool_bounded; + typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_sht_less_pool_bounded; +#endif + struct BronsonAVLTreeMap_less_pool_bounded_stat : public BronsonAVLTreeMap_less + { + typedef cc::bronson_avltree::stat<> stat; + typedef cds::sync::pool_monitor sync_monitor; + static CDS_CONSTEXPR bool const relaxed_insert = true; + }; + typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_gpi_less_pool_bounded_stat; + typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_gpb_less_pool_bounded_stat; + typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_gpt_less_pool_bounded_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_shb_less_pool_bounded_stat; + typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_sht_less_pool_bounded_stat; +#endif + }; + + template + static inline void print_stat( cc::BronsonAVLTreeMap const& m ) + { + CPPUNIT_MSG( m.statistics() ); + CPPUNIT_MSG( m.monitor().statistics() ); + } + + template + static inline void check_before_cleanup( cc::BronsonAVLTreeMap& m ) + { + CPPUNIT_MSG( " Check internal consistency (single-threaded)..." ); + bool bOk = m.check_consistency([]( size_t nLevel, size_t hLeft, size_t hRight ) + { + CPPUNIT_MSG( "Tree violation on level=" << nLevel << ": hLeft=" << hLeft << ", hRight=" << hRight ) + }); + CPPUNIT_CHECK_CURRENT_EX( bOk, "check_consistency failed"); + } + +} // namespace map2 + +#endif // ifndef CDSUNIT_MAP_TYPE_BRONSON_AVLTREE_H diff --git a/tests/unit/map2/map_type_cuckoo.h b/tests/unit/map2/map_type_cuckoo.h new file mode 100644 index 00000000..3875ead7 --- /dev/null +++ b/tests/unit/map2/map_type_cuckoo.h @@ -0,0 +1,168 @@ +//$$CDS-header$$ + +#ifndef CDSUNIT_MAP_TYPE_CUCKOO_H +#define CDSUNIT_MAP_TYPE_CUCKOO_H + +#include "map2/map_type.h" + +#include + +#include "print_cuckoo_stat.h" + +namespace map2 { + + template + class CuckooMap : + public cc::CuckooMap< K, V, Traits > + { + public: + typedef cc::CuckooMap< K, V, Traits > cuckoo_base_class; + + public: + CuckooMap( size_t nCapacity, size_t nLoadFactor ) + : cuckoo_base_class( nCapacity / (nLoadFactor * 16), (unsigned int) 4 ) + {} + + template + bool erase_with( Q const& key, Pred /*pred*/ ) + { + return cuckoo_base_class::erase_with( key, typename std::conditional< cuckoo_base_class::c_isSorted, Pred, typename Pred::equal_to>::type() ); + } + }; + + template + struct map_type< cds::intrusive::cuckoo::implementation_tag, Key, Value >: public map_type_base< Key, Value > + { + typedef map_type_base< Key, Value > base_class; + typedef typename base_class::compare compare; + typedef typename base_class::less less; + typedef typename base_class::equal_to equal_to; + typedef typename base_class::key_hash key_hash; + typedef typename base_class::hash hash; + typedef typename base_class::hash2 hash2; + + template + struct traits_CuckooStripedMap: public Traits + { + typedef cc::cuckoo::striping<> mutex_policy; + }; + template + struct traits_CuckooRefinableMap : public Traits + { + typedef cc::cuckoo::refinable<> mutex_policy; + }; + + struct traits_CuckooMap_list_unord : + public cc::cuckoo::make_traits < + cc::cuckoo::probeset_type< cc::cuckoo::list > + , co::equal_to< equal_to > + , co::hash< std::tuple< hash, hash2 > > + > ::type + {}; + typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_list_unord; + typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_list_unord; + + struct traits_CuckooMap_list_unord_stat : public traits_CuckooMap_list_unord + { + typedef cc::cuckoo::stat stat; + }; + typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_list_unord_stat; + typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_list_unord_stat; + + struct traits_CuckooMap_list_unord_storehash : public traits_CuckooMap_list_unord + { + static CDS_CONSTEXPR const bool store_hash = true; + }; + typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_list_unord_storehash; + typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_list_unord_storehash; + + struct traits_CuckooMap_list_ord : + public cc::cuckoo::make_traits < + cc::cuckoo::probeset_type< cc::cuckoo::list > + , co::compare< compare > + , co::hash< std::tuple< hash, hash2 > > + >::type + {}; + typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_list_ord; + typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_list_ord; + + struct traits_CuckooMap_list_ord_stat : public traits_CuckooMap_list_ord + { + typedef cc::cuckoo::stat stat; + }; + typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_list_ord_stat; + typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_list_ord_stat; + + struct traits_CuckooMap_list_ord_storehash : public traits_CuckooMap_list_ord + { + static CDS_CONSTEXPR const bool store_hash = true; + }; + typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_list_ord_storehash; + typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_list_ord_storehash; + + struct traits_CuckooMap_vector_unord : + public cc::cuckoo::make_traits < + cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > + , co::equal_to< equal_to > + , co::hash< std::tuple< hash, hash2 > > + >::type + {}; + typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_vector_unord; + typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_vector_unord; + + struct traits_CuckooMap_vector_unord_stat : public traits_CuckooMap_vector_unord + { + typedef cc::cuckoo::stat stat; + }; + typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_vector_unord_stat; + typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_vector_unord_stat; + + struct traits_CuckooMap_vector_unord_storehash : public traits_CuckooMap_vector_unord + { + static CDS_CONSTEXPR const bool store_hash = true; + }; + typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_vector_unord_storehash; + typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_vector_unord_storehash; + + struct traits_CuckooMap_vector_ord : + public cc::cuckoo::make_traits < + cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > + , co::compare< compare > + , co::hash< std::tuple< hash, hash2 > > + >::type + {}; + typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_vector_ord; + typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_vector_ord; + + struct traits_CuckooMap_vector_ord_stat : public traits_CuckooMap_vector_ord + { + typedef cc::cuckoo::stat stat; + }; + typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_vector_ord_stat; + typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_vector_ord_stat; + + struct traits_CuckooMap_vector_ord_storehash : public traits_CuckooMap_vector_ord + { + static CDS_CONSTEXPR const bool store_hash = true; + }; + typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_vector_ord_storehash; + typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_vector_ord_storehash; + + }; + + template + static inline void print_stat( cc::CuckooMap< K, T, Traits > const& m ) + { + CPPUNIT_MSG( m.statistics() << m.mutex_policy_statistics() ); + } + + template + static inline void print_stat( CuckooMap< K, V, Traits > const& m ) + { + typedef CuckooMap< K, V, Traits > map_type; + print_stat( static_cast(m) ); + } + +} // namespace map2 + +#endif // ifndef CDSUNIT_MAP_TYPE_CUCKOO_H diff --git a/tests/unit/map2/map_type_ellen_bintree.h b/tests/unit/map2/map_type_ellen_bintree.h new file mode 100644 index 00000000..6b382b16 --- /dev/null +++ b/tests/unit/map2/map_type_ellen_bintree.h @@ -0,0 +1,233 @@ +//$$CDS-header$$ + +#ifndef CDSUNIT_MAP_TYPE_ELLEN_BINTREE_H +#define CDSUNIT_MAP_TYPE_ELLEN_BINTREE_H + +#include "map2/map_type.h" + +#include +#include +#include + +#include "ellen_bintree_update_desc_pool.h" +#include "print_ellenbintree_stat.h" + +namespace map2 { + + template + struct map_type< cc::ellen_bintree::implementation_tag, Key, Value >: public map_type_base< Key, Value > + { + typedef map_type_base< Key, Value > base_class; + typedef typename base_class::compare compare; + typedef typename base_class::less less; + + struct ellen_bintree_props { + struct hp_gc { + typedef cc::ellen_bintree::map_node leaf_node; + typedef cc::ellen_bintree::internal_node< Key, leaf_node > internal_node; + typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; + }; + struct dhp_gc { + typedef cc::ellen_bintree::map_node leaf_node; + typedef cc::ellen_bintree::internal_node< Key, leaf_node > internal_node; + typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; + }; + struct gpi { + typedef cc::ellen_bintree::map_node leaf_node; + typedef cc::ellen_bintree::internal_node< Key, leaf_node > internal_node; + typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; + }; + struct gpb { + typedef cc::ellen_bintree::map_node leaf_node; + typedef cc::ellen_bintree::internal_node< Key, leaf_node > internal_node; + typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; + }; + struct gpt { + typedef cc::ellen_bintree::map_node leaf_node; + typedef cc::ellen_bintree::internal_node< Key, leaf_node > internal_node; + typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; + }; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + struct shb { + typedef cc::ellen_bintree::map_node leaf_node; + typedef cc::ellen_bintree::internal_node< Key, leaf_node > internal_node; + typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; + }; + struct sht { + typedef cc::ellen_bintree::map_node leaf_node; + typedef cc::ellen_bintree::internal_node< Key, leaf_node > internal_node; + typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; + }; +#endif + }; + + struct traits_EllenBinTreeMap: public cc::ellen_bintree::make_set_traits< + co::less< less > + ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > > + ,co::item_counter< cds::atomicity::item_counter > + >::type + {}; + struct traits_EllenBinTreeMap_hp : traits_EllenBinTreeMap { + typedef cds::memory::pool_allocator< typename ellen_bintree_props::hp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; + }; + typedef cc::EllenBinTreeMap< cds::gc::HP, Key, Value, traits_EllenBinTreeMap_hp >EllenBinTreeMap_hp; + + struct traits_EllenBinTreeMap_dhp : traits_EllenBinTreeMap { + typedef cds::memory::pool_allocator< typename ellen_bintree_props::dhp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; + }; + typedef cc::EllenBinTreeMap< cds::gc::DHP, Key, Value, traits_EllenBinTreeMap_dhp >EllenBinTreeMap_dhp; + + struct traits_EllenBinTreeMap_gpi : traits_EllenBinTreeMap { + typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpi::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; + }; + typedef cc::EllenBinTreeMap< rcu_gpi, Key, Value, traits_EllenBinTreeMap_gpi >EllenBinTreeMap_rcu_gpi; + + struct traits_EllenBinTreeMap_gpb : traits_EllenBinTreeMap { + typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; + }; + typedef cc::EllenBinTreeMap< rcu_gpb, Key, Value, traits_EllenBinTreeMap_gpb >EllenBinTreeMap_rcu_gpb; + + struct traits_EllenBinTreeMap_gpt : traits_EllenBinTreeMap { + typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpt::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; + }; + typedef cc::EllenBinTreeMap< rcu_gpt, Key, Value, traits_EllenBinTreeMap_gpt >EllenBinTreeMap_rcu_gpt; + +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + struct traits_EllenBinTreeMap_shb : traits_EllenBinTreeMap { + typedef cds::memory::pool_allocator< typename ellen_bintree_props::shb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; + }; + typedef cc::EllenBinTreeMap< rcu_shb, Key, Value, traits_EllenBinTreeMap_shb >EllenBinTreeMap_rcu_shb; + + struct traits_EllenBinTreeMap_sht : traits_EllenBinTreeMap { + typedef cds::memory::pool_allocator< typename ellen_bintree_props::sht::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; + }; + typedef cc::EllenBinTreeMap< rcu_sht, Key, Value, traits_EllenBinTreeMap_sht >EllenBinTreeMap_rcu_sht; +#endif + + struct traits_EllenBinTreeMap_yield : public traits_EllenBinTreeMap + { + typedef cds::backoff::yield back_off; + }; + struct traits_EllenBinTreeMap_hp_yield : traits_EllenBinTreeMap_yield { + typedef cds::memory::pool_allocator< typename ellen_bintree_props::hp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; + }; + typedef cc::EllenBinTreeMap< cds::gc::HP, Key, Value, traits_EllenBinTreeMap_hp_yield >EllenBinTreeMap_hp_yield; + + struct traits_EllenBinTreeMap_dhp_yield : traits_EllenBinTreeMap_yield { + typedef cds::memory::pool_allocator< typename ellen_bintree_props::dhp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; + }; + typedef cc::EllenBinTreeMap< cds::gc::DHP, Key, Value, traits_EllenBinTreeMap_dhp_yield >EllenBinTreeMap_dhp_yield; + + struct traits_EllenBinTreeMap_gpb_yield : traits_EllenBinTreeMap_yield { + typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; + }; + typedef cc::EllenBinTreeMap< rcu_gpb, Key, Value, traits_EllenBinTreeMap_gpb_yield >EllenBinTreeMap_rcu_gpb_yield; + + + struct traits_EllenBinTreeMap_stat: public cc::ellen_bintree::make_set_traits< + co::less< less > + ,cc::ellen_bintree::update_desc_allocator< + cds::memory::pool_allocator< typename ellen_bintree_props::hp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > + > + ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > > + ,co::stat< cc::ellen_bintree::stat<> > + ,co::item_counter< cds::atomicity::item_counter > + >::type + {}; + + struct traits_EllenBinTreeMap_stat_hp : public traits_EllenBinTreeMap_stat + { + typedef cds::memory::pool_allocator< typename ellen_bintree_props::hp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; + }; + typedef cc::EllenBinTreeMap< cds::gc::HP, Key, Value, traits_EllenBinTreeMap_stat_hp > EllenBinTreeMap_hp_stat; + + struct traits_EllenBinTreeMap_stat_dhp : public traits_EllenBinTreeMap_stat + { + typedef cds::memory::pool_allocator< typename ellen_bintree_props::dhp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; + }; + typedef cc::EllenBinTreeMap< cds::gc::HP, Key, Value, traits_EllenBinTreeMap_stat_dhp > EllenBinTreeMap_dhp_stat; + + struct traits_EllenBinTreeMap_stat_gpi : public traits_EllenBinTreeMap_stat + { + typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpi::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; + }; + typedef cc::EllenBinTreeMap< rcu_gpi, Key, Value, traits_EllenBinTreeMap_stat_gpi > EllenBinTreeMap_rcu_gpi_stat; + + struct traits_EllenBinTreeMap_stat_gpb : public traits_EllenBinTreeMap_stat + { + typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; + }; + typedef cc::EllenBinTreeMap< rcu_gpb, Key, Value, traits_EllenBinTreeMap_stat_gpb > EllenBinTreeMap_rcu_gpb_stat; + + struct traits_EllenBinTreeMap_stat_gpt : public traits_EllenBinTreeMap_stat + { + typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpt::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; + }; + typedef cc::EllenBinTreeMap< rcu_gpt, Key, Value, traits_EllenBinTreeMap_stat_gpt > EllenBinTreeMap_rcu_gpt_stat; + +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + struct traits_EllenBinTreeMap_stat_shb : public traits_EllenBinTreeMap_stat + { + typedef cds::memory::pool_allocator< typename ellen_bintree_props::shb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; + }; + typedef cc::EllenBinTreeMap< rcu_shb, Key, Value, traits_EllenBinTreeMap_stat_shb > EllenBinTreeMap_rcu_shb_stat; + + struct traits_EllenBinTreeMap_stat_sht : public traits_EllenBinTreeMap_stat + { + typedef cds::memory::pool_allocator< typename ellen_bintree_props::sht::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; + }; + typedef cc::EllenBinTreeMap< rcu_sht, Key, Value, traits_EllenBinTreeMap_stat_sht > EllenBinTreeMap_rcu_sht_stat; +#endif + }; + + template + static inline void print_stat( cc::EllenBinTreeMap const& s ) + { + CPPUNIT_MSG( s.statistics() ); + } + template + static inline void additional_cleanup( cc::EllenBinTreeMap& /*s*/ ) + { + ellen_bintree_pool::internal_node_counter::reset(); + } + namespace ellen_bintree_check { + static inline void check_stat( cds::intrusive::ellen_bintree::empty_stat const& /*s*/ ) + { + // This check is not valid for thread-based RCU + /* + CPPUNIT_CHECK_CURRENT_EX( ellen_bintree_pool::internal_node_counter::m_nAlloc.get() == ellen_bintree_pool::internal_node_counter::m_nFree.get(), + "m_nAlloc=" << ellen_bintree_pool::internal_node_counter::m_nAlloc.get() + << ", m_nFree=" << ellen_bintree_pool::internal_node_counter::m_nFree.get() + ); + */ + } + + static inline void check_stat( cds::intrusive::ellen_bintree::stat<> const& stat ) + { + CPPUNIT_CHECK_CURRENT_EX( stat.m_nInternalNodeCreated == stat.m_nInternalNodeDeleted, + "m_nInternalNodeCreated=" << stat.m_nInternalNodeCreated + << " m_nInternalNodeDeleted=" << stat.m_nInternalNodeDeleted ); + CPPUNIT_CHECK_CURRENT_EX( stat.m_nUpdateDescCreated == stat.m_nUpdateDescDeleted, + "m_nUpdateDescCreated=" << stat.m_nUpdateDescCreated + << " m_nUpdateDescDeleted=" << stat.m_nUpdateDescDeleted ); + CPPUNIT_CHECK_CURRENT_EX( ellen_bintree_pool::internal_node_counter::m_nAlloc.get() == stat.m_nInternalNodeCreated, + "allocated=" << ellen_bintree_pool::internal_node_counter::m_nAlloc.get() + << "m_nInternalNodeCreated=" << stat.m_nInternalNodeCreated ); + } + } // namespace ellen_bintree_check + template + static inline void additional_check( cc::EllenBinTreeMap& s ) + { + GC::force_dispose(); + ellen_bintree_check::check_stat( s.statistics() ); + } + + template + static inline void check_before_cleanup( cc::EllenBinTreeMap& m ) + { + CPPUNIT_MSG( " Check internal consistency (single-threaded)..." ); + CPPUNIT_CHECK_CURRENT( m.check_consistency() ); + } +} // namespace map2 + +#endif // ifndef CDSUNIT_MAP_TYPE_ELLEN_BINTREE_H diff --git a/tests/unit/map2/map_type_lazy_list.h b/tests/unit/map2/map_type_lazy_list.h new file mode 100644 index 00000000..6116bb6e --- /dev/null +++ b/tests/unit/map2/map_type_lazy_list.h @@ -0,0 +1,134 @@ +//$$CDS-header$$ + +#ifndef CDSUNIT_MAP_TYPE_LAZY_LIST_H +#define CDSUNIT_MAP_TYPE_LAZY_LIST_H + +#include "map2/map_type.h" + +#include +#include +#include +#include + +#include "michael_alloc.h" + +namespace map2 { + + template + struct lazy_list_type + { + typedef typename map_type_base::compare compare; + typedef typename map_type_base::less less; + typedef typename map_type_base::equal_to equal_to; + + struct traits_LazyList_cmp_stdAlloc: + public cc::lazy_list::make_traits< + co::compare< compare > + >::type + {}; + typedef cc::LazyKVList< cds::gc::HP, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_HP_cmp_stdAlloc; + typedef cc::LazyKVList< cds::gc::DHP, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_DHP_cmp_stdAlloc; + typedef cc::LazyKVList< cds::gc::nogc, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_NOGC_cmp_stdAlloc; + typedef cc::LazyKVList< rcu_gpi, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_RCU_GPI_cmp_stdAlloc; + typedef cc::LazyKVList< rcu_gpb, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_RCU_GPB_cmp_stdAlloc; + typedef cc::LazyKVList< rcu_gpt, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_RCU_GPT_cmp_stdAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::LazyKVList< rcu_shb, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_RCU_SHB_cmp_stdAlloc; + typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_RCU_SHT_cmp_stdAlloc; +#endif + + struct traits_LazyList_unord_stdAlloc : + public cc::lazy_list::make_traits< + co::equal_to< equal_to > + ,co::sort< false > + >::type + {}; + typedef cc::LazyKVList< cds::gc::nogc, Key, Value, traits_LazyList_unord_stdAlloc > LazyList_NOGC_unord_stdAlloc; + + struct traits_LazyList_cmp_stdAlloc_seqcst : + public cc::lazy_list::make_traits< + co::compare< compare > + ,co::memory_model< co::v::sequential_consistent > + >::type + {}; + typedef cc::LazyKVList< cds::gc::HP, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_HP_cmp_stdAlloc_seqcst; + typedef cc::LazyKVList< cds::gc::DHP, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_DHP_cmp_stdAlloc_seqcst; + typedef cc::LazyKVList< cds::gc::nogc, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_NOGC_cmp_stdAlloc_seqcst; + typedef cc::LazyKVList< rcu_gpi, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_GPI_cmp_stdAlloc_seqcst; + typedef cc::LazyKVList< rcu_gpb, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_GPB_cmp_stdAlloc_seqcst; + typedef cc::LazyKVList< rcu_gpt, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_GPT_cmp_stdAlloc_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::LazyKVList< rcu_shb, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_SHB_cmp_stdAlloc_seqcst; + typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_SHT_cmp_stdAlloc_seqcst; +#endif + + struct traits_LazyList_cmp_michaelAlloc : + public cc::lazy_list::make_traits< + co::compare< compare >, + co::allocator< memory::MichaelAllocator > + >::type + {}; + typedef cc::LazyKVList< cds::gc::HP, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_HP_cmp_michaelAlloc; + typedef cc::LazyKVList< cds::gc::DHP, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_DHP_cmp_michaelAlloc; + typedef cc::LazyKVList< cds::gc::nogc, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_NOGC_cmp_michaelAlloc; + typedef cc::LazyKVList< rcu_gpi, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_GPI_cmp_michaelAlloc; + typedef cc::LazyKVList< rcu_gpb, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_GPB_cmp_michaelAlloc; + typedef cc::LazyKVList< rcu_gpt, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_GPT_cmp_michaelAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::LazyKVList< rcu_shb, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_SHB_cmp_michaelAlloc; + typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_SHT_cmp_michaelAlloc; +#endif + struct traits_LazyList_less_stdAlloc : + public cc::lazy_list::make_traits< + co::less< less > + >::type + {}; + typedef cc::LazyKVList< cds::gc::HP, Key, Value, traits_LazyList_less_stdAlloc > LazyList_HP_less_stdAlloc; + typedef cc::LazyKVList< cds::gc::DHP, Key, Value, traits_LazyList_less_stdAlloc > LazyList_DHP_less_stdAlloc; + typedef cc::LazyKVList< cds::gc::nogc, Key, Value, traits_LazyList_less_stdAlloc > LazyList_NOGC_less_stdAlloc; + typedef cc::LazyKVList< rcu_gpi, Key, Value, traits_LazyList_less_stdAlloc > LazyList_RCU_GPI_less_stdAlloc; + typedef cc::LazyKVList< rcu_gpb, Key, Value, traits_LazyList_less_stdAlloc > LazyList_RCU_GPB_less_stdAlloc; + typedef cc::LazyKVList< rcu_gpt, Key, Value, traits_LazyList_less_stdAlloc > LazyList_RCU_GPT_less_stdAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::LazyKVList< rcu_shb, Key, Value, traits_LazyList_less_stdAlloc > LazyList_RCU_SHB_less_stdAlloc; + typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_less_stdAlloc > LazyList_RCU_SHT_less_stdAlloc; +#endif + + struct traits_LazyList_less_stdAlloc_seqcst : + public cc::lazy_list::make_traits< + co::less< less > + ,co::memory_model< co::v::sequential_consistent > + >::type + {}; + typedef cc::LazyKVList< cds::gc::HP, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_HP_less_stdAlloc_seqcst; + typedef cc::LazyKVList< cds::gc::DHP, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_DHP_less_stdAlloc_seqcst; + typedef cc::LazyKVList< cds::gc::nogc, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_NOGC_less_stdAlloc_seqcst; + typedef cc::LazyKVList< rcu_gpi, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_GPI_less_stdAlloc_seqcst; + typedef cc::LazyKVList< rcu_gpb, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_GPB_less_stdAlloc_seqcst; + typedef cc::LazyKVList< rcu_gpt, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_GPT_less_stdAlloc_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::LazyKVList< rcu_shb, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_SHB_less_stdAlloc_seqcst; + typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_SHT_less_stdAlloc_seqcst; +#endif + + struct traits_LazyList_less_michaelAlloc : + public cc::lazy_list::make_traits< + co::less< less >, + co::allocator< memory::MichaelAllocator > + >::type + {}; + typedef cc::LazyKVList< cds::gc::HP, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_HP_less_michaelAlloc; + typedef cc::LazyKVList< cds::gc::DHP, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_DHP_less_michaelAlloc; + typedef cc::LazyKVList< cds::gc::nogc, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_NOGC_less_michaelAlloc; + typedef cc::LazyKVList< rcu_gpi, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_RCU_GPI_less_michaelAlloc; + typedef cc::LazyKVList< rcu_gpb, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_RCU_GPB_less_michaelAlloc; + typedef cc::LazyKVList< rcu_gpt, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_RCU_GPT_less_michaelAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::LazyKVList< rcu_shb, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_RCU_SHB_less_michaelAlloc; + typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_RCU_SHT_less_michaelAlloc; +#endif + }; + +} // namespace map2 + +#endif // ifndef CDSUNIT_MAP_TYPE_LAZY_LIST_H diff --git a/tests/unit/map2/map_type_michael.h b/tests/unit/map2/map_type_michael.h new file mode 100644 index 00000000..8e9cfd8d --- /dev/null +++ b/tests/unit/map2/map_type_michael.h @@ -0,0 +1,180 @@ +//$$CDS-header$$ + +#ifndef CDSUNIT_MAP_TYPE_MICHAEL_H +#define CDSUNIT_MAP_TYPE_MICHAEL_H + +#include "map2/map_type_michael_list.h" +#include "map2/map_type_lazy_list.h" + +#include +#include +#include + +namespace map2 { + + template + struct map_type< cc::michael_map::implementation_tag, Key, Value >: public map_type_base< Key, Value > + { + typedef map_type_base< Key, Value > base_class; + typedef typename base_class::compare compare; + typedef typename base_class::less less; + typedef typename base_class::equal_to equal_to; + typedef typename base_class::key_hash key_hash; + typedef typename base_class::hash hash; + + + // *************************************************************************** + // MichaelHashMap based on MichaelKVList + typedef michael_list_type< Key, Value > ml; + + struct traits_MichaelMap_hash : + public cc::michael_map::make_traits< + co::hash< hash > + >::type + {}; + typedef cc::MichaelHashMap< cds::gc::HP, typename ml::MichaelList_HP_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_HP_cmp_stdAlloc; + typedef cc::MichaelHashMap< cds::gc::DHP, typename ml::MichaelList_DHP_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_DHP_cmp_stdAlloc; + typedef cc::MichaelHashMap< cds::gc::nogc, typename ml::MichaelList_NOGC_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_NOGC_cmp_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpi, typename ml::MichaelList_RCU_GPI_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_GPI_cmp_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpb, typename ml::MichaelList_RCU_GPB_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_GPB_cmp_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpt, typename ml::MichaelList_RCU_GPT_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_GPT_cmp_stdAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashMap< rcu_shb, typename ml::MichaelList_RCU_SHB_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_SHB_cmp_stdAlloc; + typedef cc::MichaelHashMap< rcu_sht, typename ml::MichaelList_RCU_SHT_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_SHT_cmp_stdAlloc; +#endif + + typedef cc::MichaelHashMap< cds::gc::HP, typename ml::MichaelList_HP_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_HP_less_stdAlloc; + typedef cc::MichaelHashMap< cds::gc::DHP, typename ml::MichaelList_DHP_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_DHP_less_stdAlloc; + typedef cc::MichaelHashMap< cds::gc::nogc, typename ml::MichaelList_NOGC_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_NOGC_less_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpi, typename ml::MichaelList_RCU_GPI_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_GPI_less_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpb, typename ml::MichaelList_RCU_GPB_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_GPB_less_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpt, typename ml::MichaelList_RCU_GPT_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_GPT_less_stdAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashMap< rcu_shb, typename ml::MichaelList_RCU_SHB_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_SHB_less_stdAlloc; + typedef cc::MichaelHashMap< rcu_sht, typename ml::MichaelList_RCU_SHT_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_SHT_less_stdAlloc; +#endif + + typedef cc::MichaelHashMap< cds::gc::HP, typename ml::MichaelList_HP_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_HP_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< cds::gc::DHP, typename ml::MichaelList_DHP_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_DHP_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< cds::gc::nogc, typename ml::MichaelList_NOGC_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_NOGC_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpi, typename ml::MichaelList_RCU_GPI_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPI_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpb, typename ml::MichaelList_RCU_GPB_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPB_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpt, typename ml::MichaelList_RCU_GPT_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPT_cmp_stdAlloc_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashMap< rcu_shb, typename ml::MichaelList_RCU_SHB_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_SHB_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_sht, typename ml::MichaelList_RCU_SHT_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_SHT_cmp_stdAlloc_seqcst; +#endif + + typedef cc::MichaelHashMap< cds::gc::HP, typename ml::MichaelList_HP_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_HP_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< cds::gc::DHP, typename ml::MichaelList_DHP_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_DHP_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< cds::gc::nogc, typename ml::MichaelList_NOGC_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_NOGC_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpi, typename ml::MichaelList_RCU_GPI_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPI_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpb, typename ml::MichaelList_RCU_GPB_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPB_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpt, typename ml::MichaelList_RCU_GPT_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPT_less_stdAlloc_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashMap< rcu_shb, typename ml::MichaelList_RCU_SHB_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_SHB_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_sht, typename ml::MichaelList_RCU_SHT_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_SHT_less_stdAlloc_seqcst; +#endif + + struct traits_MichaelSet_michaelAlloc : + public traits_MichaelMap_hash + { + typedef memory::MichaelAllocator allocator; + }; + typedef cc::MichaelHashMap< cds::gc::HP, typename ml::MichaelList_HP_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_HP_cmp_michaelAlloc; + typedef cc::MichaelHashMap< cds::gc::DHP, typename ml::MichaelList_DHP_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_DHP_cmp_michaelAlloc; + typedef cc::MichaelHashMap< cds::gc::nogc, typename ml::MichaelList_NOGC_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_NOGC_cmp_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpi, typename ml::MichaelList_RCU_GPI_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_GPI_cmp_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpb, typename ml::MichaelList_RCU_GPB_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_GPB_cmp_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpt, typename ml::MichaelList_RCU_GPT_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_GPT_cmp_michaelAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashMap< rcu_shb, typename ml::MichaelList_RCU_SHB_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_SHB_cmp_michaelAlloc; + typedef cc::MichaelHashMap< rcu_sht, typename ml::MichaelList_RCU_SHT_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_SHT_cmp_michaelAlloc; +#endif + typedef cc::MichaelHashMap< cds::gc::HP, typename ml::MichaelList_HP_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_HP_less_michaelAlloc; + typedef cc::MichaelHashMap< cds::gc::DHP, typename ml::MichaelList_DHP_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_DHP_less_michaelAlloc; + typedef cc::MichaelHashMap< cds::gc::nogc, typename ml::MichaelList_NOGC_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_NOGC_less_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpi, typename ml::MichaelList_RCU_GPI_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_GPI_less_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpb, typename ml::MichaelList_RCU_GPB_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_GPB_less_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpt, typename ml::MichaelList_RCU_GPT_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_GPT_less_michaelAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashMap< rcu_shb, typename ml::MichaelList_RCU_SHB_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_SHB_less_michaelAlloc; + typedef cc::MichaelHashMap< rcu_sht, typename ml::MichaelList_RCU_SHT_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_SHT_less_michaelAlloc; +#endif + + + // *************************************************************************** + // MichaelHashMap based on LazyKVList + typedef lazy_list_type< Key, Value > ll; + + typedef cc::MichaelHashMap< cds::gc::HP, typename ll::LazyList_HP_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_HP_cmp_stdAlloc; + typedef cc::MichaelHashMap< cds::gc::DHP, typename ll::LazyList_DHP_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_DHP_cmp_stdAlloc; + typedef cc::MichaelHashMap< cds::gc::nogc, typename ll::LazyList_NOGC_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_cmp_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpi, typename ll::LazyList_RCU_GPI_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPI_cmp_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpb, typename ll::LazyList_RCU_GPB_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPB_cmp_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpt, typename ll::LazyList_RCU_GPT_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPT_cmp_stdAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashMap< rcu_shb, typename ll::LazyList_RCU_SHB_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHB_cmp_stdAlloc; + typedef cc::MichaelHashMap< rcu_sht, typename ll::LazyList_RCU_SHT_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHT_cmp_stdAlloc; +#endif + + typedef cc::MichaelHashMap< cds::gc::nogc, typename ll::LazyList_NOGC_unord_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_unord_stdAlloc; + + typedef cc::MichaelHashMap< cds::gc::HP, typename ll::LazyList_HP_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_HP_less_stdAlloc; + typedef cc::MichaelHashMap< cds::gc::DHP, typename ll::LazyList_DHP_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_DHP_less_stdAlloc; + typedef cc::MichaelHashMap< cds::gc::nogc, typename ll::LazyList_NOGC_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_less_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpi, typename ll::LazyList_RCU_GPI_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPI_less_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpb, typename ll::LazyList_RCU_GPB_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPB_less_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpt, typename ll::LazyList_RCU_GPT_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPT_less_stdAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashMap< rcu_shb, typename ll::LazyList_RCU_SHB_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHB_less_stdAlloc; + typedef cc::MichaelHashMap< rcu_sht, typename ll::LazyList_RCU_SHT_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHT_less_stdAlloc; +#endif + + typedef cc::MichaelHashMap< cds::gc::HP, typename ll::LazyList_HP_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_HP_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< cds::gc::DHP, typename ll::LazyList_DHP_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_DHP_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< cds::gc::nogc, typename ll::LazyList_NOGC_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpi, typename ll::LazyList_RCU_GPI_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPI_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpb, typename ll::LazyList_RCU_GPB_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPB_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpt, typename ll::LazyList_RCU_GPT_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPT_cmp_stdAlloc_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashMap< rcu_shb, typename ll::LazyList_RCU_SHB_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHB_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_sht, typename ll::LazyList_RCU_SHT_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHT_cmp_stdAlloc_seqcst; +#endif + + typedef cc::MichaelHashMap< cds::gc::HP, typename ll::LazyList_HP_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_HP_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< cds::gc::DHP, typename ll::LazyList_DHP_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_DHP_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< cds::gc::nogc, typename ll::LazyList_NOGC_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpi, typename ll::LazyList_RCU_GPI_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPI_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpb, typename ll::LazyList_RCU_GPB_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPB_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpt, typename ll::LazyList_RCU_GPT_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPT_less_stdAlloc_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashMap< rcu_shb, typename ll::LazyList_RCU_SHB_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHB_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_sht, typename ll::LazyList_RCU_SHT_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHT_less_stdAlloc_seqcst; +#endif + + typedef cc::MichaelHashMap< cds::gc::HP, typename ll::LazyList_HP_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_HP_cmp_michaelAlloc; + typedef cc::MichaelHashMap< cds::gc::DHP, typename ll::LazyList_DHP_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_DHP_cmp_michaelAlloc; + typedef cc::MichaelHashMap< cds::gc::nogc, typename ll::LazyList_NOGC_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_NOGC_cmp_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpi, typename ll::LazyList_RCU_GPI_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_GPI_cmp_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpb, typename ll::LazyList_RCU_GPB_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_GPB_cmp_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpt, typename ll::LazyList_RCU_GPT_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_GPT_cmp_michaelAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashMap< rcu_shb, typename ll::LazyList_RCU_SHB_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_SHB_cmp_michaelAlloc; + typedef cc::MichaelHashMap< rcu_sht, typename ll::LazyList_RCU_SHT_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_SHT_cmp_michaelAlloc; +#endif + typedef cc::MichaelHashMap< cds::gc::HP, typename ll::LazyList_HP_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_HP_less_michaelAlloc; + typedef cc::MichaelHashMap< cds::gc::DHP, typename ll::LazyList_DHP_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_DHP_less_michaelAlloc; + typedef cc::MichaelHashMap< cds::gc::nogc, typename ll::LazyList_NOGC_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_NOGC_less_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpi, typename ll::LazyList_RCU_GPI_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_GPI_less_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpb, typename ll::LazyList_RCU_GPB_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_GPB_less_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpt, typename ll::LazyList_RCU_GPT_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_GPT_less_michaelAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashMap< rcu_shb, typename ll::LazyList_RCU_SHB_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_SHB_less_michaelAlloc; + typedef cc::MichaelHashMap< rcu_sht, typename ll::LazyList_RCU_SHT_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_SHT_less_michaelAlloc; +#endif + + }; +} // namespace map2 + +#endif // ifndef CDSUNIT_MAP_TYPE_MICHAEL_H diff --git a/tests/unit/map2/map_type_michael_list.h b/tests/unit/map2/map_type_michael_list.h new file mode 100644 index 00000000..acb1813c --- /dev/null +++ b/tests/unit/map2/map_type_michael_list.h @@ -0,0 +1,126 @@ +//$$CDS-header$$ + +#ifndef CDSUNIT_MAP_TYPE_MICHAEL_LIST_H +#define CDSUNIT_MAP_TYPE_MICHAEL_LIST_H + +#include "map2/map_type.h" + +#include +#include +#include +#include + +#include "michael_alloc.h" + +namespace map2 { + + template + struct michael_list_type + { + typedef typename map_type_base::compare compare; + typedef typename map_type_base::less less; + + struct traits_MichaelList_cmp_stdAlloc : + public cc::michael_list::make_traits< + co::compare< compare > + >::type + {}; + typedef cc::MichaelKVList< cds::gc::HP, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_HP_cmp_stdAlloc; + typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_DHP_cmp_stdAlloc; + typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_NOGC_cmp_stdAlloc; + typedef cc::MichaelKVList< rcu_gpi, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_GPI_cmp_stdAlloc; + typedef cc::MichaelKVList< rcu_gpb, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_GPB_cmp_stdAlloc; + typedef cc::MichaelKVList< rcu_gpt, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_GPT_cmp_stdAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelKVList< rcu_shb, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_SHB_cmp_stdAlloc; + typedef cc::MichaelKVList< rcu_sht, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_SHT_cmp_stdAlloc; +#endif + + struct traits_MichaelList_cmp_stdAlloc_seqcst : + public cc::michael_list::make_traits< + co::compare< compare > + ,co::memory_model< co::v::sequential_consistent > + >::type + {}; + typedef cc::MichaelKVList< cds::gc::HP, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_HP_cmp_stdAlloc_seqcst; + typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_DHP_cmp_stdAlloc_seqcst; + typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_NOGC_cmp_stdAlloc_seqcst; + typedef cc::MichaelKVList< rcu_gpi, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_GPI_cmp_stdAlloc_seqcst; + typedef cc::MichaelKVList< rcu_gpb, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_GPB_cmp_stdAlloc_seqcst; + typedef cc::MichaelKVList< rcu_gpt, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_GPT_cmp_stdAlloc_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelKVList< rcu_shb, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_SHB_cmp_stdAlloc_seqcst; + typedef cc::MichaelKVList< rcu_sht, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_SHT_cmp_stdAlloc_seqcst; +#endif + + struct traits_MichaelList_cmp_michaelAlloc : + public cc::michael_list::make_traits< + co::compare< compare >, + co::allocator< memory::MichaelAllocator > + >::type + {}; + typedef cc::MichaelKVList< cds::gc::HP, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_HP_cmp_michaelAlloc; + typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_DHP_cmp_michaelAlloc; + typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_NOGC_cmp_michaelAlloc; + typedef cc::MichaelKVList< rcu_gpi, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_GPI_cmp_michaelAlloc; + typedef cc::MichaelKVList< rcu_gpb, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_GPB_cmp_michaelAlloc; + typedef cc::MichaelKVList< rcu_gpt, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_GPT_cmp_michaelAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelKVList< rcu_shb, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_SHB_cmp_michaelAlloc; + typedef cc::MichaelKVList< rcu_sht, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_SHT_cmp_michaelAlloc; +#endif + + struct traits_MichaelList_less_stdAlloc : + public cc::michael_list::make_traits< + co::less< less > + >::type + {}; + typedef cc::MichaelKVList< cds::gc::HP, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_HP_less_stdAlloc; + typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_DHP_less_stdAlloc; + typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_NOGC_less_stdAlloc; + typedef cc::MichaelKVList< rcu_gpi, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_RCU_GPI_less_stdAlloc; + typedef cc::MichaelKVList< rcu_gpb, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_RCU_GPB_less_stdAlloc; + typedef cc::MichaelKVList< rcu_gpt, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_RCU_GPT_less_stdAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelKVList< rcu_shb, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_RCU_SHB_less_stdAlloc; + typedef cc::MichaelKVList< rcu_sht, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_RCU_SHT_less_stdAlloc; +#endif + + struct traits_MichaelList_less_stdAlloc_seqcst : + public cc::michael_list::make_traits< + co::less< less > + ,co::memory_model< co::v::sequential_consistent > + >::type + {}; + typedef cc::MichaelKVList< cds::gc::HP, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_HP_less_stdAlloc_seqcst; + typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_DHP_less_stdAlloc_seqcst; + typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_NOGC_less_stdAlloc_seqcst; + typedef cc::MichaelKVList< rcu_gpi, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_GPI_less_stdAlloc_seqcst; + typedef cc::MichaelKVList< rcu_gpb, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_GPB_less_stdAlloc_seqcst; + typedef cc::MichaelKVList< rcu_gpt, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_GPT_less_stdAlloc_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelKVList< rcu_shb, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_SHB_less_stdAlloc_seqcst; + typedef cc::MichaelKVList< rcu_sht, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_SHT_less_stdAlloc_seqcst; +#endif + + struct traits_MichaelList_less_michaelAlloc : + public cc::michael_list::make_traits< + co::less< less >, + co::allocator< memory::MichaelAllocator > + >::type + {}; + typedef cc::MichaelKVList< cds::gc::HP, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_HP_less_michaelAlloc; + typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_DHP_less_michaelAlloc; + typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_NOGC_less_michaelAlloc; + typedef cc::MichaelKVList< rcu_gpi, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_GPI_less_michaelAlloc; + typedef cc::MichaelKVList< rcu_gpb, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_GPB_less_michaelAlloc; + typedef cc::MichaelKVList< rcu_gpt, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_GPT_less_michaelAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelKVList< rcu_shb, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_SHB_less_michaelAlloc; + typedef cc::MichaelKVList< rcu_sht, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_SHT_less_michaelAlloc; +#endif + }; + +} // namespace map2 + +#endif // ifndef CDSUNIT_MAP_TYPE_MICHAEL_LIST_H diff --git a/tests/unit/map2/map_type_skip_list.h b/tests/unit/map2/map_type_skip_list.h new file mode 100644 index 00000000..eb142c94 --- /dev/null +++ b/tests/unit/map2/map_type_skip_list.h @@ -0,0 +1,192 @@ +//$$CDS-header$$ + +#ifndef CDSUNIT_MAP_TYPE_SKIP_LIST_H +#define CDSUNIT_MAP_TYPE_SKIP_LIST_H + +#include "map2/map_type.h" + +#include +#include +#include +#include + +#include "print_skip_list_stat.h" + +namespace map2 { + + template + struct map_type< cc::skip_list::implementation_tag, Key, Value >: public map_type_base< Key, Value > + { + typedef map_type_base< Key, Value > base_class; + typedef typename base_class::compare compare; + typedef typename base_class::less less; + + class traits_SkipListMap_less_pascal: public cc::skip_list::make_traits < + co::less< less > + ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > + ,co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_hp_less_pascal; + typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_dhp_less_pascal; + typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_nogc_less_pascal; + typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_gpi_less_pascal; + typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_gpb_less_pascal; + typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_gpt_less_pascal; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_shb_less_pascal; + typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_sht_less_pascal; +#endif + + class traits_SkipListMap_less_pascal_seqcst: public cc::skip_list::make_traits < + co::less< less > + ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > + ,co::memory_model< co::v::sequential_consistent > + ,co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_hp_less_pascal_seqcst; + typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_dhp_less_pascal_seqcst; + typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_nogc_less_pascal_seqcst; + typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_gpi_less_pascal_seqcst; + typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_gpb_less_pascal_seqcst; + typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_gpt_less_pascal_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_shb_less_pascal_seqcst; + typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_sht_less_pascal_seqcst; +#endif + + class traits_SkipListMap_less_pascal_stat: public cc::skip_list::make_traits < + co::less< less > + ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > + ,co::stat< cc::skip_list::stat<> > + ,co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_hp_less_pascal_stat; + typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_dhp_less_pascal_stat; + typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_nogc_less_pascal_stat; + typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_gpi_less_pascal_stat; + typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_gpb_less_pascal_stat; + typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_gpt_less_pascal_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_shb_less_pascal_stat; + typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_sht_less_pascal_stat; +#endif + + class traits_SkipListMap_cmp_pascal: public cc::skip_list::make_traits < + co::compare< compare > + ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > + ,co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_hp_cmp_pascal; + typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_dhp_cmp_pascal; + typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_nogc_cmp_pascal; + typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_gpi_cmp_pascal; + typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_gpb_cmp_pascal; + typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_gpt_cmp_pascal; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_shb_cmp_pascal; + typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_sht_cmp_pascal; +#endif + + class traits_SkipListMap_cmp_pascal_stat: public cc::skip_list::make_traits < + co::compare< compare > + ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > + ,co::stat< cc::skip_list::stat<> > + ,co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_hp_cmp_pascal_stat; + typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_dhp_cmp_pascal_stat; + typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_nogc_cmp_pascal_stat; + typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_gpi_cmp_pascal_stat; + typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_gpb_cmp_pascal_stat; + typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_gpt_cmp_pascal_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_shb_cmp_pascal_stat; + typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_sht_cmp_pascal_stat; +#endif + + class traits_SkipListMap_less_xorshift: public cc::skip_list::make_traits < + co::less< less > + ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > + ,co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_hp_less_xorshift; + typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_dhp_less_xorshift; + typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_nogc_less_xorshift; + typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_gpi_less_xorshift; + typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_gpb_less_xorshift; + typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_gpt_less_xorshift; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_shb_less_xorshift; + typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_sht_less_xorshift; +#endif + + class traits_SkipListMap_less_xorshift_stat: public cc::skip_list::make_traits < + co::less< less > + ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > + ,co::stat< cc::skip_list::stat<> > + ,co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_hp_less_xorshift_stat; + typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_dhp_less_xorshift_stat; + typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_nogc_less_xorshift_stat; + typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_gpi_less_xorshift_stat; + typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_gpb_less_xorshift_stat; + typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_gpt_less_xorshift_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_shb_less_xorshift_stat; + typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_sht_less_xorshift_stat; +#endif + + class traits_SkipListMap_cmp_xorshift: public cc::skip_list::make_traits < + co::compare< compare > + ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > + ,co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_hp_cmp_xorshift; + typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_dhp_cmp_xorshift; + typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_nogc_cmp_xorshift; + typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_gpi_cmp_xorshift; + typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_gpb_cmp_xorshift; + typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_gpt_cmp_xorshift; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_shb_cmp_xorshift; + typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_sht_cmp_xorshift; +#endif + + class traits_SkipListMap_cmp_xorshift_stat: public cc::skip_list::make_traits < + co::compare< compare > + ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > + ,co::stat< cc::skip_list::stat<> > + ,co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_hp_cmp_xorshift_stat; + typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_dhp_cmp_xorshift_stat; + typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_nogc_cmp_xorshift_stat; + typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_gpi_cmp_xorshift_stat; + typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_gpb_cmp_xorshift_stat; + typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_gpt_cmp_xorshift_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_shb_cmp_xorshift_stat; + typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_sht_cmp_xorshift_stat; +#endif + + }; + + template + static inline void print_stat( cc::SkipListMap< GC, K, T, Traits > const& m ) + { + CPPUNIT_MSG( m.statistics() ); + } + +} // namespace map2 + +#endif // ifndef CDSUNIT_MAP_TYPE_SKIP_LIST_H diff --git a/tests/unit/map2/map_type_split_list.h b/tests/unit/map2/map_type_split_list.h new file mode 100644 index 00000000..e18aa241 --- /dev/null +++ b/tests/unit/map2/map_type_split_list.h @@ -0,0 +1,523 @@ +//$$CDS-header$$ + +#ifndef CDSUNIT_MAP_TYPE_SPLIT_LIST_H +#define CDSUNIT_MAP_TYPE_SPLIT_LIST_H + +#include "map2/map_type.h" + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include "print_split_list_stat.h" + +namespace map2 { + + template + struct map_type< cc::split_list::implementation_tag, Key, Value >: public map_type_base< Key, Value > + { + typedef map_type_base< Key, Value > base_class; + typedef typename base_class::compare compare; + typedef typename base_class::less less; + typedef typename base_class::equal_to equal_to; + typedef typename base_class::key_hash key_hash; + typedef typename base_class::hash hash; + + // SplitListMap has no clear() method + template + class NogcSplitMapWrapper: public Base + { + typedef Base base_class; + public: + NogcSplitMapWrapper( size_t nMaxItemCount, size_t nLoadFactor ) + : base_class( nMaxItemCount, nLoadFactor ) + {} + + template + bool insert( K const& key ) + { + return base_class::insert( key ) != base_class::end(); + } + + template + bool insert( K const& key, V const& val ) + { + return base_class::insert( key, val ) != base_class::end(); + } + + template + bool insert_with( K const& key, Func func ) + { + return base_class::insert_with( key, func ) != base_class::end(); + } + + template + bool find( K const& key ) + { + return base_class::find( key ) != base_class::end(); + } + + void clear() + {} + }; + + + // *************************************************************************** + // SplitListMap based on MichaelList + struct traits_SplitList_Michael_dyn_cmp: public cc::split_list::make_traits< + cc::split_list::ordered_list + ,co::hash< hash > + ,cc::split_list::ordered_list_traits< + typename cc::michael_list::make_traits< + co::compare< compare > + >::type + > + >::type + {}; + typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_HP_dyn_cmp; + typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_DHP_dyn_cmp; + typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_cmp >> SplitList_Michael_NOGC_dyn_cmp; + typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_GPI_dyn_cmp; + typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_GPB_dyn_cmp; + typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_GPT_dyn_cmp; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_SHB_dyn_cmp; + typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_SHT_dyn_cmp; +#endif + + struct traits_SplitList_Michael_dyn_cmp_stat : public traits_SplitList_Michael_dyn_cmp + { + typedef cc::split_list::stat<> stat; + }; + typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_HP_dyn_cmp_stat; + typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_DHP_dyn_cmp_stat; + typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_cmp_stat >> SplitList_Michael_NOGC_dyn_cmp_stat; + typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_GPI_dyn_cmp_stat; + typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_GPB_dyn_cmp_stat; + typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_GPT_dyn_cmp_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_SHB_dyn_cmp_stat; + typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_SHT_dyn_cmp_stat; +#endif + + struct traits_SplitList_Michael_dyn_cmp_seqcst: public cc::split_list::make_traits< + cc::split_list::ordered_list + ,co::hash< hash > + ,co::memory_model< co::v::sequential_consistent > + ,cc::split_list::ordered_list_traits< + typename cc::michael_list::make_traits< + co::compare< compare > + ,co::memory_model< co::v::sequential_consistent > + >::type + > + >::type + {}; + typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_HP_dyn_cmp_seqcst; + typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_DHP_dyn_cmp_seqcst; + typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst >> SplitList_Michael_NOGC_dyn_cmp_seqcst; + typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_GPI_dyn_cmp_seqcst; + typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_GPB_dyn_cmp_seqcst; + typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_GPT_dyn_cmp_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_SHB_dyn_cmp_seqcst; + typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_SHT_dyn_cmp_seqcst; +#endif + + struct traits_SplitList_Michael_st_cmp: public cc::split_list::make_traits< + cc::split_list::ordered_list + ,cc::split_list::dynamic_bucket_table< false > + ,co::hash< hash > + ,cc::split_list::ordered_list_traits< + typename cc::michael_list::make_traits< + co::compare< compare > + >::type + > + >::type + {}; + typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_HP_st_cmp; + typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_DHP_st_cmp; + typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_cmp >> SplitList_Michael_NOGC_st_cmp; + typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_GPI_st_cmp; + typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_GPB_st_cmp; + typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_GPT_st_cmp; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_SHB_st_cmp; + typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_SHT_st_cmp; +#endif + + struct traits_SplitList_Michael_st_cmp_seqcst: public cc::split_list::make_traits< + cc::split_list::ordered_list + ,co::hash< hash > + ,cc::split_list::dynamic_bucket_table< false > + ,co::memory_model< co::v::sequential_consistent > + ,cc::split_list::ordered_list_traits< + typename cc::michael_list::make_traits< + co::compare< compare > + ,co::memory_model< co::v::sequential_consistent > + >::type + > + >::type + {}; + typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_HP_st_cmp_seqcst; + typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_DHP_st_cmp_seqcst; + typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_cmp_seqcst >> SplitList_Michael_NOGC_st_cmp_seqcst; + typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_RCU_GPI_st_cmp_seqcst; + typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_RCU_GPB_st_cmp_seqcst; + typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_RCU_GPT_st_cmp_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_RCU_SHB_st_cmp_seqcst; + typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_RCU_SHT_st_cmp_seqcst; +#endif + + //HP + less + struct traits_SplitList_Michael_dyn_less: public cc::split_list::make_traits< + cc::split_list::ordered_list + ,co::hash< hash > + ,cc::split_list::ordered_list_traits< + typename cc::michael_list::make_traits< + co::less< less > + >::type + > + >::type + {}; + typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_HP_dyn_less; + typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_DHP_dyn_less; + typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_less >> SplitList_Michael_NOGC_dyn_less; + typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_GPI_dyn_less; + typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_GPB_dyn_less; + typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_GPT_dyn_less; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_SHB_dyn_less; + typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_SHT_dyn_less; +#endif + + + struct traits_SplitList_Michael_dyn_less_seqcst: public cc::split_list::make_traits< + cc::split_list::ordered_list + ,co::hash< hash > + ,co::memory_model< co::v::sequential_consistent > + ,cc::split_list::ordered_list_traits< + typename cc::michael_list::make_traits< + co::less< less > + ,co::memory_model< co::v::sequential_consistent > + >::type + > + >::type + {}; + typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_HP_dyn_less_seqcst; + typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_DHP_dyn_less_seqcst; + typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_less_seqcst >> SplitList_Michael_NOGC_dyn_less_seqcst; + typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_GPI_dyn_less_seqcst; + typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_GPB_dyn_less_seqcst; + typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_GPT_dyn_less_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_SHB_dyn_less_seqcst; + typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_SHT_dyn_less_seqcst; +#endif + + struct traits_SplitList_Michael_st_less: public cc::split_list::make_traits< + cc::split_list::ordered_list + ,cc::split_list::dynamic_bucket_table< false > + ,co::hash< hash > + ,cc::split_list::ordered_list_traits< + typename cc::michael_list::make_traits< + co::less< less > + >::type + > + >::type + {}; + typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_HP_st_less; + typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_DHP_st_less; + typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_less >> SplitList_Michael_NOGC_st_less; + typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_GPI_st_less; + typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_GPB_st_less; + typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_GPT_st_less; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_SHB_st_less; + typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_SHT_st_less; +#endif + + struct traits_SplitList_Michael_st_less_stat : traits_SplitList_Michael_st_less + { + typedef cc::split_list::stat<> stat; + }; + typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_HP_st_less_stat; + typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_DHP_st_less_stat; + typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_less_stat >> SplitList_Michael_NOGC_st_less_stat; + typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_GPI_st_less_stat; + typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_GPB_st_less_stat; + typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_GPT_st_less_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_SHB_st_less_stat; + typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_SHT_st_less_stat; +#endif + + + class traits_SplitList_Michael_st_less_seqcst: public cc::split_list::make_traits< + cc::split_list::ordered_list + ,co::hash< hash > + ,cc::split_list::dynamic_bucket_table< false > + ,co::memory_model< co::v::sequential_consistent > + ,cc::split_list::ordered_list_traits< + typename cc::michael_list::make_traits< + co::less< less > + ,co::memory_model< co::v::sequential_consistent > + >::type + > + >::type + {}; + typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_HP_st_less_seqcst; + typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_DHP_st_less_seqcst; + typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_less_seqcst >> SplitList_Michael_NOGC_st_less_seqcst; + typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_GPI_st_less_seqcst; + typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_GPB_st_less_seqcst; + typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_GPT_st_less_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_SHB_st_less_seqcst; + typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_SHT_st_less_seqcst; +#endif + + + // *************************************************************************** + // SplitListMap based on LazyKVList + + struct SplitList_Lazy_dyn_cmp : + public cc::split_list::make_traits< + cc::split_list::ordered_list + ,co::hash< hash > + ,cc::split_list::ordered_list_traits< + typename cc::lazy_list::make_traits< + co::compare< compare > + >::type + > + >::type + {}; + typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_HP_dyn_cmp; + typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_DHP_dyn_cmp; + typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_cmp >> SplitList_Lazy_NOGC_dyn_cmp; + typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_GPI_dyn_cmp; + typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_GPB_dyn_cmp; + typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_GPT_dyn_cmp; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_SHB_dyn_cmp; + typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_SHT_dyn_cmp; +#endif + + struct SplitList_Lazy_dyn_cmp_stat : public SplitList_Lazy_dyn_cmp + { + typedef cc::split_list::stat<> stat; + }; + typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_HP_dyn_cmp_stat; + typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_DHP_dyn_cmp_stat; + typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_cmp_stat >> SplitList_Lazy_NOGC_dyn_cmp_stat; + typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_GPI_dyn_cmp_stat; + typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_GPB_dyn_cmp_stat; + typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_GPT_dyn_cmp_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_SHB_dyn_cmp_stat; + typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_SHT_dyn_cmp_stat; +#endif + + struct SplitList_Lazy_dyn_cmp_seqcst : + public cc::split_list::make_traits< + cc::split_list::ordered_list + ,co::hash< hash > + ,co::memory_model< co::v::sequential_consistent > + ,cc::split_list::ordered_list_traits< + typename cc::lazy_list::make_traits< + co::compare< compare > + ,co::memory_model< co::v::sequential_consistent > + >::type + > + >::type + {}; + typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_HP_dyn_cmp_seqcst; + typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_DHP_dyn_cmp_seqcst; + typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_cmp_seqcst >> SplitList_Lazy_NOGC_dyn_cmp_seqcst; + typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_GPI_dyn_cmp_seqcst; + typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_GPB_dyn_cmp_seqcst; + typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_GPT_dyn_cmp_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_SHB_dyn_cmp_seqcst; + typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_SHT_dyn_cmp_seqcst; +#endif + + struct SplitList_Lazy_st_cmp : + public cc::split_list::make_traits< + cc::split_list::ordered_list + ,cc::split_list::dynamic_bucket_table< false > + ,co::hash< hash > + ,cc::split_list::ordered_list_traits< + typename cc::lazy_list::make_traits< + co::compare< compare > + >::type + > + >::type + {}; + typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_HP_st_cmp; + typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_DHP_st_cmp; + typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_cmp >> SplitList_Lazy_NOGC_st_cmp; + typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_GPI_st_cmp; + typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_GPB_st_cmp; + typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_GPT_st_cmp; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_SHB_st_cmp; + typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_SHT_st_cmp; +#endif + + + struct SplitList_Lazy_st_cmp_seqcst : + public cc::split_list::make_traits< + cc::split_list::ordered_list + ,co::hash< hash > + ,cc::split_list::dynamic_bucket_table< false > + ,co::memory_model< co::v::sequential_consistent > + ,cc::split_list::ordered_list_traits< + typename cc::lazy_list::make_traits< + co::compare< compare > + ,co::memory_model< co::v::sequential_consistent > + >::type + > + >::type + {}; + typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_HP_st_cmp_seqcst; + typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_DHP_st_cmp_seqcst; + typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_cmp_seqcst >> SplitList_Lazy_NOGC_st_cmp_seqcst; + typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_RCU_GPI_st_cmp_seqcst; + typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_RCU_GPB_st_cmp_seqcst; + typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_RCU_GPT_st_cmp_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_RCU_SHB_st_cmp_seqcst; + typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_RCU_SHT_st_cmp_seqcst; +#endif + + + struct SplitList_Lazy_dyn_less : + public cc::split_list::make_traits< + cc::split_list::ordered_list + ,co::hash< hash > + ,cc::split_list::ordered_list_traits< + typename cc::lazy_list::make_traits< + co::less< less > + >::type + > + >::type + {}; + typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_HP_dyn_less; + typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_DHP_dyn_less; + typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_less >> SplitList_Lazy_NOGC_dyn_less; + typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_GPI_dyn_less; + typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_GPB_dyn_less; + typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_GPT_dyn_less; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_SHB_dyn_less; + typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_SHT_dyn_less; +#endif + + struct SplitList_Lazy_dyn_less_seqcst: + public cc::split_list::make_traits< + cc::split_list::ordered_list + ,co::hash< hash > + ,co::memory_model< co::v::sequential_consistent > + ,cc::split_list::ordered_list_traits< + typename cc::lazy_list::make_traits< + co::less< less > + ,co::memory_model< co::v::sequential_consistent > + >::type + > + >::type + {}; + typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_HP_dyn_less_seqcst; + typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_DHP_dyn_less_seqcst; + typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_less_seqcst >> SplitList_Lazy_NOGC_dyn_less_seqcst; + typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_GPI_dyn_less_seqcst; + typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_GPB_dyn_less_seqcst; + typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_GPT_dyn_less_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_SHB_dyn_less_seqcst; + typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_SHT_dyn_less_seqcst; +#endif + + struct SplitList_Lazy_st_less : + public cc::split_list::make_traits< + cc::split_list::ordered_list + ,cc::split_list::dynamic_bucket_table< false > + ,co::hash< hash > + ,cc::split_list::ordered_list_traits< + typename cc::lazy_list::make_traits< + co::less< less > + >::type + > + >::type + {}; + typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_HP_st_less; + typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_DHP_st_less; + typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_less >> SplitList_Lazy_NOGC_st_less; + typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_GPI_st_less; + typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_GPB_st_less; + typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_GPT_st_less; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_SHB_st_less; + typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_SHT_st_less; +#endif + + struct SplitList_Lazy_st_less_stat : public SplitList_Lazy_st_less + { + typedef cc::split_list::stat<> stat; + }; + typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_HP_st_less_stat; + typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_DHP_st_less_stat; + typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_less_stat >> SplitList_Lazy_NOGC_st_less_stat; + typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_GPI_st_less_stat; + typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_GPB_st_less_stat; + typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_GPT_st_less_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_SHB_st_less_stat; + typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_SHT_st_less_stat; +#endif + + struct SplitList_Lazy_st_less_seqcst : + public cc::split_list::make_traits< + cc::split_list::ordered_list + ,co::hash< hash > + ,cc::split_list::dynamic_bucket_table< false > + ,co::memory_model< co::v::sequential_consistent > + ,cc::split_list::ordered_list_traits< + typename cc::lazy_list::make_traits< + co::less< less > + ,co::memory_model< co::v::sequential_consistent > + >::type + > + >::type + {}; + typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_HP_st_less_seqcst; + typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_DHP_st_less_seqcst; + typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_less_seqcst >> SplitList_Lazy_NOGC_st_less_seqcst; + typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_GPI_st_less_seqcst; + typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_GPB_st_less_seqcst; + typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_GPT_st_less_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_SHB_st_less_seqcst; + typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_SHT_st_less_seqcst; +#endif + }; + + template + static inline void print_stat( cc::SplitListMap< GC, K, T, Traits > const& m ) + { + CPPUNIT_MSG( m.statistics() ); + } + +} // namespace map2 + +#endif // ifndef CDSUNIT_MAP_TYPE_SPLIT_LIST_H diff --git a/tests/unit/map2/map_type_std.h b/tests/unit/map2/map_type_std.h new file mode 100644 index 00000000..3022896d --- /dev/null +++ b/tests/unit/map2/map_type_std.h @@ -0,0 +1,32 @@ +//$$CDS-header$$ + +#ifndef CDSUNIT_MAP_TYPE_STD_H +#define CDSUNIT_MAP_TYPE_STD_H + +#include "map2/map_type.h" + +#include "map2/std_map.h" +#include "map2/std_hash_map.h" + +#include "lock/nolock.h" + +namespace map2 { + + struct std_implementation_tag; + + template + struct map_type< std_implementation_tag, Key, Value >: public map_type_base< Key, Value > + { + typedef map_type_base< Key, Value > base_class; + typedef typename base_class::compare compare; + typedef typename base_class::less less; + + typedef StdMap< Key, Value, cds::sync::spin > StdMap_Spin; + typedef StdMap< Key, Value, lock::NoLock> StdMap_NoLock; + + typedef StdHashMap< Key, Value, cds::sync::spin > StdHashMap_Spin; + typedef StdHashMap< Key, Value, lock::NoLock > StdHashMap_NoLock; + }; +} // namespace map2 + +#endif // ifndef CDSUNIT_MAP_TYPE_STD_H diff --git a/tests/unit/map2/map_type_striped.h b/tests/unit/map2/map_type_striped.h new file mode 100644 index 00000000..a1e5a1e8 --- /dev/null +++ b/tests/unit/map2/map_type_striped.h @@ -0,0 +1,234 @@ +//$$CDS-header$$ + +#ifndef CDSUNIT_MAP_TYPE_MICHAEL_H +#define CDSUNIT_MAP_TYPE_MICHAEL_H + +#include "map2/map_type.h" +#include +#include +#include + +#include +#if BOOST_VERSION >= 104800 +# include +# include +# include +# include +#endif +#include +#include + +namespace map2 { + + template + struct map_type< cc::striped_set::implementation_tag, Key, Value >: public map_type_base< Key, Value > + { + typedef map_type_base< Key, Value > base_class; + typedef typename base_class::compare compare; + typedef typename base_class::less less; + typedef typename base_class::equal_to equal_to; + typedef typename base_class::key_hash key_hash; + typedef typename base_class::hash hash; + typedef typename base_class::hash2 hash2; + + // for sequential containers + template + class StripedHashMap_seq: + public cc::StripedMap< BucketEntry, + co::mutex_policy< cc::striped_set::striping<> > + ,co::resizing_policy > + , Options... + > + { + typedef cc::StripedMap< BucketEntry, + co::mutex_policy< cc::striped_set::striping<> > + ,co::resizing_policy > + , Options... + > base_class; + typedef typename base_class::resizing_policy resizing_policy_t; + + resizing_policy_t m_placeHolder; + public: + StripedHashMap_seq( size_t nCapacity, size_t nLoadFactor ) + : base_class( nCapacity / nLoadFactor / 16, *(new(&m_placeHolder) resizing_policy_t( nLoadFactor )) ) + {} + }; + + // for non-sequential ordered containers + template + class StripedHashMap_ord: + public cc::StripedMap< BucketEntry, + co::resizing_policy > + ,co::mutex_policy< cc::striped_set::striping<> > + , Options... + > + { + typedef cc::StripedMap< BucketEntry, + co::resizing_policy > + ,co::mutex_policy< cc::striped_set::striping<> > + , Options... + > base_class; + typedef typename base_class::resizing_policy resizing_policy_t; + + resizing_policy_t m_placeHolder; + public: + StripedHashMap_ord( size_t /*nCapacity*/, size_t nLoadFactor ) + : base_class( 0, *(new(&m_placeHolder) resizing_policy_t( nLoadFactor * 1024 )) ) + {} + }; + + + typedef StripedHashMap_seq< + std::list< std::pair< Key const, Value > > + , co::hash< hash2 > + , co::less< less > + > StripedMap_list; + +# if (CDS_COMPILER == CDS_COMPILER_MSVC || (CDS_COMPILER == CDS_COMPILER_INTEL && CDS_OS_INTERFACE == CDS_OSI_WINDOWS)) && _MSC_VER < 1600 + typedef StripedHashMap_ord< + stdext::hash_map< Key, Value, stdext::hash_compare > + , co::hash< hash2 > + > StripedMap_hashmap; +# else + typedef StripedHashMap_ord< + std::unordered_map< Key, Value, hash, equal_to > + , co::hash< hash2 > + > StripedMap_hashmap; +# endif + + typedef StripedHashMap_ord< + std::map< Key, Value, less > + , co::hash< hash2 > + > StripedMap_map; + + typedef StripedHashMap_ord< + boost::unordered_map< Key, Value, hash, equal_to > + , co::hash< hash2 > + > StripedMap_boost_unordered_map; + +# if BOOST_VERSION >= 104800 + typedef StripedHashMap_seq< + boost::container::slist< std::pair< Key const, Value > > + , co::hash< hash2 > + , co::less< less > + > StripedMap_slist; + + typedef StripedHashMap_seq< + boost::container::list< std::pair< Key const, Value > > + , co::hash< hash2 > + , co::less< less > + > StripedMap_boost_list; + + typedef StripedHashMap_ord< + boost::container::map< Key, Value, less > + , co::hash< hash2 > + > StripedMap_boost_map; + + typedef StripedHashMap_ord< + boost::container::flat_map< Key, Value, less > + , co::hash< hash2 > + > StripedMap_boost_flat_map; +# endif // BOOST_VERSION >= 104800 + + + // *************************************************************************** + // RefinableHashMap + + // for sequential containers + template + class RefinableHashMap_seq: + public cc::StripedMap< BucketEntry, + co::resizing_policy > + ,co::mutex_policy< cc::striped_set::refinable<> > + , Options... + > + { + typedef cc::StripedMap< BucketEntry, + co::resizing_policy > + ,co::mutex_policy< cc::striped_set::refinable<> > + , Options... + > base_class; + typedef typename base_class::resizing_policy resizing_policy_t; + + resizing_policy_t m_placeHolder; + public: + RefinableHashMap_seq( size_t nCapacity, size_t nLoadFactor ) + : base_class( nCapacity / nLoadFactor / 16, *(new(&m_placeHolder) resizing_policy_t( nLoadFactor )) ) + {} + }; + + // for non-sequential ordered containers + template + class RefinableHashMap_ord: + public cc::StripedMap< BucketEntry, + co::resizing_policy > + ,co::mutex_policy< cc::striped_set::refinable<> > + , Options... + > + { + typedef cc::StripedMap< BucketEntry, + co::resizing_policy > + ,co::mutex_policy< cc::striped_set::refinable<> > + , Options... + > base_class; + typedef typename base_class::resizing_policy resizing_policy_t; + + resizing_policy_t m_placeHolder; + public: + RefinableHashMap_ord( size_t /*nCapacity*/, size_t nLoadFactor ) + : base_class( 0, *(new(&m_placeHolder) resizing_policy_t( nLoadFactor * 1024 )) ) + {} + }; + + + typedef RefinableHashMap_seq< + std::list< std::pair< Key const, Value > > + , co::hash< hash2 > + , co::less< less > + > RefinableMap_list; + +# if BOOST_VERSION >= 104800 + typedef RefinableHashMap_seq< + boost::container::slist< std::pair< Key const, Value > > + , co::hash< hash2 > + , co::less< less > + > RefinableMap_slist; +# endif + + typedef RefinableHashMap_ord< + std::map< Key, Value, less > + , co::hash< hash2 > + > RefinableMap_map; + + typedef RefinableHashMap_ord< + std::unordered_map< Key, Value, hash, equal_to > + , co::hash< hash2 > + > RefinableMap_hashmap; + + typedef RefinableHashMap_ord< + boost::unordered_map< Key, Value, hash, equal_to > + , co::hash< hash2 > + > RefinableMap_boost_unordered_map; + +# if BOOST_VERSION >= 104800 + typedef RefinableHashMap_seq< + boost::container::list< std::pair< Key const, Value > > + , co::hash< hash2 > + , co::less< less > + > RefinableMap_boost_list; + + typedef RefinableHashMap_ord< + boost::container::map< Key, Value, less > + , co::hash< hash2 > + > RefinableMap_boost_map; + + typedef RefinableHashMap_ord< + boost::container::flat_map< Key, Value, less > + , co::hash< hash2 > + > RefinableMap_boost_flat_map; +# endif // #if BOOST_VERSION >= 104800 + + }; +} // namespace map2 + +#endif // ifndef CDSUNIT_MAP_TYPE_MICHAEL_H diff --git a/tests/unit/map2/map_types.h b/tests/unit/map2/map_types.h deleted file mode 100644 index 085bcadd..00000000 --- a/tests/unit/map2/map_types.h +++ /dev/null @@ -1,1966 +0,0 @@ -//$$CDS-header$$ - -#ifndef CDSUNIT_MAP_TYPES_H -#define CDSUNIT_MAP_TYPES_H - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include -#if BOOST_VERSION >= 104800 -# include -# include -# include -# include -#endif -#include -#include - -#include - -#include "cppunit/cppunit_mini.h" -#include "lock/nolock.h" -#include "map2/std_map.h" -#include "map2/std_hash_map.h" -#include "michael_alloc.h" -#include "print_cuckoo_stat.h" -#include "print_split_list_stat.h" -#include "print_skip_list_stat.h" -#include "print_ellenbintree_stat.h" -#include "print_bronsonavltree_stat.h" -#include "print_sync_monitor_stat.h" -#include "ellen_bintree_update_desc_pool.h" - -namespace map2 { - namespace cc = cds::container; - namespace co = cds::opt; - - typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_gpi; - typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_gpb; - typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_gpt; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_shb; - typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_sht; -#endif - - template - struct cmp { - int operator ()(Key const& k1, Key const& k2) const - { - if ( std::less( k1, k2 ) ) - return -1; - return std::less( k2, k1 ) ? 1 : 0; - } - }; - -#define CDSUNIT_INT_COMPARE(t) template <> struct cmp { int operator()( t k1, t k2 ){ return (int)(k1 - k2); } } - CDSUNIT_INT_COMPARE(char); - CDSUNIT_INT_COMPARE(unsigned char); - CDSUNIT_INT_COMPARE(int); - CDSUNIT_INT_COMPARE(unsigned int); - CDSUNIT_INT_COMPARE(long); - CDSUNIT_INT_COMPARE(unsigned long); - CDSUNIT_INT_COMPARE(long long); - CDSUNIT_INT_COMPARE(unsigned long long); -#undef CDSUNIT_INT_COMPARE - - template <> - struct cmp - { - int operator()(std::string const& s1, std::string const& s2) - { - return s1.compare( s2 ); - } - int operator()(std::string const& s1, char const * s2) - { - return s1.compare( s2 ); - } - int operator()(char const * s1, std::string const& s2) - { - return -s2.compare( s1 ); - } - }; - - template - class CuckooMap : - public cc::CuckooMap< K, V, Traits > - { - public: - typedef cc::CuckooMap< K, V, Traits > cuckoo_base_class; - - public: - CuckooMap( size_t nCapacity, size_t nLoadFactor ) - : cuckoo_base_class( nCapacity / (nLoadFactor * 16), (unsigned int) 4 ) - {} - - template - bool erase_with( Q const& key, Pred /*pred*/ ) - { - return cuckoo_base_class::erase_with( key, typename std::conditional< cuckoo_base_class::c_isSorted, Pred, typename Pred::equal_to>::type() ); - } - }; - - template - struct MapTypes { - typedef co::v::hash key_hash; - typedef std::less less; - typedef cmp compare; - - struct equal_to { - bool operator()( Key const& k1, Key const& k2 ) const - { - return compare()( k1, k2 ) == 0; - } - }; - - struct hash: public key_hash - { - size_t operator()( Key const& k ) const - { - return key_hash::operator()( k ); - } - template - size_t operator()( Q const& k ) const - { - return key_hash::operator()( k ); - } - }; - - struct hash2: public key_hash - { - size_t operator()( Key const& k ) const - { - size_t seed = ~key_hash::operator ()( k ); - boost::hash_combine( seed, k ); - return seed; - } - template - size_t operator()( Q const& k ) const - { - size_t seed = ~key_hash::operator()( k ); - boost::hash_combine( seed, k ); - return seed; - } - }; - - // *************************************************************************** - // MichaelKVList - - struct traits_MichaelList_cmp_stdAlloc : - public cc::michael_list::make_traits< - co::compare< compare > - >::type - {}; - typedef cc::MichaelKVList< cds::gc::HP, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_HP_cmp_stdAlloc; - typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_DHP_cmp_stdAlloc; - typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_NOGC_cmp_stdAlloc; - typedef cc::MichaelKVList< rcu_gpi, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_GPI_cmp_stdAlloc; - typedef cc::MichaelKVList< rcu_gpb, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_GPB_cmp_stdAlloc; - typedef cc::MichaelKVList< rcu_gpt, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_GPT_cmp_stdAlloc; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelKVList< rcu_shb, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_SHB_cmp_stdAlloc; - typedef cc::MichaelKVList< rcu_sht, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_SHT_cmp_stdAlloc; -#endif - - struct traits_MichaelList_cmp_stdAlloc_seqcst : - public cc::michael_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - {}; - typedef cc::MichaelKVList< cds::gc::HP, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_HP_cmp_stdAlloc_seqcst; - typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_DHP_cmp_stdAlloc_seqcst; - typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_NOGC_cmp_stdAlloc_seqcst; - typedef cc::MichaelKVList< rcu_gpi, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_GPI_cmp_stdAlloc_seqcst; - typedef cc::MichaelKVList< rcu_gpb, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_GPB_cmp_stdAlloc_seqcst; - typedef cc::MichaelKVList< rcu_gpt, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_GPT_cmp_stdAlloc_seqcst; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelKVList< rcu_shb, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_SHB_cmp_stdAlloc_seqcst; - typedef cc::MichaelKVList< rcu_sht, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_SHT_cmp_stdAlloc_seqcst; -#endif - - struct traits_MichaelList_cmp_michaelAlloc : - public cc::michael_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - {}; - typedef cc::MichaelKVList< cds::gc::HP, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_HP_cmp_michaelAlloc; - typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_DHP_cmp_michaelAlloc; - typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_NOGC_cmp_michaelAlloc; - typedef cc::MichaelKVList< rcu_gpi, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_GPI_cmp_michaelAlloc; - typedef cc::MichaelKVList< rcu_gpb, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_GPB_cmp_michaelAlloc; - typedef cc::MichaelKVList< rcu_gpt, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_GPT_cmp_michaelAlloc; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelKVList< rcu_shb, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_SHB_cmp_michaelAlloc; - typedef cc::MichaelKVList< rcu_sht, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_SHT_cmp_michaelAlloc; -#endif - - struct traits_MichaelList_less_stdAlloc : - public cc::michael_list::make_traits< - co::less< less > - >::type - {}; - typedef cc::MichaelKVList< cds::gc::HP, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_HP_less_stdAlloc; - typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_DHP_less_stdAlloc; - typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_NOGC_less_stdAlloc; - typedef cc::MichaelKVList< rcu_gpi, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_RCU_GPI_less_stdAlloc; - typedef cc::MichaelKVList< rcu_gpb, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_RCU_GPB_less_stdAlloc; - typedef cc::MichaelKVList< rcu_gpt, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_RCU_GPT_less_stdAlloc; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelKVList< rcu_shb, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_RCU_SHB_less_stdAlloc; - typedef cc::MichaelKVList< rcu_sht, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_RCU_SHT_less_stdAlloc; -#endif - - struct traits_MichaelList_less_stdAlloc_seqcst : - public cc::michael_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - {}; - typedef cc::MichaelKVList< cds::gc::HP, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_HP_less_stdAlloc_seqcst; - typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_DHP_less_stdAlloc_seqcst; - typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_NOGC_less_stdAlloc_seqcst; - typedef cc::MichaelKVList< rcu_gpi, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_GPI_less_stdAlloc_seqcst; - typedef cc::MichaelKVList< rcu_gpb, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_GPB_less_stdAlloc_seqcst; - typedef cc::MichaelKVList< rcu_gpt, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_GPT_less_stdAlloc_seqcst; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelKVList< rcu_shb, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_SHB_less_stdAlloc_seqcst; - typedef cc::MichaelKVList< rcu_sht, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_SHT_less_stdAlloc_seqcst; -#endif - - struct traits_MichaelList_less_michaelAlloc : - public cc::michael_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - {}; - typedef cc::MichaelKVList< cds::gc::HP, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_HP_less_michaelAlloc; - typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_DHP_less_michaelAlloc; - typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_NOGC_less_michaelAlloc; - typedef cc::MichaelKVList< rcu_gpi, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_GPI_less_michaelAlloc; - typedef cc::MichaelKVList< rcu_gpb, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_GPB_less_michaelAlloc; - typedef cc::MichaelKVList< rcu_gpt, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_GPT_less_michaelAlloc; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelKVList< rcu_shb, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_SHB_less_michaelAlloc; - typedef cc::MichaelKVList< rcu_sht, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_SHT_less_michaelAlloc; -#endif - - template - class NogcMapWrapper: public Base - { - typedef Base base_class; - public: - NogcMapWrapper( size_t nMaxItemCount, size_t nLoadFactor ) - : base_class( nMaxItemCount, nLoadFactor ) - {} - - template - bool insert( K const& key ) - { - return base_class::insert( key ) != base_class::end(); - } - - template - bool insert( K const& key, V const& val ) - { - return base_class::insert( key, val ) != base_class::end(); - } - - template - bool insert_with( K const& key, Func func ) - { - return base_class::insert_with( key, func ) != base_class::end(); - } - - template - bool find( K const& key ) - { - return base_class::find( key ) != base_class::end(); - } - - void clear() - { - base_class::clear(); - } - }; - - template - class NogcMapWrapper_dctor: public Base - { - typedef Base base_class; - public: - NogcMapWrapper_dctor() - {} - - template - bool insert( K const& key ) - { - return base_class::insert( key ) != base_class::end(); - } - - template - bool insert( K const& key, V const& val ) - { - return base_class::insert( key, val ) != base_class::end(); - } - - template - bool insert_with( K const& key, Func func ) - { - return base_class::insert_with( key, func ) != base_class::end(); - } - - template - bool find( K const& key ) - { - return base_class::find( key ) != base_class::end(); - } - }; - - // SplitListMap has no clear() method - template - class NogcSplitMapWrapper: public Base - { - typedef Base base_class; - public: - NogcSplitMapWrapper( size_t nMaxItemCount, size_t nLoadFactor ) - : base_class( nMaxItemCount, nLoadFactor ) - {} - - template - bool insert( K const& key ) - { - return base_class::insert( key ) != base_class::end(); - } - - template - bool insert( K const& key, V const& val ) - { - return base_class::insert( key, val ) != base_class::end(); - } - - template - bool insert_with( K const& key, Func func ) - { - return base_class::insert_with( key, func ) != base_class::end(); - } - - template - bool find( K const& key ) - { - return base_class::find( key ) != base_class::end(); - } - - void clear() - {} - }; - - - // *************************************************************************** - // MichaelHashMap based on MichaelKVList - - struct traits_MichaelMap_hash : - public cc::michael_map::make_traits< - co::hash< hash > - >::type - {}; - typedef cc::MichaelHashMap< cds::gc::HP, MichaelList_HP_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_HP_cmp_stdAlloc; - typedef cc::MichaelHashMap< cds::gc::DHP, MichaelList_DHP_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_DHP_cmp_stdAlloc; - typedef cc::MichaelHashMap< cds::gc::nogc, MichaelList_NOGC_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_NOGC_cmp_stdAlloc; - typedef cc::MichaelHashMap< rcu_gpi, MichaelList_RCU_GPI_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_GPI_cmp_stdAlloc; - typedef cc::MichaelHashMap< rcu_gpb, MichaelList_RCU_GPB_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_GPB_cmp_stdAlloc; - typedef cc::MichaelHashMap< rcu_gpt, MichaelList_RCU_GPT_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_GPT_cmp_stdAlloc; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelHashMap< rcu_shb, MichaelList_RCU_SHB_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_SHB_cmp_stdAlloc; - typedef cc::MichaelHashMap< rcu_sht, MichaelList_RCU_SHT_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_SHT_cmp_stdAlloc; -#endif - - typedef cc::MichaelHashMap< cds::gc::HP, MichaelList_HP_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_HP_less_stdAlloc; - typedef cc::MichaelHashMap< cds::gc::DHP, MichaelList_DHP_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_DHP_less_stdAlloc; - typedef cc::MichaelHashMap< cds::gc::nogc, MichaelList_NOGC_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_NOGC_less_stdAlloc; - typedef cc::MichaelHashMap< rcu_gpi, MichaelList_RCU_GPI_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_GPI_less_stdAlloc; - typedef cc::MichaelHashMap< rcu_gpb, MichaelList_RCU_GPB_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_GPB_less_stdAlloc; - typedef cc::MichaelHashMap< rcu_gpt, MichaelList_RCU_GPT_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_GPT_less_stdAlloc; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelHashMap< rcu_shb, MichaelList_RCU_SHB_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_SHB_less_stdAlloc; - typedef cc::MichaelHashMap< rcu_sht, MichaelList_RCU_SHT_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_SHT_less_stdAlloc; -#endif - - typedef cc::MichaelHashMap< cds::gc::HP, MichaelList_HP_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_HP_cmp_stdAlloc_seqcst; - typedef cc::MichaelHashMap< cds::gc::DHP, MichaelList_DHP_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_DHP_cmp_stdAlloc_seqcst; - typedef cc::MichaelHashMap< cds::gc::nogc, MichaelList_NOGC_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_NOGC_cmp_stdAlloc_seqcst; - typedef cc::MichaelHashMap< rcu_gpi, MichaelList_RCU_GPI_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPI_cmp_stdAlloc_seqcst; - typedef cc::MichaelHashMap< rcu_gpb, MichaelList_RCU_GPB_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPB_cmp_stdAlloc_seqcst; - typedef cc::MichaelHashMap< rcu_gpt, MichaelList_RCU_GPT_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPT_cmp_stdAlloc_seqcst; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelHashMap< rcu_shb, MichaelList_RCU_SHB_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_SHB_cmp_stdAlloc_seqcst; - typedef cc::MichaelHashMap< rcu_sht, MichaelList_RCU_SHT_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_SHT_cmp_stdAlloc_seqcst; -#endif - - typedef cc::MichaelHashMap< cds::gc::HP, MichaelList_HP_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_HP_less_stdAlloc_seqcst; - typedef cc::MichaelHashMap< cds::gc::DHP, MichaelList_DHP_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_DHP_less_stdAlloc_seqcst; - typedef cc::MichaelHashMap< cds::gc::nogc, MichaelList_NOGC_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_NOGC_less_stdAlloc_seqcst; - typedef cc::MichaelHashMap< rcu_gpi, MichaelList_RCU_GPI_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPI_less_stdAlloc_seqcst; - typedef cc::MichaelHashMap< rcu_gpb, MichaelList_RCU_GPB_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPB_less_stdAlloc_seqcst; - typedef cc::MichaelHashMap< rcu_gpt, MichaelList_RCU_GPT_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPT_less_stdAlloc_seqcst; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelHashMap< rcu_shb, MichaelList_RCU_SHB_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_SHB_less_stdAlloc_seqcst; - typedef cc::MichaelHashMap< rcu_sht, MichaelList_RCU_SHT_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_SHT_less_stdAlloc_seqcst; -#endif - - struct traits_MichaelSet_michaelAlloc : - public traits_MichaelMap_hash - { - typedef memory::MichaelAllocator allocator; - }; - typedef cc::MichaelHashMap< cds::gc::HP, MichaelList_HP_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_HP_cmp_michaelAlloc; - typedef cc::MichaelHashMap< cds::gc::DHP, MichaelList_DHP_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_DHP_cmp_michaelAlloc; - typedef cc::MichaelHashMap< cds::gc::nogc, MichaelList_NOGC_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_NOGC_cmp_michaelAlloc; - typedef cc::MichaelHashMap< rcu_gpi, MichaelList_RCU_GPI_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_GPI_cmp_michaelAlloc; - typedef cc::MichaelHashMap< rcu_gpb, MichaelList_RCU_GPB_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_GPB_cmp_michaelAlloc; - typedef cc::MichaelHashMap< rcu_gpt, MichaelList_RCU_GPT_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_GPT_cmp_michaelAlloc; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelHashMap< rcu_shb, MichaelList_RCU_SHB_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_SHB_cmp_michaelAlloc; - typedef cc::MichaelHashMap< rcu_sht, MichaelList_RCU_SHT_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_SHT_cmp_michaelAlloc; -#endif - typedef cc::MichaelHashMap< cds::gc::HP, MichaelList_HP_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_HP_less_michaelAlloc; - typedef cc::MichaelHashMap< cds::gc::DHP, MichaelList_DHP_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_DHP_less_michaelAlloc; - typedef cc::MichaelHashMap< cds::gc::nogc, MichaelList_NOGC_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_NOGC_less_michaelAlloc; - typedef cc::MichaelHashMap< rcu_gpi, MichaelList_RCU_GPI_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_GPI_less_michaelAlloc; - typedef cc::MichaelHashMap< rcu_gpb, MichaelList_RCU_GPB_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_GPB_less_michaelAlloc; - typedef cc::MichaelHashMap< rcu_gpt, MichaelList_RCU_GPT_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_GPT_less_michaelAlloc; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelHashMap< rcu_shb, MichaelList_RCU_SHB_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_SHB_less_michaelAlloc; - typedef cc::MichaelHashMap< rcu_sht, MichaelList_RCU_SHT_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_SHT_less_michaelAlloc; -#endif - - // *************************************************************************** - // LazyKVList - - struct traits_LazyList_cmp_stdAlloc : - public cc::lazy_list::make_traits< - co::compare< compare > - >::type - {}; - typedef cc::LazyKVList< cds::gc::HP, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_HP_cmp_stdAlloc; - typedef cc::LazyKVList< cds::gc::DHP, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_DHP_cmp_stdAlloc; - typedef cc::LazyKVList< cds::gc::nogc, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_NOGC_cmp_stdAlloc; - typedef cc::LazyKVList< rcu_gpi, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_RCU_GPI_cmp_stdAlloc; - typedef cc::LazyKVList< rcu_gpb, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_RCU_GPB_cmp_stdAlloc; - typedef cc::LazyKVList< rcu_gpt, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_RCU_GPT_cmp_stdAlloc; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::LazyKVList< rcu_shb, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_RCU_SHB_cmp_stdAlloc; - typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_RCU_SHT_cmp_stdAlloc; -#endif - - struct traits_LazyList_unord_stdAlloc : - public cc::lazy_list::make_traits< - co::equal_to< equal_to > - ,co::sort< false > - >::type - {}; - typedef cc::LazyKVList< cds::gc::nogc, Key, Value, traits_LazyList_unord_stdAlloc > LazyList_NOGC_unord_stdAlloc; - - struct traits_LazyList_cmp_stdAlloc_seqcst : - public cc::lazy_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - {}; - typedef cc::LazyKVList< cds::gc::HP, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_HP_cmp_stdAlloc_seqcst; - typedef cc::LazyKVList< cds::gc::DHP, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_DHP_cmp_stdAlloc_seqcst; - typedef cc::LazyKVList< cds::gc::nogc, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_NOGC_cmp_stdAlloc_seqcst; - typedef cc::LazyKVList< rcu_gpi, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_GPI_cmp_stdAlloc_seqcst; - typedef cc::LazyKVList< rcu_gpb, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_GPB_cmp_stdAlloc_seqcst; - typedef cc::LazyKVList< rcu_gpt, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_GPT_cmp_stdAlloc_seqcst; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::LazyKVList< rcu_shb, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_SHB_cmp_stdAlloc_seqcst; - typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_SHT_cmp_stdAlloc_seqcst; -#endif - - struct traits_LazyList_cmp_michaelAlloc : - public cc::lazy_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - {}; - typedef cc::LazyKVList< cds::gc::HP, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_HP_cmp_michaelAlloc; - typedef cc::LazyKVList< cds::gc::DHP, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_DHP_cmp_michaelAlloc; - typedef cc::LazyKVList< cds::gc::nogc, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_NOGC_cmp_michaelAlloc; - typedef cc::LazyKVList< rcu_gpi, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_GPI_cmp_michaelAlloc; - typedef cc::LazyKVList< rcu_gpb, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_GPB_cmp_michaelAlloc; - typedef cc::LazyKVList< rcu_gpt, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_GPT_cmp_michaelAlloc; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::LazyKVList< rcu_shb, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_SHB_cmp_michaelAlloc; - typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_SHT_cmp_michaelAlloc; -#endif - struct traits_LazyList_less_stdAlloc : - public cc::lazy_list::make_traits< - co::less< less > - >::type - {}; - typedef cc::LazyKVList< cds::gc::HP, Key, Value, traits_LazyList_less_stdAlloc > LazyList_HP_less_stdAlloc; - typedef cc::LazyKVList< cds::gc::DHP, Key, Value, traits_LazyList_less_stdAlloc > LazyList_DHP_less_stdAlloc; - typedef cc::LazyKVList< cds::gc::nogc, Key, Value, traits_LazyList_less_stdAlloc > LazyList_NOGC_less_stdAlloc; - typedef cc::LazyKVList< rcu_gpi, Key, Value, traits_LazyList_less_stdAlloc > LazyList_RCU_GPI_less_stdAlloc; - typedef cc::LazyKVList< rcu_gpb, Key, Value, traits_LazyList_less_stdAlloc > LazyList_RCU_GPB_less_stdAlloc; - typedef cc::LazyKVList< rcu_gpt, Key, Value, traits_LazyList_less_stdAlloc > LazyList_RCU_GPT_less_stdAlloc; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::LazyKVList< rcu_shb, Key, Value, traits_LazyList_less_stdAlloc > LazyList_RCU_SHB_less_stdAlloc; - typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_less_stdAlloc > LazyList_RCU_SHT_less_stdAlloc; -#endif - - struct traits_LazyList_less_stdAlloc_seqcst : - public cc::lazy_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - {}; - typedef cc::LazyKVList< cds::gc::HP, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_HP_less_stdAlloc_seqcst; - typedef cc::LazyKVList< cds::gc::DHP, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_DHP_less_stdAlloc_seqcst; - typedef cc::LazyKVList< cds::gc::nogc, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_NOGC_less_stdAlloc_seqcst; - typedef cc::LazyKVList< rcu_gpi, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_GPI_less_stdAlloc_seqcst; - typedef cc::LazyKVList< rcu_gpb, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_GPB_less_stdAlloc_seqcst; - typedef cc::LazyKVList< rcu_gpt, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_GPT_less_stdAlloc_seqcst; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::LazyKVList< rcu_shb, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_SHB_less_stdAlloc_seqcst; - typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_SHT_less_stdAlloc_seqcst; -#endif - - struct traits_LazyList_less_michaelAlloc : - public cc::lazy_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - {}; - typedef cc::LazyKVList< cds::gc::HP, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_HP_less_michaelAlloc; - typedef cc::LazyKVList< cds::gc::DHP, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_DHP_less_michaelAlloc; - typedef cc::LazyKVList< cds::gc::nogc, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_NOGC_less_michaelAlloc; - typedef cc::LazyKVList< rcu_gpi, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_RCU_GPI_less_michaelAlloc; - typedef cc::LazyKVList< rcu_gpb, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_RCU_GPB_less_michaelAlloc; - typedef cc::LazyKVList< rcu_gpt, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_RCU_GPT_less_michaelAlloc; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::LazyKVList< rcu_shb, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_RCU_SHB_less_michaelAlloc; - typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_RCU_SHT_less_michaelAlloc; -#endif - - // *************************************************************************** - // MichaelHashMap based on LazyKVList - typedef cc::MichaelHashMap< cds::gc::HP, LazyList_HP_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_HP_cmp_stdAlloc; - typedef cc::MichaelHashMap< cds::gc::DHP, LazyList_DHP_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_DHP_cmp_stdAlloc; - typedef cc::MichaelHashMap< cds::gc::nogc, LazyList_NOGC_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_cmp_stdAlloc; - typedef cc::MichaelHashMap< rcu_gpi, LazyList_RCU_GPI_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPI_cmp_stdAlloc; - typedef cc::MichaelHashMap< rcu_gpb, LazyList_RCU_GPB_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPB_cmp_stdAlloc; - typedef cc::MichaelHashMap< rcu_gpt, LazyList_RCU_GPT_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPT_cmp_stdAlloc; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelHashMap< rcu_shb, LazyList_RCU_SHB_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHB_cmp_stdAlloc; - typedef cc::MichaelHashMap< rcu_sht, LazyList_RCU_SHT_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHT_cmp_stdAlloc; -#endif - - typedef cc::MichaelHashMap< cds::gc::nogc, LazyList_NOGC_unord_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_unord_stdAlloc; - - typedef cc::MichaelHashMap< cds::gc::HP, LazyList_HP_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_HP_less_stdAlloc; - typedef cc::MichaelHashMap< cds::gc::DHP, LazyList_DHP_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_DHP_less_stdAlloc; - typedef cc::MichaelHashMap< cds::gc::nogc, LazyList_NOGC_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_less_stdAlloc; - typedef cc::MichaelHashMap< rcu_gpi, LazyList_RCU_GPI_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPI_less_stdAlloc; - typedef cc::MichaelHashMap< rcu_gpb, LazyList_RCU_GPB_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPB_less_stdAlloc; - typedef cc::MichaelHashMap< rcu_gpt, LazyList_RCU_GPT_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPT_less_stdAlloc; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelHashMap< rcu_shb, LazyList_RCU_SHB_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHB_less_stdAlloc; - typedef cc::MichaelHashMap< rcu_sht, LazyList_RCU_SHT_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHT_less_stdAlloc; -#endif - - typedef cc::MichaelHashMap< cds::gc::HP, LazyList_HP_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_HP_cmp_stdAlloc_seqcst; - typedef cc::MichaelHashMap< cds::gc::DHP, LazyList_DHP_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_DHP_cmp_stdAlloc_seqcst; - typedef cc::MichaelHashMap< cds::gc::nogc, LazyList_NOGC_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_cmp_stdAlloc_seqcst; - typedef cc::MichaelHashMap< rcu_gpi, LazyList_RCU_GPI_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPI_cmp_stdAlloc_seqcst; - typedef cc::MichaelHashMap< rcu_gpb, LazyList_RCU_GPB_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPB_cmp_stdAlloc_seqcst; - typedef cc::MichaelHashMap< rcu_gpt, LazyList_RCU_GPT_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPT_cmp_stdAlloc_seqcst; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelHashMap< rcu_shb, LazyList_RCU_SHB_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHB_cmp_stdAlloc_seqcst; - typedef cc::MichaelHashMap< rcu_sht, LazyList_RCU_SHT_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHT_cmp_stdAlloc_seqcst; -#endif - - typedef cc::MichaelHashMap< cds::gc::HP, LazyList_HP_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_HP_less_stdAlloc_seqcst; - typedef cc::MichaelHashMap< cds::gc::DHP, LazyList_DHP_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_DHP_less_stdAlloc_seqcst; - typedef cc::MichaelHashMap< cds::gc::nogc, LazyList_NOGC_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_less_stdAlloc_seqcst; - typedef cc::MichaelHashMap< rcu_gpi, LazyList_RCU_GPI_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPI_less_stdAlloc_seqcst; - typedef cc::MichaelHashMap< rcu_gpb, LazyList_RCU_GPB_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPB_less_stdAlloc_seqcst; - typedef cc::MichaelHashMap< rcu_gpt, LazyList_RCU_GPT_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPT_less_stdAlloc_seqcst; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelHashMap< rcu_shb, LazyList_RCU_SHB_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHB_less_stdAlloc_seqcst; - typedef cc::MichaelHashMap< rcu_sht, LazyList_RCU_SHT_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHT_less_stdAlloc_seqcst; -#endif - - typedef cc::MichaelHashMap< cds::gc::HP, LazyList_HP_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_HP_cmp_michaelAlloc; - typedef cc::MichaelHashMap< cds::gc::DHP, LazyList_DHP_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_DHP_cmp_michaelAlloc; - typedef cc::MichaelHashMap< cds::gc::nogc, LazyList_NOGC_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_NOGC_cmp_michaelAlloc; - typedef cc::MichaelHashMap< rcu_gpi, LazyList_RCU_GPI_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_GPI_cmp_michaelAlloc; - typedef cc::MichaelHashMap< rcu_gpb, LazyList_RCU_GPB_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_GPB_cmp_michaelAlloc; - typedef cc::MichaelHashMap< rcu_gpt, LazyList_RCU_GPT_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_GPT_cmp_michaelAlloc; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelHashMap< rcu_shb, LazyList_RCU_SHB_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_SHB_cmp_michaelAlloc; - typedef cc::MichaelHashMap< rcu_sht, LazyList_RCU_SHT_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_SHT_cmp_michaelAlloc; -#endif - typedef cc::MichaelHashMap< cds::gc::HP, LazyList_HP_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_HP_less_michaelAlloc; - typedef cc::MichaelHashMap< cds::gc::DHP, LazyList_DHP_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_DHP_less_michaelAlloc; - typedef cc::MichaelHashMap< cds::gc::nogc, LazyList_NOGC_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_NOGC_less_michaelAlloc; - typedef cc::MichaelHashMap< rcu_gpi, LazyList_RCU_GPI_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_GPI_less_michaelAlloc; - typedef cc::MichaelHashMap< rcu_gpb, LazyList_RCU_GPB_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_GPB_less_michaelAlloc; - typedef cc::MichaelHashMap< rcu_gpt, LazyList_RCU_GPT_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_GPT_less_michaelAlloc; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelHashMap< rcu_shb, LazyList_RCU_SHB_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_SHB_less_michaelAlloc; - typedef cc::MichaelHashMap< rcu_sht, LazyList_RCU_SHT_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_SHT_less_michaelAlloc; -#endif - - // *************************************************************************** - // SplitListMap based on MichaelList - - // HP - struct traits_SplitList_Michael_dyn_cmp: public cc::split_list::make_traits< - cc::split_list::ordered_list - ,co::hash< hash > - ,cc::split_list::ordered_list_traits< - typename cc::michael_list::make_traits< - co::compare< compare > - >::type - > - >::type - {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_HP_dyn_cmp; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_DHP_dyn_cmp; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_cmp >> SplitList_Michael_NOGC_dyn_cmp; - typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_GPI_dyn_cmp; - typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_GPB_dyn_cmp; - typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_GPT_dyn_cmp; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_SHB_dyn_cmp; - typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_SHT_dyn_cmp; -#endif - - struct traits_SplitList_Michael_dyn_cmp_stat : public traits_SplitList_Michael_dyn_cmp - { - typedef cc::split_list::stat<> stat; - }; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_HP_dyn_cmp_stat; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_DHP_dyn_cmp_stat; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_cmp_stat >> SplitList_Michael_NOGC_dyn_cmp_stat; - typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_GPI_dyn_cmp_stat; - typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_GPB_dyn_cmp_stat; - typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_GPT_dyn_cmp_stat; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_SHB_dyn_cmp_stat; - typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_SHT_dyn_cmp_stat; -#endif - - struct traits_SplitList_Michael_dyn_cmp_seqcst: public cc::split_list::make_traits< - cc::split_list::ordered_list - ,co::hash< hash > - ,co::memory_model< co::v::sequential_consistent > - ,cc::split_list::ordered_list_traits< - typename cc::michael_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > - >::type - {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_HP_dyn_cmp_seqcst; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_DHP_dyn_cmp_seqcst; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst >> SplitList_Michael_NOGC_dyn_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_GPI_dyn_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_GPB_dyn_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_GPT_dyn_cmp_seqcst; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_SHB_dyn_cmp_seqcst; - typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_SHT_dyn_cmp_seqcst; -#endif - - struct traits_SplitList_Michael_st_cmp: public cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::split_list::dynamic_bucket_table< false > - ,co::hash< hash > - ,cc::split_list::ordered_list_traits< - typename cc::michael_list::make_traits< - co::compare< compare > - >::type - > - >::type - {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_HP_st_cmp; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_DHP_st_cmp; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_cmp >> SplitList_Michael_NOGC_st_cmp; - typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_GPI_st_cmp; - typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_GPB_st_cmp; - typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_GPT_st_cmp; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_SHB_st_cmp; - typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_SHT_st_cmp; -#endif - - struct traits_SplitList_Michael_st_cmp_seqcst: public cc::split_list::make_traits< - cc::split_list::ordered_list - ,co::hash< hash > - ,cc::split_list::dynamic_bucket_table< false > - ,co::memory_model< co::v::sequential_consistent > - ,cc::split_list::ordered_list_traits< - typename cc::michael_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > - >::type - {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_HP_st_cmp_seqcst; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_DHP_st_cmp_seqcst; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_cmp_seqcst >> SplitList_Michael_NOGC_st_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_RCU_GPI_st_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_RCU_GPB_st_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_RCU_GPT_st_cmp_seqcst; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_RCU_SHB_st_cmp_seqcst; - typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_RCU_SHT_st_cmp_seqcst; -#endif - - //HP + less - struct traits_SplitList_Michael_dyn_less: public cc::split_list::make_traits< - cc::split_list::ordered_list - ,co::hash< hash > - ,cc::split_list::ordered_list_traits< - typename cc::michael_list::make_traits< - co::less< less > - >::type - > - >::type - {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_HP_dyn_less; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_DHP_dyn_less; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_less >> SplitList_Michael_NOGC_dyn_less; - typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_GPI_dyn_less; - typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_GPB_dyn_less; - typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_GPT_dyn_less; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_SHB_dyn_less; - typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_SHT_dyn_less; -#endif - - - struct traits_SplitList_Michael_dyn_less_seqcst: public cc::split_list::make_traits< - cc::split_list::ordered_list - ,co::hash< hash > - ,co::memory_model< co::v::sequential_consistent > - ,cc::split_list::ordered_list_traits< - typename cc::michael_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > - >::type - {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_HP_dyn_less_seqcst; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_DHP_dyn_less_seqcst; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_less_seqcst >> SplitList_Michael_NOGC_dyn_less_seqcst; - typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_GPI_dyn_less_seqcst; - typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_GPB_dyn_less_seqcst; - typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_GPT_dyn_less_seqcst; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_SHB_dyn_less_seqcst; - typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_SHT_dyn_less_seqcst; -#endif - - struct traits_SplitList_Michael_st_less: public cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::split_list::dynamic_bucket_table< false > - ,co::hash< hash > - ,cc::split_list::ordered_list_traits< - typename cc::michael_list::make_traits< - co::less< less > - >::type - > - >::type - {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_HP_st_less; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_DHP_st_less; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_less >> SplitList_Michael_NOGC_st_less; - typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_GPI_st_less; - typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_GPB_st_less; - typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_GPT_st_less; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_SHB_st_less; - typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_SHT_st_less; -#endif - - struct traits_SplitList_Michael_st_less_stat : traits_SplitList_Michael_st_less - { - typedef cc::split_list::stat<> stat; - }; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_HP_st_less_stat; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_DHP_st_less_stat; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_less_stat >> SplitList_Michael_NOGC_st_less_stat; - typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_GPI_st_less_stat; - typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_GPB_st_less_stat; - typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_GPT_st_less_stat; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_SHB_st_less_stat; - typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_SHT_st_less_stat; -#endif - - - class traits_SplitList_Michael_st_less_seqcst: public cc::split_list::make_traits< - cc::split_list::ordered_list - ,co::hash< hash > - ,cc::split_list::dynamic_bucket_table< false > - ,co::memory_model< co::v::sequential_consistent > - ,cc::split_list::ordered_list_traits< - typename cc::michael_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > - >::type - {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_HP_st_less_seqcst; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_DHP_st_less_seqcst; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_less_seqcst >> SplitList_Michael_NOGC_st_less_seqcst; - typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_GPI_st_less_seqcst; - typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_GPB_st_less_seqcst; - typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_GPT_st_less_seqcst; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_SHB_st_less_seqcst; - typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_SHT_st_less_seqcst; -#endif - - - // *************************************************************************** - // SplitListMap based on LazyKVList - - struct SplitList_Lazy_dyn_cmp : - public cc::split_list::make_traits< - cc::split_list::ordered_list - ,co::hash< hash > - ,cc::split_list::ordered_list_traits< - typename cc::lazy_list::make_traits< - co::compare< compare > - >::type - > - >::type - {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_HP_dyn_cmp; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_DHP_dyn_cmp; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_cmp >> SplitList_Lazy_NOGC_dyn_cmp; - typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_GPI_dyn_cmp; - typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_GPB_dyn_cmp; - typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_GPT_dyn_cmp; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_SHB_dyn_cmp; - typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_SHT_dyn_cmp; -#endif - - struct SplitList_Lazy_dyn_cmp_stat : public SplitList_Lazy_dyn_cmp - { - typedef cc::split_list::stat<> stat; - }; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_HP_dyn_cmp_stat; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_DHP_dyn_cmp_stat; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_cmp_stat >> SplitList_Lazy_NOGC_dyn_cmp_stat; - typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_GPI_dyn_cmp_stat; - typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_GPB_dyn_cmp_stat; - typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_GPT_dyn_cmp_stat; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_SHB_dyn_cmp_stat; - typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_SHT_dyn_cmp_stat; -#endif - - struct SplitList_Lazy_dyn_cmp_seqcst : - public cc::split_list::make_traits< - cc::split_list::ordered_list - ,co::hash< hash > - ,co::memory_model< co::v::sequential_consistent > - ,cc::split_list::ordered_list_traits< - typename cc::lazy_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > - >::type - {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_HP_dyn_cmp_seqcst; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_DHP_dyn_cmp_seqcst; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_cmp_seqcst >> SplitList_Lazy_NOGC_dyn_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_GPI_dyn_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_GPB_dyn_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_GPT_dyn_cmp_seqcst; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_SHB_dyn_cmp_seqcst; - typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_SHT_dyn_cmp_seqcst; -#endif - - struct SplitList_Lazy_st_cmp : - public cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::split_list::dynamic_bucket_table< false > - ,co::hash< hash > - ,cc::split_list::ordered_list_traits< - typename cc::lazy_list::make_traits< - co::compare< compare > - >::type - > - >::type - {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_HP_st_cmp; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_DHP_st_cmp; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_cmp >> SplitList_Lazy_NOGC_st_cmp; - typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_GPI_st_cmp; - typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_GPB_st_cmp; - typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_GPT_st_cmp; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_SHB_st_cmp; - typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_SHT_st_cmp; -#endif - - - struct SplitList_Lazy_st_cmp_seqcst : - public cc::split_list::make_traits< - cc::split_list::ordered_list - ,co::hash< hash > - ,cc::split_list::dynamic_bucket_table< false > - ,co::memory_model< co::v::sequential_consistent > - ,cc::split_list::ordered_list_traits< - typename cc::lazy_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > - >::type - {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_HP_st_cmp_seqcst; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_DHP_st_cmp_seqcst; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_cmp_seqcst >> SplitList_Lazy_NOGC_st_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_RCU_GPI_st_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_RCU_GPB_st_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_RCU_GPT_st_cmp_seqcst; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_RCU_SHB_st_cmp_seqcst; - typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_RCU_SHT_st_cmp_seqcst; -#endif - - - struct SplitList_Lazy_dyn_less : - public cc::split_list::make_traits< - cc::split_list::ordered_list - ,co::hash< hash > - ,cc::split_list::ordered_list_traits< - typename cc::lazy_list::make_traits< - co::less< less > - >::type - > - >::type - {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_HP_dyn_less; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_DHP_dyn_less; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_less >> SplitList_Lazy_NOGC_dyn_less; - typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_GPI_dyn_less; - typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_GPB_dyn_less; - typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_GPT_dyn_less; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_SHB_dyn_less; - typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_SHT_dyn_less; -#endif - - struct SplitList_Lazy_dyn_less_seqcst: - public cc::split_list::make_traits< - cc::split_list::ordered_list - ,co::hash< hash > - ,co::memory_model< co::v::sequential_consistent > - ,cc::split_list::ordered_list_traits< - typename cc::lazy_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > - >::type - {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_HP_dyn_less_seqcst; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_DHP_dyn_less_seqcst; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_less_seqcst >> SplitList_Lazy_NOGC_dyn_less_seqcst; - typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_GPI_dyn_less_seqcst; - typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_GPB_dyn_less_seqcst; - typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_GPT_dyn_less_seqcst; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_SHB_dyn_less_seqcst; - typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_SHT_dyn_less_seqcst; -#endif - - struct SplitList_Lazy_st_less : - public cc::split_list::make_traits< - cc::split_list::ordered_list - ,cc::split_list::dynamic_bucket_table< false > - ,co::hash< hash > - ,cc::split_list::ordered_list_traits< - typename cc::lazy_list::make_traits< - co::less< less > - >::type - > - >::type - {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_HP_st_less; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_DHP_st_less; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_less >> SplitList_Lazy_NOGC_st_less; - typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_GPI_st_less; - typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_GPB_st_less; - typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_GPT_st_less; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_SHB_st_less; - typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_SHT_st_less; -#endif - - struct SplitList_Lazy_st_less_stat : public SplitList_Lazy_st_less - { - typedef cc::split_list::stat<> stat; - }; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_HP_st_less_stat; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_DHP_st_less_stat; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_less_stat >> SplitList_Lazy_NOGC_st_less_stat; - typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_GPI_st_less_stat; - typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_GPB_st_less_stat; - typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_GPT_st_less_stat; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_SHB_st_less_stat; - typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_SHT_st_less_stat; -#endif - - struct SplitList_Lazy_st_less_seqcst : - public cc::split_list::make_traits< - cc::split_list::ordered_list - ,co::hash< hash > - ,cc::split_list::dynamic_bucket_table< false > - ,co::memory_model< co::v::sequential_consistent > - ,cc::split_list::ordered_list_traits< - typename cc::lazy_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > - >::type - {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_HP_st_less_seqcst; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_DHP_st_less_seqcst; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_less_seqcst >> SplitList_Lazy_NOGC_st_less_seqcst; - typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_GPI_st_less_seqcst; - typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_GPB_st_less_seqcst; - typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_GPT_st_less_seqcst; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_SHB_st_less_seqcst; - typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_SHT_st_less_seqcst; -#endif - - - - // *************************************************************************** - // StripedHashMap - - // for sequential containers - template - class StripedHashMap_seq: - public cc::StripedMap< BucketEntry, - co::mutex_policy< cc::striped_set::striping<> > - ,co::resizing_policy > - , Options... - > - { - typedef cc::StripedMap< BucketEntry, - co::mutex_policy< cc::striped_set::striping<> > - ,co::resizing_policy > - , Options... - > base_class; - typedef typename base_class::resizing_policy resizing_policy_t; - - resizing_policy_t m_placeHolder; - public: - StripedHashMap_seq( size_t nCapacity, size_t nLoadFactor ) - : base_class( nCapacity / nLoadFactor / 16, *(new(&m_placeHolder) resizing_policy_t( nLoadFactor )) ) - {} - }; - - // for non-sequential ordered containers - template - class StripedHashMap_ord: - public cc::StripedMap< BucketEntry, - co::resizing_policy > - ,co::mutex_policy< cc::striped_set::striping<> > - , Options... - > - { - typedef cc::StripedMap< BucketEntry, - co::resizing_policy > - ,co::mutex_policy< cc::striped_set::striping<> > - , Options... - > base_class; - typedef typename base_class::resizing_policy resizing_policy_t; - - resizing_policy_t m_placeHolder; - public: - StripedHashMap_ord( size_t /*nCapacity*/, size_t nLoadFactor ) - : base_class( 0, *(new(&m_placeHolder) resizing_policy_t( nLoadFactor * 1024 )) ) - {} - }; - - - typedef StripedHashMap_seq< - std::list< std::pair< Key const, Value > > - , co::hash< hash2 > - , co::less< less > - > StripedMap_list; - -#if (CDS_COMPILER == CDS_COMPILER_MSVC || (CDS_COMPILER == CDS_COMPILER_INTEL && CDS_OS_INTERFACE == CDS_OSI_WINDOWS)) && _MSC_VER < 1600 - typedef StripedHashMap_ord< - stdext::hash_map< Key, Value, stdext::hash_compare > - , co::hash< hash2 > - > StripedMap_hashmap; -#else - typedef StripedHashMap_ord< - std::unordered_map< Key, Value, hash, equal_to > - , co::hash< hash2 > - > StripedMap_hashmap; -#endif - - typedef StripedHashMap_ord< - std::map< Key, Value, less > - , co::hash< hash2 > - > StripedMap_map; - - typedef StripedHashMap_ord< - boost::unordered_map< Key, Value, hash, equal_to > - , co::hash< hash2 > - > StripedMap_boost_unordered_map; - -#if BOOST_VERSION >= 104800 - typedef StripedHashMap_seq< - boost::container::slist< std::pair< Key const, Value > > - , co::hash< hash2 > - , co::less< less > - > StripedMap_slist; - - typedef StripedHashMap_seq< - boost::container::list< std::pair< Key const, Value > > - , co::hash< hash2 > - , co::less< less > - > StripedMap_boost_list; - - typedef StripedHashMap_ord< - boost::container::map< Key, Value, less > - , co::hash< hash2 > - > StripedMap_boost_map; - -//# ifdef CDS_UNIT_MAP_TYPES_ENABLE_BOOST_FLAT_CONTAINERS - typedef StripedHashMap_ord< - boost::container::flat_map< Key, Value, less > - , co::hash< hash2 > - > StripedMap_boost_flat_map; -//# endif -#endif // BOOST_VERSION >= 104800 - - // *************************************************************************** - // RefinableHashMap - - // for sequential containers - template - class RefinableHashMap_seq: - public cc::StripedMap< BucketEntry, - co::resizing_policy > - ,co::mutex_policy< cc::striped_set::refinable<> > - , Options... - > - { - typedef cc::StripedMap< BucketEntry, - co::resizing_policy > - ,co::mutex_policy< cc::striped_set::refinable<> > - , Options... - > base_class; - typedef typename base_class::resizing_policy resizing_policy_t; - - resizing_policy_t m_placeHolder; - public: - RefinableHashMap_seq( size_t nCapacity, size_t nLoadFactor ) - : base_class( nCapacity / nLoadFactor / 16, *(new(&m_placeHolder) resizing_policy_t( nLoadFactor )) ) - {} - }; - - // for non-sequential ordered containers - template - class RefinableHashMap_ord: - public cc::StripedMap< BucketEntry, - co::resizing_policy > - ,co::mutex_policy< cc::striped_set::refinable<> > - , Options... - > - { - typedef cc::StripedMap< BucketEntry, - co::resizing_policy > - ,co::mutex_policy< cc::striped_set::refinable<> > - , Options... - > base_class; - typedef typename base_class::resizing_policy resizing_policy_t; - - resizing_policy_t m_placeHolder; - public: - RefinableHashMap_ord( size_t /*nCapacity*/, size_t nLoadFactor ) - : base_class( 0, *(new(&m_placeHolder) resizing_policy_t( nLoadFactor * 1024 )) ) - {} - }; - - - typedef RefinableHashMap_seq< - std::list< std::pair< Key const, Value > > - , co::hash< hash2 > - , co::less< less > - > RefinableMap_list; - -#if BOOST_VERSION >= 104800 - typedef RefinableHashMap_seq< - boost::container::slist< std::pair< Key const, Value > > - , co::hash< hash2 > - , co::less< less > - > RefinableMap_slist; -#endif - - typedef RefinableHashMap_ord< - std::map< Key, Value, less > - , co::hash< hash2 > - > RefinableMap_map; - - typedef RefinableHashMap_ord< - std::unordered_map< Key, Value, hash, equal_to > - , co::hash< hash2 > - > RefinableMap_hashmap; - - typedef RefinableHashMap_ord< - boost::unordered_map< Key, Value, hash, equal_to > - , co::hash< hash2 > - > RefinableMap_boost_unordered_map; - -#if BOOST_VERSION >= 104800 - typedef RefinableHashMap_seq< - boost::container::list< std::pair< Key const, Value > > - , co::hash< hash2 > - , co::less< less > - > RefinableMap_boost_list; - - typedef RefinableHashMap_ord< - boost::container::map< Key, Value, less > - , co::hash< hash2 > - > RefinableMap_boost_map; - - typedef RefinableHashMap_ord< - boost::container::flat_map< Key, Value, less > - , co::hash< hash2 > - > RefinableMap_boost_flat_map; -#endif // #if BOOST_VERSION >= 104800 - - - // *************************************************************************** - // CuckooMap - - template - struct traits_CuckooStripedMap: public Traits - { - typedef cc::cuckoo::striping<> mutex_policy; - }; - template - struct traits_CuckooRefinableMap : public Traits - { - typedef cc::cuckoo::refinable<> mutex_policy; - }; - - struct traits_CuckooMap_list_unord : - public cc::cuckoo::make_traits < - cc::cuckoo::probeset_type< cc::cuckoo::list > - , co::equal_to< equal_to > - , co::hash< std::tuple< hash, hash2 > > - > ::type - {}; - typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_list_unord; - typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_list_unord; - - struct traits_CuckooMap_list_unord_stat : public traits_CuckooMap_list_unord - { - typedef cc::cuckoo::stat stat; - }; - typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_list_unord_stat; - typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_list_unord_stat; - - struct traits_CuckooMap_list_unord_storehash : public traits_CuckooMap_list_unord - { - static CDS_CONSTEXPR const bool store_hash = true; - }; - typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_list_unord_storehash; - typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_list_unord_storehash; - - struct traits_CuckooMap_list_ord : - public cc::cuckoo::make_traits < - cc::cuckoo::probeset_type< cc::cuckoo::list > - , co::compare< compare > - , co::hash< std::tuple< hash, hash2 > > - >::type - {}; - typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_list_ord; - typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_list_ord; - - struct traits_CuckooMap_list_ord_stat : public traits_CuckooMap_list_ord - { - typedef cc::cuckoo::stat stat; - }; - typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_list_ord_stat; - typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_list_ord_stat; - - struct traits_CuckooMap_list_ord_storehash : public traits_CuckooMap_list_ord - { - static CDS_CONSTEXPR const bool store_hash = true; - }; - typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_list_ord_storehash; - typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_list_ord_storehash; - - struct traits_CuckooMap_vector_unord : - public cc::cuckoo::make_traits < - cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > - , co::equal_to< equal_to > - , co::hash< std::tuple< hash, hash2 > > - >::type - {}; - typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_vector_unord; - typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_vector_unord; - - struct traits_CuckooMap_vector_unord_stat : public traits_CuckooMap_vector_unord - { - typedef cc::cuckoo::stat stat; - }; - typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_vector_unord_stat; - typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_vector_unord_stat; - - struct traits_CuckooMap_vector_unord_storehash : public traits_CuckooMap_vector_unord - { - static CDS_CONSTEXPR const bool store_hash = true; - }; - typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_vector_unord_storehash; - typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_vector_unord_storehash; - - struct traits_CuckooMap_vector_ord : - public cc::cuckoo::make_traits < - cc::cuckoo::probeset_type< cc::cuckoo::vector<4> > - , co::compare< compare > - , co::hash< std::tuple< hash, hash2 > > - >::type - {}; - typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_vector_ord; - typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_vector_ord; - - struct traits_CuckooMap_vector_ord_stat : public traits_CuckooMap_vector_ord - { - typedef cc::cuckoo::stat stat; - }; - typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_vector_ord_stat; - typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_vector_ord_stat; - - struct traits_CuckooMap_vector_ord_storehash : public traits_CuckooMap_vector_ord - { - static CDS_CONSTEXPR const bool store_hash = true; - }; - typedef CuckooMap< Key, Value, traits_CuckooStripedMap> CuckooStripedMap_vector_ord_storehash; - typedef CuckooMap< Key, Value, traits_CuckooRefinableMap> CuckooRefinableMap_vector_ord_storehash; - - // *************************************************************************** - // SkipListMap - - class traits_SkipListMap_less_pascal: public cc::skip_list::make_traits < - co::less< less > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - ,co::item_counter< cds::atomicity::item_counter > - >::type - {}; - typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_hp_less_pascal; - typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_dhp_less_pascal; - typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_nogc_less_pascal; - typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_gpi_less_pascal; - typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_gpb_less_pascal; - typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_gpt_less_pascal; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_shb_less_pascal; - typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_sht_less_pascal; -#endif - - class traits_SkipListMap_less_pascal_seqcst: public cc::skip_list::make_traits < - co::less< less > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - ,co::memory_model< co::v::sequential_consistent > - ,co::item_counter< cds::atomicity::item_counter > - >::type - {}; - typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_hp_less_pascal_seqcst; - typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_dhp_less_pascal_seqcst; - typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_nogc_less_pascal_seqcst; - typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_gpi_less_pascal_seqcst; - typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_gpb_less_pascal_seqcst; - typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_gpt_less_pascal_seqcst; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_shb_less_pascal_seqcst; - typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_sht_less_pascal_seqcst; -#endif - - class traits_SkipListMap_less_pascal_stat: public cc::skip_list::make_traits < - co::less< less > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - ,co::stat< cc::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - {}; - typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_hp_less_pascal_stat; - typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_dhp_less_pascal_stat; - typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_nogc_less_pascal_stat; - typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_gpi_less_pascal_stat; - typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_gpb_less_pascal_stat; - typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_gpt_less_pascal_stat; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_shb_less_pascal_stat; - typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_sht_less_pascal_stat; -#endif - - class traits_SkipListMap_cmp_pascal: public cc::skip_list::make_traits < - co::compare< compare > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - ,co::item_counter< cds::atomicity::item_counter > - >::type - {}; - typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_hp_cmp_pascal; - typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_dhp_cmp_pascal; - typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_nogc_cmp_pascal; - typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_gpi_cmp_pascal; - typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_gpb_cmp_pascal; - typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_gpt_cmp_pascal; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_shb_cmp_pascal; - typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_sht_cmp_pascal; -#endif - - class traits_SkipListMap_cmp_pascal_stat: public cc::skip_list::make_traits < - co::compare< compare > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > - ,co::stat< cc::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - {}; - typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_hp_cmp_pascal_stat; - typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_dhp_cmp_pascal_stat; - typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_nogc_cmp_pascal_stat; - typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_gpi_cmp_pascal_stat; - typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_gpb_cmp_pascal_stat; - typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_gpt_cmp_pascal_stat; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_shb_cmp_pascal_stat; - typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_sht_cmp_pascal_stat; -#endif - - class traits_SkipListMap_less_xorshift: public cc::skip_list::make_traits < - co::less< less > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - ,co::item_counter< cds::atomicity::item_counter > - >::type - {}; - typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_hp_less_xorshift; - typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_dhp_less_xorshift; - typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_nogc_less_xorshift; - typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_gpi_less_xorshift; - typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_gpb_less_xorshift; - typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_gpt_less_xorshift; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_shb_less_xorshift; - typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_sht_less_xorshift; -#endif - - class traits_SkipListMap_less_xorshift_stat: public cc::skip_list::make_traits < - co::less< less > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - ,co::stat< cc::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - {}; - typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_hp_less_xorshift_stat; - typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_dhp_less_xorshift_stat; - typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_nogc_less_xorshift_stat; - typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_gpi_less_xorshift_stat; - typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_gpb_less_xorshift_stat; - typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_gpt_less_xorshift_stat; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_shb_less_xorshift_stat; - typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_sht_less_xorshift_stat; -#endif - - class traits_SkipListMap_cmp_xorshift: public cc::skip_list::make_traits < - co::compare< compare > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - ,co::item_counter< cds::atomicity::item_counter > - >::type - {}; - typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_hp_cmp_xorshift; - typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_dhp_cmp_xorshift; - typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_nogc_cmp_xorshift; - typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_gpi_cmp_xorshift; - typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_gpb_cmp_xorshift; - typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_gpt_cmp_xorshift; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_shb_cmp_xorshift; - typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_sht_cmp_xorshift; -#endif - - class traits_SkipListMap_cmp_xorshift_stat: public cc::skip_list::make_traits < - co::compare< compare > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > - ,co::stat< cc::skip_list::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - {}; - typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_hp_cmp_xorshift_stat; - typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_dhp_cmp_xorshift_stat; - typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_nogc_cmp_xorshift_stat; - typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_gpi_cmp_xorshift_stat; - typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_gpb_cmp_xorshift_stat; - typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_gpt_cmp_xorshift_stat; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_shb_cmp_xorshift_stat; - typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_sht_cmp_xorshift_stat; -#endif - - - // *************************************************************************** - // EllenBinTreeMap - struct ellen_bintree_props { - struct hp_gc { - typedef cc::ellen_bintree::map_node leaf_node; - typedef cc::ellen_bintree::internal_node< Key, leaf_node > internal_node; - typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; - }; - struct dhp_gc { - typedef cc::ellen_bintree::map_node leaf_node; - typedef cc::ellen_bintree::internal_node< Key, leaf_node > internal_node; - typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; - }; - struct gpi { - typedef cc::ellen_bintree::map_node leaf_node; - typedef cc::ellen_bintree::internal_node< Key, leaf_node > internal_node; - typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; - }; - struct gpb { - typedef cc::ellen_bintree::map_node leaf_node; - typedef cc::ellen_bintree::internal_node< Key, leaf_node > internal_node; - typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; - }; - struct gpt { - typedef cc::ellen_bintree::map_node leaf_node; - typedef cc::ellen_bintree::internal_node< Key, leaf_node > internal_node; - typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; - }; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct shb { - typedef cc::ellen_bintree::map_node leaf_node; - typedef cc::ellen_bintree::internal_node< Key, leaf_node > internal_node; - typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; - }; - struct sht { - typedef cc::ellen_bintree::map_node leaf_node; - typedef cc::ellen_bintree::internal_node< Key, leaf_node > internal_node; - typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; - }; -#endif - }; - - struct traits_EllenBinTreeMap: public cc::ellen_bintree::make_set_traits< - co::less< less > - ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - {}; - struct traits_EllenBinTreeMap_hp : traits_EllenBinTreeMap { - typedef cds::memory::pool_allocator< typename ellen_bintree_props::hp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; - }; - typedef cc::EllenBinTreeMap< cds::gc::HP, Key, Value, traits_EllenBinTreeMap_hp >EllenBinTreeMap_hp; - - struct traits_EllenBinTreeMap_dhp : traits_EllenBinTreeMap { - typedef cds::memory::pool_allocator< typename ellen_bintree_props::dhp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; - }; - typedef cc::EllenBinTreeMap< cds::gc::DHP, Key, Value, traits_EllenBinTreeMap_dhp >EllenBinTreeMap_dhp; - - struct traits_EllenBinTreeMap_gpi : traits_EllenBinTreeMap { - typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpi::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; - }; - typedef cc::EllenBinTreeMap< rcu_gpi, Key, Value, traits_EllenBinTreeMap_gpi >EllenBinTreeMap_rcu_gpi; - - struct traits_EllenBinTreeMap_gpb : traits_EllenBinTreeMap { - typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; - }; - typedef cc::EllenBinTreeMap< rcu_gpb, Key, Value, traits_EllenBinTreeMap_gpb >EllenBinTreeMap_rcu_gpb; - - struct traits_EllenBinTreeMap_gpt : traits_EllenBinTreeMap { - typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpt::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; - }; - typedef cc::EllenBinTreeMap< rcu_gpt, Key, Value, traits_EllenBinTreeMap_gpt >EllenBinTreeMap_rcu_gpt; - -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits_EllenBinTreeMap_shb : traits_EllenBinTreeMap { - typedef cds::memory::pool_allocator< typename ellen_bintree_props::shb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; - }; - typedef cc::EllenBinTreeMap< rcu_shb, Key, Value, traits_EllenBinTreeMap_shb >EllenBinTreeMap_rcu_shb; - - struct traits_EllenBinTreeMap_sht : traits_EllenBinTreeMap { - typedef cds::memory::pool_allocator< typename ellen_bintree_props::sht::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; - }; - typedef cc::EllenBinTreeMap< rcu_sht, Key, Value, traits_EllenBinTreeMap_sht >EllenBinTreeMap_rcu_sht; -#endif - - struct traits_EllenBinTreeMap_yield : public traits_EllenBinTreeMap - { - typedef cds::backoff::yield back_off; - }; - struct traits_EllenBinTreeMap_hp_yield : traits_EllenBinTreeMap_yield { - typedef cds::memory::pool_allocator< typename ellen_bintree_props::hp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; - }; - typedef cc::EllenBinTreeMap< cds::gc::HP, Key, Value, traits_EllenBinTreeMap_hp_yield >EllenBinTreeMap_hp_yield; - - struct traits_EllenBinTreeMap_dhp_yield : traits_EllenBinTreeMap_yield { - typedef cds::memory::pool_allocator< typename ellen_bintree_props::dhp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; - }; - typedef cc::EllenBinTreeMap< cds::gc::DHP, Key, Value, traits_EllenBinTreeMap_dhp_yield >EllenBinTreeMap_dhp_yield; - - struct traits_EllenBinTreeMap_gpb_yield : traits_EllenBinTreeMap_yield { - typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; - }; - typedef cc::EllenBinTreeMap< rcu_gpb, Key, Value, traits_EllenBinTreeMap_gpb_yield >EllenBinTreeMap_rcu_gpb_yield; - - - struct traits_EllenBinTreeMap_stat: public cc::ellen_bintree::make_set_traits< - co::less< less > - ,cc::ellen_bintree::update_desc_allocator< - cds::memory::pool_allocator< typename ellen_bintree_props::hp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > - > - ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::item_counter< cds::atomicity::item_counter > - >::type - {}; - - struct traits_EllenBinTreeMap_stat_hp : public traits_EllenBinTreeMap_stat - { - typedef cds::memory::pool_allocator< typename ellen_bintree_props::hp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; - }; - typedef cc::EllenBinTreeMap< cds::gc::HP, Key, Value, traits_EllenBinTreeMap_stat_hp > EllenBinTreeMap_hp_stat; - - struct traits_EllenBinTreeMap_stat_dhp : public traits_EllenBinTreeMap_stat - { - typedef cds::memory::pool_allocator< typename ellen_bintree_props::dhp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; - }; - typedef cc::EllenBinTreeMap< cds::gc::HP, Key, Value, traits_EllenBinTreeMap_stat_dhp > EllenBinTreeMap_dhp_stat; - - struct traits_EllenBinTreeMap_stat_gpi : public traits_EllenBinTreeMap_stat - { - typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpi::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; - }; - typedef cc::EllenBinTreeMap< rcu_gpi, Key, Value, traits_EllenBinTreeMap_stat_gpi > EllenBinTreeMap_rcu_gpi_stat; - - struct traits_EllenBinTreeMap_stat_gpb : public traits_EllenBinTreeMap_stat - { - typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; - }; - typedef cc::EllenBinTreeMap< rcu_gpb, Key, Value, traits_EllenBinTreeMap_stat_gpb > EllenBinTreeMap_rcu_gpb_stat; - - struct traits_EllenBinTreeMap_stat_gpt : public traits_EllenBinTreeMap_stat - { - typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpt::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; - }; - typedef cc::EllenBinTreeMap< rcu_gpt, Key, Value, traits_EllenBinTreeMap_stat_gpt > EllenBinTreeMap_rcu_gpt_stat; - -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits_EllenBinTreeMap_stat_shb : public traits_EllenBinTreeMap_stat - { - typedef cds::memory::pool_allocator< typename ellen_bintree_props::shb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; - }; - typedef cc::EllenBinTreeMap< rcu_shb, Key, Value, traits_EllenBinTreeMap_stat_shb > EllenBinTreeMap_rcu_shb_stat; - - struct traits_EllenBinTreeMap_stat_sht : public traits_EllenBinTreeMap_stat - { - typedef cds::memory::pool_allocator< typename ellen_bintree_props::sht::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator; - }; - typedef cc::EllenBinTreeMap< rcu_sht, Key, Value, traits_EllenBinTreeMap_stat_sht > EllenBinTreeMap_rcu_sht_stat; -#endif - - // *************************************************************************** - // BronsonAVLTreeMap - typedef cds::memory::vyukov_queue_pool< std::mutex > BronsonAVLTreeMap_simple_pool; - typedef cds::memory::lazy_vyukov_queue_pool< std::mutex > BronsonAVLTreeMap_lazy_pool; - typedef cds::memory::bounded_vyukov_queue_pool< std::mutex > BronsonAVLTreeMap_bounded_pool; - - struct BronsonAVLTreeMap_less: public - cc::bronson_avltree::make_traits< - co::less< less > - ,cc::bronson_avltree::relaxed_insert< false > - ,co::item_counter< cds::atomicity::item_counter > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_gpi_less; - typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_gpb_less; - typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_gpt_less; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_shb_less; - typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_sht_less; -#endif - struct BronsonAVLTreeMap_cmp_stat: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,cc::bronson_avltree::relaxed_insert< false > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::bronson_avltree::stat<>> - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_gpi_cmp_stat; - typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_gpb_cmp_stat; - typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_gpt_cmp_stat; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_shb_cmp_stat; - typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_sht_cmp_stat; -#endif - - struct BronsonAVLTreeMap_less_pool_simple: public BronsonAVLTreeMap_less - { - typedef cds::sync::pool_monitor sync_monitor; - }; - typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_gpi_less_pool_simple; - typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_gpb_less_pool_simple; - typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_gpt_less_pool_simple; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_shb_less_pool_simple; - typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_sht_less_pool_simple; -#endif - struct BronsonAVLTreeMap_less_pool_simple_stat : public BronsonAVLTreeMap_less - { - typedef cc::bronson_avltree::stat<> stat; - typedef cds::sync::pool_monitor sync_monitor; - }; - typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_gpi_less_pool_simple_stat; - typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_gpb_less_pool_simple_stat; - typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_gpt_less_pool_simple_stat; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_shb_less_pool_simple_stat; - typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_sht_less_pool_simple_stat; -#endif - struct BronsonAVLTreeMap_less_pool_lazy: public BronsonAVLTreeMap_less - { - typedef cds::sync::pool_monitor sync_monitor; - static CDS_CONSTEXPR bool const relaxed_insert = true; - }; - typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_gpi_less_pool_lazy; - typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_gpb_less_pool_lazy; - typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_gpt_less_pool_lazy; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_shb_less_pool_lazy; - typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_sht_less_pool_lazy; -#endif - struct BronsonAVLTreeMap_less_pool_lazy_stat : public BronsonAVLTreeMap_less - { - typedef cc::bronson_avltree::stat<> stat; - typedef cds::sync::pool_monitor sync_monitor; - static CDS_CONSTEXPR bool const relaxed_insert = true; - }; - typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_gpi_less_pool_lazy_stat; - typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_gpb_less_pool_lazy_stat; - typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_gpt_less_pool_lazy_stat; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_shb_less_pool_lazy_stat; - typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_sht_less_pool_lazy_stat; -#endif - struct BronsonAVLTreeMap_less_pool_bounded: public BronsonAVLTreeMap_less - { - typedef cds::sync::pool_monitor sync_monitor; - static CDS_CONSTEXPR bool const relaxed_insert = true; - }; - typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_gpi_less_pool_bounded; - typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_gpb_less_pool_bounded; - typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_gpt_less_pool_bounded; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_shb_less_pool_bounded; - typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_sht_less_pool_bounded; -#endif - struct BronsonAVLTreeMap_less_pool_bounded_stat : public BronsonAVLTreeMap_less - { - typedef cc::bronson_avltree::stat<> stat; - typedef cds::sync::pool_monitor sync_monitor; - static CDS_CONSTEXPR bool const relaxed_insert = true; - }; - typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_gpi_less_pool_bounded_stat; - typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_gpb_less_pool_bounded_stat; - typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_gpt_less_pool_bounded_stat; -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_shb_less_pool_bounded_stat; - typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_sht_less_pool_bounded_stat; -#endif - - // *************************************************************************** - // Standard implementations - - typedef StdMap< Key, Value, cds::sync::spin > StdMap_Spin; - typedef StdMap< Key, Value, lock::NoLock> StdMap_NoLock; - - typedef StdHashMap< Key, Value, cds::sync::spin > StdHashMap_Spin; - typedef StdHashMap< Key, Value, lock::NoLock > StdHashMap_NoLock; - - }; - - template - static inline void print_stat( Map const& /*m*/ ) - {} - - template - static inline void check_before_cleanup( Map& /*m*/ ) - {} - - template - static inline void additional_cleanup( Map& /*m*/ ) - {} - - template - static inline void additional_check( Map& /*m*/ ) - {} - - - template - static inline void print_stat( cc::CuckooMap< K, T, Traits > const& m ) - { - CPPUNIT_MSG( m.statistics() << m.mutex_policy_statistics() ); - } - - template - static inline void print_stat( cc::SkipListMap< GC, K, T, Traits > const& m ) - { - CPPUNIT_MSG( m.statistics() ); - } - - template - static inline void print_stat( cc::SplitListMap< GC, K, T, Traits > const& m ) - { - CPPUNIT_MSG( m.statistics() ); - } - - // EllenBinTreeMap - template - static inline void print_stat( cc::EllenBinTreeMap const& s ) - { - CPPUNIT_MSG( s.statistics() ); - } - template - static inline void additional_cleanup( cc::EllenBinTreeMap& /*s*/ ) - { - ellen_bintree_pool::internal_node_counter::reset(); - } - namespace ellen_bintree_check { - static inline void check_stat( cds::intrusive::ellen_bintree::empty_stat const& /*s*/ ) - { - // This check is not valid for thread-based RCU - /* - CPPUNIT_CHECK_CURRENT_EX( ellen_bintree_pool::internal_node_counter::m_nAlloc.get() == ellen_bintree_pool::internal_node_counter::m_nFree.get(), - "m_nAlloc=" << ellen_bintree_pool::internal_node_counter::m_nAlloc.get() - << ", m_nFree=" << ellen_bintree_pool::internal_node_counter::m_nFree.get() - ); - */ - } - - static inline void check_stat( cds::intrusive::ellen_bintree::stat<> const& stat ) - { - CPPUNIT_CHECK_CURRENT_EX( stat.m_nInternalNodeCreated == stat.m_nInternalNodeDeleted, - "m_nInternalNodeCreated=" << stat.m_nInternalNodeCreated - << " m_nInternalNodeDeleted=" << stat.m_nInternalNodeDeleted ); - CPPUNIT_CHECK_CURRENT_EX( stat.m_nUpdateDescCreated == stat.m_nUpdateDescDeleted, - "m_nUpdateDescCreated=" << stat.m_nUpdateDescCreated - << " m_nUpdateDescDeleted=" << stat.m_nUpdateDescDeleted ); - CPPUNIT_CHECK_CURRENT_EX( ellen_bintree_pool::internal_node_counter::m_nAlloc.get() == stat.m_nInternalNodeCreated, - "allocated=" << ellen_bintree_pool::internal_node_counter::m_nAlloc.get() - << "m_nInternalNodeCreated=" << stat.m_nInternalNodeCreated ); - } - } // namespace ellen_bintree_check - template - static inline void additional_check( cc::EllenBinTreeMap& s ) - { - GC::force_dispose(); - ellen_bintree_check::check_stat( s.statistics() ); - } - - template - static inline void check_before_cleanup( cc::EllenBinTreeMap& m ) - { - CPPUNIT_MSG( " Check internal consistency (single-threaded)..." ); - CPPUNIT_CHECK_CURRENT( m.check_consistency() ); - } - - - // BronsonAVLTreeMap - template - static inline void print_stat( cc::BronsonAVLTreeMap const& m ) - { - CPPUNIT_MSG( m.statistics() ); - CPPUNIT_MSG( m.monitor().statistics() ); - } - - template - static inline void check_before_cleanup( cc::BronsonAVLTreeMap& m ) - { - CPPUNIT_MSG( " Check internal consistency (single-threaded)..." ); - bool bOk = m.check_consistency([]( size_t nLevel, size_t hLeft, size_t hRight ) - { - CPPUNIT_MSG( "Tree violation on level=" << nLevel << ": hLeft=" << hLeft << ", hRight=" << hRight ) - }); - CPPUNIT_CHECK_CURRENT_EX( bOk, "check_consistency failed"); - } - - template - static inline void print_stat( CuckooMap< K, V, Traits > const& m ) - { - typedef CuckooMap< K, V, Traits > map_type; - print_stat( static_cast(m) ); - } -} // namespace map2 - -#endif // ifndef CDSUNIT_MAP_TYPES_H -- 2.34.1