From 1448c5adf2a0623d34564d438012790fdc330717 Mon Sep 17 00:00:00 2001 From: khizmax Date: Mon, 30 May 2016 22:52:49 +0300 Subject: [PATCH] Migrated map-insfind-int stress test to gtest --- build/Makefile | 22 +- projects/Win/vc14/cds.sln | 58 ++-- .../Win/vc14/stress-map-insfind-int.vcxproj | 273 +++++++++++++++ .../stress-map-insfind-int.vcxproj.filters | 60 ++++ projects/Win/vc14/unit-map-find.vcxproj | 318 ------------------ .../Win/vc14/unit-map-find.vcxproj.filters | 45 --- projects/source.unit.map.mk | 12 - test/stress/data/test-debug.conf | 6 +- test/stress/data/test-express.conf | 4 +- test/stress/data/test.conf | 4 +- test/stress/map/CMakeLists.txt | 2 + test/stress/map/insdelfind/map_insdelfind.h | 4 +- test/stress/map/insfind_int/CMakeLists.txt | 31 ++ test/stress/map/insfind_int/map_insfind.cpp | 99 ++++++ .../map_insfind_bronsonavltree.cpp | 38 +++ .../map/insfind_int/map_insfind_cuckoo.cpp | 38 +++ .../map/insfind_int/map_insfind_ellentree.cpp | 38 +++ .../map_insfind_feldman_hashset.cpp | 38 +++ test/stress/map/insfind_int/map_insfind_int.h | 210 ++++++++++++ .../map/insfind_int/map_insfind_michael.cpp | 39 +++ .../map/insfind_int/map_insfind_skip.cpp | 39 +++ .../map/insfind_int/map_insfind_split.cpp | 39 +++ .../map/insfind_int/map_insfind_std.cpp | 38 +++ .../map/insfind_int/map_insfind_striped.cpp | 38 +++ 24 files changed, 1051 insertions(+), 442 deletions(-) create mode 100644 projects/Win/vc14/stress-map-insfind-int.vcxproj create mode 100644 projects/Win/vc14/stress-map-insfind-int.vcxproj.filters delete mode 100644 projects/Win/vc14/unit-map-find.vcxproj delete mode 100644 projects/Win/vc14/unit-map-find.vcxproj.filters delete mode 100644 projects/source.unit.map.mk create mode 100644 test/stress/map/insfind_int/CMakeLists.txt create mode 100644 test/stress/map/insfind_int/map_insfind.cpp create mode 100644 test/stress/map/insfind_int/map_insfind_bronsonavltree.cpp create mode 100644 test/stress/map/insfind_int/map_insfind_cuckoo.cpp create mode 100644 test/stress/map/insfind_int/map_insfind_ellentree.cpp create mode 100644 test/stress/map/insfind_int/map_insfind_feldman_hashset.cpp create mode 100644 test/stress/map/insfind_int/map_insfind_int.h create mode 100644 test/stress/map/insfind_int/map_insfind_michael.cpp create mode 100644 test/stress/map/insfind_int/map_insfind_skip.cpp create mode 100644 test/stress/map/insfind_int/map_insfind_split.cpp create mode 100644 test/stress/map/insfind_int/map_insfind_std.cpp create mode 100644 test/stress/map/insfind_int/map_insfind_striped.cpp diff --git a/build/Makefile b/build/Makefile index baca8083..a0873c55 100644 --- a/build/Makefile +++ b/build/Makefile @@ -116,26 +116,19 @@ TEST_DATA_DIR=`pwd`/../tests/data CDSUNIT_COMMON_FILE= -include ../projects/source.unit.map.mk -CDSUNIT_MAP_SOURCES := $(CDSUNIT_MAP_SOURCES:%.cpp=../%.cpp) -CDSUNIT_MAP_OBJS := $(CDSUNIT_MAP_SOURCES:%.cpp=%.o) - include ../projects/source.unit.misc.mk CDSUNIT_MISC_SOURCES := $(CDSUNIT_MISC_SOURCES:%.cpp=../%.cpp) CDSUNIT_MISC_OBJS := $(CDSUNIT_MISC_SOURCES:%.cpp=%.o) -TEST_OBJ_FILE := $(CDSUNIT_COMMON_FILE) $(CDSUNIT_MAP_OBJS) $(CDSUNIT_MISC_OBJS) +TEST_OBJ_FILE := $(CDSUNIT_COMMON_FILE) $(CDSUNIT_MISC_OBJS) TEST_OBJ_FILE_DEPS := $(TEST_OBJ_FILE:%.o=%.d) -include $(TEST_OBJ_FILE_DEPS) $(TEST_OBJ_FILE): %.o: %.cpp $(CXX) $(CPP_COMP_OPT) -I$(TEST_SRC_DIR) -I$(TEST_COMMONHDR_SRC_DIR) $< -o $@ -CDSUNIT_MAP_EXE=$(BIN_PATH)/cdsu-map CDSUNIT_MISC_EXE=$(BIN_PATH)/cdsu-misc -CDSUNIT_EXE_FILES= $(CDSUNIT_MAP_EXE) $(CDSUNIT_MISC_EXE) - -unit-map: $(CDSUNIT_MAP_EXE) +CDSUNIT_EXE_FILES= $(CDSUNIT_MISC_EXE) ifeq ($(platform),mingw) make_test : $(CDSUNIT_EXE_FILES) @@ -147,18 +140,12 @@ make_test : $(CDSUNIT_EXE_FILES) ln -sf $(TEST_DATA_DIR)/test.conf $(TEST_DATA_DIR)/test-debug.conf $(TEST_DATA_DIR)/dictionary.txt $(BIN_PATH) endif -$(CDSUNIT_MAP_EXE) : $(CDSUNIT_MAP_OBJS) $(CDSUNIT_COMMON_FILE) $(TEST_COMMON_OBJS) - $(CXX) $(LD_OPTS) -L$(BIN_PATH) $(CDSUNIT_MAP_OBJS) $(CDSUNIT_COMMON_FILE) $(TEST_COMMON_OBJS) -o $@ $(LD_BOOST_THREAD_LIB) $(LD_TEST_COMMON_LIBS) $(LDLIBS) - $(CDSUNIT_MISC_EXE) : $(CDSUNIT_MISC_OBJS) $(CDSUNIT_COMMON_FILE) $(TEST_COMMON_OBJS) $(CXX) $(LD_OPTS) -L$(BIN_PATH) $(CDSUNIT_MISC_OBJS) $(CDSUNIT_COMMON_FILE) $(TEST_COMMON_OBJS) -o $@ $(LD_BOOST_THREAD_LIB) $(LD_TEST_COMMON_LIBS) $(LDLIBS) -CDSUNIT_MAP_EXE_DBG=$(CDSUNIT_MAP_EXE)-d CDSUNIT_MISC_EXE_DBG=$(CDSUNIT_MISC_EXE)-d -CDSUNIT_EXE_DBG_FILES= $(CDSUNIT_MAP_EXE_DBG) $(CDSUNIT_MISC_EXE_DBG) - -unit-map-dbg: $(CDSUNIT_MAP_EXE_DBG) +CDSUNIT_EXE_DBG_FILES= $(CDSUNIT_MISC_EXE_DBG) ifeq ($(platform),mingw) make_debug_test : $(CDSUNIT_EXE_DBG_FILES) @@ -170,9 +157,6 @@ make_debug_test : $(CDSUNIT_EXE_DBG_FILES) ln -sf $(TEST_DATA_DIR)/test.conf $(TEST_DATA_DIR)/test-debug.conf $(TEST_DATA_DIR)/dictionary.txt $(BIN_PATH) endif -$(CDSUNIT_MAP_EXE_DBG) : $(CDSUNIT_MAP_OBJS) $(CDSUNIT_COMMON_FILE) $(TEST_COMMON_OBJS) - $(CXX) $(LD_OPTS) -L$(BIN_PATH) $(CDSUNIT_MAP_OBJS) $(CDSUNIT_COMMON_FILE) $(TEST_COMMON_OBJS) -o $@ $(LD_BOOST_THREAD_LIB) $(LD_TEST_COMMON_DEBUG_LIBS) $(LDLIBS) - $(CDSUNIT_MISC_EXE_DBG) : $(CDSUNIT_MISC_OBJS) $(CDSUNIT_COMMON_FILE) $(TEST_COMMON_OBJS) $(CXX) $(LD_OPTS) -L$(BIN_PATH) $(CDSUNIT_MISC_OBJS) $(CDSUNIT_COMMON_FILE) $(TEST_COMMON_OBJS) -o $@ $(LD_BOOST_THREAD_LIB) $(LD_TEST_COMMON_DEBUG_LIBS) $(LDLIBS) diff --git a/projects/Win/vc14/cds.sln b/projects/Win/vc14/cds.sln index 91cdfc6e..4124d059 100644 --- a/projects/Win/vc14/cds.sln +++ b/projects/Win/vc14/cds.sln @@ -29,31 +29,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unit-misc", "unit-misc.vcxp {408FE9BC-44F0-4E6A-89FA-D6F952584239} = {408FE9BC-44F0-4E6A-89FA-D6F952584239} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "map", "map", "{6BB7A27F-FC59-4267-B6FA-D034176D1459}" - ProjectSection(SolutionItems) = preProject - ..\..\..\tests\unit\map2\map_defs.h = ..\..\..\tests\unit\map2\map_defs.h - ..\..\..\tests\unit\map2\map_type.h = ..\..\..\tests\unit\map2\map_type.h - ..\..\..\tests\unit\map2\map_type_bronson_avltree.h = ..\..\..\tests\unit\map2\map_type_bronson_avltree.h - ..\..\..\tests\unit\map2\map_type_cuckoo.h = ..\..\..\tests\unit\map2\map_type_cuckoo.h - ..\..\..\tests\unit\map2\map_type_ellen_bintree.h = ..\..\..\tests\unit\map2\map_type_ellen_bintree.h - ..\..\..\tests\unit\map2\map_type_feldman_hashmap.h = ..\..\..\tests\unit\map2\map_type_feldman_hashmap.h - ..\..\..\tests\unit\map2\map_type_lazy_list.h = ..\..\..\tests\unit\map2\map_type_lazy_list.h - ..\..\..\tests\unit\map2\map_type_michael.h = ..\..\..\tests\unit\map2\map_type_michael.h - ..\..\..\tests\unit\map2\map_type_michael_list.h = ..\..\..\tests\unit\map2\map_type_michael_list.h - ..\..\..\tests\unit\map2\map_type_skip_list.h = ..\..\..\tests\unit\map2\map_type_skip_list.h - ..\..\..\tests\unit\map2\map_type_split_list.h = ..\..\..\tests\unit\map2\map_type_split_list.h - ..\..\..\tests\unit\map2\map_type_std.h = ..\..\..\tests\unit\map2\map_type_std.h - ..\..\..\tests\unit\map2\map_type_striped.h = ..\..\..\tests\unit\map2\map_type_striped.h - ..\..\..\tests\unit\map2\std_hash_map.h = ..\..\..\tests\unit\map2\std_hash_map.h - ..\..\..\tests\unit\map2\std_map.h = ..\..\..\tests\unit\map2\std_map.h - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unit-map-find", "unit-map-find.vcxproj", "{BA2A9239-0299-4069-BB0E-16DACE87ADE0}" - 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("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unit", "unit", "{810490B7-31E5-49AE-8455-CAF99A9658B6}" ProjectSection(SolutionItems) = preProject ..\..\..\tests\test-hdr\size_check.h = ..\..\..\tests\test-hdr\size_check.h @@ -264,6 +239,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stress-map-insdelfind", "st {408FE9BC-44F0-4E6A-89FA-D6F952584239} = {408FE9BC-44F0-4E6A-89FA-D6F952584239} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stress-map-insfind-int", "stress-map-insfind-int.vcxproj", "{24DF3B87-387E-4EFC-BDE0-8DAD279FE19A}" + ProjectSection(ProjectDependencies) = postProject + {A34CED07-A442-4FA1-81C4-F8B9CD3C832B} = {A34CED07-A442-4FA1-81C4-F8B9CD3C832B} + {408FE9BC-44F0-4E6A-89FA-D6F952584239} = {408FE9BC-44F0-4E6A-89FA-D6F952584239} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -310,18 +291,6 @@ Global {77350FDC-9E51-438B-9A8F-D2FEA11D46B2}.Release|Win32.Build.0 = Release|Win32 {77350FDC-9E51-438B-9A8F-D2FEA11D46B2}.Release|x64.ActiveCfg = Release|x64 {77350FDC-9E51-438B-9A8F-D2FEA11D46B2}.Release|x64.Build.0 = Release|x64 - {BA2A9239-0299-4069-BB0E-16DACE87ADE0}.Debug|Win32.ActiveCfg = Debug|Win32 - {BA2A9239-0299-4069-BB0E-16DACE87ADE0}.Debug|Win32.Build.0 = Debug|Win32 - {BA2A9239-0299-4069-BB0E-16DACE87ADE0}.Debug|x64.ActiveCfg = Debug|x64 - {BA2A9239-0299-4069-BB0E-16DACE87ADE0}.Debug|x64.Build.0 = Debug|x64 - {BA2A9239-0299-4069-BB0E-16DACE87ADE0}.DebugVLD|Win32.ActiveCfg = DebugVLD|Win32 - {BA2A9239-0299-4069-BB0E-16DACE87ADE0}.DebugVLD|Win32.Build.0 = DebugVLD|Win32 - {BA2A9239-0299-4069-BB0E-16DACE87ADE0}.DebugVLD|x64.ActiveCfg = DebugVLD|x64 - {BA2A9239-0299-4069-BB0E-16DACE87ADE0}.DebugVLD|x64.Build.0 = DebugVLD|x64 - {BA2A9239-0299-4069-BB0E-16DACE87ADE0}.Release|Win32.ActiveCfg = Release|Win32 - {BA2A9239-0299-4069-BB0E-16DACE87ADE0}.Release|Win32.Build.0 = Release|Win32 - {BA2A9239-0299-4069-BB0E-16DACE87ADE0}.Release|x64.ActiveCfg = Release|x64 - {BA2A9239-0299-4069-BB0E-16DACE87ADE0}.Release|x64.Build.0 = Release|x64 {5407E9D2-67D9-4266-976E-7A90BDE2541D}.Debug|Win32.ActiveCfg = Debug|Win32 {5407E9D2-67D9-4266-976E-7A90BDE2541D}.Debug|Win32.Build.0 = Debug|Win32 {5407E9D2-67D9-4266-976E-7A90BDE2541D}.Debug|x64.ActiveCfg = Debug|x64 @@ -658,6 +627,18 @@ Global {1BB746AC-7856-4E59-9430-51177621DC35}.Release|Win32.Build.0 = Release|Win32 {1BB746AC-7856-4E59-9430-51177621DC35}.Release|x64.ActiveCfg = Release|x64 {1BB746AC-7856-4E59-9430-51177621DC35}.Release|x64.Build.0 = Release|x64 + {24DF3B87-387E-4EFC-BDE0-8DAD279FE19A}.Debug|Win32.ActiveCfg = Debug|Win32 + {24DF3B87-387E-4EFC-BDE0-8DAD279FE19A}.Debug|Win32.Build.0 = Debug|Win32 + {24DF3B87-387E-4EFC-BDE0-8DAD279FE19A}.Debug|x64.ActiveCfg = Debug|x64 + {24DF3B87-387E-4EFC-BDE0-8DAD279FE19A}.Debug|x64.Build.0 = Debug|x64 + {24DF3B87-387E-4EFC-BDE0-8DAD279FE19A}.DebugVLD|Win32.ActiveCfg = DebugVLD|Win32 + {24DF3B87-387E-4EFC-BDE0-8DAD279FE19A}.DebugVLD|Win32.Build.0 = DebugVLD|Win32 + {24DF3B87-387E-4EFC-BDE0-8DAD279FE19A}.DebugVLD|x64.ActiveCfg = DebugVLD|x64 + {24DF3B87-387E-4EFC-BDE0-8DAD279FE19A}.DebugVLD|x64.Build.0 = DebugVLD|x64 + {24DF3B87-387E-4EFC-BDE0-8DAD279FE19A}.Release|Win32.ActiveCfg = Release|Win32 + {24DF3B87-387E-4EFC-BDE0-8DAD279FE19A}.Release|Win32.Build.0 = Release|Win32 + {24DF3B87-387E-4EFC-BDE0-8DAD279FE19A}.Release|x64.ActiveCfg = Release|x64 + {24DF3B87-387E-4EFC-BDE0-8DAD279FE19A}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -665,8 +646,6 @@ Global GlobalSection(NestedProjects) = preSolution {61179F2F-07E1-490D-B64D-D85A90B6EF81} = {B30CA283-1796-4763-92C3-2E4848D443F7} {77350FDC-9E51-438B-9A8F-D2FEA11D46B2} = {B30CA283-1796-4763-92C3-2E4848D443F7} - {6BB7A27F-FC59-4267-B6FA-D034176D1459} = {B30CA283-1796-4763-92C3-2E4848D443F7} - {BA2A9239-0299-4069-BB0E-16DACE87ADE0} = {6BB7A27F-FC59-4267-B6FA-D034176D1459} {5407E9D2-67D9-4266-976E-7A90BDE2541D} = {810490B7-31E5-49AE-8455-CAF99A9658B6} {EA5D825A-83A4-4A36-83C1-3D048D21D55B} = {810490B7-31E5-49AE-8455-CAF99A9658B6} {ED94B1D1-2442-43C2-A71C-A757122408A6} = {810490B7-31E5-49AE-8455-CAF99A9658B6} @@ -699,6 +678,7 @@ Global {2D0E651D-058D-4D69-9A44-12149E6CA5BE} = {7D3EE35B-185D-40B5-88C2-7F9933426978} {50387CA5-F5B2-4C40-ACFD-FC3C9EE2CD6B} = {7D3EE35B-185D-40B5-88C2-7F9933426978} {1BB746AC-7856-4E59-9430-51177621DC35} = {7D3EE35B-185D-40B5-88C2-7F9933426978} + {24DF3B87-387E-4EFC-BDE0-8DAD279FE19A} = {7D3EE35B-185D-40B5-88C2-7F9933426978} EndGlobalSection GlobalSection(DPCodeReviewSolutionGUID) = preSolution DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} diff --git a/projects/Win/vc14/stress-map-insfind-int.vcxproj b/projects/Win/vc14/stress-map-insfind-int.vcxproj new file mode 100644 index 00000000..0867818b --- /dev/null +++ b/projects/Win/vc14/stress-map-insfind-int.vcxproj @@ -0,0 +1,273 @@ + + + + + DebugVLD + Win32 + + + DebugVLD + x64 + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + + + + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + + + + + + 4503 + 4503 + 4503 + 4503 + 4503 + 4503 + + + + + + + + + + + + {24DF3B87-387E-4EFC-BDE0-8DAD279FE19A} + Win32Proj + stress_map_insfind_int + 8.1 + stress-map-insfind-int + + + + Application + true + v140 + Unicode + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + Application + true + v140 + Unicode + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + true + $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ + $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ + $(ProjectName)_d + + + true + $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ + $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ + $(ProjectName)_d + + + true + $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ + $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ + $(ProjectName)_d + + + true + $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ + $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ + $(ProjectName)_d + + + 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)\ + + + + NotUsing + Level3 + Disabled + _ENABLE_ATOMIC_ALIGNMENT_FIX;CDSUNIT_USE_URCU;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\map;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + + + Console + true + $(GTEST_LIB32);$(GTEST_ROOT)/lib/x86;$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir) + gtestd.lib;stress-framework_d.lib;%(AdditionalDependencies) + + + + + NotUsing + Level3 + Disabled + _ENABLE_ATOMIC_ALIGNMENT_FIX;CDSUNIT_USE_URCU;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\map;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + + + Console + true + $(GTEST_LIB32);$(GTEST_ROOT)/lib/x86;$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir) + gtestd.lib;stress-framework_d.lib;%(AdditionalDependencies) + + + + + NotUsing + Level3 + Disabled + _ENABLE_ATOMIC_ALIGNMENT_FIX;CDSUNIT_USE_URCU;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\map;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + + + Console + true + $(GTEST_LIB64);$(GTEST_ROOT)/lib/x64;$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir) + gtestd.lib;stress-framework_d.lib;%(AdditionalDependencies) + + + + + NotUsing + Level3 + Disabled + _ENABLE_ATOMIC_ALIGNMENT_FIX;CDSUNIT_USE_URCU;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\map;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + + + Console + true + $(GTEST_LIB64);$(GTEST_ROOT)/lib/x64;$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir) + gtestd.lib;stress-framework_d.lib;%(AdditionalDependencies) + + + + + Level3 + NotUsing + MaxSpeed + true + true + _ENABLE_ATOMIC_ALIGNMENT_FIX;CDSUNIT_USE_URCU;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\map;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + + + Console + true + true + true + $(GTEST_LIB32);$(GTEST_ROOT)/lib/x86;$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir) + gtest.lib;stress-framework.lib;%(AdditionalDependencies) + + + + + Level3 + NotUsing + MaxSpeed + true + true + _ENABLE_ATOMIC_ALIGNMENT_FIX;CDSUNIT_USE_URCU;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + $(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\map;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories) + /bigobj %(AdditionalOptions) + + + Console + true + true + true + $(GTEST_LIB64);$(GTEST_ROOT)/lib/x64;$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir) + gtest.lib;stress-framework.lib;%(AdditionalDependencies) + + + + + + \ No newline at end of file diff --git a/projects/Win/vc14/stress-map-insfind-int.vcxproj.filters b/projects/Win/vc14/stress-map-insfind-int.vcxproj.filters new file mode 100644 index 00000000..4cf63931 --- /dev/null +++ b/projects/Win/vc14/stress-map-insfind-int.vcxproj.filters @@ -0,0 +1,60 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + + + + \ No newline at end of file diff --git a/projects/Win/vc14/unit-map-find.vcxproj b/projects/Win/vc14/unit-map-find.vcxproj deleted file mode 100644 index c97d6f08..00000000 --- a/projects/Win/vc14/unit-map-find.vcxproj +++ /dev/null @@ -1,318 +0,0 @@ - - - - - DebugVLD - Win32 - - - DebugVLD - x64 - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - {BA2A9239-0299-4069-BB0E-16DACE87ADE0} - unitmap - Win32Proj - 8.1 - - - - Application - Unicode - true - v140 - - - Application - Unicode - v140 - - - Application - Unicode - v140 - - - Application - Unicode - true - v140 - - - Application - Unicode - v140 - - - Application - Unicode - v140 - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - false - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ - $(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - $(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\ - false - 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 - 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\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - _SCL_SECURE_NO_WARNINGS;WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - 4503;%(DisableSpecificWarnings) - - - unit-prerequisites_d.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - MachineX86 - MultiplyDefinedSymbolOnly - - - - - /bigobj /Zc:inline %(AdditionalOptions) - Disabled - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - _SCL_SECURE_NO_WARNINGS;CDS_USE_VLD;WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - 4503;%(DisableSpecificWarnings) - - - unit-prerequisites_d.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - MachineX86 - MultiplyDefinedSymbolOnly - - - - - X64 - - - /bigobj /Zc:inline %(AdditionalOptions) - Disabled - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - _SCL_SECURE_NO_WARNINGS;WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - 4503;%(DisableSpecificWarnings) - - - unit-prerequisites_d.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - MachineX64 - MultiplyDefinedSymbolOnly - - - - - X64 - - - /bigobj /Zc:inline %(AdditionalOptions) - Disabled - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - _SCL_SECURE_NO_WARNINGS;CDS_USE_VLD;WIN32;NOMINMAX;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - 4503;%(DisableSpecificWarnings) - - - unit-prerequisites_d.lib;%(AdditionalDependencies) - $(TargetPath) - $(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - MachineX64 - MultiplyDefinedSymbolOnly - - - - - /bigobj /Zc:inline %(AdditionalOptions) - MaxSpeed - AnySuitable - true - Speed - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - _SCL_SECURE_NO_WARNINGS;WIN32;NOMINMAX;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) - MultiThreadedDLL - true - - - Level3 - ProgramDatabase - 4503;%(DisableSpecificWarnings) - - - unit-prerequisites.lib;%(AdditionalDependencies) - $(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - true - true - MachineX86 - $(TargetPath) - MultiplyDefinedSymbolOnly - - - - - X64 - - - /bigobj /Zc:inline %(AdditionalOptions) - MaxSpeed - AnySuitable - true - Speed - $(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories) - _SCL_SECURE_NO_WARNINGS;WIN32;NOMINMAX;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions) - MultiThreadedDLL - true - - - Level3 - ProgramDatabase - 4503;%(DisableSpecificWarnings) - - - unit-prerequisites.lib;%(AdditionalDependencies) - $(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories) - true - Console - true - true - MachineX64 - $(TargetPath) - MultiplyDefinedSymbolOnly - - - - - - \ No newline at end of file diff --git a/projects/Win/vc14/unit-map-find.vcxproj.filters b/projects/Win/vc14/unit-map-find.vcxproj.filters deleted file mode 100644 index 2d78482c..00000000 --- a/projects/Win/vc14/unit-map-find.vcxproj.filters +++ /dev/null @@ -1,45 +0,0 @@ - - - - - map_insfind_int - - - map_insfind_int - - - map_insfind_int - - - map_insfind_int - - - map_insfind_int - - - map_insfind_int - - - map_insfind_int - - - map_insfind_int - - - map_insfind_int - - - map_insfind_int - - - - - map_insfind_int - - - - - {ba26fa2b-d618-4dd8-97d6-7dc874d9acf4} - - - \ No newline at end of file diff --git a/projects/source.unit.map.mk b/projects/source.unit.map.mk deleted file mode 100644 index 8a4371c0..00000000 --- a/projects/source.unit.map.mk +++ /dev/null @@ -1,12 +0,0 @@ - -CDSUNIT_MAP_SOURCES := \ - tests/unit/map2/map_insfind_int.cpp \ - tests/unit/map2/map_insfind_int_bronsonavltree.cpp \ - tests/unit/map2/map_insfind_int_cuckoo.cpp \ - tests/unit/map2/map_insfind_int_ellentree.cpp \ - tests/unit/map2/map_insfind_int_michael.cpp \ - tests/unit/map2/map_insfind_int_feldmanhashmap.cpp \ - tests/unit/map2/map_insfind_int_skip.cpp \ - tests/unit/map2/map_insfind_int_split.cpp \ - tests/unit/map2/map_insfind_int_striped.cpp \ - tests/unit/map2/map_insfind_int_std.cpp \ diff --git a/test/stress/data/test-debug.conf b/test/stress/data/test-debug.conf index 7e3c050b..3ee90f14 100644 --- a/test/stress/data/test-debug.conf +++ b/test/stress/data/test-debug.conf @@ -270,11 +270,11 @@ CuckooProbesetThreshold=0 FeldmanMapHeadBits=8 FeldmanMapArrayBits=4 -[Map_InsFind_int] +[map_insfind_int] ThreadCount=0 -MapSize=1000 +MapSize=2000 MaxLoadFactor=4 -PrintGCStateFlag=1 + # *** Cuckoo map properties CuckooInitialSize=256 CuckooProbesetSize=8 diff --git a/test/stress/data/test-express.conf b/test/stress/data/test-express.conf index a08ee2d4..db39a265 100644 --- a/test/stress/data/test-express.conf +++ b/test/stress/data/test-express.conf @@ -264,11 +264,11 @@ CuckooProbesetThreshold=0 FeldmanMapHeadBits=8 FeldmanMapArrayBits=4 -[Map_InsFind_int] +[map_insfind_int] ThreadCount=0 MapSize=1000 MaxLoadFactor=4 -PrintGCStateFlag=1 + # *** Cuckoo map properties CuckooInitialSize=1024 CuckooProbesetSize=16 diff --git a/test/stress/data/test.conf b/test/stress/data/test.conf index f165f44f..b0039097 100644 --- a/test/stress/data/test.conf +++ b/test/stress/data/test.conf @@ -261,11 +261,11 @@ CuckooProbesetThreshold=0 FeldmanMapHeadBits=10 FeldmanMapArrayBits=4 -[Map_InsFind_int] +[map_insfind_int] ThreadCount=0 MapSize=5000 MaxLoadFactor=4 -PrintGCStateFlag=1 + # *** Cuckoo map properties CuckooInitialSize=1024 CuckooProbesetSize=16 diff --git a/test/stress/map/CMakeLists.txt b/test/stress/map/CMakeLists.txt index 133079ab..7428b22e 100644 --- a/test/stress/map/CMakeLists.txt +++ b/test/stress/map/CMakeLists.txt @@ -9,6 +9,7 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_int) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_string) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_item_int) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdelfind) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insfind_int) #add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_find) #add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_func) #add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_string) @@ -23,4 +24,5 @@ add_custom_target( stress-map stress-map-insdel-string stress-map-insdel-item-int stress-map-insdelfind + stress-map-insfind-int ) diff --git a/test/stress/map/insdelfind/map_insdelfind.h b/test/stress/map/insdelfind/map_insdelfind.h index 844e2b94..87a5c853 100644 --- a/test/stress/map/insdelfind/map_insdelfind.h +++ b/test/stress/map/insdelfind/map_insdelfind.h @@ -37,8 +37,8 @@ namespace map { { public: static size_t s_nMapSize; // initial map size - static size_t s_nThreadCount; // thread count - static size_t s_nMaxLoadFactor; // maximum load factor + static size_t s_nThreadCount; // thread count + static size_t s_nMaxLoadFactor; // maximum load factor static unsigned int s_nInsertPercentage; static unsigned int s_nDeletePercentage; static unsigned int s_nDuration; // test duration, seconds diff --git a/test/stress/map/insfind_int/CMakeLists.txt b/test/stress/map/insfind_int/CMakeLists.txt new file mode 100644 index 00000000..9027a4b0 --- /dev/null +++ b/test/stress/map/insfind_int/CMakeLists.txt @@ -0,0 +1,31 @@ +set(PACKAGE_NAME stress-map-insfind-int) + +set(CDSSTRESS_MAP_INSFIND_INT_SOURCES + ../../main.cpp + map_insfind.cpp + map_insfind_bronsonavltree.cpp + map_insfind_cuckoo.cpp + map_insfind_ellentree.cpp + map_insfind_feldman_hashset.cpp + map_insfind_michael.cpp + map_insfind_skip.cpp + map_insfind_split.cpp + map_insfind_std.cpp + map_insfind_striped.cpp +) + +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/.. +) + +add_executable(${PACKAGE_NAME} ${CDSSTRESS_MAP_INSFIND_INT_SOURCES} $) +target_link_libraries(${PACKAGE_NAME} + ${CDS_SHARED_LIBRARY} + ${GTEST_LIBRARY} + ${Boost_THREAD_LIBRARY} + ${Boost_SYSTEM_LIBRARY} + ${CMAKE_THREAD_LIBS_INIT} +) + +add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) \ No newline at end of file diff --git a/test/stress/map/insfind_int/map_insfind.cpp b/test/stress/map/insfind_int/map_insfind.cpp new file mode 100644 index 00000000..ac7c443c --- /dev/null +++ b/test/stress/map/insfind_int/map_insfind.cpp @@ -0,0 +1,99 @@ +/* + 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 "map_insfind_int.h" + +namespace map { + + size_t Map_InsFind_int::s_nMapSize = 500000; + size_t Map_InsFind_int::s_nThreadCount = 8; + size_t Map_InsFind_int::s_nMaxLoadFactor = 8; + + size_t Map_InsFind_int::s_nCuckooInitialSize = 1024; // initial size for CuckooSet + size_t Map_InsFind_int::s_nCuckooProbesetSize = 16; // CuckooSet probeset size (only for list-based probeset) + size_t Map_InsFind_int::s_nCuckooProbesetThreshold = 0; // CuckooSet probeset threshold (0 - use default) + + size_t Map_InsFind_int::s_nFeldmanMap_HeadBits = 10; + size_t Map_InsFind_int::s_nFeldmanMap_ArrayBits = 4; + + size_t Map_InsFind_int::s_nLoadFactor = 1; + + void Map_InsFind_int::SetUpTestCase() + { + cds_test::config const& cfg = get_config( "map_insfind_int" ); + + s_nMapSize = cfg.get_size_t( "MapSize", s_nMapSize ); + if ( s_nMapSize < 100 ) + s_nMapSize = 100; + + s_nThreadCount = cfg.get_size_t( "ThreadCount", s_nThreadCount ); + if ( s_nThreadCount == 0 ) + s_nThreadCount = std::thread::hardware_concurrency() * 2; + + s_nMaxLoadFactor = cfg.get_size_t( "MaxLoadFactor", s_nMaxLoadFactor ); + if ( s_nMaxLoadFactor == 0 ) + s_nMaxLoadFactor = 1; + + s_nCuckooInitialSize = cfg.get_size_t( "CuckooInitialSize", s_nCuckooInitialSize ); + if ( s_nCuckooInitialSize < 256 ) + s_nCuckooInitialSize = 256; + + s_nCuckooProbesetSize = cfg.get_size_t( "CuckooProbesetSize", s_nCuckooProbesetSize ); + if ( s_nCuckooProbesetSize < 8 ) + s_nCuckooProbesetSize = 8; + + s_nCuckooProbesetThreshold = cfg.get_size_t( "CuckooProbesetThreshold", s_nCuckooProbesetThreshold ); + + s_nFeldmanMap_HeadBits = cfg.get_size_t( "FeldmanMapHeadBits", s_nFeldmanMap_HeadBits ); + if ( s_nFeldmanMap_HeadBits == 0 ) + s_nFeldmanMap_HeadBits = 2; + + s_nFeldmanMap_ArrayBits = cfg.get_size_t( "FeldmanMapArrayBits", s_nFeldmanMap_ArrayBits ); + if ( s_nFeldmanMap_ArrayBits == 0 ) + s_nFeldmanMap_ArrayBits = 2; + } + + std::vector Map_InsFind_int_LF::get_load_factors() + { + cds_test::config const& cfg = get_config( "map_insfind_int" ); + + s_nMaxLoadFactor = cfg.get_size_t( "MaxLoadFactor", s_nMaxLoadFactor ); + if ( s_nMaxLoadFactor == 0 ) + s_nMaxLoadFactor = 1; + + std::vector lf; + for ( size_t n = 1; n <= s_nMaxLoadFactor; n *= 2 ) + lf.push_back( n ); + + return lf; + } + + INSTANTIATE_TEST_CASE_P( a, Map_InsFind_int_LF, ::testing::ValuesIn( Map_InsFind_int_LF::get_load_factors())); +} // namespace map diff --git a/test/stress/map/insfind_int/map_insfind_bronsonavltree.cpp b/test/stress/map/insfind_int/map_insfind_bronsonavltree.cpp new file mode 100644 index 00000000..6c4ee7b6 --- /dev/null +++ b/test/stress/map/insfind_int/map_insfind_bronsonavltree.cpp @@ -0,0 +1,38 @@ +/* + 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 "map_insfind_int.h" +#include "map_type_bronson_avltree.h" + +namespace map { + + CDSSTRESS_BronsonAVLTreeMap( Map_InsFind_int, run_test, size_t, size_t ) + +} // namespace map diff --git a/test/stress/map/insfind_int/map_insfind_cuckoo.cpp b/test/stress/map/insfind_int/map_insfind_cuckoo.cpp new file mode 100644 index 00000000..ef623721 --- /dev/null +++ b/test/stress/map/insfind_int/map_insfind_cuckoo.cpp @@ -0,0 +1,38 @@ +/* + 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 "map_insfind_int.h" +#include "map_type_cuckoo.h" + +namespace map { + + CDSSTRESS_CuckooMap( Map_InsFind_int, run_test, size_t, size_t ) + +} // namespace map diff --git a/test/stress/map/insfind_int/map_insfind_ellentree.cpp b/test/stress/map/insfind_int/map_insfind_ellentree.cpp new file mode 100644 index 00000000..7a327bc8 --- /dev/null +++ b/test/stress/map/insfind_int/map_insfind_ellentree.cpp @@ -0,0 +1,38 @@ +/* + 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 "map_insfind_int.h" +#include "map_type_ellen_bintree.h" + +namespace map { + + CDSSTRESS_EllenBinTreeMap( Map_InsFind_int, run_test, size_t, size_t ) + +} // namespace map diff --git a/test/stress/map/insfind_int/map_insfind_feldman_hashset.cpp b/test/stress/map/insfind_int/map_insfind_feldman_hashset.cpp new file mode 100644 index 00000000..7174a372 --- /dev/null +++ b/test/stress/map/insfind_int/map_insfind_feldman_hashset.cpp @@ -0,0 +1,38 @@ +/* + 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 "map_insfind_int.h" +#include "map_type_feldman_hashmap.h" + +namespace map { + + CDSSTRESS_FeldmanHashMap_fixed( Map_InsFind_int, run_test, size_t, size_t ) + +} // namespace map diff --git a/test/stress/map/insfind_int/map_insfind_int.h b/test/stress/map/insfind_int/map_insfind_int.h new file mode 100644 index 00000000..048309e7 --- /dev/null +++ b/test/stress/map/insfind_int/map_insfind_int.h @@ -0,0 +1,210 @@ +/* + 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 "map_type.h" + +namespace map { + + class Map_InsFind_int: public cds_test::stress_fixture + { + public: + static size_t s_nMapSize; // initial map size + static size_t s_nThreadCount; // thread count + static size_t s_nMaxLoadFactor; // maximum load factor + + static size_t s_nCuckooInitialSize; // initial size for CuckooMap + static size_t s_nCuckooProbesetSize; // CuckooMap probeset size (only for list-based probeset) + static size_t s_nCuckooProbesetThreshold; // CuckooMap probeset threshold (o - use default) + + static size_t s_nFeldmanMap_HeadBits; + static size_t s_nFeldmanMap_ArrayBits; + + static size_t s_nLoadFactor; // current load factor + + static void SetUpTestCase(); + //static void TearDownTestCase(); + + private: + typedef size_t key_type; + typedef size_t value_type; + + template + static bool check_result( Iterator const& it, Map const& map ) + { + return it != map.end(); + } + template + static bool check_result( bool b, Map const& ) + { + return b; + } + + template + class Inserter: public cds_test::thread + { + typedef cds_test::thread base_class; + + Map& m_Map; + std::vector m_arrVal; + + void make_array() + { + size_t const nThreadCount = s_nThreadCount; + size_t const nSize = s_nMapSize / nThreadCount + 1; + m_arrVal.resize( nSize ); + size_t nItem = id(); + for ( size_t i = 0; i < nSize; nItem += nThreadCount, ++i ) + m_arrVal[i] = nItem; + shuffle( m_arrVal.begin(), m_arrVal.end() ); + } + public: + size_t m_nInsertSuccess = 0; + size_t m_nInsertFailed = 0; + size_t m_nFindSuccess = 0; + size_t m_nFindFail = 0; + + public: + Inserter( cds_test::thread_pool& pool, Map& map ) + : base_class( pool ) + , m_Map( map ) + { + make_array(); + } + + Inserter( Inserter& src ) + : base_class( src ) + , m_Map( src.m_Map ) + { + make_array(); + } + + virtual thread * clone() + { + return new Inserter( *this ); + } + + virtual void test() + { + Map& rMap = m_Map; + + size_t const nArrSize = m_arrVal.size(); + for ( size_t i = 0; i < nArrSize; ++i ) { + size_t const nItem = m_arrVal[i]; + if ( check_result( rMap.insert( nItem, nItem * 8 ), rMap )) + ++m_nInsertSuccess; + else + ++m_nInsertFailed; + + for ( size_t k = 0; k <= i; ++k ) { + if ( check_result( rMap.contains( m_arrVal[k] ), rMap )) + ++m_nFindSuccess; + else + ++m_nFindFail; + } + } + } + }; + + protected: + + template + void do_test( Map& testMap ) + { + typedef Inserter inserter; + + cds_test::thread_pool& pool = get_pool(); + pool.add( new inserter( pool, testMap ), s_nThreadCount ); + + propout() + << std::make_pair( "thread_count", s_nThreadCount ) + << std::make_pair( "insert_per_thread", s_nMapSize ); + + std::chrono::milliseconds duration = pool.run(); + + propout() << std::make_pair( "duration", duration ); + + size_t nInsertSuccess = 0; + size_t nInsertFailed = 0; + size_t nFindSuccess = 0; + size_t nFindFailed = 0; + for ( size_t i = 0; i < pool.size(); ++i ) { + inserter& thr = static_cast(pool.get( i )); + + EXPECT_EQ( thr.m_nInsertFailed, 0 ) << "thread " << thr.id(); + EXPECT_EQ( thr.m_nFindFail, 0 ) << "thread " << thr.id(); + + nInsertSuccess += thr.m_nInsertSuccess; + nInsertFailed += thr.m_nInsertFailed; + nFindSuccess += thr.m_nFindSuccess; + nFindFailed += thr.m_nFindFail; + } + + propout() + << std::make_pair( "insert_success", nInsertSuccess ) + << std::make_pair( "insert_failed", nInsertFailed ) + << std::make_pair( "find_success", nFindSuccess ) + << std::make_pair( "find_failed", nFindFailed ) + << std::make_pair( "finish_map_size", testMap.size() ); + + EXPECT_EQ( nInsertFailed, 0 ); + EXPECT_EQ( nFindFailed, 0 ); + + check_before_cleanup( testMap ); + + testMap.clear(); + additional_check( testMap ); + print_stat( propout(), testMap ); + additional_cleanup( testMap ); + } + + template + void run_test() + { + Map testMap( *this ); + do_test( testMap ); + } + }; + + class Map_InsFind_int_LF: public Map_InsFind_int + , public ::testing::WithParamInterface + { + public: + template + void run_test() + { + s_nLoadFactor = GetParam(); + propout() << std::make_pair( "load_factor", s_nLoadFactor ); + Map_InsFind_int::run_test(); + } + + static std::vector get_load_factors(); + }; + +} // namespace map diff --git a/test/stress/map/insfind_int/map_insfind_michael.cpp b/test/stress/map/insfind_int/map_insfind_michael.cpp new file mode 100644 index 00000000..86f279b7 --- /dev/null +++ b/test/stress/map/insfind_int/map_insfind_michael.cpp @@ -0,0 +1,39 @@ +/* + 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 "map_insfind_int.h" +#include "map_type_michael.h" + +namespace map { + + CDSSTRESS_MichaelMap( Map_InsFind_int_LF, run_test, size_t, size_t ) + CDSSTRESS_MichaelMap_nogc( Map_InsFind_int_LF, run_test, size_t, size_t ) + +} // namespace map diff --git a/test/stress/map/insfind_int/map_insfind_skip.cpp b/test/stress/map/insfind_int/map_insfind_skip.cpp new file mode 100644 index 00000000..2593ca61 --- /dev/null +++ b/test/stress/map/insfind_int/map_insfind_skip.cpp @@ -0,0 +1,39 @@ +/* + 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 "map_insfind_int.h" +#include "map_type_skip_list.h" + +namespace map { + + CDSSTRESS_SkipListMap( Map_InsFind_int, run_test, size_t, size_t ) + CDSSTRESS_SkipListMap_nogc( Map_InsFind_int, run_test, size_t, size_t ) + +} // namespace map diff --git a/test/stress/map/insfind_int/map_insfind_split.cpp b/test/stress/map/insfind_int/map_insfind_split.cpp new file mode 100644 index 00000000..326b5258 --- /dev/null +++ b/test/stress/map/insfind_int/map_insfind_split.cpp @@ -0,0 +1,39 @@ +/* + 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 "map_insfind_int.h" +#include "map_type_split_list.h" + +namespace map { + + CDSSTRESS_SplitListMap( Map_InsFind_int_LF, run_test, size_t, size_t ) + CDSSTRESS_SplitListMap_nogc( Map_InsFind_int_LF, run_test, size_t, size_t ) + +} // namespace map diff --git a/test/stress/map/insfind_int/map_insfind_std.cpp b/test/stress/map/insfind_int/map_insfind_std.cpp new file mode 100644 index 00000000..c7b9b519 --- /dev/null +++ b/test/stress/map/insfind_int/map_insfind_std.cpp @@ -0,0 +1,38 @@ +/* + 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 "map_insfind_int.h" +#include "map_type_std.h" + +namespace map { + + CDSSTRESS_StdMap( Map_InsFind_int, run_test, size_t, size_t ) + +} // namespace map diff --git a/test/stress/map/insfind_int/map_insfind_striped.cpp b/test/stress/map/insfind_int/map_insfind_striped.cpp new file mode 100644 index 00000000..ec4e781c --- /dev/null +++ b/test/stress/map/insfind_int/map_insfind_striped.cpp @@ -0,0 +1,38 @@ +/* + 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 "map_insfind_int.h" +#include "map_type_striped.h" + +namespace map { + + CDSSTRESS_StripedMap( Map_InsFind_int_LF, run_test, size_t, size_t ) + +} // namespace map -- 2.34.1