From: khizmax Date: Thu, 21 Apr 2016 20:38:24 +0000 (+0300) Subject: Removed old tree unit test X-Git-Tag: v2.2.0~265 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ff3b19a7120f7a8e60731ad276615d1e9abac595;p=libcds.git Removed old tree unit test --- diff --git a/build/Makefile b/build/Makefile index 24dd8011..b9875470 100644 --- a/build/Makefile +++ b/build/Makefile @@ -121,16 +121,6 @@ TESTHDR_SRC_DIR=../tests/test-hdr $(TESTHDR_OBJS): %.o: %.cpp $(CXX) $(CPP_COMP_OPT) -I$(TESTHDR_SRC_DIR) -I$(TEST_COMMONHDR_SRC_DIR) $< -o $@ -include ../projects/source.test-hdr.offsetof.mk -CDS_TESTHDR_OFFSETOF_SOURCES := $(CDS_TESTHDR_OFFSETOF_SOURCES:%.cpp=../%.cpp) -TESTHDR_OBJS_NO_OFFSETOF_WARN := $(CDS_TESTHDR_OFFSETOF_SOURCES:%.cpp=%.o) -TESTHDR_OBJS_NO_OFFSETOF_WARN_DEPS := $(TESTHDR_OBJS_NO_OFFSETOF_WARN:%.o=%.d) - --include $(TESTHDR_OBJS_NO_OFFSETOF_WARN_DEPS) -$(TESTHDR_OBJS_NO_OFFSETOF_WARN): %.o: %.cpp - $(CXX) $(CPP_COMP_OPT) -I$(TESTHDR_SRC_DIR) -I$(TEST_COMMONHDR_SRC_DIR) -Wno-invalid-offsetof $< -o $@ - - TEST_SRC_DIR=../tests/unit TEST_DATA_DIR=`pwd`/../tests/data diff --git a/projects/Win/vc14/cds.sln b/projects/Win/vc14/cds.sln index c670b5a2..e899f3b6 100644 --- a/projects/Win/vc14/cds.sln +++ b/projects/Win/vc14/cds.sln @@ -105,12 +105,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unit-set-insdel", "unit-set {408FE9BC-44F0-4E6A-89FA-D6F952584239} = {408FE9BC-44F0-4E6A-89FA-D6F952584239} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hdr-test-tree", "hdr-test-tree.vcxproj", "{6F834EAD-7B94-4979-A0F1-A662E3D30145}" - ProjectSection(ProjectDependencies) = postProject - {61179F2F-07E1-490D-B64D-D85A90B6EF81} = {61179F2F-07E1-490D-B64D-D85A90B6EF81} - {408FE9BC-44F0-4E6A-89FA-D6F952584239} = {408FE9BC-44F0-4E6A-89FA-D6F952584239} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unit-map-insdel-item", "unit-map-insdel-item.vcxproj", "{7521DD92-56FF-4ECA-93E5-CCE50862354B}" ProjectSection(ProjectDependencies) = postProject {61179F2F-07E1-490D-B64D-D85A90B6EF81} = {61179F2F-07E1-490D-B64D-D85A90B6EF81} @@ -338,18 +332,6 @@ Global {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}.Release|Win32.Build.0 = Release|Win32 {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}.Release|x64.ActiveCfg = Release|x64 {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}.Release|x64.Build.0 = Release|x64 - {6F834EAD-7B94-4979-A0F1-A662E3D30145}.Debug|Win32.ActiveCfg = Debug|Win32 - {6F834EAD-7B94-4979-A0F1-A662E3D30145}.Debug|Win32.Build.0 = Debug|Win32 - {6F834EAD-7B94-4979-A0F1-A662E3D30145}.Debug|x64.ActiveCfg = Debug|x64 - {6F834EAD-7B94-4979-A0F1-A662E3D30145}.Debug|x64.Build.0 = Debug|x64 - {6F834EAD-7B94-4979-A0F1-A662E3D30145}.DebugVLD|Win32.ActiveCfg = DebugVLD|Win32 - {6F834EAD-7B94-4979-A0F1-A662E3D30145}.DebugVLD|Win32.Build.0 = DebugVLD|Win32 - {6F834EAD-7B94-4979-A0F1-A662E3D30145}.DebugVLD|x64.ActiveCfg = DebugVLD|x64 - {6F834EAD-7B94-4979-A0F1-A662E3D30145}.DebugVLD|x64.Build.0 = DebugVLD|x64 - {6F834EAD-7B94-4979-A0F1-A662E3D30145}.Release|Win32.ActiveCfg = Release|Win32 - {6F834EAD-7B94-4979-A0F1-A662E3D30145}.Release|Win32.Build.0 = Release|Win32 - {6F834EAD-7B94-4979-A0F1-A662E3D30145}.Release|x64.ActiveCfg = Release|x64 - {6F834EAD-7B94-4979-A0F1-A662E3D30145}.Release|x64.Build.0 = Release|x64 {7521DD92-56FF-4ECA-93E5-CCE50862354B}.Debug|Win32.ActiveCfg = Debug|Win32 {7521DD92-56FF-4ECA-93E5-CCE50862354B}.Debug|Win32.Build.0 = Debug|Win32 {7521DD92-56FF-4ECA-93E5-CCE50862354B}.Debug|x64.ActiveCfg = Debug|x64 @@ -581,7 +563,6 @@ Global {CA25BDBF-B354-4597-B6D2-220ABBB0D2F4} = {6BB7A27F-FC59-4267-B6FA-D034176D1459} {AF7B2253-2E6D-4992-94D9-4B3699C54929} = {A64449B7-90FB-4E2B-A686-9EFC0E298644} {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1} = {A64449B7-90FB-4E2B-A686-9EFC0E298644} - {6F834EAD-7B94-4979-A0F1-A662E3D30145} = {B8C24D26-A3BF-4DA6-B64C-142CBA4BFE75} {7521DD92-56FF-4ECA-93E5-CCE50862354B} = {6BB7A27F-FC59-4267-B6FA-D034176D1459} {CA6F0834-0628-4CD7-8800-AEABCD636360} = {6BB7A27F-FC59-4267-B6FA-D034176D1459} {DE256E91-EE96-412E-82EE-DD7BD1A1130D} = {A64449B7-90FB-4E2B-A686-9EFC0E298644} diff --git a/projects/Win/vc14/hdr-test-tree.vcxproj b/projects/Win/vc14/hdr-test-tree.vcxproj deleted file mode 100644 index e9d8058e..00000000 --- a/projects/Win/vc14/hdr-test-tree.vcxproj +++ /dev/null @@ -1,385 +0,0 @@ - - - - - DebugVLD - Win32 - - - DebugVLD - x64 - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {6F834EAD-7B94-4979-A0F1-A662E3D30145} - hdrtesttree - Win32Proj - 8.1 - - - - Application - MultiByte - v140 - - - Application - MultiByte - true - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - v140 - - - Application - MultiByte - true - v140 - - - Application - MultiByte - v140 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-release\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-release\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - $(ProjectName)_d - $(ProjectName)_d - $(ProjectName)_d - $(ProjectName)_d - - - - /bigobj /Zc:inline %(AdditionalOptions) - Disabled - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;NOMINMAX;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - Cdecl - 4520 - - - unit-prerequisites_d.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - MultiplyDefinedSymbolOnly - - - - - X64 - - - /bigobj /Zc:inline %(AdditionalOptions) - Disabled - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;NOMINMAX;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - Cdecl - 4520 - - - unit-prerequisites_d.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - MultiplyDefinedSymbolOnly - - - - - /bigobj /Zc:inline %(AdditionalOptions) - Full - AnySuitable - true - Speed - false - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;NOMINMAX;_WIN32_WINNT=0x0500;_SCL_SECURE=0;%(PreprocessorDefinitions) - true - MultiThreadedDLL - StreamingSIMDExtensions2 - - - Level3 - ProgramDatabase - Cdecl - false - 4520 - - - unit-prerequisites.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - true - true - false - - - MachineX86 - true - MultiplyDefinedSymbolOnly - - - - - X64 - - - /bigobj /Zc:inline %(AdditionalOptions) - Full - AnySuitable - true - Speed - false - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;NOMINMAX;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) - true - MultiThreadedDLL - - - Level3 - ProgramDatabase - Cdecl - false - 4520 - - - unit-prerequisites.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - true - true - UseLinkTimeCodeGeneration - false - - - MachineX64 - true - MultiplyDefinedSymbolOnly - - - - - /bigobj /Zc:inline %(AdditionalOptions) - Disabled - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;NOMINMAX;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - Cdecl - 4520 - - - unit-prerequisites_d.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX86 - MultiplyDefinedSymbolOnly - - - - - X64 - - - /bigobj /Zc:inline %(AdditionalOptions) - Disabled - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;NOMINMAX;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - Cdecl - 4520 - - - unit-prerequisites_d.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - false - - - MachineX64 - MultiplyDefinedSymbolOnly - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/projects/Win/vc14/hdr-test-tree.vcxproj.filters b/projects/Win/vc14/hdr-test-tree.vcxproj.filters deleted file mode 100644 index eab1bbab..00000000 --- a/projects/Win/vc14/hdr-test-tree.vcxproj.filters +++ /dev/null @@ -1,163 +0,0 @@ - - - - - {dec34594-a06a-4ed8-9792-fbc6b2a251f5} - - - {a13910ed-6cb1-46bc-a137-7da531e65e3a} - - - {e2f66f2f-4770-4533-86f0-75fe68a263ab} - - - {36cb9dc5-7022-42bd-a68d-db247368092f} - - - {c47142c5-b407-4938-94f6-49f43f192890} - - - {af39cad7-51ab-4d41-ae94-d02f650314da} - - - - - container\bronson-avltree-map - - - container\ellen-bintree-set - - - container\ellen-bintree-map - - - intrusive\ellen-bintree-set - - - intrusive\ellen-bintree-set - - - intrusive\ellen-bintree-set - - - intrusive\ellen-bintree-set - - - - - - container\bronson-avltree-map - - - container\bronson-avltree-map - - - container\bronson-avltree-map - - - container\bronson-avltree-map - - - container\bronson-avltree-map - - - container\bronson-avltree-map - - - container\bronson-avltree-map - - - container\bronson-avltree-map - - - container\bronson-avltree-map - - - container\bronson-avltree-map - - - container\ellen-bintree-set - - - container\ellen-bintree-set - - - container\ellen-bintree-set - - - container\ellen-bintree-set - - - container\ellen-bintree-set - - - container\ellen-bintree-set - - - container\ellen-bintree-set - - - container\ellen-bintree-map - - - container\ellen-bintree-map - - - container\ellen-bintree-map - - - container\ellen-bintree-map - - - container\ellen-bintree-map - - - container\ellen-bintree-map - - - container\ellen-bintree-map - - - intrusive\ellen-bintree-set - - - intrusive\ellen-bintree-set - - - intrusive\ellen-bintree-set - - - intrusive\ellen-bintree-set - - - intrusive\ellen-bintree-set - - - intrusive\ellen-bintree-set - - - intrusive\ellen-bintree-set - - - intrusive\ellen-bintree-set - - - intrusive\ellen-bintree-set - - - intrusive\ellen-bintree-set - - - intrusive\ellen-bintree-set - - - intrusive\ellen-bintree-set - - - intrusive\ellen-bintree-set - - - intrusive\ellen-bintree-set - - - \ No newline at end of file diff --git a/projects/source.test-hdr.mk b/projects/source.test-hdr.mk index 8ff1ee71..3f84e584 100644 --- a/projects/source.test-hdr.mk +++ b/projects/source.test-hdr.mk @@ -1,38 +1,3 @@ -CDS_TESTHDR_TREE := \ - tests/test-hdr/tree/hdr_tree_reg.cpp \ - tests/test-hdr/tree/hdr_intrusive_ellen_bintree_hp.cpp \ - tests/test-hdr/tree/hdr_intrusive_ellen_bintree_dhp.cpp \ - tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpb.cpp \ - tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpi.cpp \ - tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpt.cpp \ - tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_shb.cpp \ - tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_sht.cpp \ - tests/test-hdr/tree/hdr_ellenbintree_map_hp.cpp \ - tests/test-hdr/tree/hdr_ellenbintree_map_dhp.cpp \ - tests/test-hdr/tree/hdr_ellenbintree_map_rcu_gpb.cpp \ - tests/test-hdr/tree/hdr_ellenbintree_map_rcu_gpi.cpp \ - tests/test-hdr/tree/hdr_ellenbintree_map_rcu_gpt.cpp \ - tests/test-hdr/tree/hdr_ellenbintree_map_rcu_shb.cpp \ - tests/test-hdr/tree/hdr_ellenbintree_map_rcu_sht.cpp \ - tests/test-hdr/tree/hdr_ellenbintree_set_hp.cpp \ - tests/test-hdr/tree/hdr_ellenbintree_set_dhp.cpp \ - tests/test-hdr/tree/hdr_ellenbintree_set_rcu_gpb.cpp \ - tests/test-hdr/tree/hdr_ellenbintree_set_rcu_gpi.cpp \ - tests/test-hdr/tree/hdr_ellenbintree_set_rcu_gpt.cpp \ - tests/test-hdr/tree/hdr_ellenbintree_set_rcu_shb.cpp \ - tests/test-hdr/tree/hdr_ellenbintree_set_rcu_sht.cpp \ - tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpb.cpp \ - tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpb_pool_monitor.cpp \ - tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpi.cpp \ - tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpi_pool_monitor.cpp \ - tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpt.cpp \ - tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpt_pool_monitor.cpp \ - tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_shb.cpp \ - tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_shb_pool_monitor.cpp \ - tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_sht.cpp \ - tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_sht_pool_monitor.cpp \ - - CDS_TESTHDR_MISC := \ tests/test-hdr/misc/cxx11_atomic_class.cpp \ tests/test-hdr/misc/cxx11_atomic_func.cpp \ @@ -46,6 +11,5 @@ CDS_TESTHDR_MISC := \ tests/test-hdr/misc/thread_init_fini.cpp CDS_TESTHDR_SOURCES := \ - $(CDS_TESTHDR_TREE) \ $(CDS_TESTHDR_MISC) diff --git a/projects/source.test-hdr.offsetof.mk b/projects/source.test-hdr.offsetof.mk deleted file mode 100644 index 3723e1b8..00000000 --- a/projects/source.test-hdr.offsetof.mk +++ /dev/null @@ -1,11 +0,0 @@ -CDS_TESTHDR_OFFSETOF_TREE := \ - tests/test-hdr/tree/hdr_intrusive_ellen_bintree_hp_member.cpp \ - tests/test-hdr/tree/hdr_intrusive_ellen_bintree_dhp_member.cpp \ - tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpb_member.cpp \ - tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpi_member.cpp \ - tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpt_member.cpp \ - tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_shb_member.cpp \ - tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_sht_member.cpp - -CDS_TESTHDR_OFFSETOF_SOURCES := \ - $(CDS_TESTHDR_OFFSETOF_TREE) diff --git a/tests/test-hdr/CMakeLists.txt b/tests/test-hdr/CMakeLists.txt index 34808779..fa5938cd 100644 --- a/tests/test-hdr/CMakeLists.txt +++ b/tests/test-hdr/CMakeLists.txt @@ -1,40 +1,5 @@ set(PACKAGE_NAME test-hdr) -set(CDS_TESTHDR_TREE - tree/hdr_tree_reg.cpp - tree/hdr_intrusive_ellen_bintree_hp.cpp - tree/hdr_intrusive_ellen_bintree_dhp.cpp - tree/hdr_intrusive_ellen_bintree_rcu_gpb.cpp - tree/hdr_intrusive_ellen_bintree_rcu_gpi.cpp - tree/hdr_intrusive_ellen_bintree_rcu_gpt.cpp - tree/hdr_intrusive_ellen_bintree_rcu_shb.cpp - tree/hdr_intrusive_ellen_bintree_rcu_sht.cpp - tree/hdr_ellenbintree_map_hp.cpp - tree/hdr_ellenbintree_map_dhp.cpp - tree/hdr_ellenbintree_map_rcu_gpb.cpp - tree/hdr_ellenbintree_map_rcu_gpi.cpp - tree/hdr_ellenbintree_map_rcu_gpt.cpp - tree/hdr_ellenbintree_map_rcu_shb.cpp - tree/hdr_ellenbintree_map_rcu_sht.cpp - tree/hdr_ellenbintree_set_hp.cpp - tree/hdr_ellenbintree_set_dhp.cpp - tree/hdr_ellenbintree_set_rcu_gpb.cpp - tree/hdr_ellenbintree_set_rcu_gpi.cpp - tree/hdr_ellenbintree_set_rcu_gpt.cpp - tree/hdr_ellenbintree_set_rcu_shb.cpp - tree/hdr_ellenbintree_set_rcu_sht.cpp - tree/hdr_bronson_avltree_map_rcu_gpb.cpp - tree/hdr_bronson_avltree_map_rcu_gpb_pool_monitor.cpp - tree/hdr_bronson_avltree_map_rcu_gpi.cpp - tree/hdr_bronson_avltree_map_rcu_gpi_pool_monitor.cpp - tree/hdr_bronson_avltree_map_rcu_gpt.cpp - tree/hdr_bronson_avltree_map_rcu_gpt_pool_monitor.cpp - tree/hdr_bronson_avltree_map_rcu_shb.cpp - tree/hdr_bronson_avltree_map_rcu_shb_pool_monitor.cpp - tree/hdr_bronson_avltree_map_rcu_sht.cpp - tree/hdr_bronson_avltree_map_rcu_sht_pool_monitor.cpp - ) - set(CDS_TESTHDR_MISC misc/cxx11_atomic_class.cpp misc/cxx11_atomic_func.cpp @@ -47,26 +12,7 @@ set(CDS_TESTHDR_MISC misc/permutation_generator.cpp misc/thread_init_fini.cpp) -set(CDS_TESTHDR_OFFSETOF_TREE - tree/hdr_intrusive_ellen_bintree_hp_member.cpp - tree/hdr_intrusive_ellen_bintree_dhp_member.cpp - tree/hdr_intrusive_ellen_bintree_rcu_gpb_member.cpp - tree/hdr_intrusive_ellen_bintree_rcu_gpi_member.cpp - tree/hdr_intrusive_ellen_bintree_rcu_gpt_member.cpp - tree/hdr_intrusive_ellen_bintree_rcu_shb_member.cpp - tree/hdr_intrusive_ellen_bintree_rcu_sht_member.cpp) - -set(CDS_TESTHDR_OFFSETOF_SOURCES - ${CDS_TESTHDR_OFFSETOF_TREE}) - -add_library(test-hdr-offsetof OBJECT ${CDS_TESTHDR_OFFSETOF_SOURCES}) - -if(CMAKE_COMPILER_IS_GNUCC) - set_property(TARGET test-hdr-offsetof APPEND_STRING PROPERTY COMPILE_FLAGS -Wno-invalid-offsetof) -endif(CMAKE_COMPILER_IS_GNUCC) - set(CDS_TESTHDR_SOURCES - ${CDS_TESTHDR_TREE} ${CDS_TESTHDR_MISC}) add_executable(${PACKAGE_NAME} ${CDS_TESTHDR_SOURCES} $ $) diff --git a/tests/test-hdr/tree/hdr_bronson_avltree_map.h b/tests/test-hdr/tree/hdr_bronson_avltree_map.h deleted file mode 100644 index c91518db..00000000 --- a/tests/test-hdr/tree/hdr_bronson_avltree_map.h +++ /dev/null @@ -1,706 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSTEST_HDR_BRONSON_AVLTREE_MAP_H -#define CDSTEST_HDR_BRONSON_AVLTREE_MAP_H - -#include "cppunit/cppunit_proxy.h" -#include "size_check.h" -#include // ref -#include - -namespace tree { - using misc::check_size; - - class BronsonAVLTreeHdrTest : public CppUnitMini::TestCase - { - public: - typedef int key_type; - - struct stat_data { - size_t nInsertFuncCall; - size_t nEnsureExistFuncCall; - size_t nEnsureNewFuncCall; - size_t nEraseFuncCall; - size_t nFindFuncCall; - - stat_data() - : nInsertFuncCall( 0 ) - , nEnsureExistFuncCall( 0 ) - , nEnsureNewFuncCall( 0 ) - , nEraseFuncCall( 0 ) - , nFindFuncCall( 0 ) - {} - }; - - struct value_type { - int nVal; - stat_data stat; - - value_type() - : nVal(0) - {} - - value_type( int v ) - : nVal( v ) - {} - }; - - struct compare { - int operator()( key_type k1, key_type k2 ) - { - return k1 < k2 ? -1 : k1 > k2 ? 1 : 0; - } - }; - - struct wrapped_int { - int nKey; - - wrapped_int( int n ) - : nKey( n ) - {} - }; - - struct wrapped_less - { - bool operator()( wrapped_int const& w, int n ) const - { - return w.nKey < n; - } - bool operator()( int n, wrapped_int const& w ) const - { - return n < w.nKey; - } - template - bool operator()( wrapped_int const& w, T const& v ) const - { - return w.nKey < v.nKey; - } - template - bool operator()( T const& v, wrapped_int const& w ) const - { - return v.nKey < w.nKey; - } - }; - - protected: - static const size_t c_nItemCount = 10000; - - struct find_functor - { - void operator()( key_type, value_type& v ) const - { - ++v.stat.nFindFuncCall; - } - }; - - template - struct copy_found - { - Item m_found; - - void operator()( key_type const&, Item& v ) - { - m_found = v; - } - - void operator()( Item& v ) - { - m_found = v; - } - }; - - struct insert_functor - { - template - void operator()( key_type key, Item& i ) - { - i.nVal = key * 100; - ++i.stat.nInsertFuncCall; - } - }; - - template - static void update_func( bool bNew, Q key, value_type& i ) - { - i.nVal = key * 100; - if ( bNew ) - ++i.stat.nEnsureNewFuncCall; - else - ++i.stat.nEnsureExistFuncCall; - } - - struct update_functor - { - template - void operator()( bool bNew, Q key, value_type& i ) - { - update_func( bNew, key, i ); - } - }; - - struct check_functor - { - void operator()( size_t nLevel, size_t hLeft, size_t hRight ) - { - CPPUNIT_MSG("Consistency violation: level=" << nLevel << ", hLeft=" << hLeft << ", hRight=" << hRight ); - } - }; - - protected: - template - void test_with( Set& s ) - { - value_type itm; - int key; - typedef typename Set::exempt_ptr exempt_ptr; - - // insert/find test - CPPUNIT_ASSERT( !s.contains( 10 ) ); - CPPUNIT_ASSERT( s.insert( 10 ) ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 1 ) ); - CPPUNIT_ASSERT( s.contains( 10 ) ); - - CPPUNIT_ASSERT( !s.insert( 10 ) ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 1 ) ); - - CPPUNIT_ASSERT( !s.contains( 20, std::less() ) ); - CPPUNIT_ASSERT( s.insert( 20, 25 ) ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 ) ); - CPPUNIT_ASSERT( s.contains( 10, std::less() ) ); - CPPUNIT_ASSERT( s.contains( key = 20 ) ); - CPPUNIT_ASSERT( s.find_with( key, std::less(), find_functor() ) ); - { - copy_found f; - key = 20; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nVal == 25 ); - CPPUNIT_ASSERT( f.m_found.stat.nFindFuncCall == 1 ); - } - CPPUNIT_ASSERT( s.find( key, find_functor() ) ); - { - copy_found f; - key = 20; - CPPUNIT_ASSERT( s.find_with( key, std::less(), std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nVal == 25 ); - CPPUNIT_ASSERT( f.m_found.stat.nFindFuncCall == 2 ); - } - CPPUNIT_ASSERT( s.find( 20, find_functor() ) ); - { - copy_found f; - CPPUNIT_ASSERT( s.find_with( 20, std::less(), std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nVal == 25 ); - CPPUNIT_ASSERT( f.m_found.stat.nFindFuncCall == 3 ); - } - - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 ) ); - - CPPUNIT_ASSERT( !s.contains( 25 ) ); - CPPUNIT_ASSERT( s.insert_with( 25, insert_functor() ) ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 ) ); - { - copy_found f; - key = 25; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nVal == 2500 ); - CPPUNIT_ASSERT( f.m_found.stat.nInsertFuncCall == 1 ); - } - - // update test - key = 10; - { - copy_found f; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nVal == 0 ); - CPPUNIT_ASSERT( f.m_found.stat.nEnsureExistFuncCall == 0 ); - CPPUNIT_ASSERT( f.m_found.stat.nEnsureNewFuncCall == 0 ); - } - std::pair updateResult = s.update( key, update_functor() ); - CPPUNIT_ASSERT( updateResult.first && !updateResult.second ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 ) ); - { - copy_found f; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nVal == 1000 ); - CPPUNIT_ASSERT( f.m_found.stat.nEnsureExistFuncCall == 1 ); - CPPUNIT_ASSERT( f.m_found.stat.nEnsureNewFuncCall == 0 ); - } - - updateResult = s.update( 13, []( bool /*bNew*/, key_type key, value_type& v ) - { - v.nVal = key * 1000; - ++v.stat.nEnsureNewFuncCall; - }); - CPPUNIT_ASSERT( updateResult.first && updateResult.second ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 4 ) ); - { - copy_found f; - key = 13; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nVal == 13000 ); - CPPUNIT_ASSERT( f.m_found.stat.nEnsureExistFuncCall == 0 ); - CPPUNIT_ASSERT( f.m_found.stat.nEnsureNewFuncCall == 1 ); - } - - // erase test - CPPUNIT_ASSERT( s.erase( 13 ) ); - CPPUNIT_ASSERT( !s.contains( 13 ) ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 ) ); - CPPUNIT_ASSERT( !s.erase( 13 ) ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 ) ); - - CPPUNIT_ASSERT( s.contains( 10 ) ); - CPPUNIT_ASSERT( s.erase_with( 10, std::less() ) ); - CPPUNIT_ASSERT( !s.contains( 10 ) ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 ) ); - CPPUNIT_ASSERT( !s.erase_with( 10, std::less() ) ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 ) ); - - CPPUNIT_ASSERT( s.contains( 20 ) ); - { - copy_found f; - CPPUNIT_ASSERT( s.erase( 20, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nVal == 25 ); - - CPPUNIT_ASSERT( s.insert( 235, 2350 ) ); - CPPUNIT_ASSERT( s.erase_with( 235, std::less(), std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nVal == 2350 ); - } - CPPUNIT_ASSERT( !s.contains( 20 ) ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 1 ) ); - - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 ) ); - - // emplace test - CPPUNIT_ASSERT( s.emplace( 151 ) ); // key = 151, val=0 - CPPUNIT_ASSERT( s.emplace( 174, 471 ) ); // key = 174, val = 471 - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 ) ); - - CPPUNIT_ASSERT( s.contains( 151 ) ); - CPPUNIT_ASSERT( s.contains( 174, std::less() ) ); - CPPUNIT_ASSERT( !s.contains( 190 ) ); - - { - copy_found f; - key = 151; - CPPUNIT_ASSERT( s.find( key, std::ref( f ))); - CPPUNIT_ASSERT( f.m_found.nVal == 0 ); - - key = 174; - CPPUNIT_ASSERT( s.find( key, std::ref( f ))); - CPPUNIT_ASSERT( f.m_found.nVal == 471 ); - } - - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 ) ); - - const int c_nStep = 10; - int keys[1000]; - for ( key_type i = 0; i < static_cast(sizeof(keys) / sizeof(keys[0])); ++i ) - keys[i] = i; - shuffle( keys, keys + sizeof(keys) / sizeof(keys[0])); - - size_t nCount = 1; - int nPrev; - key_type keyPrev; - exempt_ptr xp; - - // extract_min - for ( int i = 0; i < static_cast(sizeof(keys) / sizeof(keys[0])); ++i ) - CPPUNIT_ASSERT( s.emplace( keys[i], keys[i] * c_nStep )); - CPPUNIT_CHECK( s.check_consistency( check_functor() )); - - xp = s.extract_min(); - CPPUNIT_ASSERT( xp ); - nPrev = xp->nVal; - CPPUNIT_CHECK_EX( nPrev == 0, "Expected=0 real=" << nPrev ); - while ( !s.empty() ) { - xp = s.extract_min(); - CPPUNIT_ASSERT( xp ); - CPPUNIT_CHECK_EX( nPrev + c_nStep == xp->nVal, "Expected=" << nPrev + c_nStep << " real=" << xp->nVal ); - nPrev = xp->nVal; - ++nCount; - } - CPPUNIT_CHECK( nCount == sizeof(keys) / sizeof(keys[0])); - - // extract_min - for ( int i = 0; i < static_cast(sizeof(keys) / sizeof(keys[0])); ++i ) - CPPUNIT_ASSERT( s.insert( keys[i], keys[i] * c_nStep )); - CPPUNIT_CHECK( s.check_consistency( check_functor() )); - - nCount = 1; - xp = s.extract_min( [&keyPrev]( key_type k ){ keyPrev = k; }); - CPPUNIT_ASSERT( xp ); - nPrev = xp->nVal; - CPPUNIT_CHECK_EX( keyPrev == 0, "Expected=0 real=" << keyPrev ); - CPPUNIT_CHECK_EX( nPrev == 0, "Expected=0 real=" << nPrev ); - while ( !s.empty() ) { - xp = s.extract_min( [&key](key_type k){ key = k; } ); - CPPUNIT_ASSERT( xp ); - CPPUNIT_CHECK_EX( key == keyPrev + 1, "Expected=" << keyPrev + 1 << " real=" << key ); - CPPUNIT_CHECK_EX( nPrev + c_nStep == xp->nVal, "Expected=" << nPrev + c_nStep << " real=" << xp->nVal ); - nPrev = xp->nVal; - ++keyPrev; - ++nCount; - } - CPPUNIT_CHECK( nCount == sizeof(keys) / sizeof(keys[0])); - - // extract_min_key - for ( int i = 0; i < static_cast(sizeof(keys) / sizeof(keys[0])); ++i ) - CPPUNIT_ASSERT( s.insert( keys[i], keys[i] * c_nStep )); - CPPUNIT_CHECK( s.check_consistency( check_functor() )); - - nCount = 1; - xp = s.extract_min_key( keyPrev ); - CPPUNIT_ASSERT( xp ); - nPrev = xp->nVal; - CPPUNIT_CHECK_EX( keyPrev == 0, "Expected=0 real=" << keyPrev ); - CPPUNIT_CHECK_EX( nPrev == 0, "Expected=0 real=" << nPrev ); - while ( !s.empty() ) { - xp = s.extract_min_key( key ); - CPPUNIT_ASSERT( xp ); - CPPUNIT_CHECK_EX( key == keyPrev + 1, "Expected=" << keyPrev + 1 << " real=" << key ); - CPPUNIT_CHECK_EX( nPrev + c_nStep == xp->nVal, "Expected=" << nPrev + c_nStep << " real=" << xp->nVal ); - nPrev = xp->nVal; - ++keyPrev; - ++nCount; - } - CPPUNIT_CHECK( nCount == sizeof(keys) / sizeof(keys[0])); - - // extract_max - for ( int i = 0; i < static_cast(sizeof(keys) / sizeof(keys[0])); ++i ) - CPPUNIT_ASSERT( s.emplace( keys[i], keys[i] * c_nStep )); - CPPUNIT_CHECK( s.check_consistency( check_functor() )); - - nCount = 1; - xp = s.extract_max(); - CPPUNIT_ASSERT( xp ); - nPrev = xp->nVal; - CPPUNIT_CHECK_EX( nPrev == c_nStep * (sizeof(keys) / sizeof(keys[0]) - 1), - "Expected=" << c_nStep * (sizeof(keys) / sizeof(keys[0]) - 1) << " real=" << nPrev ); - while ( !s.empty() ) { - xp = s.extract_max(); - CPPUNIT_ASSERT( xp ); - CPPUNIT_CHECK_EX( nPrev - c_nStep == xp->nVal, "Expected=" << nPrev - c_nStep << " real=" << xp->nVal ); - nPrev = xp->nVal; - ++nCount; - } - CPPUNIT_CHECK( nCount == sizeof(keys) / sizeof(keys[0])); - - // extract_max - for ( int i = 0; i < static_cast(sizeof(keys) / sizeof(keys[0])); ++i ) - CPPUNIT_ASSERT( s.emplace( keys[i], keys[i] * c_nStep )); - CPPUNIT_CHECK( s.check_consistency( check_functor() )); - - nCount = 1; - xp = s.extract_max( [&keyPrev]( key_type k ){ keyPrev = k; }); - CPPUNIT_ASSERT( xp ); - nPrev = xp->nVal; - CPPUNIT_CHECK_EX( keyPrev == sizeof(keys) / sizeof(keys[0]) - 1, - "Expected=" << sizeof(keys) / sizeof(keys[0]) - 1 << " real=" << keyPrev ); - CPPUNIT_CHECK_EX( nPrev == c_nStep * (sizeof(keys) / sizeof(keys[0]) - 1), - "Expected=" << c_nStep * (sizeof(keys) / sizeof(keys[0]) - 1) << " real=" << nPrev ); - while ( !s.empty() ) { - xp = s.extract_max( [&key](key_type k){ key = k; }); - CPPUNIT_ASSERT( xp ); - CPPUNIT_CHECK_EX( key == keyPrev - 1, "Expected=" << keyPrev - 1 << " real=" << key ); - CPPUNIT_CHECK_EX( nPrev - c_nStep == xp->nVal, "Expected=" << nPrev - c_nStep << " real=" << xp->nVal ); - nPrev = xp->nVal; - --keyPrev; - ++nCount; - } - CPPUNIT_CHECK( nCount == sizeof(keys) / sizeof(keys[0])); - - // extract_max_key - for ( int i = 0; i < static_cast(sizeof(keys) / sizeof(keys[0])); ++i ) - CPPUNIT_ASSERT( s.emplace( keys[i], keys[i] * c_nStep )); - CPPUNIT_CHECK( s.check_consistency( check_functor() )); - - nCount = 1; - xp = s.extract_max_key( keyPrev ); - CPPUNIT_ASSERT( xp ); - nPrev = xp->nVal; - CPPUNIT_CHECK_EX( keyPrev == sizeof(keys) / sizeof(keys[0]) - 1, - "Expected=" << sizeof(keys) / sizeof(keys[0]) - 1 << " real=" << keyPrev ); - CPPUNIT_CHECK_EX( nPrev == c_nStep * (sizeof(keys) / sizeof(keys[0]) - 1), - "Expected=" << c_nStep * (sizeof(keys) / sizeof(keys[0]) - 1) << " real=" << nPrev ); - while ( !s.empty() ) { - xp = s.extract_max_key( key ); - CPPUNIT_ASSERT( xp ); - CPPUNIT_CHECK_EX( key == keyPrev - 1, "Expected=" << keyPrev - 1 << " real=" << key ); - CPPUNIT_CHECK_EX( nPrev - c_nStep == xp->nVal, "Expected=" << nPrev - c_nStep << " real=" << xp->nVal ); - nPrev = xp->nVal; - --keyPrev; - ++nCount; - } - CPPUNIT_CHECK( nCount == sizeof(keys) / sizeof(keys[0])); - - // extract - for ( int i = 0; i < static_cast(sizeof(keys) / sizeof(keys[0])); ++i ) - CPPUNIT_ASSERT( s.emplace( keys[i], keys[i] * c_nStep )); - CPPUNIT_CHECK( s.check_consistency( check_functor() )); - - for ( int i = 0; i < static_cast(sizeof( keys ) / sizeof( keys[0] )); ++i ) { - xp = s.extract(keys[i]); - CPPUNIT_CHECK_EX( xp->nVal == keys[i] * c_nStep, "Expected value=" << keys[i] * c_nStep << " real=" << xp->nVal ); - } - CPPUNIT_ASSERT(s.empty()); - - - // extract_with - for ( int i = 0; i < static_cast(sizeof(keys) / sizeof(keys[0])); ++i ) - CPPUNIT_ASSERT( s.emplace( keys[i], keys[i] * c_nStep )); - CPPUNIT_CHECK( s.check_consistency( check_functor() )); - - for ( int i = 0; i < static_cast(sizeof( keys ) / sizeof( keys[0] )); ++i ) { - xp = s.extract_with( wrapped_int(keys[i]), wrapped_less()); - CPPUNIT_CHECK_EX( xp->nVal == keys[i] * c_nStep, "Expected value=" << keys[i] * c_nStep << " real=" << xp->nVal ); - } - CPPUNIT_ASSERT(s.empty()); - } - - template - void test() - { - typedef Set set_type; - - set_type s; - - test_with( s ); - - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 ) ); - - PrintStat()(s); - } - - void BronsonAVLTree_rcu_gpi_less(); - void BronsonAVLTree_rcu_gpi_less_stat(); - void BronsonAVLTree_rcu_gpi_cmp(); - void BronsonAVLTree_rcu_gpi_cmp_stat(); - void BronsonAVLTree_rcu_gpi_cmpless(); - void BronsonAVLTree_rcu_gpi_less_ic(); - void BronsonAVLTree_rcu_gpi_cmp_ic(); - void BronsonAVLTree_rcu_gpi_cmp_ic_stat(); - void BronsonAVLTree_rcu_gpi_cmp_ic_stat_yield(); - void BronsonAVLTree_rcu_gpi_less_relaxed_insert(); - void BronsonAVLTree_rcu_gpi_less_relaxed_insert_stat(); - void BronsonAVLTree_rcu_gpi_pool_monitor_less(); - void BronsonAVLTree_rcu_gpi_pool_monitor_less_stat(); - void BronsonAVLTree_rcu_gpi_pool_monitor_cmp_ic_stat(); - void BronsonAVLTree_rcu_gpi_pool_monitor_cmp_ic_stat_yield(); - void BronsonAVLTree_rcu_gpi_pool_monitor_less_relaxed_insert(); - void BronsonAVLTree_rcu_gpi_pool_monitor_less_relaxed_insert_stat(); - - void BronsonAVLTree_rcu_gpb_less(); - void BronsonAVLTree_rcu_gpb_less_stat(); - void BronsonAVLTree_rcu_gpb_cmp(); - void BronsonAVLTree_rcu_gpb_cmp_stat(); - void BronsonAVLTree_rcu_gpb_cmpless(); - void BronsonAVLTree_rcu_gpb_less_ic(); - void BronsonAVLTree_rcu_gpb_cmp_ic(); - void BronsonAVLTree_rcu_gpb_cmp_ic_stat(); - void BronsonAVLTree_rcu_gpb_cmp_ic_stat_yield(); - void BronsonAVLTree_rcu_gpb_less_relaxed_insert(); - void BronsonAVLTree_rcu_gpb_less_relaxed_insert_stat(); - void BronsonAVLTree_rcu_gpb_pool_monitor_less(); - void BronsonAVLTree_rcu_gpb_pool_monitor_less_stat(); - void BronsonAVLTree_rcu_gpb_pool_monitor_cmp_ic_stat(); - void BronsonAVLTree_rcu_gpb_pool_monitor_cmp_ic_stat_yield(); - void BronsonAVLTree_rcu_gpb_pool_monitor_less_relaxed_insert(); - void BronsonAVLTree_rcu_gpb_pool_monitor_less_relaxed_insert_stat(); - - void BronsonAVLTree_rcu_gpt_less(); - void BronsonAVLTree_rcu_gpt_less_stat(); - void BronsonAVLTree_rcu_gpt_cmp(); - void BronsonAVLTree_rcu_gpt_cmp_stat(); - void BronsonAVLTree_rcu_gpt_cmpless(); - void BronsonAVLTree_rcu_gpt_less_ic(); - void BronsonAVLTree_rcu_gpt_cmp_ic(); - void BronsonAVLTree_rcu_gpt_cmp_ic_stat(); - void BronsonAVLTree_rcu_gpt_cmp_ic_stat_yield(); - void BronsonAVLTree_rcu_gpt_less_relaxed_insert(); - void BronsonAVLTree_rcu_gpt_less_relaxed_insert_stat(); - void BronsonAVLTree_rcu_gpt_pool_monitor_less(); - void BronsonAVLTree_rcu_gpt_pool_monitor_less_stat(); - void BronsonAVLTree_rcu_gpt_pool_monitor_cmp_ic_stat(); - void BronsonAVLTree_rcu_gpt_pool_monitor_cmp_ic_stat_yield(); - void BronsonAVLTree_rcu_gpt_pool_monitor_less_relaxed_insert(); - void BronsonAVLTree_rcu_gpt_pool_monitor_less_relaxed_insert_stat(); - - void BronsonAVLTree_rcu_shb_less(); - void BronsonAVLTree_rcu_shb_less_stat(); - void BronsonAVLTree_rcu_shb_cmp(); - void BronsonAVLTree_rcu_shb_cmp_stat(); - void BronsonAVLTree_rcu_shb_cmpless(); - void BronsonAVLTree_rcu_shb_less_ic(); - void BronsonAVLTree_rcu_shb_cmp_ic(); - void BronsonAVLTree_rcu_shb_cmp_ic_stat(); - void BronsonAVLTree_rcu_shb_cmp_ic_stat_yield(); - void BronsonAVLTree_rcu_shb_less_relaxed_insert(); - void BronsonAVLTree_rcu_shb_less_relaxed_insert_stat(); - void BronsonAVLTree_rcu_shb_pool_monitor_less(); - void BronsonAVLTree_rcu_shb_pool_monitor_less_stat(); - void BronsonAVLTree_rcu_shb_pool_monitor_cmp_ic_stat(); - void BronsonAVLTree_rcu_shb_pool_monitor_cmp_ic_stat_yield(); - void BronsonAVLTree_rcu_shb_pool_monitor_less_relaxed_insert(); - void BronsonAVLTree_rcu_shb_pool_monitor_less_relaxed_insert_stat(); - - void BronsonAVLTree_rcu_sht_less(); - void BronsonAVLTree_rcu_sht_less_stat(); - void BronsonAVLTree_rcu_sht_cmp(); - void BronsonAVLTree_rcu_sht_cmp_stat(); - void BronsonAVLTree_rcu_sht_cmpless(); - void BronsonAVLTree_rcu_sht_less_ic(); - void BronsonAVLTree_rcu_sht_cmp_ic(); - void BronsonAVLTree_rcu_sht_cmp_ic_stat(); - void BronsonAVLTree_rcu_sht_cmp_ic_stat_yield(); - void BronsonAVLTree_rcu_sht_less_relaxed_insert(); - void BronsonAVLTree_rcu_sht_less_relaxed_insert_stat(); - void BronsonAVLTree_rcu_sht_pool_monitor_less(); - void BronsonAVLTree_rcu_sht_pool_monitor_less_stat(); - void BronsonAVLTree_rcu_sht_pool_monitor_cmp_ic_stat(); - void BronsonAVLTree_rcu_sht_pool_monitor_cmp_ic_stat_yield(); - void BronsonAVLTree_rcu_sht_pool_monitor_less_relaxed_insert(); - void BronsonAVLTree_rcu_sht_pool_monitor_less_relaxed_insert_stat(); - - CPPUNIT_TEST_SUITE( BronsonAVLTreeHdrTest ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpi_less ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpi_less_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpi_cmp ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpi_cmp_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpi_cmpless ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpi_less_ic ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpi_cmp_ic ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpi_cmp_ic_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpi_cmp_ic_stat_yield ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpi_less_relaxed_insert ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpi_less_relaxed_insert_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpi_pool_monitor_less ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpi_pool_monitor_less_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpi_pool_monitor_cmp_ic_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpi_pool_monitor_cmp_ic_stat_yield ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpi_pool_monitor_less_relaxed_insert ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpi_pool_monitor_less_relaxed_insert_stat ) - - CPPUNIT_TEST( BronsonAVLTree_rcu_gpb_less ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpb_less_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpb_cmp ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpb_cmp_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpb_cmpless ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpb_less_ic ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpb_cmp_ic ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpb_cmp_ic_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpb_cmp_ic_stat_yield ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpb_less_relaxed_insert ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpb_less_relaxed_insert_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpb_pool_monitor_less ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpb_pool_monitor_less_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpb_pool_monitor_cmp_ic_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpb_pool_monitor_cmp_ic_stat_yield ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpb_pool_monitor_less_relaxed_insert ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpb_pool_monitor_less_relaxed_insert_stat ) - - CPPUNIT_TEST( BronsonAVLTree_rcu_gpt_less ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpt_less_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpt_cmp ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpt_cmp_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpt_cmpless ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpt_less_ic ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpt_cmp_ic ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpt_cmp_ic_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpt_cmp_ic_stat_yield ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpt_less_relaxed_insert ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpt_less_relaxed_insert_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpt_pool_monitor_less ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpt_pool_monitor_less_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpt_pool_monitor_cmp_ic_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpt_pool_monitor_cmp_ic_stat_yield ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpt_pool_monitor_less_relaxed_insert ) - CPPUNIT_TEST( BronsonAVLTree_rcu_gpt_pool_monitor_less_relaxed_insert_stat ) - - CPPUNIT_TEST( BronsonAVLTree_rcu_shb_less ) - CPPUNIT_TEST( BronsonAVLTree_rcu_shb_less_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_shb_cmp ) - CPPUNIT_TEST( BronsonAVLTree_rcu_shb_cmp_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_shb_cmpless ) - CPPUNIT_TEST( BronsonAVLTree_rcu_shb_less_ic ) - CPPUNIT_TEST( BronsonAVLTree_rcu_shb_cmp_ic ) - CPPUNIT_TEST( BronsonAVLTree_rcu_shb_cmp_ic_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_shb_cmp_ic_stat_yield ) - CPPUNIT_TEST( BronsonAVLTree_rcu_shb_less_relaxed_insert ) - CPPUNIT_TEST( BronsonAVLTree_rcu_shb_less_relaxed_insert_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_shb_pool_monitor_less ) - CPPUNIT_TEST( BronsonAVLTree_rcu_shb_pool_monitor_less_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_shb_pool_monitor_cmp_ic_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_shb_pool_monitor_cmp_ic_stat_yield ) - CPPUNIT_TEST( BronsonAVLTree_rcu_shb_pool_monitor_less_relaxed_insert ) - CPPUNIT_TEST( BronsonAVLTree_rcu_shb_pool_monitor_less_relaxed_insert_stat ) - - CPPUNIT_TEST( BronsonAVLTree_rcu_sht_less ) - CPPUNIT_TEST( BronsonAVLTree_rcu_sht_less_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_sht_cmp ) - CPPUNIT_TEST( BronsonAVLTree_rcu_sht_cmp_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_sht_cmpless ) - CPPUNIT_TEST( BronsonAVLTree_rcu_sht_less_ic ) - CPPUNIT_TEST( BronsonAVLTree_rcu_sht_cmp_ic ) - CPPUNIT_TEST( BronsonAVLTree_rcu_sht_cmp_ic_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_sht_cmp_ic_stat_yield ) - CPPUNIT_TEST( BronsonAVLTree_rcu_sht_less_relaxed_insert ) - CPPUNIT_TEST( BronsonAVLTree_rcu_sht_less_relaxed_insert_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_sht_pool_monitor_less ) - CPPUNIT_TEST( BronsonAVLTree_rcu_sht_pool_monitor_less_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_sht_pool_monitor_cmp_ic_stat ) - CPPUNIT_TEST( BronsonAVLTree_rcu_sht_pool_monitor_cmp_ic_stat_yield ) - CPPUNIT_TEST( BronsonAVLTree_rcu_sht_pool_monitor_less_relaxed_insert ) - CPPUNIT_TEST( BronsonAVLTree_rcu_sht_pool_monitor_less_relaxed_insert_stat ) - - CPPUNIT_TEST_SUITE_END() - }; -} // namespace tree - -#endif // #ifndef CDSTEST_HDR_BRONSON_AVLTREE_MAP_H diff --git a/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpb.cpp b/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpb.cpp deleted file mode 100644 index b265d001..00000000 --- a/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpb.cpp +++ /dev/null @@ -1,188 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_bronson_avltree_map.h" -#include -#include - -#include "unit/print_bronsonavltree_stat.h" - -namespace tree { - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type; - - struct print_stat { - template - void operator()( Tree const& t ) - { - std::cout << t.statistics(); - } - }; - } // namespace - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpb_less() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,cc::bronson_avltree::relaxed_insert< false > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpb_less_stat() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::stat< cc::bronson_avltree::stat<> > - ,cc::bronson_avltree::relaxed_insert< false > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpb_cmp() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpb_cmp_stat() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::stat< cc::bronson_avltree::stat<> > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpb_cmpless() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::less< std::less > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpb_less_ic() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::item_counter< cds::atomicity::item_counter > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpb_cmp_ic() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpb_cmp_ic_stat() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::bronson_avltree::stat<> > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpb_cmp_ic_stat_yield() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::bronson_avltree::stat<> > - ,co::back_off< cds::backoff::yield > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpb_less_relaxed_insert() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,cc::bronson_avltree::relaxed_insert< true > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpb_less_relaxed_insert_stat() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::stat< cc::bronson_avltree::stat<> > - ,cc::bronson_avltree::relaxed_insert< true > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpb_pool_monitor.cpp b/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpb_pool_monitor.cpp deleted file mode 100644 index a1780ddc..00000000 --- a/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpb_pool_monitor.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_bronson_avltree_map.h" -#include -#include -#include -#include - -#include "unit/print_bronsonavltree_stat.h" -#include "unit/print_sync_monitor_stat.h" - -namespace tree { - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type; - - struct print_stat { - template - void operator()( Tree const& t ) const - { - std::cout << t.statistics(); - std::cout << t.monitor().statistics(); - } - }; - - typedef cds::memory::vyukov_queue_pool< std::mutex > simple_pool; - typedef cds::memory::lazy_vyukov_queue_pool< std::mutex > lazy_pool; - typedef cds::memory::bounded_vyukov_queue_pool< std::mutex > bounded_pool; - } // namespace - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpb_pool_monitor_less() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::sync_monitor< cds::sync::pool_monitor > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpb_pool_monitor_less_stat() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::stat< cc::bronson_avltree::stat<> > - ,co::sync_monitor< cds::sync::pool_monitor> - ,cc::bronson_avltree::relaxed_insert< false > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpb_pool_monitor_cmp_ic_stat() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::bronson_avltree::stat<> > - ,co::sync_monitor< cds::sync::pool_monitor> - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpb_pool_monitor_cmp_ic_stat_yield() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::bronson_avltree::stat<> > - ,co::back_off< cds::backoff::yield > - ,co::sync_monitor< cds::sync::pool_monitor> - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpb_pool_monitor_less_relaxed_insert() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,cc::bronson_avltree::relaxed_insert< true > - ,co::sync_monitor< cds::sync::pool_monitor > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpb_pool_monitor_less_relaxed_insert_stat() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::stat< cc::bronson_avltree::stat<> > - ,cc::bronson_avltree::relaxed_insert< true > - ,co::sync_monitor< cds::sync::pool_monitor> - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpi.cpp b/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpi.cpp deleted file mode 100644 index 32c65b6f..00000000 --- a/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpi.cpp +++ /dev/null @@ -1,188 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_bronson_avltree_map.h" -#include -#include - -#include "unit/print_bronsonavltree_stat.h" - -namespace tree { - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type; - - struct print_stat { - template - void operator()( Tree const& t ) - { - std::cout << t.statistics(); - } - }; - } // namespace - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpi_less() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,cc::bronson_avltree::relaxed_insert< false > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpi_less_stat() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::stat< cc::bronson_avltree::stat<> > - ,cc::bronson_avltree::relaxed_insert< false > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpi_cmp() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpi_cmp_stat() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::stat< cc::bronson_avltree::stat<> > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpi_cmpless() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::less< std::less > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpi_less_ic() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::item_counter< cds::atomicity::item_counter > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpi_cmp_ic() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpi_cmp_ic_stat() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::bronson_avltree::stat<> > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpi_cmp_ic_stat_yield() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::bronson_avltree::stat<> > - ,co::back_off< cds::backoff::yield > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpi_less_relaxed_insert() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,cc::bronson_avltree::relaxed_insert< true > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpi_less_relaxed_insert_stat() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::stat< cc::bronson_avltree::stat<> > - ,cc::bronson_avltree::relaxed_insert< true > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpi_pool_monitor.cpp b/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpi_pool_monitor.cpp deleted file mode 100644 index 3976d54f..00000000 --- a/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpi_pool_monitor.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_bronson_avltree_map.h" -#include -#include -#include -#include - -#include "unit/print_bronsonavltree_stat.h" -#include "unit/print_sync_monitor_stat.h" - -namespace tree { - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type; - - struct print_stat { - template - void operator()( Tree const& t ) - { - std::cout << t.statistics(); - std::cout << t.monitor().statistics(); - } - }; - - typedef cds::memory::vyukov_queue_pool< std::mutex > simple_pool; - typedef cds::memory::lazy_vyukov_queue_pool< std::mutex > lazy_pool; - typedef cds::memory::bounded_vyukov_queue_pool< std::mutex > bounded_pool; - } // namespace - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpi_pool_monitor_less() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::sync_monitor< cds::sync::pool_monitor > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpi_pool_monitor_less_stat() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::stat< cc::bronson_avltree::stat<> > - ,co::sync_monitor< cds::sync::pool_monitor > - ,cc::bronson_avltree::relaxed_insert< false > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpi_pool_monitor_cmp_ic_stat() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::bronson_avltree::stat<> > - ,co::sync_monitor< cds::sync::pool_monitor > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpi_pool_monitor_cmp_ic_stat_yield() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::bronson_avltree::stat<> > - ,co::back_off< cds::backoff::yield > - ,co::sync_monitor< cds::sync::pool_monitor > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpi_pool_monitor_less_relaxed_insert() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,cc::bronson_avltree::relaxed_insert< true > - ,co::sync_monitor< cds::sync::pool_monitor > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpi_pool_monitor_less_relaxed_insert_stat() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::stat< cc::bronson_avltree::stat<> > - ,cc::bronson_avltree::relaxed_insert< true > - ,co::sync_monitor< cds::sync::pool_monitor > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpt.cpp b/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpt.cpp deleted file mode 100644 index d628bcaf..00000000 --- a/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpt.cpp +++ /dev/null @@ -1,188 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_bronson_avltree_map.h" -#include -#include - -#include "unit/print_bronsonavltree_stat.h" - -namespace tree { - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type; - - struct print_stat { - template - void operator()( Tree const& t ) - { - std::cout << t.statistics(); - } - }; - } // namespace - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpt_less() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,cc::bronson_avltree::relaxed_insert< false > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpt_less_stat() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::stat< cc::bronson_avltree::stat<> > - ,cc::bronson_avltree::relaxed_insert< false > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpt_cmp() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpt_cmp_stat() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::stat< cc::bronson_avltree::stat<> > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpt_cmpless() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::less< std::less > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpt_less_ic() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::item_counter< cds::atomicity::item_counter > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpt_cmp_ic() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpt_cmp_ic_stat() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::bronson_avltree::stat<> > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpt_cmp_ic_stat_yield() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::bronson_avltree::stat<> > - ,co::back_off< cds::backoff::yield > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpt_less_relaxed_insert() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,cc::bronson_avltree::relaxed_insert< true > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpt_less_relaxed_insert_stat() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::stat< cc::bronson_avltree::stat<> > - ,cc::bronson_avltree::relaxed_insert< true > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpt_pool_monitor.cpp b/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpt_pool_monitor.cpp deleted file mode 100644 index e00e6012..00000000 --- a/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_gpt_pool_monitor.cpp +++ /dev/null @@ -1,143 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_bronson_avltree_map.h" -#include -#include -#include -#include - -#include "unit/print_bronsonavltree_stat.h" -#include "unit/print_sync_monitor_stat.h" - - -namespace tree { - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type; - - struct print_stat { - template - void operator()( Tree const& t ) - { - std::cout << t.statistics(); - std::cout << t.monitor().statistics(); - } - }; - - typedef cds::memory::vyukov_queue_pool< std::mutex > simple_pool; - typedef cds::memory::lazy_vyukov_queue_pool< std::mutex > lazy_pool; - typedef cds::memory::bounded_vyukov_queue_pool< std::mutex > bounded_pool; - } // namespace - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpt_pool_monitor_less() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::sync_monitor< cds::sync::pool_monitor > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpt_pool_monitor_less_stat() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::stat< cc::bronson_avltree::stat<> > - ,co::sync_monitor< cds::sync::pool_monitor > - ,cc::bronson_avltree::relaxed_insert< false > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpt_pool_monitor_cmp_ic_stat() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::bronson_avltree::stat<> > - ,co::sync_monitor< cds::sync::pool_monitor > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpt_pool_monitor_cmp_ic_stat_yield() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::bronson_avltree::stat<> > - ,co::back_off< cds::backoff::yield > - ,co::sync_monitor< cds::sync::pool_monitor > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpt_pool_monitor_less_relaxed_insert() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,cc::bronson_avltree::relaxed_insert< true > - ,co::sync_monitor< cds::sync::pool_monitor > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_gpt_pool_monitor_less_relaxed_insert_stat() - { - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::stat< cc::bronson_avltree::stat<> > - ,cc::bronson_avltree::relaxed_insert< true > - ,co::sync_monitor< cds::sync::pool_monitor > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); - } - -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_shb.cpp b/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_shb.cpp deleted file mode 100644 index a33836d7..00000000 --- a/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_shb.cpp +++ /dev/null @@ -1,212 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_bronson_avltree_map.h" -#include -#include - -#include "unit/print_bronsonavltree_stat.h" - -namespace tree { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type; - - struct print_stat { - template - void operator()( Tree const& t ) - { - std::cout << t.statistics(); - } - }; - } // namespace -#endif - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_shb_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,cc::bronson_avltree::relaxed_insert< false > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_shb_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::stat< cc::bronson_avltree::stat<> > - ,cc::bronson_avltree::relaxed_insert< false > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_shb_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_shb_cmp_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::stat< cc::bronson_avltree::stat<> > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_shb_cmpless() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::less< std::less > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_shb_less_ic() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::item_counter< cds::atomicity::item_counter > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_shb_cmp_ic() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_shb_cmp_ic_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::bronson_avltree::stat<> > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_shb_cmp_ic_stat_yield() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::bronson_avltree::stat<> > - ,co::back_off< cds::backoff::yield > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_shb_less_relaxed_insert() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,cc::bronson_avltree::relaxed_insert< true > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_shb_less_relaxed_insert_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::stat< cc::bronson_avltree::stat<> > - ,cc::bronson_avltree::relaxed_insert< true > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_shb_pool_monitor.cpp b/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_shb_pool_monitor.cpp deleted file mode 100644 index ca6df315..00000000 --- a/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_shb_pool_monitor.cpp +++ /dev/null @@ -1,155 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_bronson_avltree_map.h" -#include -#include -#include -#include - -#include "unit/print_bronsonavltree_stat.h" -#include "unit/print_sync_monitor_stat.h" - -namespace tree { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type; - - struct print_stat { - template - void operator()( Tree const& t ) - { - std::cout << t.statistics(); - std::cout << t.monitor().statistics(); - } - }; - - typedef cds::memory::vyukov_queue_pool< std::mutex > simple_pool; - typedef cds::memory::lazy_vyukov_queue_pool< std::mutex > lazy_pool; - typedef cds::memory::bounded_vyukov_queue_pool< std::mutex > bounded_pool; - } // namespace -#endif - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_shb_pool_monitor_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::sync_monitor< cds::sync::pool_monitor > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_shb_pool_monitor_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::stat< cc::bronson_avltree::stat<> > - ,co::sync_monitor< cds::sync::pool_monitor > - ,cc::bronson_avltree::relaxed_insert< false > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_shb_pool_monitor_cmp_ic_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::bronson_avltree::stat<> > - ,co::sync_monitor< cds::sync::pool_monitor > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_shb_pool_monitor_cmp_ic_stat_yield() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::bronson_avltree::stat<> > - ,co::back_off< cds::backoff::yield > - ,co::sync_monitor< cds::sync::pool_monitor > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_shb_pool_monitor_less_relaxed_insert() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,cc::bronson_avltree::relaxed_insert< true > - ,co::sync_monitor< cds::sync::pool_monitor > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_shb_pool_monitor_less_relaxed_insert_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::stat< cc::bronson_avltree::stat<> > - ,cc::bronson_avltree::relaxed_insert< true > - ,co::sync_monitor< cds::sync::pool_monitor > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_sht.cpp b/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_sht.cpp deleted file mode 100644 index a83d2d63..00000000 --- a/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_sht.cpp +++ /dev/null @@ -1,212 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_bronson_avltree_map.h" -#include -#include - -#include "unit/print_bronsonavltree_stat.h" - -namespace tree { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type; - - struct print_stat { - template - void operator()( Tree const& t ) - { - std::cout << t.statistics(); - } - }; - } // namespace -#endif - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_sht_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,cc::bronson_avltree::relaxed_insert< false > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_sht_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::stat< cc::bronson_avltree::stat<> > - ,cc::bronson_avltree::relaxed_insert< false > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_sht_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_sht_cmp_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::stat< cc::bronson_avltree::stat<> > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_sht_cmpless() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::less< std::less > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_sht_less_ic() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::item_counter< cds::atomicity::item_counter > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_sht_cmp_ic() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_sht_cmp_ic_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::bronson_avltree::stat<> > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_sht_cmp_ic_stat_yield() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::bronson_avltree::stat<> > - ,co::back_off< cds::backoff::yield > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_sht_less_relaxed_insert() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,cc::bronson_avltree::relaxed_insert< true > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_sht_less_relaxed_insert_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::stat< cc::bronson_avltree::stat<> > - ,cc::bronson_avltree::relaxed_insert< true > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_sht_pool_monitor.cpp b/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_sht_pool_monitor.cpp deleted file mode 100644 index aa542c7f..00000000 --- a/tests/test-hdr/tree/hdr_bronson_avltree_map_rcu_sht_pool_monitor.cpp +++ /dev/null @@ -1,155 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_bronson_avltree_map.h" -#include -#include -#include -#include - -#include "unit/print_bronsonavltree_stat.h" -#include "unit/print_sync_monitor_stat.h" - -namespace tree { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type; - - struct print_stat { - template - void operator()( Tree const& t ) - { - std::cout << t.statistics(); - std::cout << t.monitor().statistics(); - } - }; - - typedef cds::memory::vyukov_queue_pool< std::mutex > simple_pool; - typedef cds::memory::lazy_vyukov_queue_pool< std::mutex > lazy_pool; - typedef cds::memory::bounded_vyukov_queue_pool< std::mutex > bounded_pool; - } // namespace -#endif - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_sht_pool_monitor_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::sync_monitor< cds::sync::pool_monitor > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_sht_pool_monitor_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::stat< cc::bronson_avltree::stat<> > - ,co::sync_monitor< cds::sync::pool_monitor > - ,cc::bronson_avltree::relaxed_insert< false > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_sht_pool_monitor_cmp_ic_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::bronson_avltree::stat<> > - ,co::sync_monitor< cds::sync::pool_monitor > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_sht_pool_monitor_cmp_ic_stat_yield() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::compare< compare > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::bronson_avltree::stat<> > - ,co::back_off< cds::backoff::yield > - ,co::sync_monitor< cds::sync::pool_monitor > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_sht_pool_monitor_less_relaxed_insert() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,cc::bronson_avltree::relaxed_insert< true > - ,co::sync_monitor< cds::sync::pool_monitor > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } - - void BronsonAVLTreeHdrTest::BronsonAVLTree_rcu_sht_pool_monitor_less_relaxed_insert_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - struct traits: public - cc::bronson_avltree::make_traits< - co::less< std::less > - ,co::stat< cc::bronson_avltree::stat<> > - ,cc::bronson_avltree::relaxed_insert< true > - ,co::sync_monitor< cds::sync::pool_monitor > - >::type - {}; - typedef cc::BronsonAVLTreeMap< rcu_type, key_type, value_type, traits > map_type; - test(); -#endif - } -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_ellenbintree_map.h b/tests/test-hdr/tree/hdr_ellenbintree_map.h deleted file mode 100644 index b62589c9..00000000 --- a/tests/test-hdr/tree/hdr_ellenbintree_map.h +++ /dev/null @@ -1,758 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSTEST_HDR_ELLENBINTREE_MAP_H -#define CDSTEST_HDR_ELLENBINTREE_MAP_H - -#include "cppunit/cppunit_proxy.h" -#include "size_check.h" -#include // ref -#include - -namespace tree { - using misc::check_size; - - class EllenBinTreeMapHdrTest: public CppUnitMini::TestCase - { - public: - typedef int key_type; - - struct stat_data { - size_t nInsertFuncCall; - size_t nEnsureExistFuncCall; - size_t nEnsureNewFuncCall; - size_t nEraseFuncCall; - size_t nFindFuncCall; - size_t nFindConstFuncCall; - - stat_data() - : nInsertFuncCall(0) - , nEnsureExistFuncCall(0) - , nEnsureNewFuncCall(0) - , nEraseFuncCall(0) - , nFindFuncCall(0) - , nFindConstFuncCall(0) - {} - }; - - struct value_type: public stat_data - { - int nVal; - - value_type() - : nVal(0) - {} - - value_type( int v ) - : nVal( v ) - {} - - value_type( value_type const& v ) - : nVal( v.nVal ) - {} - - value_type( value_type&& v ) - : nVal( v.nVal ) - {} - - value_type& operator=( int n ) - { - nVal = n; - return *this; - } - - value_type& operator=( value_type const& v ) - { - nVal = v.nVal; - return *this; - } - }; - - typedef std::pair pair_type; - - struct less { - bool operator()( int k1, int k2 ) const - { - return k1 < k2; - } - }; - - struct compare { - int cmp( int k1, int k2 ) const - { - return k1 < k2 ? -1 : (k1 > k2 ? 1 : 0); - } - int operator()( int k1, int k2 ) const - { - return cmp( k1, k2 ); - } - }; - - struct wrapped_int { - int nKey; - - wrapped_int( int n ) - : nKey(n) - {} - }; - - struct wrapped_less - { - bool operator()( wrapped_int const& w, int n ) const - { - return w.nKey < n; - } - bool operator()( int n, wrapped_int const& w ) const - { - return n < w.nKey; - } - /* - template - bool operator()( wrapped_int const& w, T const& v ) const - { - return w.nKey < v.nKey; - } - template - bool operator()( T const& v, wrapped_int const& w ) const - { - return v.nKey < w.nKey; - } - */ - }; - - protected: - template - struct insert_functor - { - typedef typename Map::value_type pair_type; - - // insert ftor - void operator()( pair_type& item ) - { - item.second.nVal = item.first * 3; - } - - // update ftor - void operator()( bool bNew, pair_type& item ) - { - if ( bNew ) - item.second.nVal = item.first * 2; - else - item.second.nVal = item.first * 5; - } - }; - - struct check_value { - int m_nExpected; - - check_value( int nExpected ) - : m_nExpected( nExpected ) - {} - - template - void operator ()( T& pair ) - { - CPPUNIT_ASSERT_CURRENT( pair.second.nVal == m_nExpected ); - } - template - void operator ()( T& pair, Q ) - { - CPPUNIT_ASSERT_CURRENT( pair.second.nVal == m_nExpected ); - } - }; - - struct extract_functor - { - int * m_pVal; - void operator()( pair_type const& val ) - { - *m_pVal = val.second.nVal; - } - }; - - protected: - static const size_t c_nItemCount = 10000; - - class data_array - { - int * pFirst; - int * pLast; - - public: - data_array() - : pFirst( new int[c_nItemCount] ) - , pLast( pFirst + c_nItemCount ) - { - int i = 0; - for ( int * p = pFirst; p != pLast; ++p, ++i ) - *p = i; - - shuffle( pFirst, pLast ); - } - - ~data_array() - { - delete [] pFirst; - } - - int operator[]( size_t i ) const - { - assert( i < size_t(pLast - pFirst) ); - return pFirst[i]; - } - }; - - struct extract_functor2 - { - int nKey; - - template - void operator()( Q&, pair_type& v ) - { - nKey = v.first; - } - }; - - - protected: - - template - void test_with( Map& m ) - { - std::pair updateResult; - - // insert - CPPUNIT_ASSERT( m.empty() ); - CPPUNIT_ASSERT( check_size( m, 0 )); - CPPUNIT_ASSERT( !m.contains(25) ); - CPPUNIT_ASSERT( m.insert( 25 ) ) ; // value = 0 - CPPUNIT_ASSERT( m.contains(25) ); - CPPUNIT_ASSERT( !m.empty() ); - CPPUNIT_ASSERT( check_size( m, 1 )); - CPPUNIT_ASSERT( m.contains(25) ); - - CPPUNIT_ASSERT( !m.insert( 25 ) ); - CPPUNIT_ASSERT( !m.empty() ); - CPPUNIT_ASSERT( check_size( m, 1 )); - - CPPUNIT_ASSERT( !m.contains(10, less()) ); - CPPUNIT_ASSERT( m.insert( 10, 10 ) ); - CPPUNIT_ASSERT( !m.empty() ); - CPPUNIT_ASSERT( check_size( m, 2 )); - CPPUNIT_ASSERT( m.contains(10, less()) ); - - CPPUNIT_ASSERT( !m.insert( 10, 20 ) ); - CPPUNIT_ASSERT( !m.empty() ); - CPPUNIT_ASSERT( check_size( m, 2 )); - - CPPUNIT_ASSERT( !m.contains(30) ); - CPPUNIT_ASSERT( m.insert_with( 30, insert_functor() ) ) ; // value = 90 - CPPUNIT_ASSERT( !m.empty() ); - CPPUNIT_ASSERT( check_size( m, 3 )); - CPPUNIT_ASSERT( m.contains(30) ); - - CPPUNIT_ASSERT( !m.insert_with( 10, insert_functor() ) ); - CPPUNIT_ASSERT( !m.insert_with( 25, insert_functor() ) ); - CPPUNIT_ASSERT( !m.insert_with( 30, insert_functor() ) ); - - // update (new key) - CPPUNIT_ASSERT( !m.contains(27) ); - updateResult = m.update( 27, insert_functor(), false ) ; // value = 54 - CPPUNIT_ASSERT( !updateResult.first ); - CPPUNIT_ASSERT( !updateResult.second ); - CPPUNIT_ASSERT( !m.contains(27) ); - updateResult = m.update( 27, insert_functor(), true ) ; // value = 54 - CPPUNIT_ASSERT( updateResult.first ); - CPPUNIT_ASSERT( updateResult.second ); - CPPUNIT_ASSERT( m.contains(27) ); - - // find test - check_value chk(10); - CPPUNIT_ASSERT( m.find( 10, std::ref(chk) )); - chk.m_nExpected = 0; - CPPUNIT_ASSERT( m.find_with( 25, less(), std::ref( chk ) ) ); - chk.m_nExpected = 90; - CPPUNIT_ASSERT( m.find( 30, std::ref( chk ) ) ); - chk.m_nExpected = 54; - CPPUNIT_ASSERT( m.find( 27, std::ref( chk ) ) ); - - updateResult = m.update( 10, insert_functor() ) ; // value = 50 - CPPUNIT_ASSERT( updateResult.first ); - CPPUNIT_ASSERT( !updateResult.second ); - chk.m_nExpected = 50; - CPPUNIT_ASSERT( m.find( 10, std::ref( chk ) ) ); - - // erase test - CPPUNIT_ASSERT( !m.contains(100) ); - CPPUNIT_ASSERT( !m.erase( 100 )) ; // not found - - CPPUNIT_ASSERT( m.contains(25) ); - CPPUNIT_ASSERT( check_size( m, 4 )); - CPPUNIT_ASSERT( m.erase( 25 )); - CPPUNIT_ASSERT( !m.empty() ); - CPPUNIT_ASSERT( check_size( m, 3 )); - CPPUNIT_ASSERT( !m.contains(25) ); - CPPUNIT_ASSERT( !m.erase( 25 )); - - CPPUNIT_ASSERT( !m.contains(258) ); - CPPUNIT_ASSERT( m.insert(258)) - CPPUNIT_ASSERT( check_size( m, 4 )); - CPPUNIT_ASSERT( m.contains(258, less()) ); - CPPUNIT_ASSERT( m.erase_with( 258, less() )); - CPPUNIT_ASSERT( !m.empty() ); - CPPUNIT_ASSERT( check_size( m, 3 )); - CPPUNIT_ASSERT( !m.contains(258) ); - CPPUNIT_ASSERT( !m.erase_with( 258, less() )); - - int nVal; - extract_functor ext; - ext.m_pVal = &nVal; - - CPPUNIT_ASSERT( !m.contains(29) ); - CPPUNIT_ASSERT( m.insert(29, 290)); - CPPUNIT_ASSERT( check_size( m, 4 )); - CPPUNIT_ASSERT( m.erase_with( 29, less(), std::ref( ext ) ) ); - CPPUNIT_ASSERT( !m.empty() ); - CPPUNIT_ASSERT( check_size( m, 3 )); - CPPUNIT_ASSERT( nVal == 290 ); - nVal = -1; - CPPUNIT_ASSERT( !m.erase_with( 29, less(), std::ref( ext ) ) ); - CPPUNIT_ASSERT( nVal == -1 ); - - CPPUNIT_ASSERT( m.erase( 30, std::ref( ext ) ) ); - CPPUNIT_ASSERT( !m.empty() ); - CPPUNIT_ASSERT( check_size( m, 2 )); - CPPUNIT_ASSERT( nVal == 90 ); - nVal = -1; - CPPUNIT_ASSERT( !m.erase( 30, std::ref( ext ) ) ); - CPPUNIT_ASSERT( nVal == -1 ); - - m.clear(); - CPPUNIT_ASSERT( m.empty() ); - CPPUNIT_ASSERT( check_size( m, 0 )); - - // emplace test - CPPUNIT_ASSERT( m.emplace(126) ) ; // key = 126, val = 0 - CPPUNIT_ASSERT( m.emplace(137, 731)) ; // key = 137, val = 731 - CPPUNIT_ASSERT( m.emplace( 149, value_type(941) )) ; // key = 149, val = 941 - - CPPUNIT_ASSERT( !m.empty() ); - CPPUNIT_ASSERT( check_size( m, 3 )); - - chk.m_nExpected = 0; - CPPUNIT_ASSERT( m.find( 126, std::ref(chk) )); - chk.m_nExpected = 731; - CPPUNIT_ASSERT( m.find_with( 137, less(), std::ref(chk) )); - chk.m_nExpected = 941; - CPPUNIT_ASSERT( m.find( 149, std::ref(chk) )); - - CPPUNIT_ASSERT( !m.emplace(126, 621)) ; // already in map - chk.m_nExpected = 0; - CPPUNIT_ASSERT( m.find( 126, std::ref(chk) )); - CPPUNIT_ASSERT( !m.empty() ); - CPPUNIT_ASSERT( check_size( m, 3 )); - - m.clear(); - CPPUNIT_ASSERT( m.empty() ); - CPPUNIT_ASSERT( check_size( m, 0 )); - } - - template - void fill_map( Map& s, data_array& a ) - { - CPPUNIT_ASSERT( s.empty() ); - for ( size_t i = 0; i < c_nItemCount; ++i ) { - CPPUNIT_ASSERT( s.insert( a[i] )); - } - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, c_nItemCount )); - } - - template - void test() - { - typedef Map map_type; - - map_type m; - - test_with( m ); - - m.clear(); - CPPUNIT_ASSERT( m.empty() ); - CPPUNIT_ASSERT( check_size( m, 0 )); - - // extract min/max - { - typename map_type::guarded_ptr gp; - - data_array arr; - fill_map( m, arr ); - - int i = 0; - std::pair v; - while ( !m.empty() ) { - gp = m.extract_min(); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_ASSERT( gp->first == i ); - ++i; - } - CPPUNIT_ASSERT( m.empty() ); - CPPUNIT_ASSERT( check_size( m, 0 )); - - - fill_map( m, arr ); - i = (int) c_nItemCount - 1; - while ( !m.empty() ) { - gp = m.extract_max(); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_ASSERT( gp->first == i ); - --i; - } - CPPUNIT_ASSERT( m.empty() ); - CPPUNIT_ASSERT( check_size( m, 0 )); - - fill_map( m, arr ); - for ( int i = 0; i < static_cast( c_nItemCount ); ++i ) { - int nKey = arr[i]; - gp = m.get( nKey ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->first == nKey ); - - gp = m.extract( nKey ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->first == nKey ); - - gp = m.get( nKey ); - CPPUNIT_CHECK( !gp ); - CPPUNIT_CHECK( gp.empty()); - CPPUNIT_CHECK( !m.extract( nKey )); - CPPUNIT_CHECK( gp.empty()); - } - CPPUNIT_ASSERT( m.empty() ); - CPPUNIT_ASSERT( check_size( m, 0 )); - - fill_map( m, arr ); - for ( int i = 0; i < static_cast( c_nItemCount ); ++i ) { - int nKey = arr[i]; - gp = m.get_with( wrapped_int( nKey ), wrapped_less() ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->first == nKey ); - - gp = m.extract_with( wrapped_int( nKey ), wrapped_less() ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->first == nKey ); - - gp = m.get_with( wrapped_int( nKey ), wrapped_less() ); - CPPUNIT_CHECK( !gp ); - CPPUNIT_CHECK( gp.empty()); - CPPUNIT_CHECK( !m.extract_with( wrapped_int(nKey), wrapped_less() )); - CPPUNIT_CHECK( gp.empty()); - } - - CPPUNIT_ASSERT( m.empty() ); - CPPUNIT_ASSERT( check_size( m, 0 )); - } - - PrintStat()( m ); - } - - template - void test_rcu() - { - typedef Map map_type; - - map_type m; - - test_with( m ); - - m.clear(); - CPPUNIT_ASSERT( m.empty() ); - CPPUNIT_ASSERT( check_size( m, 0 )); - - // extract min/max - { - typename map_type::exempt_ptr ep; - data_array arr; - fill_map( m, arr ); - - int i = 0; - while ( !m.empty() ) { - ep = m.extract_min(); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty()); - CPPUNIT_ASSERT(ep->first == i ); - ++i; - //ep.release(); - } - CPPUNIT_ASSERT( m.empty() ); - CPPUNIT_ASSERT( check_size( m, 0 )); - ep = m.extract_min(); - CPPUNIT_ASSERT( !ep ); - CPPUNIT_ASSERT( ep.empty()); - - fill_map( m, arr ); - i = (int) c_nItemCount - 1; - while ( !m.empty() ) { - ep = m.extract_max(); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty()); - CPPUNIT_ASSERT( ep->first == i ); - --i; - //ep.release(); - } - CPPUNIT_ASSERT( m.empty() ); - CPPUNIT_ASSERT( check_size( m, 0 )); - ep = m.extract_max(); - CPPUNIT_ASSERT( !ep ); - CPPUNIT_ASSERT( ep.empty()); - - fill_map( m, arr ); - for ( size_t i = 0; i < c_nItemCount; ++i ) { - int nKey = arr[i]; - { - typename map_type::rcu_lock l; - typename map_type::value_type * pVal = m.get(nKey); - CPPUNIT_ASSERT( pVal != nullptr ); - CPPUNIT_CHECK( pVal->first == nKey); - } - ep = m.extract( nKey ); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty()); - CPPUNIT_CHECK( ep->first == nKey); - //ep.release(); - - ep = m.extract( nKey ); - CPPUNIT_ASSERT( !ep ); - CPPUNIT_ASSERT( ep.empty()); - { - typename map_type::rcu_lock l; - CPPUNIT_CHECK( !m.get(nKey)); - } - } - CPPUNIT_ASSERT( m.empty() ); - CPPUNIT_ASSERT( check_size( m, 0 )); - - fill_map( m, arr ); - for ( size_t i = 0; i < c_nItemCount; ++i ) { - int nKey = arr[i]; - { - typename map_type::rcu_lock l; - typename map_type::value_type * pVal = m.get_with(wrapped_int(nKey), wrapped_less()); - CPPUNIT_ASSERT( pVal != nullptr ); - CPPUNIT_CHECK( pVal->first == nKey); - } - ep = m.extract_with( wrapped_int( nKey ), wrapped_less() ); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty()); - CPPUNIT_CHECK( ep->first == nKey); - //ep.release(); - - ep = m.extract_with( wrapped_int( nKey ), wrapped_less() ); - CPPUNIT_ASSERT( !ep ); - CPPUNIT_ASSERT( ep.empty()); - { - typename map_type::rcu_lock l; - CPPUNIT_CHECK( !m.get_with(wrapped_int(nKey), wrapped_less())); - } - } - CPPUNIT_ASSERT( m.empty() ); - CPPUNIT_ASSERT( check_size( m, 0 )); - } - - PrintStat()( m ); - } - - void EllenBinTree_hp_less(); - void EllenBinTree_hp_cmp(); - void EllenBinTree_hp_cmpless(); - void EllenBinTree_hp_less_ic(); - void EllenBinTree_hp_cmp_ic(); - void EllenBinTree_hp_less_stat(); - void EllenBinTree_hp_cmp_ic_stat(); - void EllenBinTree_hp_cmp_ic_stat_yield(); - void EllenBinTree_hp_less_pool(); - void EllenBinTree_hp_less_pool_ic_stat(); - - void EllenBinTree_dhp_less(); - void EllenBinTree_dhp_cmp(); - void EllenBinTree_dhp_cmpless(); - void EllenBinTree_dhp_less_ic(); - void EllenBinTree_dhp_cmp_ic(); - void EllenBinTree_dhp_less_stat(); - void EllenBinTree_dhp_cmp_ic_stat(); - void EllenBinTree_dhp_cmp_ic_stat_yield(); - void EllenBinTree_dhp_less_pool(); - void EllenBinTree_dhp_less_pool_ic_stat(); - - void EllenBinTree_rcu_gpi_less(); - void EllenBinTree_rcu_gpi_cmp(); - void EllenBinTree_rcu_gpi_cmpless(); - void EllenBinTree_rcu_gpi_less_ic(); - void EllenBinTree_rcu_gpi_cmp_ic(); - void EllenBinTree_rcu_gpi_less_stat(); - void EllenBinTree_rcu_gpi_cmp_ic_stat(); - void EllenBinTree_rcu_gpi_cmp_ic_stat_yield(); - void EllenBinTree_rcu_gpi_less_pool(); - void EllenBinTree_rcu_gpi_less_pool_ic_stat(); - - void EllenBinTree_rcu_gpb_less(); - void EllenBinTree_rcu_gpb_cmp(); - void EllenBinTree_rcu_gpb_cmpless(); - void EllenBinTree_rcu_gpb_less_ic(); - void EllenBinTree_rcu_gpb_cmp_ic(); - void EllenBinTree_rcu_gpb_less_stat(); - void EllenBinTree_rcu_gpb_cmp_ic_stat(); - void EllenBinTree_rcu_gpb_cmp_ic_stat_yield(); - void EllenBinTree_rcu_gpb_less_pool(); - void EllenBinTree_rcu_gpb_less_pool_ic_stat(); - - void EllenBinTree_rcu_gpt_less(); - void EllenBinTree_rcu_gpt_cmp(); - void EllenBinTree_rcu_gpt_cmpless(); - void EllenBinTree_rcu_gpt_less_ic(); - void EllenBinTree_rcu_gpt_cmp_ic(); - void EllenBinTree_rcu_gpt_less_stat(); - void EllenBinTree_rcu_gpt_cmp_ic_stat(); - void EllenBinTree_rcu_gpt_cmp_ic_stat_yield(); - void EllenBinTree_rcu_gpt_less_pool(); - void EllenBinTree_rcu_gpt_less_pool_ic_stat(); - - void EllenBinTree_rcu_shb_less(); - void EllenBinTree_rcu_shb_cmp(); - void EllenBinTree_rcu_shb_cmpless(); - void EllenBinTree_rcu_shb_less_ic(); - void EllenBinTree_rcu_shb_cmp_ic(); - void EllenBinTree_rcu_shb_less_stat(); - void EllenBinTree_rcu_shb_cmp_ic_stat(); - void EllenBinTree_rcu_shb_cmp_ic_stat_yield(); - void EllenBinTree_rcu_shb_less_pool(); - void EllenBinTree_rcu_shb_less_pool_ic_stat(); - - void EllenBinTree_rcu_sht_less(); - void EllenBinTree_rcu_sht_cmp(); - void EllenBinTree_rcu_sht_cmpless(); - void EllenBinTree_rcu_sht_less_ic(); - void EllenBinTree_rcu_sht_cmp_ic(); - void EllenBinTree_rcu_sht_less_stat(); - void EllenBinTree_rcu_sht_cmp_ic_stat(); - void EllenBinTree_rcu_sht_cmp_ic_stat_yield(); - void EllenBinTree_rcu_sht_less_pool(); - void EllenBinTree_rcu_sht_less_pool_ic_stat(); - - CPPUNIT_TEST_SUITE(EllenBinTreeMapHdrTest) - CPPUNIT_TEST(EllenBinTree_hp_less) - CPPUNIT_TEST(EllenBinTree_hp_cmp) - CPPUNIT_TEST(EllenBinTree_hp_less_stat) - CPPUNIT_TEST(EllenBinTree_hp_cmpless) - CPPUNIT_TEST(EllenBinTree_hp_less_ic) - CPPUNIT_TEST(EllenBinTree_hp_cmp_ic) - CPPUNIT_TEST(EllenBinTree_hp_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_hp_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_hp_less_pool ) - CPPUNIT_TEST(EllenBinTree_hp_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_dhp_less) - CPPUNIT_TEST(EllenBinTree_dhp_cmp) - CPPUNIT_TEST(EllenBinTree_dhp_less_stat) - CPPUNIT_TEST(EllenBinTree_dhp_cmpless) - CPPUNIT_TEST(EllenBinTree_dhp_less_ic) - CPPUNIT_TEST(EllenBinTree_dhp_cmp_ic) - CPPUNIT_TEST(EllenBinTree_dhp_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_dhp_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_dhp_less_pool ) - CPPUNIT_TEST(EllenBinTree_dhp_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_rcu_gpi_less) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_cmp) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_less_stat) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_cmpless) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_less_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_cmp_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_rcu_gpi_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_rcu_gpi_less_pool ) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_rcu_gpb_less) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_cmp) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_less_stat) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_cmpless) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_less_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_cmp_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_rcu_gpb_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_rcu_gpb_less_pool ) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_rcu_gpt_less) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_cmp) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_less_stat) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_cmpless) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_less_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_cmp_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_rcu_gpt_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_rcu_gpt_less_pool ) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_rcu_shb_less) - CPPUNIT_TEST(EllenBinTree_rcu_shb_cmp) - CPPUNIT_TEST(EllenBinTree_rcu_shb_less_stat) - CPPUNIT_TEST(EllenBinTree_rcu_shb_cmpless) - CPPUNIT_TEST(EllenBinTree_rcu_shb_less_ic) - CPPUNIT_TEST(EllenBinTree_rcu_shb_cmp_ic) - CPPUNIT_TEST(EllenBinTree_rcu_shb_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_rcu_shb_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_rcu_shb_less_pool ) - CPPUNIT_TEST(EllenBinTree_rcu_shb_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_rcu_sht_less) - CPPUNIT_TEST(EllenBinTree_rcu_sht_cmp) - CPPUNIT_TEST(EllenBinTree_rcu_sht_less_stat) - CPPUNIT_TEST(EllenBinTree_rcu_sht_cmpless) - CPPUNIT_TEST(EllenBinTree_rcu_sht_less_ic) - CPPUNIT_TEST(EllenBinTree_rcu_sht_cmp_ic) - CPPUNIT_TEST(EllenBinTree_rcu_sht_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_rcu_sht_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_rcu_sht_less_pool ) - CPPUNIT_TEST(EllenBinTree_rcu_sht_less_pool_ic_stat) - - CPPUNIT_TEST_SUITE_END() - - }; -} // namespace tree - -#endif // #ifndef CDSTEST_HDR_ELLENBINTREE_MAP_H diff --git a/tests/test-hdr/tree/hdr_ellenbintree_map_dhp.cpp b/tests/test-hdr/tree/hdr_ellenbintree_map_dhp.cpp deleted file mode 100644 index 5536b7c8..00000000 --- a/tests/test-hdr/tree/hdr_ellenbintree_map_dhp.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_ellenbintree_map.h" -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_dhp.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::gc::DHP gc_type; - - typedef cc::ellen_bintree::map_node tree_leaf_node; - typedef cc::ellen_bintree::internal_node< EllenBinTreeMapHdrTest::key_type, tree_leaf_node > tree_internal_node; - typedef cc::ellen_bintree::update_desc tree_update_desc; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - - } - - void EllenBinTreeMapHdrTest::EllenBinTree_dhp_less() - { - struct map_traits : public cc::ellen_bintree::traits - { - typedef EllenBinTreeMapHdrTest::less less; - }; - typedef cc::EllenBinTreeMap< gc_type, key_type, value_type, map_traits > set_type; - - test(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_dhp_cmp() - { - typedef cc::EllenBinTreeMap< gc_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::compare< compare > - >::type - > set_type; - - test(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_dhp_cmpless() - { - typedef cc::EllenBinTreeMap< gc_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::compare< compare > - ,co::less< less > - >::type - > set_type; - - test(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_dhp_less_ic() - { - typedef cc::EllenBinTreeMap< gc_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_dhp_cmp_ic() - { - typedef cc::EllenBinTreeMap< gc_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::item_counter< cds::atomicity::item_counter > - ,co::compare< compare > - >::type - > set_type; - - test(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_dhp_less_stat() - { - typedef cc::EllenBinTreeMap< gc_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_dhp_cmp_ic_stat() - { - typedef cc::EllenBinTreeMap< gc_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - >::type - > set_type; - - test(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_dhp_cmp_ic_stat_yield() - { - typedef cc::EllenBinTreeMap< gc_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - , co::back_off< cds::backoff::yield > - >::type - > set_type; - - test(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_dhp_less_pool() - { - typedef cc::EllenBinTreeMap< gc_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_dhp::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_dhp::update_desc_pool_accessor > > - >::type - > set_type; - - test(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_dhp_less_pool_ic_stat() - { - typedef cc::EllenBinTreeMap< gc_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_dhp::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_dhp::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test(); - } - -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_ellenbintree_map_hp.cpp b/tests/test-hdr/tree/hdr_ellenbintree_map_hp.cpp deleted file mode 100644 index b6a3bce2..00000000 --- a/tests/test-hdr/tree/hdr_ellenbintree_map_hp.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_ellenbintree_map.h" -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_hp.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::gc::HP gc_type; - - typedef cc::ellen_bintree::map_node tree_leaf_node; - typedef cc::ellen_bintree::internal_node< EllenBinTreeMapHdrTest::key_type, tree_leaf_node > tree_internal_node; - typedef cc::ellen_bintree::update_desc tree_update_desc; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - - } - - void EllenBinTreeMapHdrTest::EllenBinTree_hp_less() - { - struct set_traits : public cc::ellen_bintree::traits - { - typedef EllenBinTreeMapHdrTest::less less; - }; - typedef cc::EllenBinTreeMap< gc_type, key_type, value_type, set_traits > set_type; - - test(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_hp_cmp() - { - typedef cc::EllenBinTreeMap< gc_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::compare< compare > - >::type - > set_type; - - test(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_hp_cmpless() - { - typedef cc::EllenBinTreeMap< gc_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::compare< compare > - ,co::less< less > - >::type - > set_type; - - test(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_hp_less_ic() - { - typedef cc::EllenBinTreeMap< gc_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_hp_cmp_ic() - { - typedef cc::EllenBinTreeMap< gc_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::item_counter< cds::atomicity::item_counter > - ,co::compare< compare > - >::type - > set_type; - - test(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_hp_less_stat() - { - typedef cc::EllenBinTreeMap< gc_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_hp_cmp_ic_stat() - { - typedef cc::EllenBinTreeMap< gc_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - >::type - > set_type; - - test(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_hp_cmp_ic_stat_yield() - { - typedef cc::EllenBinTreeMap< gc_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - , co::back_off< cds::backoff::yield > - >::type - > set_type; - - test(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_hp_less_pool() - { - typedef cc::EllenBinTreeMap< gc_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_hp::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_hp::update_desc_pool_accessor > > - >::type - > set_type; - - test(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_hp_less_pool_ic_stat() - { - typedef cc::EllenBinTreeMap< gc_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_hp::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_hp::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test(); - } - -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_ellenbintree_map_rcu_gpb.cpp b/tests/test-hdr/tree/hdr_ellenbintree_map_rcu_gpb.cpp deleted file mode 100644 index dbf27300..00000000 --- a/tests/test-hdr/tree/hdr_ellenbintree_map_rcu_gpb.cpp +++ /dev/null @@ -1,181 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_ellenbintree_map.h" -#include -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_rcu.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type; - - typedef cc::ellen_bintree::map_node tree_leaf_node; - typedef cc::ellen_bintree::internal_node< EllenBinTreeMapHdrTest::key_type, tree_leaf_node > tree_internal_node; - typedef cc::ellen_bintree::update_desc tree_update_desc; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpb_less() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - >::type - > map_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpb_cmp() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::compare< compare > - >::type - > map_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpb_cmpless() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::compare< compare > - ,co::less< less > - >::type - > map_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpb_less_ic() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > map_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpb_cmp_ic() - { - struct map_traits : public cc::ellen_bintree::traits { - typedef cds::atomicity::item_counter item_counter; - typedef EllenBinTreeMapHdrTest::compare compare; - }; - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, map_traits > map_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpb_less_stat() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > map_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpb_cmp_ic_stat() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - >::type - > map_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpb_cmp_ic_stat_yield() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - , co::back_off< cds::backoff::yield > - >::type - > map_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpb_less_pool() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - >::type - > map_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpb_less_pool_ic_stat() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > map_type; - - test_rcu(); - } - -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_ellenbintree_map_rcu_gpi.cpp b/tests/test-hdr/tree/hdr_ellenbintree_map_rcu_gpi.cpp deleted file mode 100644 index b5ef0f29..00000000 --- a/tests/test-hdr/tree/hdr_ellenbintree_map_rcu_gpi.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_ellenbintree_map.h" -#include -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_rcu.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type; - - typedef cc::ellen_bintree::map_node tree_leaf_node; - typedef cc::ellen_bintree::internal_node< EllenBinTreeMapHdrTest::key_type, tree_leaf_node > tree_internal_node; - typedef cc::ellen_bintree::update_desc tree_update_desc; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpi_less() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpi_cmp() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::compare< compare > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpi_cmpless() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::compare< compare > - ,co::less< less > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpi_less_ic() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpi_cmp_ic() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::item_counter< cds::atomicity::item_counter > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpi_less_stat() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpi_cmp_ic_stat() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpi_cmp_ic_stat_yield() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - , co::back_off< cds::backoff::yield > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpi_less_pool() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpi_less_pool_ic_stat() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test_rcu(); - } - -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_ellenbintree_map_rcu_gpt.cpp b/tests/test-hdr/tree/hdr_ellenbintree_map_rcu_gpt.cpp deleted file mode 100644 index 314dc67a..00000000 --- a/tests/test-hdr/tree/hdr_ellenbintree_map_rcu_gpt.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_ellenbintree_map.h" -#include -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_rcu.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type; - - typedef cc::ellen_bintree::map_node tree_leaf_node; - typedef cc::ellen_bintree::internal_node< EllenBinTreeMapHdrTest::key_type, tree_leaf_node > tree_internal_node; - typedef cc::ellen_bintree::update_desc tree_update_desc; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpt_less() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpt_cmp() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::compare< compare > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpt_cmpless() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::compare< compare > - ,co::less< less > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpt_less_ic() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpt_cmp_ic() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::item_counter< cds::atomicity::item_counter > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpt_less_stat() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpt_cmp_ic_stat() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpt_cmp_ic_stat_yield() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - , co::back_off< cds::backoff::yield > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpt_less_pool() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpt_less_pool_ic_stat() - { - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test_rcu(); - } - -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_ellenbintree_map_rcu_shb.cpp b/tests/test-hdr/tree/hdr_ellenbintree_map_rcu_shb.cpp deleted file mode 100644 index 745eb63a..00000000 --- a/tests/test-hdr/tree/hdr_ellenbintree_map_rcu_shb.cpp +++ /dev/null @@ -1,204 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_ellenbintree_map.h" -#include -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_rcu.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type; - - typedef cc::ellen_bintree::map_node tree_leaf_node; - typedef cc::ellen_bintree::internal_node< EllenBinTreeMapHdrTest::key_type, tree_leaf_node > tree_internal_node; - typedef cc::ellen_bintree::update_desc tree_update_desc; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - } -#endif - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_shb_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_shb_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::compare< compare > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_shb_cmpless() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::compare< compare > - ,co::less< less > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_shb_less_ic() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_shb_cmp_ic() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::item_counter< cds::atomicity::item_counter > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_shb_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_shb_cmp_ic_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_shb_cmp_ic_stat_yield() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - , co::back_off< cds::backoff::yield > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_shb_less_pool() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_shb_less_pool_ic_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test_rcu(); -#endif - } - -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_ellenbintree_map_rcu_sht.cpp b/tests/test-hdr/tree/hdr_ellenbintree_map_rcu_sht.cpp deleted file mode 100644 index 78b621cf..00000000 --- a/tests/test-hdr/tree/hdr_ellenbintree_map_rcu_sht.cpp +++ /dev/null @@ -1,204 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_ellenbintree_map.h" -#include -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_rcu.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type; - - typedef cc::ellen_bintree::map_node tree_leaf_node; - typedef cc::ellen_bintree::internal_node< EllenBinTreeMapHdrTest::key_type, tree_leaf_node > tree_internal_node; - typedef cc::ellen_bintree::update_desc tree_update_desc; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - } -#endif - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_sht_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_sht_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::compare< compare > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_sht_cmpless() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::compare< compare > - ,co::less< less > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_sht_less_ic() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_sht_cmp_ic() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::item_counter< cds::atomicity::item_counter > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_sht_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_sht_cmp_ic_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_sht_cmp_ic_stat_yield() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - , co::back_off< cds::backoff::yield > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_sht_less_pool() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeMapHdrTest::EllenBinTree_rcu_sht_less_pool_ic_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, - cc::ellen_bintree::make_map_traits< - co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test_rcu(); -#endif - } - -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_ellenbintree_set.h b/tests/test-hdr/tree/hdr_ellenbintree_set.h deleted file mode 100644 index 6f55d6d8..00000000 --- a/tests/test-hdr/tree/hdr_ellenbintree_set.h +++ /dev/null @@ -1,855 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSTEST_HDR_ELLENBINTREE_SET_H -#define CDSTEST_HDR_ELLENBINTREE_SET_H - -#include "cppunit/cppunit_proxy.h" -#include "size_check.h" -#include // ref -#include - -namespace tree { - using misc::check_size; - - class EllenBinTreeSetHdrTest: public CppUnitMini::TestCase - { - public: - typedef int key_type; - - struct stat_data { - size_t nInsertFuncCall; - size_t nEnsureExistFuncCall; - size_t nEnsureNewFuncCall; - size_t nEraseFuncCall; - size_t nFindFuncCall; - size_t nFindConstFuncCall; - - stat_data() - : nInsertFuncCall(0) - , nEnsureExistFuncCall(0) - , nEnsureNewFuncCall(0) - , nEraseFuncCall(0) - , nFindFuncCall(0) - , nFindConstFuncCall(0) - {} - }; - - struct value_type { - key_type nKey; - int nVal; - - stat_data stat; - - value_type() - {} - - value_type( int key ) - : nKey( key ) - , nVal( key * 10 ) - {} - - value_type( int key, int v ) - : nKey( key ) - , nVal( v ) - {} - - value_type( std::pair const& p ) - : nKey( p.first ) - , nVal( p.second ) - {} - }; - - struct key_extractor { - void operator()( key_type& dest, value_type const& src ) const - { - dest = src.nKey; - } - }; - - struct less { - bool operator()( int k1, int k2 ) const - { - return k1 < k2; - } - bool operator()( value_type const& v1, value_type const& v2 ) const - { - return v1.nKey < v2.nKey; - } - bool operator()( value_type const& v, int k ) const - { - return v.nKey < k; - } - bool operator()( int k, value_type const& v ) const - { - return k < v.nKey; - } - bool operator()( std::pair const& p, value_type& v ) const - { - return p.first < v.nKey; - } - bool operator()( value_type& v, std::pair const& p ) const - { - return v.nKey < p.first; - } - bool operator()( std::pair const& p, int v ) const - { - return p.first < v; - } - bool operator()( int v, std::pair const& p ) const - { - return v < p.first; - } - }; - - struct compare { - int cmp( int k1, int k2 ) const - { - return k1 < k2 ? -1 : (k1 > k2 ? 1 : 0); - } - int operator()( int k1, int k2 ) const - { - return cmp( k1, k2 ); - } - int operator()( value_type const& v1, value_type const& v2 ) const - { - return cmp( v1.nKey, v2.nKey ); - } - int operator()( value_type const& v, int k ) const - { - return cmp( v.nKey, k ); - } - int operator()( int k, value_type const& v ) const - { - return cmp( k, v.nKey ); - } - int operator()( std::pair const& p, value_type& v ) const - { - return cmp( p.first, v.nKey ); - } - int operator()( value_type& v, std::pair const& p ) const - { - return cmp( v.nKey, p.first ); - } - int operator()( std::pair const& p, int v ) const - { - return cmp( p.first, v ); - } - int operator()( int v, std::pair const& p ) const - { - return cmp( v, p.first ); - } - }; - - struct wrapped_int { - int nKey; - - wrapped_int( int n ) - : nKey(n) - {} - }; - - struct wrapped_less - { - bool operator()( wrapped_int const& w, int n ) const - { - return w.nKey < n; - } - bool operator()( int n, wrapped_int const& w ) const - { - return n < w.nKey; - } - template - bool operator()( wrapped_int const& w, T const& v ) const - { - return w.nKey < v.nKey; - } - template - bool operator()( T const& v, wrapped_int const& w ) const - { - return v.nKey < w.nKey; - } - }; - - protected: - static const size_t c_nItemCount = 10000; - - class data_array - { - int * pFirst; - int * pLast; - - public: - data_array() - : pFirst( new int[c_nItemCount] ) - , pLast( pFirst + c_nItemCount ) - { - int i = 0; - for ( int * p = pFirst; p != pLast; ++p, ++i ) - *p = i; - - shuffle( pFirst, pLast ); - } - - ~data_array() - { - delete [] pFirst; - } - - int operator[]( size_t i ) const - { - assert( i < size_t(pLast - pFirst) ); - return pFirst[i]; - } - }; - - struct find_functor - { - template - void operator()( value_type& i, T& /*val*/ ) - { - ++i.stat.nFindFuncCall; - } - template - void operator()( value_type& i, T const& /*val*/ ) - { - ++i.stat.nFindConstFuncCall; - } - }; - - template - struct copy_found - { - Item m_found; - - template - void operator()( Item& i, T& /*val*/ ) - { - m_found = i; - } - - void operator()( Item const& i ) - { - m_found = i; - } - }; - - struct insert_functor - { - template - void operator()(Item& i ) - { - i.nVal = i.nKey * 100; - ++i.stat.nInsertFuncCall; - } - }; - - template - static void ensure_func( bool bNew, value_type& i, Q& /*val*/ ) - { - if ( bNew ) - ++i.stat.nEnsureNewFuncCall; - else - ++i.stat.nEnsureExistFuncCall; - } - - struct update_functor - { - template - void operator()( bool bNew, value_type& i, Q& val ) - { - ensure_func( bNew, i, val ); - } - }; - - struct extract_functor - { - int nKey; - - template - void operator()( Q&, value_type& v ) - { - nKey = v.nKey; - } - }; - - - protected: - template - void test_with( Set& s) - { - value_type itm; - int key; - - // insert/find test - CPPUNIT_ASSERT( !s.contains( 10 ) ); - CPPUNIT_ASSERT( s.insert( 10 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 1 )); - CPPUNIT_ASSERT( s.contains( 10 ) ); - - CPPUNIT_ASSERT( !s.insert( 10 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 1 )); - - CPPUNIT_ASSERT( !s.contains( 20, less() ) ); - CPPUNIT_ASSERT( s.insert( std::make_pair(20, 25) )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( s.contains( 10, less() ) ); - CPPUNIT_ASSERT( s.contains( key = 20 ) ); - CPPUNIT_ASSERT( s.find_with( key, less(), find_functor() ) ); - { - copy_found f; - f.m_found.nKey = 0; - key = 20; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 20 ); - CPPUNIT_ASSERT( f.m_found.nVal == 25 ); - CPPUNIT_ASSERT( f.m_found.stat.nFindFuncCall == 1 ); - CPPUNIT_ASSERT( f.m_found.stat.nFindConstFuncCall == 0 ); - } - CPPUNIT_ASSERT( s.find( key, find_functor() ) ); - { - copy_found f; - f.m_found.nKey = 0; - key = 20; - CPPUNIT_ASSERT( s.find_with( key, less(), std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 20 ); - CPPUNIT_ASSERT( f.m_found.nVal == 25 ); - CPPUNIT_ASSERT( f.m_found.stat.nFindFuncCall == 2 ); - CPPUNIT_ASSERT( f.m_found.stat.nFindConstFuncCall == 0 ); - } - CPPUNIT_ASSERT( s.find( 20, find_functor() ) ); - { - copy_found f; - f.m_found.nKey = 0; - CPPUNIT_ASSERT( s.find_with( 20, less(), std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 20 ); - CPPUNIT_ASSERT( f.m_found.nVal == 25 ); - CPPUNIT_ASSERT( f.m_found.stat.nFindFuncCall == 2 ); - CPPUNIT_ASSERT( f.m_found.stat.nFindConstFuncCall == 1 ); - } - - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - - CPPUNIT_ASSERT( !s.contains( 25 ) ); - CPPUNIT_ASSERT( s.insert( std::make_pair(25, -1), insert_functor() )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - { - copy_found f; - f.m_found.nKey = 0; - key = 25; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 25 ); - CPPUNIT_ASSERT( f.m_found.nVal == 2500 ); - CPPUNIT_ASSERT( f.m_found.stat.nInsertFuncCall == 1 ); - } - - // update test - key = 10; - { - copy_found f; - f.m_found.nKey = 0; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 10 ); - CPPUNIT_ASSERT( f.m_found.nVal == 100 ); - CPPUNIT_ASSERT( f.m_found.stat.nEnsureExistFuncCall == 0 ); - CPPUNIT_ASSERT( f.m_found.stat.nEnsureNewFuncCall == 0 ); - } - std::pair updateResult = s.update( key, update_functor(), false ); - CPPUNIT_ASSERT( updateResult.first && !updateResult.second ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - { - copy_found f; - f.m_found.nKey = 0; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 10 ); - CPPUNIT_ASSERT( f.m_found.nVal == 100 ); - CPPUNIT_ASSERT( f.m_found.stat.nEnsureExistFuncCall == 1 ); - CPPUNIT_ASSERT( f.m_found.stat.nEnsureNewFuncCall == 0 ); - } - - updateResult = s.update( std::make_pair(13, 1300), update_functor(), false ); - CPPUNIT_ASSERT( !updateResult.first && !updateResult.second ); - updateResult = s.update( std::make_pair(13, 1300), update_functor()); - CPPUNIT_ASSERT( updateResult.first && updateResult.second ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 4 )); - { - copy_found f; - f.m_found.nKey = 0; - key = 13; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 13 ); - CPPUNIT_ASSERT( f.m_found.nVal == 1300 ); - CPPUNIT_ASSERT( f.m_found.stat.nEnsureExistFuncCall == 0 ); - CPPUNIT_ASSERT( f.m_found.stat.nEnsureNewFuncCall == 1 ); - } - - // erase test - CPPUNIT_ASSERT( s.erase(13) ); - CPPUNIT_ASSERT( !s.contains( 13 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - CPPUNIT_ASSERT( !s.erase(13) ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - CPPUNIT_ASSERT( s.contains( 10 )); - CPPUNIT_ASSERT( s.erase_with( 10, less() )); - CPPUNIT_ASSERT( !s.contains( 10 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - CPPUNIT_ASSERT( !s.erase_with(10, less()) ); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 2 )); - - CPPUNIT_ASSERT( s.contains(20) ); - { - copy_found f; - f.m_found.nKey = 0; - CPPUNIT_ASSERT( s.erase( 20, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 20 ); - CPPUNIT_ASSERT( f.m_found.nVal == 25 ); - - CPPUNIT_ASSERT( s.insert(235)) - CPPUNIT_ASSERT( s.erase_with( 235, less(), std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 235 ); - CPPUNIT_ASSERT( f.m_found.nVal == 2350 ); - } - CPPUNIT_ASSERT( !s.contains( 20 )); - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 1 )); - - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - // emplace test - CPPUNIT_ASSERT( s.emplace( 151 )) ; // key = 151, val = 1510 - CPPUNIT_ASSERT( s.emplace( 174, 471 )) ; // key = 174, val = 471 - CPPUNIT_ASSERT( s.emplace( std::make_pair( 190, 91 ) )) ; // key == 190, val = 91 - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, 3 )); - - CPPUNIT_ASSERT( s.contains(151)); - CPPUNIT_ASSERT( s.contains(174, less())); - CPPUNIT_ASSERT( s.contains(190)); - - { - copy_found f; - f.m_found.nKey = 0; - key = 151; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 151 ); - CPPUNIT_ASSERT( f.m_found.nVal == 1510 ); - - key = 174; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 174 ); - CPPUNIT_ASSERT( f.m_found.nVal == 471 ); - - key = 190; - CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) ); - CPPUNIT_ASSERT( f.m_found.nKey == 190 ); - CPPUNIT_ASSERT( f.m_found.nVal == 91 ); - } - - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - } - - template - void fill_set( Set& s, data_array& a ) - { - CPPUNIT_ASSERT( s.empty() ); - for ( size_t i = 0; i < c_nItemCount; ++i ) { - CPPUNIT_ASSERT( s.insert( a[i] )); - } - CPPUNIT_ASSERT( !s.empty() ); - CPPUNIT_ASSERT( check_size( s, c_nItemCount )); - - } - - template - void test() - { - typedef Set set_type; - - set_type s; - - test_with( s ); - - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - // extract min/max - { - typename Set::guarded_ptr gp; - - data_array arr; - fill_set( s, arr ); - - int i = 0; - while ( !s.empty() ) { - gp = s.extract_min(); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( gp->nKey == i ); - ++i; - } - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - fill_set( s, arr ); - i = (int) c_nItemCount - 1; - while ( !s.empty() ) { - gp = s.extract_max(); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( gp->nKey == i ); - --i; - } - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - fill_set( s, arr ); - for ( int i = 0; i < static_cast( c_nItemCount ); ++i ) { - int nKey = arr[i]; - gp = s.get( nKey ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->nKey == nKey ); - - gp = s.extract( nKey ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->nKey == nKey ); - - gp = s.get( nKey ); - CPPUNIT_CHECK( !gp ); - CPPUNIT_CHECK( gp.empty()); - CPPUNIT_CHECK( !s.extract( nKey )); - CPPUNIT_CHECK( gp.empty()); - } - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - fill_set( s, arr ); - for ( int i = 0; i < static_cast( c_nItemCount ); ++i ) { - int nKey = arr[i]; - gp = s.get_with( wrapped_int( nKey ), wrapped_less() ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->nKey == nKey ); - - gp = s.extract_with( wrapped_int( nKey ), wrapped_less() ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->nKey == nKey ); - - gp = s.get_with( wrapped_int( nKey ), wrapped_less() ); - CPPUNIT_CHECK( !gp ); - CPPUNIT_CHECK( gp.empty()); - CPPUNIT_CHECK( !s.extract_with( wrapped_int(nKey), wrapped_less() )); - CPPUNIT_CHECK( gp.empty()); - } - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - } - - PrintStat()( s ); - } - - template - void test_rcu() - { - typedef Set set_type; - - set_type s; - - test_with( s ); - - s.clear(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - // extract min/max - { - typename set_type::exempt_ptr ep; - data_array arr; - fill_set( s, arr ); - - int i = 0; - value_type v; - while ( !s.empty() ) { - ep = s.extract_min(); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty()); - CPPUNIT_CHECK( ep->nKey == i ); - ++i; - //ep.release(); - } - ep.release(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - fill_set( s, arr ); - i = (int) c_nItemCount - 1; - while ( !s.empty() ) { - ep = s.extract_max(); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty()); - CPPUNIT_CHECK( ep->nKey == i ); - --i; - //ep.release(); - } - ep.release(); - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - fill_set( s, arr ); - for ( size_t i = 0; i < c_nItemCount; ++i ) { - int nKey = arr[i]; - { - typename set_type::rcu_lock l; - value_type * p = s.get( nKey ); - CPPUNIT_ASSERT( p != nullptr ); - CPPUNIT_CHECK( p->nKey == nKey ); - } - ep = s.extract( nKey ); - CPPUNIT_ASSERT( !ep.empty()); - CPPUNIT_CHECK( ep->nKey == nKey); - //ep.release(); - - { - typename set_type::rcu_lock l; - CPPUNIT_CHECK( s.get( nKey ) == nullptr ); - } - ep = s.extract( nKey ); - CPPUNIT_CHECK( !ep ); - } - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - fill_set( s, arr ); - for ( size_t i = 0; i < c_nItemCount; ++i ) { - int nKey = arr[i]; - { - typename set_type::rcu_lock l; - value_type * p = s.get_with( wrapped_int(nKey), wrapped_less() ); - CPPUNIT_ASSERT( p != nullptr ); - CPPUNIT_CHECK( p->nKey == nKey ); - } - ep = s.extract_with( wrapped_int( nKey ), wrapped_less() ); - CPPUNIT_ASSERT( ep ); - CPPUNIT_ASSERT( !ep.empty()); - CPPUNIT_CHECK( ep->nKey == nKey); - //ep.release(); - - { - typename set_type::rcu_lock l; - CPPUNIT_CHECK( s.get_with( wrapped_int( nKey ), wrapped_less() ) == nullptr ); - } - ep = s.extract_with( wrapped_int( nKey ), wrapped_less() ); - CPPUNIT_CHECK( !ep ); - } - CPPUNIT_ASSERT( s.empty() ); - CPPUNIT_ASSERT( check_size( s, 0 )); - - } - - PrintStat()( s ); - } - - void EllenBinTree_hp_less(); - void EllenBinTree_hp_cmp(); - void EllenBinTree_hp_cmpless(); - void EllenBinTree_hp_less_ic(); - void EllenBinTree_hp_cmp_ic(); - void EllenBinTree_hp_less_stat(); - void EllenBinTree_hp_cmp_ic_stat(); - void EllenBinTree_hp_cmp_ic_stat_yield(); - void EllenBinTree_hp_less_pool(); - void EllenBinTree_hp_less_pool_ic_stat(); - - void EllenBinTree_dhp_less(); - void EllenBinTree_dhp_cmp(); - void EllenBinTree_dhp_cmpless(); - void EllenBinTree_dhp_less_ic(); - void EllenBinTree_dhp_cmp_ic(); - void EllenBinTree_dhp_less_stat(); - void EllenBinTree_dhp_cmp_ic_stat(); - void EllenBinTree_dhp_cmp_ic_stat_yield(); - void EllenBinTree_dhp_less_pool(); - void EllenBinTree_dhp_less_pool_ic_stat(); - - void EllenBinTree_rcu_gpi_less(); - void EllenBinTree_rcu_gpi_cmp(); - void EllenBinTree_rcu_gpi_cmpless(); - void EllenBinTree_rcu_gpi_less_ic(); - void EllenBinTree_rcu_gpi_cmp_ic(); - void EllenBinTree_rcu_gpi_less_stat(); - void EllenBinTree_rcu_gpi_cmp_ic_stat(); - void EllenBinTree_rcu_gpi_cmp_ic_stat_yield(); - void EllenBinTree_rcu_gpi_less_pool(); - void EllenBinTree_rcu_gpi_less_pool_ic_stat(); - - void EllenBinTree_rcu_gpb_less(); - void EllenBinTree_rcu_gpb_cmp(); - void EllenBinTree_rcu_gpb_cmpless(); - void EllenBinTree_rcu_gpb_less_ic(); - void EllenBinTree_rcu_gpb_cmp_ic(); - void EllenBinTree_rcu_gpb_less_stat(); - void EllenBinTree_rcu_gpb_cmp_ic_stat(); - void EllenBinTree_rcu_gpb_cmp_ic_stat_yield(); - void EllenBinTree_rcu_gpb_less_pool(); - void EllenBinTree_rcu_gpb_less_pool_ic_stat(); - - void EllenBinTree_rcu_gpt_less(); - void EllenBinTree_rcu_gpt_cmp(); - void EllenBinTree_rcu_gpt_cmpless(); - void EllenBinTree_rcu_gpt_less_ic(); - void EllenBinTree_rcu_gpt_cmp_ic(); - void EllenBinTree_rcu_gpt_less_stat(); - void EllenBinTree_rcu_gpt_cmp_ic_stat(); - void EllenBinTree_rcu_gpt_cmp_ic_stat_yield(); - void EllenBinTree_rcu_gpt_less_pool(); - void EllenBinTree_rcu_gpt_less_pool_ic_stat(); - - void EllenBinTree_rcu_shb_less(); - void EllenBinTree_rcu_shb_cmp(); - void EllenBinTree_rcu_shb_cmpless(); - void EllenBinTree_rcu_shb_less_ic(); - void EllenBinTree_rcu_shb_cmp_ic(); - void EllenBinTree_rcu_shb_less_stat(); - void EllenBinTree_rcu_shb_cmp_ic_stat(); - void EllenBinTree_rcu_shb_cmp_ic_stat_yield(); - void EllenBinTree_rcu_shb_less_pool(); - void EllenBinTree_rcu_shb_less_pool_ic_stat(); - - void EllenBinTree_rcu_sht_less(); - void EllenBinTree_rcu_sht_cmp(); - void EllenBinTree_rcu_sht_cmpless(); - void EllenBinTree_rcu_sht_less_ic(); - void EllenBinTree_rcu_sht_cmp_ic(); - void EllenBinTree_rcu_sht_less_stat(); - void EllenBinTree_rcu_sht_cmp_ic_stat(); - void EllenBinTree_rcu_sht_cmp_ic_stat_yield(); - void EllenBinTree_rcu_sht_less_pool(); - void EllenBinTree_rcu_sht_less_pool_ic_stat(); - - CPPUNIT_TEST_SUITE(EllenBinTreeSetHdrTest) - CPPUNIT_TEST(EllenBinTree_hp_less) - CPPUNIT_TEST(EllenBinTree_hp_cmp) - CPPUNIT_TEST(EllenBinTree_hp_less_stat) - CPPUNIT_TEST(EllenBinTree_hp_cmpless) - CPPUNIT_TEST(EllenBinTree_hp_less_ic) - CPPUNIT_TEST(EllenBinTree_hp_cmp_ic) - CPPUNIT_TEST(EllenBinTree_hp_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_hp_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_hp_less_pool ) - CPPUNIT_TEST(EllenBinTree_hp_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_dhp_less) - CPPUNIT_TEST(EllenBinTree_dhp_cmp) - CPPUNIT_TEST(EllenBinTree_dhp_less_stat) - CPPUNIT_TEST(EllenBinTree_dhp_cmpless) - CPPUNIT_TEST(EllenBinTree_dhp_less_ic) - CPPUNIT_TEST(EllenBinTree_dhp_cmp_ic) - CPPUNIT_TEST(EllenBinTree_dhp_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_dhp_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_dhp_less_pool ) - CPPUNIT_TEST(EllenBinTree_dhp_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_rcu_gpi_less) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_cmp) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_less_stat) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_cmpless) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_less_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_cmp_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_rcu_gpi_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_rcu_gpi_less_pool ) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_rcu_gpb_less) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_cmp) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_less_stat) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_cmpless) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_less_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_cmp_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_rcu_gpb_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_rcu_gpb_less_pool ) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_rcu_gpt_less) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_cmp) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_less_stat) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_cmpless) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_less_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_cmp_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_rcu_gpt_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_rcu_gpt_less_pool ) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_rcu_shb_less) - CPPUNIT_TEST(EllenBinTree_rcu_shb_cmp) - CPPUNIT_TEST(EllenBinTree_rcu_shb_less_stat) - CPPUNIT_TEST(EllenBinTree_rcu_shb_cmpless) - CPPUNIT_TEST(EllenBinTree_rcu_shb_less_ic) - CPPUNIT_TEST(EllenBinTree_rcu_shb_cmp_ic) - CPPUNIT_TEST(EllenBinTree_rcu_shb_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_rcu_shb_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_rcu_shb_less_pool ) - CPPUNIT_TEST(EllenBinTree_rcu_shb_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_rcu_sht_less) - CPPUNIT_TEST(EllenBinTree_rcu_sht_cmp) - CPPUNIT_TEST(EllenBinTree_rcu_sht_less_stat) - CPPUNIT_TEST(EllenBinTree_rcu_sht_cmpless) - CPPUNIT_TEST(EllenBinTree_rcu_sht_less_ic) - CPPUNIT_TEST(EllenBinTree_rcu_sht_cmp_ic) - CPPUNIT_TEST(EllenBinTree_rcu_sht_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_rcu_sht_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_rcu_sht_less_pool ) - CPPUNIT_TEST(EllenBinTree_rcu_sht_less_pool_ic_stat) - - CPPUNIT_TEST_SUITE_END() - }; -} // namespace tree - -#endif // #ifndef CDSTEST_HDR_ELLENBINTREE_SET_H diff --git a/tests/test-hdr/tree/hdr_ellenbintree_set_dhp.cpp b/tests/test-hdr/tree/hdr_ellenbintree_set_dhp.cpp deleted file mode 100644 index 251918de..00000000 --- a/tests/test-hdr/tree/hdr_ellenbintree_set_dhp.cpp +++ /dev/null @@ -1,191 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_ellenbintree_set.h" -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_dhp.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::gc::DHP gc_type; - - typedef cc::ellen_bintree::node tree_leaf_node; - typedef cc::ellen_bintree::internal_node< EllenBinTreeSetHdrTest::key_type, tree_leaf_node > tree_internal_node; - typedef cc::ellen_bintree::update_desc tree_update_desc; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - - } - - void EllenBinTreeSetHdrTest::EllenBinTree_dhp_less() - { - struct set_traits: public cc::ellen_bintree::traits{ - typedef EllenBinTreeSetHdrTest::key_extractor key_extractor; - typedef EllenBinTreeSetHdrTest::less less; - }; - typedef cc::EllenBinTreeSet< gc_type, key_type, value_type, set_traits > set_type; - - test(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_dhp_cmp() - { - typedef cc::EllenBinTreeSet< gc_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::compare< compare > - >::type - > set_type; - - test(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_dhp_cmpless() - { - typedef cc::EllenBinTreeSet< gc_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::compare< compare > - ,co::less< less > - >::type - > set_type; - - test(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_dhp_less_ic() - { - typedef cc::EllenBinTreeSet< gc_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_dhp_cmp_ic() - { - typedef cc::EllenBinTreeSet< gc_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::item_counter< cds::atomicity::item_counter > - ,co::compare< compare > - >::type - > set_type; - - test(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_dhp_less_stat() - { - typedef cc::EllenBinTreeSet< gc_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_dhp_cmp_ic_stat() - { - typedef cc::EllenBinTreeSet< gc_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - >::type - > set_type; - - test(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_dhp_cmp_ic_stat_yield() - { - typedef cc::EllenBinTreeSet< gc_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - , co::back_off< cds::backoff::yield > - >::type - > set_type; - - test(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_dhp_less_pool() - { - typedef cc::EllenBinTreeSet< gc_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_dhp::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_dhp::update_desc_pool_accessor > > - >::type - > set_type; - - test(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_dhp_less_pool_ic_stat() - { - typedef cc::EllenBinTreeSet< gc_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_dhp::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_dhp::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test(); - } - -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_ellenbintree_set_hp.cpp b/tests/test-hdr/tree/hdr_ellenbintree_set_hp.cpp deleted file mode 100644 index 4404ec87..00000000 --- a/tests/test-hdr/tree/hdr_ellenbintree_set_hp.cpp +++ /dev/null @@ -1,190 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_ellenbintree_set.h" -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_hp.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::gc::HP gc_type; - - typedef cc::ellen_bintree::node tree_leaf_node; - typedef cc::ellen_bintree::internal_node< EllenBinTreeSetHdrTest::key_type, tree_leaf_node > tree_internal_node; - typedef cc::ellen_bintree::update_desc tree_update_desc; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - } - - void EllenBinTreeSetHdrTest::EllenBinTree_hp_less() - { - struct set_traits : public cc::ellen_bintree::traits{ - typedef EllenBinTreeSetHdrTest::key_extractor key_extractor; - typedef EllenBinTreeSetHdrTest::less less; - }; - typedef cc::EllenBinTreeSet< gc_type, key_type, value_type, set_traits > set_type; - - test(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_hp_cmp() - { - typedef cc::EllenBinTreeSet< gc_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::compare< compare > - >::type - > set_type; - - test(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_hp_cmpless() - { - typedef cc::EllenBinTreeSet< gc_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::compare< compare > - ,co::less< less > - >::type - > set_type; - - test(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_hp_less_ic() - { - typedef cc::EllenBinTreeSet< gc_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_hp_cmp_ic() - { - typedef cc::EllenBinTreeSet< gc_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::item_counter< cds::atomicity::item_counter > - ,co::compare< compare > - >::type - > set_type; - - test(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_hp_less_stat() - { - typedef cc::EllenBinTreeSet< gc_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_hp_cmp_ic_stat() - { - typedef cc::EllenBinTreeSet< gc_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - >::type - > set_type; - - test(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_hp_cmp_ic_stat_yield() - { - typedef cc::EllenBinTreeSet< gc_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - , co::back_off< cds::backoff::yield > - >::type - > set_type; - - test(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_hp_less_pool() - { - typedef cc::EllenBinTreeSet< gc_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_hp::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_hp::update_desc_pool_accessor > > - >::type - > set_type; - - test(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_hp_less_pool_ic_stat() - { - typedef cc::EllenBinTreeSet< gc_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_hp::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_hp::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test(); - } - -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_ellenbintree_set_rcu_gpb.cpp b/tests/test-hdr/tree/hdr_ellenbintree_set_rcu_gpb.cpp deleted file mode 100644 index 108d4c97..00000000 --- a/tests/test-hdr/tree/hdr_ellenbintree_set_rcu_gpb.cpp +++ /dev/null @@ -1,191 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_ellenbintree_set.h" -#include -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_rcu.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type; - - typedef cc::ellen_bintree::node tree_leaf_node; - typedef cc::ellen_bintree::internal_node< EllenBinTreeSetHdrTest::key_type, tree_leaf_node > tree_internal_node; - typedef cc::ellen_bintree::update_desc tree_update_desc; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpb_less() - { - struct set_traits : public cc::ellen_bintree::traits{ - typedef EllenBinTreeSetHdrTest::key_extractor key_extractor; - typedef EllenBinTreeSetHdrTest::less less; - }; - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, set_traits > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpb_cmp() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpb_cmpless() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::compare< compare > - ,co::less< less > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpb_less_ic() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpb_cmp_ic() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::item_counter< cds::atomicity::item_counter > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpb_less_stat() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpb_cmp_ic_stat() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpb_cmp_ic_stat_yield() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - , co::back_off< cds::backoff::yield > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpb_less_pool() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpb_less_pool_ic_stat() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test_rcu(); - } - -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_ellenbintree_set_rcu_gpi.cpp b/tests/test-hdr/tree/hdr_ellenbintree_set_rcu_gpi.cpp deleted file mode 100644 index ea40b964..00000000 --- a/tests/test-hdr/tree/hdr_ellenbintree_set_rcu_gpi.cpp +++ /dev/null @@ -1,193 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_ellenbintree_set.h" -#include -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_rcu.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type; - - typedef cc::ellen_bintree::node tree_leaf_node; - typedef cc::ellen_bintree::internal_node< EllenBinTreeSetHdrTest::key_type, tree_leaf_node > tree_internal_node; - typedef cc::ellen_bintree::update_desc tree_update_desc; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpi_less() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpi_cmp() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpi_cmpless() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::compare< compare > - ,co::less< less > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpi_less_ic() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpi_cmp_ic() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::item_counter< cds::atomicity::item_counter > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpi_less_stat() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpi_cmp_ic_stat() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpi_cmp_ic_stat_yield() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - , co::back_off< cds::backoff::yield > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpi_less_pool() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpi_less_pool_ic_stat() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test_rcu(); - } - -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_ellenbintree_set_rcu_gpt.cpp b/tests/test-hdr/tree/hdr_ellenbintree_set_rcu_gpt.cpp deleted file mode 100644 index 95015068..00000000 --- a/tests/test-hdr/tree/hdr_ellenbintree_set_rcu_gpt.cpp +++ /dev/null @@ -1,193 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_ellenbintree_set.h" -#include -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_rcu.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type; - - typedef cc::ellen_bintree::node tree_leaf_node; - typedef cc::ellen_bintree::internal_node< EllenBinTreeSetHdrTest::key_type, tree_leaf_node > tree_internal_node; - typedef cc::ellen_bintree::update_desc tree_update_desc; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpt_less() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpt_cmp() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpt_cmpless() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::compare< compare > - ,co::less< less > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpt_less_ic() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpt_cmp_ic() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::item_counter< cds::atomicity::item_counter > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpt_less_stat() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpt_cmp_ic_stat() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpt_cmp_ic_stat_yield() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - , co::back_off< cds::backoff::yield > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpt_less_pool() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - >::type - > set_type; - - test_rcu(); - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpt_less_pool_ic_stat() - { - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test_rcu(); - } - -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_ellenbintree_set_rcu_shb.cpp b/tests/test-hdr/tree/hdr_ellenbintree_set_rcu_shb.cpp deleted file mode 100644 index ba4a5058..00000000 --- a/tests/test-hdr/tree/hdr_ellenbintree_set_rcu_shb.cpp +++ /dev/null @@ -1,214 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_ellenbintree_set.h" -#include -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_rcu.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type; - - typedef cc::ellen_bintree::node tree_leaf_node; - typedef cc::ellen_bintree::internal_node< EllenBinTreeSetHdrTest::key_type, tree_leaf_node > tree_internal_node; - typedef cc::ellen_bintree::update_desc tree_update_desc; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - } -#endif - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_shb_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_shb_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_shb_cmpless() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::compare< compare > - ,co::less< less > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_shb_less_ic() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_shb_cmp_ic() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::item_counter< cds::atomicity::item_counter > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_shb_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_shb_cmp_ic_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_shb_cmp_ic_stat_yield() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - , co::back_off< cds::backoff::yield > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_shb_less_pool() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_shb_less_pool_ic_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test_rcu(); -#endif - } - -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_ellenbintree_set_rcu_sht.cpp b/tests/test-hdr/tree/hdr_ellenbintree_set_rcu_sht.cpp deleted file mode 100644 index e83f0320..00000000 --- a/tests/test-hdr/tree/hdr_ellenbintree_set_rcu_sht.cpp +++ /dev/null @@ -1,214 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_ellenbintree_set.h" -#include -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_rcu.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace cc = cds::container; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type; - - typedef cc::ellen_bintree::node tree_leaf_node; - typedef cc::ellen_bintree::internal_node< EllenBinTreeSetHdrTest::key_type, tree_leaf_node > tree_internal_node; - typedef cc::ellen_bintree::update_desc tree_update_desc; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - } -#endif - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_sht_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_sht_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_sht_cmpless() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::compare< compare > - ,co::less< less > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_sht_less_ic() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_sht_cmp_ic() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::item_counter< cds::atomicity::item_counter > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_sht_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_sht_cmp_ic_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_sht_cmp_ic_stat_yield() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - , co::back_off< cds::backoff::yield > - ,co::compare< compare > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_sht_less_pool() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - >::type - > set_type; - - test_rcu(); -#endif - } - - void EllenBinTreeSetHdrTest::EllenBinTree_rcu_sht_less_pool_ic_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, - cc::ellen_bintree::make_set_traits< - cc::ellen_bintree::key_extractor< key_extractor > - ,co::less< less > - ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< cc::ellen_bintree::stat<> > - >::type - > set_type; - - test_rcu(); -#endif - } - -} // namespace tree diff --git a/tests/test-hdr/tree/hdr_intrusive_bintree.h b/tests/test-hdr/tree/hdr_intrusive_bintree.h deleted file mode 100644 index 62368e0d..00000000 --- a/tests/test-hdr/tree/hdr_intrusive_bintree.h +++ /dev/null @@ -1,1281 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSTEST_HDR_INTRUSIVE_BINTREE_H -#define CDSTEST_HDR_INTRUSIVE_BINTREE_H - -#include "cppunit/cppunit_proxy.h" -#include "size_check.h" -#include - -namespace tree { - - class IntrusiveBinTreeHdrTest: public CppUnitMini::TestCase - { - public: - typedef int key_type; - - struct stat_data { - size_t nDisposeCount; - size_t nWaitingDispCount; - size_t nInsertFuncCall; - size_t nEnsureExistFuncCall; - size_t nEnsureNewFuncCall; - size_t nEraseFuncCall; - size_t nFindFuncCall; - size_t nFindConstFuncCall; - - stat_data() - : nDisposeCount(0) - , nWaitingDispCount(0) - , nInsertFuncCall(0) - , nEnsureExistFuncCall(0) - , nEnsureNewFuncCall(0) - , nEraseFuncCall(0) - , nFindFuncCall(0) - , nFindConstFuncCall(0) - {} - }; - - template - struct base_hook_value: public Hook - { - int nKey; - int nValue; - mutable stat_data stat; - - base_hook_value() - {} - - base_hook_value( int key ) - : nKey(key) - , nValue(key * 2) - {} - - base_hook_value( int key, int val ) - : nKey(key) - , nValue(val) - {} - - base_hook_value( base_hook_value&& s ) - : Hook() - , nKey(s.nKey) - , nValue(s.nValue) - {} - base_hook_value& operator=( base_hook_value const& s ) - { - nKey = s.nKey; - nValue = s.nValue; - return *this; - } - }; - - template - struct member_hook_value - { - int nKey; - int nValue; - Hook hook; - mutable stat_data stat; - - member_hook_value() - {} - - member_hook_value( int key ) - : nKey(key) - , nValue(key * 2) - {} - - member_hook_value( int key, int val ) - : nKey(key) - , nValue(val) - {} - - member_hook_value( member_hook_value&& s ) - : nKey(s.nKey) - , nValue(s.nValue) - , hook() - {} - member_hook_value& operator=( member_hook_value const& s ) - { - nKey = s.nKey; - nValue = s.nValue; - return *this; - } - }; - - template - struct less { - typedef ValueType value_type; - - bool operator()( int k1, int k2 ) const - { - return k1 < k2; - } - bool operator()( value_type const& v1, value_type const& v2 ) const - { - return v1.nKey < v2.nKey; - } - bool operator()( value_type const& v, int k ) const - { - return v.nKey < k; - } - bool operator()( int k, value_type const& v ) const - { - return k < v.nKey; - } - }; - - template - struct compare { - typedef ValueType value_type; - - int cmp( int k1, int k2 ) const - { - return k1 < k2 ? -1 : (k1 > k2 ? 1 : 0); - } - int operator()( int k1, int k2 ) const - { - return cmp( k1, k2 ); - } - int operator()( value_type const& v1, value_type const& v2 ) const - { - return cmp( v1.nKey, v2.nKey ); - } - int operator()( value_type const& v, int k ) const - { - return cmp( v.nKey, k ); - } - int operator()( int k, value_type const& v ) const - { - return cmp( k, v.nKey ); - } - }; - - struct wrapped_int { - int nKey; - - wrapped_int( int n ) - : nKey(n) - {} - }; - - template - struct wrapped_less - { - bool operator()( wrapped_int const& w, int n ) const - { - return w.nKey < n; - } - bool operator()( int n, wrapped_int const& w ) const - { - return n < w.nKey; - } - bool operator()( wrapped_int const& w, T const& v ) const - { - return w.nKey < v.nKey; - } - bool operator()( T const& v, wrapped_int const& w ) const - { - return v.nKey < w.nKey; - } - }; - - template - struct key_extractor { - void operator()( int& dest, ValueType const& src ) const - { - dest = src.nKey; - } - }; - - template - struct disposer { - void operator()( ValueType * v ) const - { - ++v->stat.nDisposeCount; - } - }; - - struct insert_functor { - template - void operator()( T& v ) const - { - ++v.stat.nInsertFuncCall; - } - }; - - struct update_functor { - template - void operator()( bool bNew, T& dest, T& src) const - { - if ( bNew ) - ++dest.stat.nEnsureNewFuncCall; - else { - dest.nValue *= 2; - ++src.stat.nEnsureExistFuncCall; - } - } - }; - - struct erase_functor { - template - void operator()( T const& v ) const - { - ++v.stat.nEraseFuncCall; - } - }; - - struct find_functor { - template - void operator()( T const& v, Q& /*q*/ ) const - { - ++v.stat.nFindFuncCall; - } - template - void operator()( T const& v, Q const& /*q*/ ) const - { - ++v.stat.nFindConstFuncCall; - } - }; - - protected: - static const size_t c_nItemCount = 10000; - - template - class data_array - { - T * pFirst; - T * pLast; - - public: - data_array() - : pFirst( new T[c_nItemCount] ) - , pLast( pFirst + c_nItemCount ) - { - int i = 0; - for ( T * p = pFirst; p != pLast; ++p, ++i ) { - p->nKey = i; - p->nValue = i * 2; - } - - shuffle( pFirst, pLast ); - } - - ~data_array() - { - delete [] pFirst; - } - - T * begin() { return pFirst; } - T * end() { return pLast ; } - }; - - protected: - template - void test_common( Tree& t ) - { - typedef Tree tree_type; - typedef typename tree_type::key_type key_type; - typedef typename tree_type::value_type value_type; - - { - value_type v1( 10, 100 ); - value_type v2( 20, 200 ); - value_type v3( 30, 300 ); - value_type v4( 25, 250 ); - value_type v5( -50, -500 ); - - // insert/update - CPPUNIT_ASSERT( t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 0 )); - CPPUNIT_CHECK( !t.contains( v1.nKey )); - CPPUNIT_CHECK( !t.contains( v1 )); - CPPUNIT_CHECK( !t.contains( v2.nKey )); - CPPUNIT_CHECK( !t.contains( v2 )); - CPPUNIT_CHECK( !t.contains( v3.nKey )); - CPPUNIT_CHECK( !t.contains( v3 )); - CPPUNIT_CHECK( !t.contains( v4.nKey )); - CPPUNIT_CHECK( !t.contains( v4 )); - CPPUNIT_CHECK( !t.contains( v5.nKey )); - CPPUNIT_CHECK( !t.contains( v5 )); - - CPPUNIT_ASSERT( t.insert( v1 )); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 1 )); - CPPUNIT_CHECK( t.contains( v1.nKey )); - CPPUNIT_CHECK( t.contains( v1 )); - CPPUNIT_CHECK( !t.contains( v2.nKey )); - CPPUNIT_CHECK( !t.contains( v2 )); - CPPUNIT_CHECK( !t.contains( v3.nKey )); - CPPUNIT_CHECK( !t.contains( v3 )); - CPPUNIT_CHECK( !t.contains( v4.nKey )); - CPPUNIT_CHECK( !t.contains( v4 )); - CPPUNIT_CHECK( !t.contains( v5.nKey )); - CPPUNIT_CHECK( !t.contains( v5 )); - - CPPUNIT_ASSERT( v2.stat.nInsertFuncCall == 0 ); - CPPUNIT_ASSERT( t.insert( v2, insert_functor() )); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( v2.stat.nInsertFuncCall == 1 ); - CPPUNIT_ASSERT( t.contains( v1.nKey )); - CPPUNIT_ASSERT( t.contains( v1 )); - CPPUNIT_ASSERT( t.contains( v2.nKey )); - CPPUNIT_ASSERT( t.contains( v2 )); - CPPUNIT_ASSERT( !t.contains( v3.nKey )); - CPPUNIT_ASSERT( !t.contains( v3 )); - CPPUNIT_ASSERT( !t.contains( v4.nKey )); - CPPUNIT_ASSERT( !t.contains( v4 )); - CPPUNIT_ASSERT( !t.contains( v5.nKey )); - CPPUNIT_ASSERT( !t.contains( v5 )); - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 2 )); - - std::pair updateResult; - CPPUNIT_ASSERT( v3.stat.nEnsureNewFuncCall == 0 ); - CPPUNIT_ASSERT( v3.stat.nEnsureExistFuncCall == 0 ); - updateResult = t.update( v3, update_functor(), false ); - CPPUNIT_ASSERT( !updateResult.first && !updateResult.second ); - CPPUNIT_ASSERT( v3.stat.nEnsureNewFuncCall == 0 ); - CPPUNIT_ASSERT( v3.stat.nEnsureExistFuncCall == 0 ); - updateResult = t.update( v3, update_functor(), true ); - CPPUNIT_ASSERT( updateResult.first && updateResult.second ); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( v3.stat.nEnsureNewFuncCall == 1 ); - CPPUNIT_ASSERT( v3.stat.nEnsureExistFuncCall == 0 ); - CPPUNIT_ASSERT( v3.nValue == 300 ); - updateResult = t.update( v3, update_functor(), false ); - CPPUNIT_ASSERT( updateResult.first && !updateResult.second ); - CPPUNIT_ASSERT( v3.stat.nEnsureNewFuncCall == 1 ); - CPPUNIT_ASSERT( v3.stat.nEnsureExistFuncCall == 1 ); - CPPUNIT_ASSERT( v3.nValue == 600 ); - CPPUNIT_ASSERT( t.contains( v1.nKey )); - CPPUNIT_ASSERT( t.contains( v1 )); - CPPUNIT_ASSERT( t.contains( v2.nKey )); - CPPUNIT_ASSERT( t.contains( v2 )); - CPPUNIT_ASSERT( t.contains( v3.nKey )); - CPPUNIT_ASSERT( t.contains( v3 )); - CPPUNIT_ASSERT( !t.contains( v4.nKey )); - CPPUNIT_ASSERT( !t.contains( v4 )); - CPPUNIT_ASSERT( !t.contains( v5.nKey )); - CPPUNIT_ASSERT( !t.contains( v5 )); - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 3 )); - - { - value_type v( v3.nKey, v3.nValue ); - CPPUNIT_ASSERT( v.stat.nEnsureExistFuncCall == 0 ); - CPPUNIT_ASSERT( v3.stat.nEnsureNewFuncCall == 1 ); - CPPUNIT_ASSERT( v3.stat.nEnsureExistFuncCall == 1 ); - CPPUNIT_ASSERT( v3.nValue == 600 ); - CPPUNIT_ASSERT( !t.update( v, update_functor() ).second ); - CPPUNIT_ASSERT( v3.stat.nEnsureNewFuncCall == 1 ); - CPPUNIT_ASSERT( v.stat.nEnsureExistFuncCall == 1 ); - CPPUNIT_ASSERT( v3.nValue == 1200 ); - - } - v3.nValue = 300; - CPPUNIT_ASSERT( !t.insert( v3 )); - - CPPUNIT_ASSERT( t.insert( v4 )); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( t.contains( v1.nKey )); - CPPUNIT_ASSERT( t.contains( v1 )); - CPPUNIT_ASSERT( t.contains( v2.nKey )); - CPPUNIT_ASSERT( t.contains( v2 )); - CPPUNIT_ASSERT( t.contains( v3.nKey )); - CPPUNIT_ASSERT( t.contains( v3 )); - CPPUNIT_ASSERT( t.contains( v4.nKey )); - CPPUNIT_ASSERT( t.contains( v4 )); - CPPUNIT_ASSERT( !t.contains( v5.nKey )); - CPPUNIT_ASSERT( !t.contains( v5 )); - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 4 )); - - CPPUNIT_ASSERT( t.insert( v5 )); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( t.contains( v1.nKey )); - CPPUNIT_ASSERT( t.contains( v1 )); - CPPUNIT_ASSERT( t.contains( v2.nKey )); - CPPUNIT_ASSERT( t.contains( v2 )); - CPPUNIT_ASSERT( t.contains( v3.nKey )); - CPPUNIT_ASSERT( t.contains( v3 )); - CPPUNIT_ASSERT( t.contains( v4.nKey )); - CPPUNIT_ASSERT( t.contains( v4 )); - CPPUNIT_ASSERT( t.contains( v5.nKey )); - CPPUNIT_ASSERT( t.contains( v5 )); - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 5 )); - - //unlink/erase - ++v1.stat.nWaitingDispCount; - CPPUNIT_ASSERT( t.unlink(v1)); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( !t.contains( v1.nKey )); - CPPUNIT_ASSERT( !t.contains( v1 )); - CPPUNIT_ASSERT( !t.unlink(v1)); - CPPUNIT_ASSERT( t.contains( v2.nKey )); - CPPUNIT_ASSERT( t.contains( v2 )); - CPPUNIT_ASSERT( t.contains( v3.nKey )); - CPPUNIT_ASSERT( t.contains( v3 )); - CPPUNIT_ASSERT( t.contains( v4.nKey )); - CPPUNIT_ASSERT( t.contains( v4 )); - CPPUNIT_ASSERT( t.contains( v5.nKey )); - CPPUNIT_ASSERT( t.contains( v5 )); - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 4 )); - - ++v2.stat.nWaitingDispCount; - CPPUNIT_ASSERT( t.erase( v2.nKey )); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( !t.contains( v1.nKey )); - CPPUNIT_ASSERT( !t.contains( v1 )); - CPPUNIT_ASSERT( !t.contains( v2.nKey )); - CPPUNIT_ASSERT( !t.contains( v2 )); - CPPUNIT_ASSERT( !t.erase(v2)); - CPPUNIT_ASSERT( t.contains( v3.nKey )); - CPPUNIT_ASSERT( t.contains( v3 )); - CPPUNIT_ASSERT( t.contains( v4.nKey )); - CPPUNIT_ASSERT( t.contains( v4 )); - CPPUNIT_ASSERT( t.contains( v5.nKey )); - CPPUNIT_ASSERT( t.contains( v5 )); - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 3 )); - - ++v3.stat.nWaitingDispCount; - CPPUNIT_ASSERT( t.erase_with( v3.nKey, less() )); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( !t.contains( v1.nKey )); - CPPUNIT_ASSERT( !t.contains( v1 )); - CPPUNIT_ASSERT( !t.contains( v2.nKey )); - CPPUNIT_ASSERT( !t.contains( v2 )); - CPPUNIT_ASSERT( !t.contains( v3.nKey )); - CPPUNIT_ASSERT( !t.contains( v3 )); - CPPUNIT_ASSERT( !t.erase_with(v3, less() )); - CPPUNIT_ASSERT( t.contains( v4.nKey )); - CPPUNIT_ASSERT( t.contains( v4 )); - CPPUNIT_ASSERT( t.contains( v5.nKey )); - CPPUNIT_ASSERT( t.contains( v5 )); - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 2 )); - - ++v4.stat.nWaitingDispCount; - CPPUNIT_ASSERT( v4.stat.nEraseFuncCall == 0 ); - CPPUNIT_ASSERT( t.erase( v4.nKey, erase_functor() )); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( v4.stat.nEraseFuncCall == 1 ); - CPPUNIT_ASSERT( !t.contains( v1.nKey )); - CPPUNIT_ASSERT( !t.contains( v1 )); - CPPUNIT_ASSERT( !t.contains( v2.nKey )); - CPPUNIT_ASSERT( !t.contains( v2 )); - CPPUNIT_ASSERT( !t.contains( v3.nKey )); - CPPUNIT_ASSERT( !t.contains( v3 )); - CPPUNIT_ASSERT( !t.contains( v4.nKey )); - CPPUNIT_ASSERT( !t.contains( v4 )); - CPPUNIT_ASSERT( !t.erase( v4.nKey, erase_functor() )); - CPPUNIT_ASSERT( v4.stat.nEraseFuncCall == 1 ); - CPPUNIT_ASSERT( t.contains( v5.nKey )); - CPPUNIT_ASSERT( t.contains( v5 )); - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 1 )); - - ++v5.stat.nWaitingDispCount; - CPPUNIT_ASSERT( t.erase_with( v5.nKey, less(), erase_functor() )); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( v5.stat.nEraseFuncCall == 1 ); - CPPUNIT_ASSERT( !t.contains( v1.nKey )); - CPPUNIT_ASSERT( !t.contains( v1 )); - CPPUNIT_ASSERT( !t.contains( v2.nKey )); - CPPUNIT_ASSERT( !t.contains( v2 )); - CPPUNIT_ASSERT( !t.contains( v3.nKey )); - CPPUNIT_ASSERT( !t.contains( v3 )); - CPPUNIT_ASSERT( !t.erase_with(v5, less(), erase_functor() )); - CPPUNIT_ASSERT( !t.contains( v4.nKey )); - CPPUNIT_ASSERT( !t.contains( v4 )); - CPPUNIT_ASSERT( !t.contains( v5.nKey )); - CPPUNIT_ASSERT( !t.contains( v5 )); - CPPUNIT_ASSERT( t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 0 )); - - tree_type::gc::force_dispose(); - - // contains - CPPUNIT_ASSERT( t.insert( v1 )); - CPPUNIT_ASSERT( t.insert( v2 )); - CPPUNIT_ASSERT( t.insert( v3 )); - CPPUNIT_ASSERT( t.insert( v4 )); - CPPUNIT_ASSERT( t.insert( v5 )); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 5 )); - - CPPUNIT_ASSERT( t.contains( 10 )); - CPPUNIT_ASSERT( !t.contains( 11 )); - CPPUNIT_ASSERT( t.contains( v1 )); - CPPUNIT_ASSERT( t.contains( v2.nKey )); - CPPUNIT_ASSERT( t.contains( v3 )); - CPPUNIT_ASSERT( t.contains( v4.nKey )); - CPPUNIT_ASSERT( t.contains( v5.nKey )); - - // contains - CPPUNIT_ASSERT( t.contains( 10, less() )); - CPPUNIT_ASSERT( !t.contains( wrapped_int(11), wrapped_less() )); - CPPUNIT_ASSERT( t.contains( v1, less() )); - CPPUNIT_ASSERT( t.contains( wrapped_int(v2.nKey), wrapped_less() )); - CPPUNIT_ASSERT( t.contains( v3, less() )); - CPPUNIT_ASSERT( t.contains( v4.nKey, less() )); - CPPUNIT_ASSERT( t.contains( v5.nKey, less() )); - - // find - CPPUNIT_ASSERT( v1.stat.nFindFuncCall == 0 ); - CPPUNIT_ASSERT( v1.stat.nFindConstFuncCall == 0 ); - CPPUNIT_ASSERT( t.find( 10, find_functor() )); - CPPUNIT_ASSERT( v1.stat.nFindFuncCall == 0 ); - CPPUNIT_ASSERT( v1.stat.nFindConstFuncCall == 1 ); - - CPPUNIT_ASSERT( !t.find( 11, find_functor() )); - - CPPUNIT_ASSERT( t.find( v1, find_functor() )); - CPPUNIT_ASSERT( v1.stat.nFindFuncCall == 1 ); - CPPUNIT_ASSERT( v1.stat.nFindConstFuncCall == 1 ); - - CPPUNIT_ASSERT( v2.stat.nFindFuncCall == 0 ); - CPPUNIT_ASSERT( v2.stat.nFindConstFuncCall == 0 ); - CPPUNIT_ASSERT( t.find( v2.nKey, find_functor() )); - CPPUNIT_ASSERT( v2.stat.nFindFuncCall == 1 ); - CPPUNIT_ASSERT( v2.stat.nFindConstFuncCall == 0 ); - - CPPUNIT_ASSERT( v3.stat.nFindFuncCall == 0 ); - CPPUNIT_ASSERT( v3.stat.nFindConstFuncCall == 0 ); - CPPUNIT_ASSERT( t.find( v3, find_functor() )); - CPPUNIT_ASSERT( v3.stat.nFindFuncCall == 1 ); - CPPUNIT_ASSERT( v3.stat.nFindConstFuncCall == 0 ); - - CPPUNIT_ASSERT( v4.stat.nFindFuncCall == 0 ); - CPPUNIT_ASSERT( v4.stat.nFindConstFuncCall == 0 ); - CPPUNIT_ASSERT( t.find( (value_type const&) v4, find_functor() )); - CPPUNIT_ASSERT( v4.stat.nFindFuncCall == 0 ); - CPPUNIT_ASSERT( v4.stat.nFindConstFuncCall == 1 ); - - CPPUNIT_ASSERT( v5.stat.nFindFuncCall == 0 ); - CPPUNIT_ASSERT( v5.stat.nFindConstFuncCall == 0 ); - CPPUNIT_ASSERT( t.find( v5.nKey, find_functor() )); - CPPUNIT_ASSERT( v5.stat.nFindFuncCall == 1 ); - CPPUNIT_ASSERT( v5.stat.nFindConstFuncCall == 0 ); - - // find_with - CPPUNIT_ASSERT( v1.stat.nFindFuncCall == 1 ); - CPPUNIT_ASSERT( v1.stat.nFindConstFuncCall == 1 ); - CPPUNIT_ASSERT( t.find_with( 10, less(), find_functor() )); - CPPUNIT_ASSERT( v1.stat.nFindFuncCall == 1 ); - CPPUNIT_ASSERT( v1.stat.nFindConstFuncCall == 2 ); - - CPPUNIT_ASSERT( !t.find_with( 11, less(), find_functor() )); - - CPPUNIT_ASSERT( t.find_with( v1, less(), find_functor() )); - CPPUNIT_ASSERT( v1.stat.nFindFuncCall == 2 ); - CPPUNIT_ASSERT( v1.stat.nFindConstFuncCall == 2 ); - - CPPUNIT_ASSERT( v2.stat.nFindFuncCall == 1 ); - CPPUNIT_ASSERT( v2.stat.nFindConstFuncCall == 0 ); - CPPUNIT_ASSERT( t.find_with( v2.nKey, less(), find_functor() )); - CPPUNIT_ASSERT( v2.stat.nFindFuncCall == 2 ); - CPPUNIT_ASSERT( v2.stat.nFindConstFuncCall == 0 ); - - CPPUNIT_ASSERT( v3.stat.nFindFuncCall == 1 ); - CPPUNIT_ASSERT( v3.stat.nFindConstFuncCall == 0 ); - CPPUNIT_ASSERT( t.find_with( wrapped_int(v3.nKey), wrapped_less(), find_functor() )); - CPPUNIT_ASSERT( v3.stat.nFindFuncCall == 1 ); - CPPUNIT_ASSERT( v3.stat.nFindConstFuncCall == 1 ); - - CPPUNIT_ASSERT( v4.stat.nFindFuncCall == 0 ); - CPPUNIT_ASSERT( v4.stat.nFindConstFuncCall == 1 ); - CPPUNIT_ASSERT( t.find_with( (value_type const&) v4, less(), find_functor() )); - CPPUNIT_ASSERT( v4.stat.nFindFuncCall == 0 ); - CPPUNIT_ASSERT( v4.stat.nFindConstFuncCall == 2 ); - - CPPUNIT_ASSERT( v5.stat.nFindFuncCall == 1 ); - CPPUNIT_ASSERT( v5.stat.nFindConstFuncCall == 0 ); - CPPUNIT_ASSERT( t.find_with( v5.nKey, less(), find_functor() )); - CPPUNIT_ASSERT( v5.stat.nFindFuncCall == 2 ); - CPPUNIT_ASSERT( v5.stat.nFindConstFuncCall == 0 ); - - CPPUNIT_ASSERT( t.check_consistency() ); - t.clear(); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 0 )); - - tree_type::gc::force_dispose(); - CPPUNIT_CHECK_EX( v1.stat.nWaitingDispCount + 1 == v1.stat.nDisposeCount, - "v1.stat.nWaitingDispCount=" << v1.stat.nWaitingDispCount << ", v1.stat.nDisposeCount=" << v1.stat.nDisposeCount ); - CPPUNIT_CHECK_EX( v2.stat.nWaitingDispCount + 1 == v2.stat.nDisposeCount, - "v2.stat.nWaitingDispCount=" << v2.stat.nWaitingDispCount << ", v2.stat.nDisposeCount=" << v2.stat.nDisposeCount ); - CPPUNIT_CHECK_EX( v3.stat.nWaitingDispCount + 1 == v3.stat.nDisposeCount, - "v3.stat.nWaitingDispCount=" << v3.stat.nWaitingDispCount << ", v3.stat.nDisposeCount=" << v3.stat.nDisposeCount ); - CPPUNIT_CHECK_EX( v4.stat.nWaitingDispCount + 1 == v4.stat.nDisposeCount, - "v4.stat.nWaitingDispCount=" << v4.stat.nWaitingDispCount << ", v4.stat.nDisposeCount=" << v4.stat.nDisposeCount ); - CPPUNIT_CHECK_EX( v5.stat.nWaitingDispCount + 1 == v5.stat.nDisposeCount, - "v5.stat.nWaitingDispCount=" << v5.stat.nWaitingDispCount << ", v5.stat.nDisposeCount=" << v5.stat.nDisposeCount ); - } - - { - data_array< value_type> arr; - value_type * pFirst = arr.begin(); - value_type * pLast = arr.end(); - - for ( value_type * p = pFirst; p != pLast; ++p ) { - CPPUNIT_ASSERT( t.insert( *p ) ); - CPPUNIT_ASSERT( !t.insert( *p )); - } - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, c_nItemCount )); - CPPUNIT_ASSERT( t.check_consistency() ); - - for ( int n = 0; n < (int) c_nItemCount; ++n ) { - CPPUNIT_ASSERT_MSG( t.contains( n ), n ); - } - for ( value_type * p = pFirst; p != pLast; ++p ) { - CPPUNIT_ASSERT( t.contains( *p )); - CPPUNIT_ASSERT( t.contains( p->nKey )); - CPPUNIT_ASSERT( t.unlink( *p ) ); - CPPUNIT_ASSERT( !t.unlink( *p ) ); - CPPUNIT_ASSERT( !t.contains( p->nKey )); - } - - tree_type::gc::force_dispose(); - } - } - - template - void test() - { - typedef Tree tree_type; - typedef typename tree_type::key_type key_type; - typedef typename tree_type::value_type value_type; - - tree_type t; - test_common(t); - - { - value_type v1( 10, 100 ); - value_type v2( 20, 200 ); - value_type v3( 30, 300 ); - value_type v4( 25, 250 ); - value_type v5( -50, -500 ); - - // extract/extract_min/extract_max - CPPUNIT_ASSERT( t.insert( v1 )); - CPPUNIT_ASSERT( t.insert( v2 )); - CPPUNIT_ASSERT( t.insert( v3 )); - CPPUNIT_ASSERT( t.insert( v4 )); - CPPUNIT_ASSERT( t.insert( v5 )); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 5 )); - - { - typename tree_type::guarded_ptr gp; - - gp = t.get( v2.nKey ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->nKey == v2.nKey ); - gp = t.extract( v2.nKey ); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 4 )); - CPPUNIT_ASSERT( gp->nKey == v2.nKey ); - gp = t.extract( v2.nKey ); - CPPUNIT_ASSERT( !gp ); - gp = t.get( v2.nKey ); - CPPUNIT_CHECK( !gp ); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 4 )); - - gp = t.extract_min(); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 3 )); - CPPUNIT_ASSERT( gp->nKey == v5.nKey ); - - gp = t.extract_min(); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 2 )); - CPPUNIT_ASSERT( gp->nKey == v1.nKey ); - - gp = t.extract_min(); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 1 )); - CPPUNIT_ASSERT( gp->nKey == v4.nKey ); - - gp = t.extract_min(); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 0 )); - CPPUNIT_ASSERT( gp->nKey == v3.nKey ); - - gp = t.extract_min(); - CPPUNIT_ASSERT( !gp ); - CPPUNIT_ASSERT( !t.extract_max()); - CPPUNIT_ASSERT( !t.extract( v1.nKey )); - } - - tree_type::gc::force_dispose(); - - { - typename tree_type::guarded_ptr gp; - - CPPUNIT_ASSERT( t.insert( v1 )); - CPPUNIT_ASSERT( t.insert( v2 )); - CPPUNIT_ASSERT( t.insert( v3 )); - CPPUNIT_ASSERT( t.insert( v4 )); - CPPUNIT_ASSERT( t.insert( v5 )); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 5 )); - - gp = t.get_with( wrapped_int( v4.nKey ), wrapped_less()); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->nKey == v4.nKey ); - gp = t.extract_with( wrapped_int( v4.nKey ), wrapped_less()); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 4 )); - CPPUNIT_ASSERT( gp->nKey == v4.nKey ); - - gp = t.extract_with( v4.nKey, less()); - CPPUNIT_ASSERT( !gp ); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( !t.get_with( v4.nKey, less() ) ); - - gp = t.extract_max(); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 3 )); - CPPUNIT_ASSERT( gp->nKey == v3.nKey ); - - gp = t.extract_max(); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 2 )); - CPPUNIT_ASSERT( gp->nKey == v2.nKey ); - - gp = t.extract_max(); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 1 )); - CPPUNIT_ASSERT( gp->nKey == v1.nKey ); - - gp = t.extract_max(); - CPPUNIT_ASSERT( gp ); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 0 )); - CPPUNIT_ASSERT( gp->nKey == v5.nKey ); - } - - tree_type::gc::force_dispose(); - } - - { - data_array< value_type> arr; - value_type * pFirst = arr.begin(); - value_type * pLast = arr.end(); - - for ( value_type * p = pFirst; p != pLast; ++p ) { - CPPUNIT_ASSERT( t.update( *p, update_functor()).second ); - } - for ( int n = 0; n < (int) c_nItemCount; ++n ) { - typename tree_type::guarded_ptr gp( t.extract_min() ); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->nKey == n ); - } - - for ( value_type * p = pFirst; p != pLast; ++p ) { - CPPUNIT_ASSERT( t.insert( *p ) ); - } - for ( int n = (int) c_nItemCount - 1; n >= 0; --n ) { - typename tree_type::guarded_ptr gp( t.extract_max()); - CPPUNIT_ASSERT( !gp.empty()); - CPPUNIT_CHECK( gp->nKey == n ); - } - - tree_type::gc::force_dispose(); - } - - PrintStat()( t ); - } - - template - void test_rcu() - { - typedef Tree tree_type; - typedef typename tree_type::key_type key_type; - typedef typename tree_type::value_type value_type; - - tree_type t; - test_common(t); - - // extract/get - { - value_type v1( 10, 100 ); - value_type v2( 20, 200 ); - value_type v3( 30, 300 ); - value_type v4( 25, 250 ); - value_type v5( -50, -500 ); - - // extract/extract_min/extract_max - CPPUNIT_ASSERT( t.insert( v1 )); - CPPUNIT_ASSERT( t.insert( v2 )); - CPPUNIT_ASSERT( t.insert( v3 )); - CPPUNIT_ASSERT( t.insert( v4 )); - CPPUNIT_ASSERT( t.insert( v5 )); - CPPUNIT_ASSERT( t.check_consistency() ); - CPPUNIT_ASSERT( !t.empty() ); - CPPUNIT_ASSERT( misc::check_size( t, 5 )); - - typename tree_type::exempt_ptr ep; - typename tree_type::value_type * pVal; - { - typename tree_type::rcu_lock l; - pVal = t.get( v1.nKey ); - CPPUNIT_ASSERT( pVal != nullptr ); - CPPUNIT_CHECK( pVal == &v1 ); - } - ep = t.extract( v1.nKey ); - CPPUNIT_ASSERT( !ep.empty()); - CPPUNIT_CHECK( ep->nKey == v1.nKey ); - { - typename tree_type::rcu_lock l; - CPPUNIT_CHECK( t.get( v1.nKey ) == nullptr ); - } - ep.release(); - ep = t.extract( v1.nKey ); - CPPUNIT_ASSERT( ep.empty()); - - ep = t.extract_min(); - CPPUNIT_ASSERT( !ep.empty() ); - CPPUNIT_CHECK( ep->nKey == v5.nKey ); - { - typename tree_type::rcu_lock l; - CPPUNIT_CHECK( t.get( v5.nKey ) == nullptr ); - } - - ep = t.extract( v5.nKey ); - CPPUNIT_ASSERT( ep.empty() ); - - ep = t.extract_max(); - CPPUNIT_ASSERT( !ep.empty()); - CPPUNIT_CHECK( ep->nKey == v3.nKey ); - { - typename tree_type::rcu_lock l; - CPPUNIT_CHECK( t.get( v3.nKey ) == nullptr ); - } - ep.release(); - - { - typename tree_type::rcu_lock l; - pVal = t.get_with( wrapped_int(v2.nKey), wrapped_less() ); - CPPUNIT_ASSERT( pVal != nullptr ); - CPPUNIT_CHECK( pVal == &v2 ); - } - ep = t.extract_with( wrapped_int( v2.nKey ), wrapped_less() ); - CPPUNIT_ASSERT( !ep.empty() ); - CPPUNIT_CHECK( ep->nKey == v2.nKey ); - { - typename tree_type::rcu_lock l; - CPPUNIT_CHECK( t.get_with( wrapped_int( v2.nKey ), wrapped_less() ) == nullptr ); - } - //ep.release(); - ep = t.extract_with( wrapped_int( v2.nKey ), wrapped_less() ); - CPPUNIT_CHECK( ep.empty()); - - ep = t.extract( v4.nKey ); - CPPUNIT_ASSERT( ep ); - CPPUNIT_CHECK( ep->nKey == v4.nKey ); - ep.release(); - - tree_type::gc::force_dispose(); - - CPPUNIT_CHECK( t.empty()); - CPPUNIT_ASSERT( misc::check_size( t, 0 )); - - { - typename tree_type::rcu_lock l; - CPPUNIT_CHECK( t.get( v1.nKey ) == nullptr ); - CPPUNIT_CHECK( t.get( v2.nKey ) == nullptr ); - CPPUNIT_CHECK( t.get( v3.nKey ) == nullptr ); - CPPUNIT_CHECK( t.get( v4.nKey ) == nullptr ); - CPPUNIT_CHECK( t.get( v5.nKey ) == nullptr ); - } - - CPPUNIT_CHECK( !t.extract(v1.nKey)); - CPPUNIT_CHECK( !t.extract(v2.nKey)); - CPPUNIT_CHECK( !t.extract(v3.nKey)); - CPPUNIT_CHECK( !t.extract(v4.nKey)); - CPPUNIT_CHECK( !t.extract(v5.nKey)); - - tree_type::gc::force_dispose(); - } - - PrintStat()( t ); - } - - void EllenBinTree_hp_base_less(); - void EllenBinTree_hp_base_cmp(); - void EllenBinTree_hp_base_cmpless(); - void EllenBinTree_hp_base_less_ic(); - void EllenBinTree_hp_base_cmp_ic(); - void EllenBinTree_hp_base_less_stat(); - void EllenBinTree_hp_base_cmp_ic_stat(); - void EllenBinTree_hp_base_cmp_ic_stat_yield(); - void EllenBinTree_hp_base_less_pool(); - void EllenBinTree_hp_base_less_pool_ic_stat(); - - void EllenBinTree_hp_member_less(); - void EllenBinTree_hp_member_cmp(); - void EllenBinTree_hp_member_cmpless(); - void EllenBinTree_hp_member_less_ic(); - void EllenBinTree_hp_member_cmp_ic(); - void EllenBinTree_hp_member_less_stat(); - void EllenBinTree_hp_member_cmp_ic_stat(); - void EllenBinTree_hp_member_cmp_ic_stat_yield(); - void EllenBinTree_hp_member_less_pool(); - void EllenBinTree_hp_member_less_pool_ic_stat(); - - void EllenBinTree_dhp_base_less(); - void EllenBinTree_dhp_base_cmp(); - void EllenBinTree_dhp_base_cmpless(); - void EllenBinTree_dhp_base_less_ic(); - void EllenBinTree_dhp_base_cmp_ic(); - void EllenBinTree_dhp_base_less_stat(); - void EllenBinTree_dhp_base_cmp_ic_stat(); - void EllenBinTree_dhp_base_cmp_ic_stat_yield(); - void EllenBinTree_dhp_base_less_pool(); - void EllenBinTree_dhp_base_less_pool_ic_stat(); - - void EllenBinTree_dhp_member_less(); - void EllenBinTree_dhp_member_cmp(); - void EllenBinTree_dhp_member_cmpless(); - void EllenBinTree_dhp_member_less_ic(); - void EllenBinTree_dhp_member_cmp_ic(); - void EllenBinTree_dhp_member_less_stat(); - void EllenBinTree_dhp_member_cmp_ic_stat(); - void EllenBinTree_dhp_member_cmp_ic_stat_yield(); - void EllenBinTree_dhp_member_less_pool(); - void EllenBinTree_dhp_member_less_pool_ic_stat(); - - void EllenBinTree_rcu_gpi_base_less(); - void EllenBinTree_rcu_gpi_base_cmp(); - void EllenBinTree_rcu_gpi_base_cmpless(); - void EllenBinTree_rcu_gpi_base_less_ic(); - void EllenBinTree_rcu_gpi_base_cmp_ic(); - void EllenBinTree_rcu_gpi_base_less_stat(); - void EllenBinTree_rcu_gpi_base_cmp_ic_stat(); - void EllenBinTree_rcu_gpi_base_cmp_ic_stat_yield(); - void EllenBinTree_rcu_gpi_base_less_pool(); - void EllenBinTree_rcu_gpi_base_less_pool_ic_stat(); - - void EllenBinTree_rcu_gpi_member_less(); - void EllenBinTree_rcu_gpi_member_cmp(); - void EllenBinTree_rcu_gpi_member_cmpless(); - void EllenBinTree_rcu_gpi_member_less_ic(); - void EllenBinTree_rcu_gpi_member_cmp_ic(); - void EllenBinTree_rcu_gpi_member_less_stat(); - void EllenBinTree_rcu_gpi_member_cmp_ic_stat(); - void EllenBinTree_rcu_gpi_member_cmp_ic_stat_yield(); - void EllenBinTree_rcu_gpi_member_less_pool(); - void EllenBinTree_rcu_gpi_member_less_pool_ic_stat(); - - void EllenBinTree_rcu_gpb_base_less(); - void EllenBinTree_rcu_gpb_base_cmp(); - void EllenBinTree_rcu_gpb_base_cmpless(); - void EllenBinTree_rcu_gpb_base_less_ic(); - void EllenBinTree_rcu_gpb_base_cmp_ic(); - void EllenBinTree_rcu_gpb_base_less_stat(); - void EllenBinTree_rcu_gpb_base_cmp_ic_stat(); - void EllenBinTree_rcu_gpb_base_cmp_ic_stat_yield(); - void EllenBinTree_rcu_gpb_base_less_pool(); - void EllenBinTree_rcu_gpb_base_less_pool_ic_stat(); - - void EllenBinTree_rcu_gpb_member_less(); - void EllenBinTree_rcu_gpb_member_cmp(); - void EllenBinTree_rcu_gpb_member_cmpless(); - void EllenBinTree_rcu_gpb_member_less_ic(); - void EllenBinTree_rcu_gpb_member_cmp_ic(); - void EllenBinTree_rcu_gpb_member_less_stat(); - void EllenBinTree_rcu_gpb_member_cmp_ic_stat(); - void EllenBinTree_rcu_gpb_member_cmp_ic_stat_yield(); - void EllenBinTree_rcu_gpb_member_less_pool(); - void EllenBinTree_rcu_gpb_member_less_pool_ic_stat(); - - void EllenBinTree_rcu_gpt_base_less(); - void EllenBinTree_rcu_gpt_base_cmp(); - void EllenBinTree_rcu_gpt_base_cmpless(); - void EllenBinTree_rcu_gpt_base_less_ic(); - void EllenBinTree_rcu_gpt_base_cmp_ic(); - void EllenBinTree_rcu_gpt_base_less_stat(); - void EllenBinTree_rcu_gpt_base_cmp_ic_stat(); - void EllenBinTree_rcu_gpt_base_cmp_ic_stat_yield(); - void EllenBinTree_rcu_gpt_base_less_pool(); - void EllenBinTree_rcu_gpt_base_less_pool_ic_stat(); - - void EllenBinTree_rcu_gpt_member_less(); - void EllenBinTree_rcu_gpt_member_cmp(); - void EllenBinTree_rcu_gpt_member_cmpless(); - void EllenBinTree_rcu_gpt_member_less_ic(); - void EllenBinTree_rcu_gpt_member_cmp_ic(); - void EllenBinTree_rcu_gpt_member_less_stat(); - void EllenBinTree_rcu_gpt_member_cmp_ic_stat(); - void EllenBinTree_rcu_gpt_member_cmp_ic_stat_yield(); - void EllenBinTree_rcu_gpt_member_less_pool(); - void EllenBinTree_rcu_gpt_member_less_pool_ic_stat(); - - void EllenBinTree_rcu_shb_base_less(); - void EllenBinTree_rcu_shb_base_cmp(); - void EllenBinTree_rcu_shb_base_cmpless(); - void EllenBinTree_rcu_shb_base_less_ic(); - void EllenBinTree_rcu_shb_base_cmp_ic(); - void EllenBinTree_rcu_shb_base_less_stat(); - void EllenBinTree_rcu_shb_base_cmp_ic_stat(); - void EllenBinTree_rcu_shb_base_cmp_ic_stat_yield(); - void EllenBinTree_rcu_shb_base_less_pool(); - void EllenBinTree_rcu_shb_base_less_pool_ic_stat(); - - void EllenBinTree_rcu_shb_member_less(); - void EllenBinTree_rcu_shb_member_cmp(); - void EllenBinTree_rcu_shb_member_cmpless(); - void EllenBinTree_rcu_shb_member_less_ic(); - void EllenBinTree_rcu_shb_member_cmp_ic(); - void EllenBinTree_rcu_shb_member_less_stat(); - void EllenBinTree_rcu_shb_member_cmp_ic_stat(); - void EllenBinTree_rcu_shb_member_cmp_ic_stat_yield(); - void EllenBinTree_rcu_shb_member_less_pool(); - void EllenBinTree_rcu_shb_member_less_pool_ic_stat(); - - void EllenBinTree_rcu_sht_base_less(); - void EllenBinTree_rcu_sht_base_cmp(); - void EllenBinTree_rcu_sht_base_cmpless(); - void EllenBinTree_rcu_sht_base_less_ic(); - void EllenBinTree_rcu_sht_base_cmp_ic(); - void EllenBinTree_rcu_sht_base_less_stat(); - void EllenBinTree_rcu_sht_base_cmp_ic_stat(); - void EllenBinTree_rcu_sht_base_cmp_ic_stat_yield(); - void EllenBinTree_rcu_sht_base_less_pool(); - void EllenBinTree_rcu_sht_base_less_pool_ic_stat(); - - void EllenBinTree_rcu_sht_member_less(); - void EllenBinTree_rcu_sht_member_cmp(); - void EllenBinTree_rcu_sht_member_cmpless(); - void EllenBinTree_rcu_sht_member_less_ic(); - void EllenBinTree_rcu_sht_member_cmp_ic(); - void EllenBinTree_rcu_sht_member_less_stat(); - void EllenBinTree_rcu_sht_member_cmp_ic_stat(); - void EllenBinTree_rcu_sht_member_cmp_ic_stat_yield(); - void EllenBinTree_rcu_sht_member_less_pool(); - void EllenBinTree_rcu_sht_member_less_pool_ic_stat(); - - CPPUNIT_TEST_SUITE(IntrusiveBinTreeHdrTest) - CPPUNIT_TEST(EllenBinTree_hp_base_less) - CPPUNIT_TEST(EllenBinTree_hp_base_cmp) - CPPUNIT_TEST(EllenBinTree_hp_base_less_stat) - CPPUNIT_TEST(EllenBinTree_hp_base_cmpless) - CPPUNIT_TEST(EllenBinTree_hp_base_less_ic) - CPPUNIT_TEST(EllenBinTree_hp_base_cmp_ic) - CPPUNIT_TEST(EllenBinTree_hp_base_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_hp_base_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_hp_base_less_pool ) - CPPUNIT_TEST(EllenBinTree_hp_base_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_hp_member_less) - CPPUNIT_TEST(EllenBinTree_hp_member_cmp) - CPPUNIT_TEST(EllenBinTree_hp_member_less_stat) - CPPUNIT_TEST(EllenBinTree_hp_member_cmpless) - CPPUNIT_TEST(EllenBinTree_hp_member_less_ic) - CPPUNIT_TEST(EllenBinTree_hp_member_cmp_ic) - CPPUNIT_TEST( EllenBinTree_hp_member_cmp_ic_stat ) - CPPUNIT_TEST( EllenBinTree_hp_member_cmp_ic_stat_yield ) - CPPUNIT_TEST(EllenBinTree_hp_member_less_pool) - CPPUNIT_TEST(EllenBinTree_hp_member_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_dhp_base_less) - CPPUNIT_TEST(EllenBinTree_dhp_base_cmp) - CPPUNIT_TEST(EllenBinTree_dhp_base_less_stat) - CPPUNIT_TEST(EllenBinTree_dhp_base_cmpless) - CPPUNIT_TEST(EllenBinTree_dhp_base_less_ic) - CPPUNIT_TEST(EllenBinTree_dhp_base_cmp_ic) - CPPUNIT_TEST(EllenBinTree_dhp_base_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_dhp_base_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_dhp_base_less_pool ) - CPPUNIT_TEST(EllenBinTree_dhp_base_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_dhp_member_less) - CPPUNIT_TEST(EllenBinTree_dhp_member_cmp) - CPPUNIT_TEST(EllenBinTree_dhp_member_less_stat) - CPPUNIT_TEST(EllenBinTree_dhp_member_cmpless) - CPPUNIT_TEST(EllenBinTree_dhp_member_less_ic) - CPPUNIT_TEST(EllenBinTree_dhp_member_cmp_ic) - CPPUNIT_TEST(EllenBinTree_dhp_member_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_dhp_member_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_dhp_member_less_pool ) - CPPUNIT_TEST(EllenBinTree_dhp_member_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_rcu_gpi_base_less) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_base_cmp) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_base_less_stat) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_base_cmpless) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_base_less_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_base_cmp_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_base_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_rcu_gpi_base_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_rcu_gpi_base_less_pool ) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_base_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_rcu_gpi_member_less) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_member_cmp) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_member_less_stat) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_member_cmpless) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_member_less_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_member_cmp_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_member_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_rcu_gpi_member_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_rcu_gpi_member_less_pool ) - CPPUNIT_TEST(EllenBinTree_rcu_gpi_member_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_rcu_gpb_base_less) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_base_cmp) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_base_less_stat) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_base_cmpless) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_base_less_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_base_cmp_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_base_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_rcu_gpb_base_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_rcu_gpb_base_less_pool ) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_base_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_rcu_gpb_member_less) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_member_cmp) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_member_less_stat) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_member_cmpless) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_member_less_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_member_cmp_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_member_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_rcu_gpb_member_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_rcu_gpb_member_less_pool ) - CPPUNIT_TEST(EllenBinTree_rcu_gpb_member_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_rcu_gpt_base_less) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_base_cmp) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_base_less_stat) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_base_cmpless) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_base_less_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_base_cmp_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_base_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_rcu_gpt_base_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_rcu_gpt_base_less_pool ) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_base_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_rcu_gpt_member_less) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_member_cmp) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_member_less_stat) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_member_cmpless) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_member_less_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_member_cmp_ic) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_member_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_rcu_gpt_member_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_rcu_gpt_member_less_pool ) - CPPUNIT_TEST(EllenBinTree_rcu_gpt_member_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_rcu_shb_base_less) - CPPUNIT_TEST(EllenBinTree_rcu_shb_base_cmp) - CPPUNIT_TEST(EllenBinTree_rcu_shb_base_less_stat) - CPPUNIT_TEST(EllenBinTree_rcu_shb_base_cmpless) - CPPUNIT_TEST(EllenBinTree_rcu_shb_base_less_ic) - CPPUNIT_TEST(EllenBinTree_rcu_shb_base_cmp_ic) - CPPUNIT_TEST(EllenBinTree_rcu_shb_base_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_rcu_shb_base_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_rcu_shb_base_less_pool ) - CPPUNIT_TEST(EllenBinTree_rcu_shb_base_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_rcu_shb_member_less) - CPPUNIT_TEST(EllenBinTree_rcu_shb_member_cmp) - CPPUNIT_TEST(EllenBinTree_rcu_shb_member_less_stat) - CPPUNIT_TEST(EllenBinTree_rcu_shb_member_cmpless) - CPPUNIT_TEST(EllenBinTree_rcu_shb_member_less_ic) - CPPUNIT_TEST(EllenBinTree_rcu_shb_member_cmp_ic) - CPPUNIT_TEST(EllenBinTree_rcu_shb_member_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_rcu_shb_member_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_rcu_shb_member_less_pool ) - CPPUNIT_TEST(EllenBinTree_rcu_shb_member_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_rcu_sht_base_less) - CPPUNIT_TEST(EllenBinTree_rcu_sht_base_cmp) - CPPUNIT_TEST(EllenBinTree_rcu_sht_base_less_stat) - CPPUNIT_TEST(EllenBinTree_rcu_sht_base_cmpless) - CPPUNIT_TEST(EllenBinTree_rcu_sht_base_less_ic) - CPPUNIT_TEST(EllenBinTree_rcu_sht_base_cmp_ic) - CPPUNIT_TEST(EllenBinTree_rcu_sht_base_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_rcu_sht_base_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_rcu_sht_base_less_pool ) - CPPUNIT_TEST(EllenBinTree_rcu_sht_base_less_pool_ic_stat) - - CPPUNIT_TEST(EllenBinTree_rcu_sht_member_less) - CPPUNIT_TEST(EllenBinTree_rcu_sht_member_cmp) - CPPUNIT_TEST(EllenBinTree_rcu_sht_member_less_stat) - CPPUNIT_TEST(EllenBinTree_rcu_sht_member_cmpless) - CPPUNIT_TEST(EllenBinTree_rcu_sht_member_less_ic) - CPPUNIT_TEST(EllenBinTree_rcu_sht_member_cmp_ic) - CPPUNIT_TEST(EllenBinTree_rcu_sht_member_cmp_ic_stat) - CPPUNIT_TEST( EllenBinTree_rcu_sht_member_cmp_ic_stat_yield ) - CPPUNIT_TEST( EllenBinTree_rcu_sht_member_less_pool ) - CPPUNIT_TEST(EllenBinTree_rcu_sht_member_less_pool_ic_stat) - - CPPUNIT_TEST_SUITE_END() - }; -} // namespace tree - -#endif // #ifndef CDSTEST_HDR_INTRUSIVE_BINTREE_H diff --git a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_dhp.cpp b/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_dhp.cpp deleted file mode 100644 index b98542e8..00000000 --- a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_dhp.cpp +++ /dev/null @@ -1,212 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_intrusive_bintree.h" -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_dhp.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { - namespace ci = cds::intrusive; - namespace co = cds::opt; - namespace { - typedef ci::ellen_bintree::node leaf_node; - typedef IntrusiveBinTreeHdrTest::base_hook_value< leaf_node > base_value; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - - typedef ci::ellen_bintree::internal_node< IntrusiveBinTreeHdrTest::key_type, leaf_node > internal_node; - typedef ci::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_dhp_base_less() - { - struct tree_traits : public ci::ellen_bintree::traits - { - typedef ci::ellen_bintree::base_hook< co::gc< cds::gc::DHP >> hook; - typedef IntrusiveBinTreeHdrTest::key_extractor< base_value > key_extractor; - typedef IntrusiveBinTreeHdrTest::less< base_value > less; - typedef IntrusiveBinTreeHdrTest::disposer< base_value > disposer; - }; - typedef ci::EllenBinTree< cds::gc::DHP, key_type, base_value, tree_traits > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_dhp_base_less_stat() - { - typedef ci::EllenBinTree< cds::gc::DHP, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< cds::gc::DHP > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_dhp_base_cmp() - { - typedef ci::EllenBinTree< cds::gc::DHP, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< cds::gc::DHP > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_dhp_base_cmpless() - { - typedef ci::EllenBinTree< cds::gc::DHP, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< cds::gc::DHP > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_dhp_base_less_ic() - { - typedef ci::EllenBinTree< cds::gc::DHP, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< cds::gc::DHP > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_dhp_base_cmp_ic() - { - typedef ci::EllenBinTree< cds::gc::DHP, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< cds::gc::DHP > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_dhp_base_cmp_ic_stat() - { - typedef ci::EllenBinTree< cds::gc::DHP, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< cds::gc::DHP > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_dhp_base_cmp_ic_stat_yield() - { - typedef ci::EllenBinTree< cds::gc::DHP, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< cds::gc::DHP > > > - , ci::ellen_bintree::key_extractor< key_extractor< base_value > > - , co::compare< compare< base_value > > - , ci::opt::disposer< disposer< base_value > > - , co::item_counter< cds::atomicity::item_counter > - , co::stat< ci::ellen_bintree::stat<> > - , co::back_off< cds::backoff::yield > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_dhp_base_less_pool() - { - typedef ci::EllenBinTree< cds::gc::DHP, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< cds::gc::DHP > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_dhp::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_dhp::update_desc_pool_accessor > > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_dhp_base_less_pool_ic_stat() - { - typedef ci::EllenBinTree< cds::gc::DHP, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< cds::gc::DHP > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_dhp::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_dhp::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test(); - } - - -} //namespace tree diff --git a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_dhp_member.cpp b/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_dhp_member.cpp deleted file mode 100644 index ac13412d..00000000 --- a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_dhp_member.cpp +++ /dev/null @@ -1,214 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_intrusive_bintree.h" -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_dhp.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { - namespace ci = cds::intrusive; - namespace co = cds::opt; - namespace { - typedef ci::ellen_bintree::node leaf_node; - typedef IntrusiveBinTreeHdrTest::member_hook_value< leaf_node > member_value; - - typedef ci::opt::hook< ci::ellen_bintree::member_hook< offsetof(member_value, hook), co::gc< cds::gc::DHP > > > member_hook; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - - typedef ci::ellen_bintree::internal_node< IntrusiveBinTreeHdrTest::key_type, leaf_node > internal_node; - typedef ci::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_dhp_member_less() - { - struct tree_traits : public ci::ellen_bintree::traits - { - typedef ci::ellen_bintree::member_hook< offsetof( member_value, hook ), co::gc< cds::gc::DHP >> hook; - typedef IntrusiveBinTreeHdrTest::key_extractor< member_value > key_extractor; - typedef IntrusiveBinTreeHdrTest::less< member_value > less; - typedef IntrusiveBinTreeHdrTest::disposer< member_value > disposer; - }; - typedef ci::EllenBinTree< cds::gc::DHP, key_type, member_value, tree_traits > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_dhp_member_less_stat() - { - typedef ci::EllenBinTree< cds::gc::DHP, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_dhp_member_cmp() - { - typedef ci::EllenBinTree< cds::gc::DHP, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_dhp_member_cmpless() - { - typedef ci::EllenBinTree< cds::gc::DHP, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_dhp_member_less_ic() - { - typedef ci::EllenBinTree< cds::gc::DHP, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_dhp_member_cmp_ic() - { - typedef ci::EllenBinTree< cds::gc::DHP, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_dhp_member_cmp_ic_stat() - { - typedef ci::EllenBinTree< cds::gc::DHP, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_dhp_member_cmp_ic_stat_yield() - { - typedef ci::EllenBinTree< cds::gc::DHP, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - ,co::back_off< cds::backoff::yield > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_dhp_member_less_pool() - { - typedef ci::EllenBinTree< cds::gc::DHP, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_dhp::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_dhp::update_desc_pool_accessor > > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_dhp_member_less_pool_ic_stat() - { - typedef ci::EllenBinTree< cds::gc::DHP, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_dhp::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_dhp::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test(); - } - - -} //namespace tree diff --git a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_hp.cpp b/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_hp.cpp deleted file mode 100644 index bd06aa66..00000000 --- a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_hp.cpp +++ /dev/null @@ -1,212 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_intrusive_bintree.h" -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_hp.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { - namespace ci = cds::intrusive; - namespace co = cds::opt; - namespace { - typedef ci::ellen_bintree::node leaf_node; - typedef IntrusiveBinTreeHdrTest::base_hook_value< leaf_node > base_value; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - - typedef ci::ellen_bintree::internal_node< IntrusiveBinTreeHdrTest::key_type, leaf_node > internal_node; - typedef ci::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_hp_base_less() - { - struct tree_traits : public ci::ellen_bintree::traits - { - typedef ci::ellen_bintree::base_hook< co::gc< cds::gc::HP >> hook; - typedef IntrusiveBinTreeHdrTest::key_extractor< base_value > key_extractor; - typedef IntrusiveBinTreeHdrTest::less< base_value > less; - typedef IntrusiveBinTreeHdrTest::disposer< base_value > disposer; - }; - typedef ci::EllenBinTree< cds::gc::HP, key_type, base_value, tree_traits > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_hp_base_less_stat() - { - typedef ci::EllenBinTree< cds::gc::HP, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< cds::gc::HP > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_hp_base_cmp() - { - typedef ci::EllenBinTree< cds::gc::HP, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< cds::gc::HP > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_hp_base_cmpless() - { - typedef ci::EllenBinTree< cds::gc::HP, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< cds::gc::HP > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_hp_base_less_ic() - { - typedef ci::EllenBinTree< cds::gc::HP, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< cds::gc::HP > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_hp_base_cmp_ic() - { - typedef ci::EllenBinTree< cds::gc::HP, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< cds::gc::HP > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_hp_base_cmp_ic_stat() - { - typedef ci::EllenBinTree< cds::gc::HP, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< cds::gc::HP > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_hp_base_cmp_ic_stat_yield() - { - typedef ci::EllenBinTree< cds::gc::HP, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< cds::gc::HP > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - , co::back_off< cds::backoff::yield > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_hp_base_less_pool() - { - typedef ci::EllenBinTree< cds::gc::HP, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< cds::gc::HP > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_hp::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_hp::update_desc_pool_accessor > > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_hp_base_less_pool_ic_stat() - { - typedef ci::EllenBinTree< cds::gc::HP, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< cds::gc::HP > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_hp::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_hp::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test(); - } - - -} //namespace tree diff --git a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_hp_member.cpp b/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_hp_member.cpp deleted file mode 100644 index 1400c852..00000000 --- a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_hp_member.cpp +++ /dev/null @@ -1,221 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_intrusive_bintree.h" -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_hp.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { - namespace ci = cds::intrusive; - namespace co = cds::opt; - namespace { - typedef ci::ellen_bintree::node leaf_node; - typedef IntrusiveBinTreeHdrTest::member_hook_value< leaf_node > member_value; - - typedef ci::opt::hook< ci::ellen_bintree::member_hook< offsetof(member_value, hook), co::gc< cds::gc::HP > > > member_hook; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - - typedef ci::ellen_bintree::internal_node< IntrusiveBinTreeHdrTest::key_type, leaf_node > internal_node; - typedef ci::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_hp_member_less() - { - struct tree_traits : public ci::ellen_bintree::traits - { - typedef ci::ellen_bintree::member_hook< offsetof( member_value, hook ), co::gc< cds::gc::HP >> hook; - typedef IntrusiveBinTreeHdrTest::key_extractor< member_value > key_extractor; - typedef IntrusiveBinTreeHdrTest::less< member_value > less; - typedef IntrusiveBinTreeHdrTest::disposer< member_value > disposer; - }; - typedef ci::EllenBinTree< cds::gc::HP, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_hp_member_less_stat() - { - typedef ci::EllenBinTree< cds::gc::HP, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_hp_member_cmp() - { - typedef ci::EllenBinTree< cds::gc::HP, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_hp_member_cmpless() - { - typedef ci::EllenBinTree< cds::gc::HP, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_hp_member_less_ic() - { - typedef ci::EllenBinTree< cds::gc::HP, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_hp_member_cmp_ic() - { - typedef ci::EllenBinTree< cds::gc::HP, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_hp_member_cmp_ic_stat() - { - typedef ci::EllenBinTree< cds::gc::HP, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_hp_member_cmp_ic_stat_yield() - { - typedef ci::EllenBinTree< cds::gc::HP, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - , co::back_off< cds::backoff::yield > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_hp_member_less_pool() - { - typedef ci::EllenBinTree< cds::gc::HP, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_hp::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_hp::update_desc_pool_accessor > > - >::type - > tree_type; - - test(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_hp_member_less_pool_ic_stat() - { - typedef ci::EllenBinTree< cds::gc::HP, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_hp::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_hp::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test(); - } - - -} //namespace tree diff --git a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_pool_dhp.h b/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_pool_dhp.h deleted file mode 100644 index 6b9a8266..00000000 --- a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_pool_dhp.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSTEST_HDR_INTRUSIVE_ELLEN_BINTREE_POOL_DHP_H -#define CDSTEST_HDR_INTRUSIVE_ELLEN_BINTREE_POOL_DHP_H - -#include "tree/hdr_intrusive_bintree.h" -#include - -#include -#include - -namespace tree { - - namespace ellen_bintree_dhp { - typedef cds::intrusive::ellen_bintree::node_types node_types; - typedef node_types::leaf_node_type leaf_node; - typedef IntrusiveBinTreeHdrTest::base_hook_value< leaf_node > base_value; - typedef node_types::internal_node_type internal_node; - typedef node_types::update_desc_type update_desc; - - - // Internal node pool based on Vyukov's queue - struct internal_node_pool_traits : public cds::memory::vyukov_queue_pool_traits - { - typedef cds::opt::v::dynamic_buffer< cds::any_type > buffer; - }; - typedef cds::memory::lazy_vyukov_queue_pool< internal_node, internal_node_pool_traits > internal_node_pool_type; - extern internal_node_pool_type s_InternalNodePool; - - struct internal_node_pool_accessor { - typedef internal_node_pool_type::value_type value_type; - - internal_node_pool_type& operator()() const - { - return s_InternalNodePool; - } - }; - - // Update descriptor pool based on Vyukov's queue - struct update_desc_pool_traits : public cds::memory::vyukov_queue_pool_traits - { - typedef cds::opt::v::static_buffer< cds::any_type, 16 > buffer; - }; - typedef cds::memory::vyukov_queue_pool< update_desc, update_desc_pool_traits > update_desc_pool_type; - extern update_desc_pool_type s_UpdateDescPool; - - struct update_desc_pool_accessor { - typedef update_desc_pool_type::value_type value_type; - - update_desc_pool_type& operator()() const - { - return s_UpdateDescPool; - } - }; - - } // namespace ellen_bintree_dhp - -} // namespace tree - -#endif // #ifndef CDSTEST_HDR_INTRUSIVE_ELLEN_BINTREE_POOL_DHP_H diff --git a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_pool_hp.h b/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_pool_hp.h deleted file mode 100644 index 0c87a690..00000000 --- a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_pool_hp.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSTEST_HDR_INTRUSIVE_ELLEN_BINTREE_POOL_HP_H -#define CDSTEST_HDR_INTRUSIVE_ELLEN_BINTREE_POOL_HP_H - -#include "tree/hdr_intrusive_bintree.h" -#include - -#include -#include - -namespace tree { - - namespace ellen_bintree_hp { - typedef cds::intrusive::ellen_bintree::node_types node_types; - typedef node_types::leaf_node_type leaf_node; - typedef IntrusiveBinTreeHdrTest::base_hook_value< leaf_node > base_value; - typedef node_types::internal_node_type internal_node; - typedef node_types::update_desc_type update_desc; - - // Internal node pool based on Vyukov's queue - struct internal_node_pool_traits : public cds::memory::vyukov_queue_pool_traits - { - typedef cds::opt::v::dynamic_buffer< cds::any_type > buffer; - }; - typedef cds::memory::lazy_vyukov_queue_pool< internal_node, internal_node_pool_traits > internal_node_pool_type; - extern internal_node_pool_type s_InternalNodePool; - - struct internal_node_pool_accessor { - typedef internal_node_pool_type::value_type value_type; - - internal_node_pool_type& operator()() const - { - return s_InternalNodePool; - } - }; - - // Update descriptor pool based on Vyukov's queue - struct update_desc_pool_traits : public cds::memory::vyukov_queue_pool_traits - { - typedef cds::opt::v::static_buffer< cds::any_type, 16 > buffer; - }; - typedef cds::memory::vyukov_queue_pool< update_desc, update_desc_pool_traits > update_desc_pool_type; - extern update_desc_pool_type s_UpdateDescPool; - - struct update_desc_pool_accessor { - typedef update_desc_pool_type::value_type value_type; - - update_desc_pool_type& operator()() const - { - return s_UpdateDescPool; - } - }; - - } // namespace ellen_bintree_hp - -} // namespace tree - -#endif // #ifndef CDSTEST_HDR_INTRUSIVE_ELLEN_BINTREE_POOL_HP_H diff --git a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_pool_rcu.h b/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_pool_rcu.h deleted file mode 100644 index d819f234..00000000 --- a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_pool_rcu.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef CDSTEST_HDR_INTRUSIVE_ELLEN_BINTREE_POOL_RCU_H -#define CDSTEST_HDR_INTRUSIVE_ELLEN_BINTREE_POOL_RCU_H - -#include "tree/hdr_intrusive_bintree.h" -#include -#include - -#include -#include - -namespace tree { - - namespace ellen_bintree_rcu { - typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type; - - typedef cds::intrusive::ellen_bintree::node_types node_types; - typedef node_types::leaf_node_type leaf_node; - typedef IntrusiveBinTreeHdrTest::base_hook_value< leaf_node > base_value; - typedef node_types::internal_node_type internal_node; - typedef node_types::update_desc_type update_desc; - - - // Internal node pool based on Vyukov's queue - struct internal_node_pool_traits : public cds::memory::vyukov_queue_pool_traits - { - typedef cds::opt::v::dynamic_buffer< cds::any_type > buffer; - }; - typedef cds::memory::lazy_vyukov_queue_pool< internal_node, internal_node_pool_traits > internal_node_pool_type; - extern internal_node_pool_type s_InternalNodePool; - - struct internal_node_pool_accessor { - typedef internal_node_pool_type::value_type value_type; - - internal_node_pool_type& operator()() const - { - return s_InternalNodePool; - } - }; - - // Update descriptor pool based on Vyukov's queue - struct update_desc_pool_traits : public cds::memory::vyukov_queue_pool_traits - { - typedef cds::opt::v::static_buffer< cds::any_type, 16 > buffer; - }; - typedef cds::memory::vyukov_queue_pool< update_desc, update_desc_pool_traits > update_desc_pool_type; - extern update_desc_pool_type s_UpdateDescPool; - - struct update_desc_pool_accessor { - typedef update_desc_pool_type::value_type value_type; - - update_desc_pool_type& operator()() const - { - return s_UpdateDescPool; - } - }; - - } // namespace ellen_bintree_rcu - -} // namespace tree - -#endif // #ifndef CDSTEST_HDR_INTRUSIVE_ELLEN_BINTREE_POOL_RCU_H diff --git a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpb.cpp b/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpb.cpp deleted file mode 100644 index f29b13c4..00000000 --- a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpb.cpp +++ /dev/null @@ -1,215 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_intrusive_bintree.h" -#include -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_rcu.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { - namespace ci = cds::intrusive; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type; - - typedef ci::ellen_bintree::node leaf_node; - typedef IntrusiveBinTreeHdrTest::base_hook_value< leaf_node > base_value; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - - typedef ci::ellen_bintree::internal_node< IntrusiveBinTreeHdrTest::key_type, leaf_node > internal_node; - typedef ci::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpb_base_less() - { - struct tree_traits : public ci::ellen_bintree::traits - { - typedef ci::ellen_bintree::base_hook< co::gc< rcu_type >> hook; - typedef IntrusiveBinTreeHdrTest::key_extractor< base_value > key_extractor; - typedef IntrusiveBinTreeHdrTest::less< base_value > less; - typedef IntrusiveBinTreeHdrTest::disposer< base_value > disposer; - }; - typedef ci::EllenBinTree< rcu_type, key_type, base_value, tree_traits > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpb_base_less_stat() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpb_base_cmp() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpb_base_cmpless() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpb_base_less_ic() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpb_base_cmp_ic() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpb_base_cmp_ic_stat() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpb_base_cmp_ic_stat_yield() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - , co::back_off< cds::backoff::yield > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpb_base_less_pool() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpb_base_less_pool_ic_stat() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); - } - - -} //namespace tree diff --git a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpb_member.cpp b/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpb_member.cpp deleted file mode 100644 index 85092881..00000000 --- a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpb_member.cpp +++ /dev/null @@ -1,217 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_intrusive_bintree.h" -#include -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_rcu.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { - namespace ci = cds::intrusive; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type; - - typedef ci::ellen_bintree::node leaf_node; - typedef IntrusiveBinTreeHdrTest::member_hook_value< leaf_node > member_value; - - typedef ci::opt::hook< ci::ellen_bintree::member_hook< offsetof(member_value, hook), co::gc< rcu_type > > > member_hook; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - - typedef ci::ellen_bintree::internal_node< IntrusiveBinTreeHdrTest::key_type, leaf_node > internal_node; - typedef ci::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpb_member_less() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpb_member_less_stat() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpb_member_cmp() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpb_member_cmpless() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpb_member_less_ic() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpb_member_cmp_ic() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpb_member_cmp_ic_stat() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpb_member_cmp_ic_stat_yield() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - , co::back_off< cds::backoff::yield > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpb_member_less_pool() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpb_member_less_pool_ic_stat() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); - } - - -} //namespace tree diff --git a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpi.cpp b/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpi.cpp deleted file mode 100644 index 033e5fb6..00000000 --- a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpi.cpp +++ /dev/null @@ -1,215 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_intrusive_bintree.h" -#include -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_rcu.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { - namespace ci = cds::intrusive; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type; - - typedef ci::ellen_bintree::node leaf_node; - typedef IntrusiveBinTreeHdrTest::base_hook_value< leaf_node > base_value; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - - typedef ci::ellen_bintree::internal_node< IntrusiveBinTreeHdrTest::key_type, leaf_node > internal_node; - typedef ci::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpi_base_less() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpi_base_less_stat() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpi_base_cmp() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpi_base_cmpless() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpi_base_less_ic() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpi_base_cmp_ic() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpi_base_cmp_ic_stat() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpi_base_cmp_ic_stat_yield() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - , co::back_off< cds::backoff::yield > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpi_base_less_pool() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpi_base_less_pool_ic_stat() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); - } - - -} //namespace tree diff --git a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpi_member.cpp b/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpi_member.cpp deleted file mode 100644 index 8bfe5778..00000000 --- a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpi_member.cpp +++ /dev/null @@ -1,217 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_intrusive_bintree.h" -#include -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_rcu.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { - namespace ci = cds::intrusive; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type; - - typedef ci::ellen_bintree::node leaf_node; - typedef IntrusiveBinTreeHdrTest::member_hook_value< leaf_node > member_value; - - typedef ci::opt::hook< ci::ellen_bintree::member_hook< offsetof(member_value, hook), co::gc< rcu_type > > > member_hook; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - - typedef ci::ellen_bintree::internal_node< IntrusiveBinTreeHdrTest::key_type, leaf_node > internal_node; - typedef ci::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpi_member_less() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpi_member_less_stat() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpi_member_cmp() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpi_member_cmpless() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpi_member_less_ic() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpi_member_cmp_ic() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpi_member_cmp_ic_stat() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpi_member_cmp_ic_stat_yield() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - , co::back_off< cds::backoff::yield > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpi_member_less_pool() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpi_member_less_pool_ic_stat() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); - } - - -} //namespace tree diff --git a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpt.cpp b/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpt.cpp deleted file mode 100644 index 7ffd8340..00000000 --- a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpt.cpp +++ /dev/null @@ -1,215 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_intrusive_bintree.h" -#include -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_rcu.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { - namespace ci = cds::intrusive; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type; - - typedef ci::ellen_bintree::node leaf_node; - typedef IntrusiveBinTreeHdrTest::base_hook_value< leaf_node > base_value; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - - typedef ci::ellen_bintree::internal_node< IntrusiveBinTreeHdrTest::key_type, leaf_node > internal_node; - typedef ci::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; -} - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpt_base_less() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpt_base_less_stat() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpt_base_cmp() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpt_base_cmpless() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpt_base_less_ic() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpt_base_cmp_ic() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpt_base_cmp_ic_stat() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpt_base_cmp_ic_stat_yield() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - , co::back_off< cds::backoff::yield > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpt_base_less_pool() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpt_base_less_pool_ic_stat() - { - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); - } - - -} //namespace tree diff --git a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpt_member.cpp b/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpt_member.cpp deleted file mode 100644 index fa7fafd2..00000000 --- a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_gpt_member.cpp +++ /dev/null @@ -1,217 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_intrusive_bintree.h" -#include -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_rcu.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { - namespace ci = cds::intrusive; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type; - - typedef ci::ellen_bintree::node leaf_node; - typedef IntrusiveBinTreeHdrTest::member_hook_value< leaf_node > member_value; - - typedef ci::opt::hook< ci::ellen_bintree::member_hook< offsetof(member_value, hook), co::gc< rcu_type > > > member_hook; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - - typedef ci::ellen_bintree::internal_node< IntrusiveBinTreeHdrTest::key_type, leaf_node > internal_node; - typedef ci::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpt_member_less() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpt_member_less_stat() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpt_member_cmp() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpt_member_cmpless() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpt_member_less_ic() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpt_member_cmp_ic() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpt_member_cmp_ic_stat() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpt_member_cmp_ic_stat_yield() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - , co::back_off< cds::backoff::yield > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpt_member_less_pool() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - >::type - > tree_type; - - test_rcu(); - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_gpt_member_less_pool_ic_stat() - { - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); - } - - -} //namespace tree diff --git a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_shb.cpp b/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_shb.cpp deleted file mode 100644 index 3c65862b..00000000 --- a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_shb.cpp +++ /dev/null @@ -1,237 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_intrusive_bintree.h" -#include -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_rcu.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace ci = cds::intrusive; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type; - - typedef ci::ellen_bintree::node leaf_node; - typedef IntrusiveBinTreeHdrTest::base_hook_value< leaf_node > base_value; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - - typedef ci::ellen_bintree::internal_node< IntrusiveBinTreeHdrTest::key_type, leaf_node > internal_node; - typedef ci::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; - } -#endif - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_shb_base_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_shb_base_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_shb_base_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_shb_base_cmpless() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_shb_base_less_ic() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_shb_base_cmp_ic() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_shb_base_cmp_ic_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_shb_base_cmp_ic_stat_yield() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - ,co::back_off< cds::backoff::yield > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_shb_base_less_pool() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_shb_base_less_pool_ic_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); -#endif - } - - -} //namespace tree diff --git a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_shb_member.cpp b/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_shb_member.cpp deleted file mode 100644 index fd6cd5ba..00000000 --- a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_shb_member.cpp +++ /dev/null @@ -1,238 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_intrusive_bintree.h" -#include -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_rcu.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace ci = cds::intrusive; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type; - - typedef ci::ellen_bintree::node leaf_node; - typedef IntrusiveBinTreeHdrTest::member_hook_value< leaf_node > member_value; - - typedef ci::opt::hook< ci::ellen_bintree::member_hook< offsetof(member_value, hook), co::gc< rcu_type > > > member_hook; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - - typedef ci::ellen_bintree::internal_node< IntrusiveBinTreeHdrTest::key_type, leaf_node > internal_node; - typedef ci::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; - } -#endif - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_shb_member_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_shb_member_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_shb_member_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_shb_member_cmpless() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_shb_member_less_ic() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_shb_member_cmp_ic() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_shb_member_cmp_ic_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_shb_member_cmp_ic_stat_yield() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - ,co::back_off< cds::backoff::yield > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_shb_member_less_pool() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_shb_member_less_pool_ic_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); -#endif - } - -} //namespace tree diff --git a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_sht.cpp b/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_sht.cpp deleted file mode 100644 index 2c5416b0..00000000 --- a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_sht.cpp +++ /dev/null @@ -1,236 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_intrusive_bintree.h" -#include -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_rcu.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace ci = cds::intrusive; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type; - - typedef ci::ellen_bintree::node leaf_node; - typedef IntrusiveBinTreeHdrTest::base_hook_value< leaf_node > base_value; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - - typedef ci::ellen_bintree::internal_node< IntrusiveBinTreeHdrTest::key_type, leaf_node > internal_node; - typedef ci::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; - } -#endif - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_sht_base_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_sht_base_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_sht_base_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_sht_base_cmpless() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_sht_base_less_ic() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_sht_base_cmp_ic() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_sht_base_cmp_ic_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_sht_base_cmp_ic_stat_yield() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::compare< compare< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - ,co::back_off< cds::backoff::yield > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_sht_base_less_pool() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_sht_base_less_pool_ic_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, base_value, - ci::ellen_bintree::make_traits< - ci::opt::hook< ci::ellen_bintree::base_hook< co::gc< rcu_type > > > - ,ci::ellen_bintree::key_extractor< key_extractor< base_value > > - ,co::less< less< base_value > > - ,ci::opt::disposer< disposer< base_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); -#endif - } - -} //namespace tree diff --git a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_sht_member.cpp b/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_sht_member.cpp deleted file mode 100644 index 7a1c3788..00000000 --- a/tests/test-hdr/tree/hdr_intrusive_ellen_bintree_rcu_sht_member.cpp +++ /dev/null @@ -1,239 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_intrusive_bintree.h" -#include -#include - -#include "tree/hdr_intrusive_ellen_bintree_pool_rcu.h" -#include "unit/print_ellenbintree_stat.h" - -namespace tree { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - namespace ci = cds::intrusive; - namespace co = cds::opt; - namespace { - typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type; - - typedef ci::ellen_bintree::node leaf_node; - typedef IntrusiveBinTreeHdrTest::member_hook_value< leaf_node > member_value; - - typedef ci::opt::hook< ci::ellen_bintree::member_hook< offsetof(member_value, hook), co::gc< rcu_type > > > member_hook; - - struct print_stat { - template - void operator()( Tree const& t) - { - std::cout << t.statistics(); - } - }; - - typedef ci::ellen_bintree::internal_node< IntrusiveBinTreeHdrTest::key_type, leaf_node > internal_node; - typedef ci::ellen_bintree::update_desc< leaf_node, internal_node > update_desc; - } -#endif - - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_sht_member_less() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_sht_member_less_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_sht_member_cmp() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_sht_member_cmpless() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_sht_member_less_ic() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_sht_member_cmp_ic() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_sht_member_cmp_ic_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_sht_member_cmp_ic_stat_yield() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::compare< compare< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - ,co::back_off< cds::backoff::yield > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_sht_member_less_pool() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - >::type - > tree_type; - - test_rcu(); -#endif - } - - void IntrusiveBinTreeHdrTest::EllenBinTree_rcu_sht_member_less_pool_ic_stat() - { -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef ci::EllenBinTree< rcu_type, key_type, member_value, - ci::ellen_bintree::make_traits< - member_hook - ,ci::ellen_bintree::key_extractor< key_extractor< member_value > > - ,co::less< less< member_value > > - ,ci::opt::disposer< disposer< member_value > > - ,co::node_allocator< cds::memory::pool_allocator< internal_node, ellen_bintree_rcu::internal_node_pool_accessor > > - ,ci::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< update_desc, ellen_bintree_rcu::update_desc_pool_accessor > > - ,co::item_counter< cds::atomicity::item_counter > - ,co::stat< ci::ellen_bintree::stat<> > - >::type - > tree_type; - - test_rcu(); -#endif - } - -} //namespace tree diff --git a/tests/test-hdr/tree/hdr_tree_reg.cpp b/tests/test-hdr/tree/hdr_tree_reg.cpp deleted file mode 100644 index dcf9428d..00000000 --- a/tests/test-hdr/tree/hdr_tree_reg.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - This file is a part of libcds - Concurrent Data Structures library - - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 - - Source code repo: http://github.com/khizmax/libcds/ - Download: http://sourceforge.net/projects/libcds/files/ - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "tree/hdr_intrusive_bintree.h" -#include "tree/hdr_intrusive_ellen_bintree_pool_rcu.h" -#include "tree/hdr_intrusive_ellen_bintree_pool_hp.h" -#include "tree/hdr_intrusive_ellen_bintree_pool_dhp.h" - -#include "tree/hdr_ellenbintree_set.h" -#include "tree/hdr_ellenbintree_map.h" -#include "tree/hdr_bronson_avltree_map.h" - -namespace tree { - namespace ellen_bintree_rcu { - internal_node_pool_type s_InternalNodePool( 1024 * 8 ); - update_desc_pool_type s_UpdateDescPool; - } - namespace ellen_bintree_hp { - internal_node_pool_type s_InternalNodePool( 1024 * 8 ); - update_desc_pool_type s_UpdateDescPool; - } - namespace ellen_bintree_dhp { - internal_node_pool_type s_InternalNodePool( 1024 * 8 ); - update_desc_pool_type s_UpdateDescPool; - } -} - - -CPPUNIT_TEST_SUITE_REGISTRATION_(tree::IntrusiveBinTreeHdrTest, s_IntrusiveBinTreeHdrTest); -CPPUNIT_TEST_SUITE_REGISTRATION_(tree::EllenBinTreeSetHdrTest, s_EllenBinTreeSetHdrTest); -CPPUNIT_TEST_SUITE_REGISTRATION_(tree::EllenBinTreeMapHdrTest, s_EllenBinTreeMapHdrTest); -CPPUNIT_TEST_SUITE_REGISTRATION_( tree::BronsonAVLTreeHdrTest, s_BronsonAVLTreeHdrTest );