CDSUNIT_MAP_SOURCES := $(CDSUNIT_MAP_SOURCES:%.cpp=../%.cpp)
CDSUNIT_MAP_OBJS := $(CDSUNIT_MAP_SOURCES:%.cpp=%.o)
-include ../projects/source.unit.set.mk
-CDSUNIT_SET_SOURCES := $(CDSUNIT_SET_SOURCES:%.cpp=../%.cpp)
-CDSUNIT_SET_OBJS := $(CDSUNIT_SET_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_SET_OBJS) \
- $(CDSUNIT_STACK_OBJS) $(CDSUNIT_MISC_OBJS)
+TEST_OBJ_FILE := $(CDSUNIT_COMMON_FILE) $(CDSUNIT_MAP_OBJS) $(CDSUNIT_MISC_OBJS)
TEST_OBJ_FILE_DEPS := $(TEST_OBJ_FILE:%.o=%.d)
-include $(TEST_OBJ_FILE_DEPS)
$(CXX) $(CPP_COMP_OPT) -I$(TEST_SRC_DIR) -I$(TEST_COMMONHDR_SRC_DIR) $< -o $@
CDSUNIT_MAP_EXE=$(BIN_PATH)/cdsu-map
-CDSUNIT_SET_EXE=$(BIN_PATH)/cdsu-set
CDSUNIT_MISC_EXE=$(BIN_PATH)/cdsu-misc
-CDSUNIT_EXE_FILES= $(CDSUNIT_MAP_EXE) $(CDSUNIT_SET_EXE) $(CDSUNIT_MISC_EXE)
+CDSUNIT_EXE_FILES= $(CDSUNIT_MAP_EXE) $(CDSUNIT_MISC_EXE)
unit-map: $(CDSUNIT_MAP_EXE)
-unit-set: $(CDSUNIT_SET_EXE)
ifeq ($(platform),mingw)
make_test : $(CDSUNIT_EXE_FILES)
$(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_SET_EXE) : $(CDSUNIT_SET_OBJS) $(CDSUNIT_COMMON_FILE) $(TEST_COMMON_OBJS)
- $(CXX) $(LD_OPTS) -L$(BIN_PATH) $(CDSUNIT_SET_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_SET_EXE_DBG=$(CDSUNIT_SET_EXE)-d
CDSUNIT_MISC_EXE_DBG=$(CDSUNIT_MISC_EXE)-d
-CDSUNIT_EXE_DBG_FILES= $(CDSUNIT_MAP_EXE_DBG) $(CDSUNIT_SET_EXE_DBG) $(CDSUNIT_MISC_EXE_DBG)
+CDSUNIT_EXE_DBG_FILES= $(CDSUNIT_MAP_EXE_DBG) $(CDSUNIT_MISC_EXE_DBG)
unit-map-dbg: $(CDSUNIT_MAP_EXE_DBG)
-unit-set-dbg: $(CDSUNIT_SET_EXE_DBG)
ifeq ($(platform),mingw)
make_debug_test : $(CDSUNIT_EXE_DBG_FILES)
$(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_SET_EXE_DBG) : $(CDSUNIT_SET_OBJS) $(CDSUNIT_COMMON_FILE) $(TEST_COMMON_OBJS)
- $(CXX) $(LD_OPTS) -L$(BIN_PATH) $(CDSUNIT_SET_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)
..\..\..\tests\unit\map2\std_map.h = ..\..\..\tests\unit\map2\std_map.h\r
EndProjectSection\r
EndProject\r
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "set", "set", "{A64449B7-90FB-4E2B-A686-9EFC0E298644}"\r
- ProjectSection(SolutionItems) = preProject\r
- ..\..\..\tests\unit\set2\set_defs.h = ..\..\..\tests\unit\set2\set_defs.h\r
- ..\..\..\tests\unit\set2\set_type.h = ..\..\..\tests\unit\set2\set_type.h\r
- ..\..\..\tests\unit\set2\set_type_cuckoo.h = ..\..\..\tests\unit\set2\set_type_cuckoo.h\r
- ..\..\..\tests\unit\set2\set_type_ellen_bintree.h = ..\..\..\tests\unit\set2\set_type_ellen_bintree.h\r
- ..\..\..\tests\unit\set2\set_type_feldman_hashset.h = ..\..\..\tests\unit\set2\set_type_feldman_hashset.h\r
- ..\..\..\tests\unit\set2\set_type_lazy_list.h = ..\..\..\tests\unit\set2\set_type_lazy_list.h\r
- ..\..\..\tests\unit\set2\set_type_michael.h = ..\..\..\tests\unit\set2\set_type_michael.h\r
- ..\..\..\tests\unit\set2\set_type_michael_list.h = ..\..\..\tests\unit\set2\set_type_michael_list.h\r
- ..\..\..\tests\unit\set2\set_type_skip_list.h = ..\..\..\tests\unit\set2\set_type_skip_list.h\r
- ..\..\..\tests\unit\set2\set_type_split_list.h = ..\..\..\tests\unit\set2\set_type_split_list.h\r
- ..\..\..\tests\unit\set2\set_type_std.h = ..\..\..\tests\unit\set2\set_type_std.h\r
- ..\..\..\tests\unit\set2\set_type_striped.h = ..\..\..\tests\unit\set2\set_type_striped.h\r
- EndProjectSection\r
-EndProject\r
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unit-map-delodd", "unit-map-delodd.vcxproj", "{3C598F96-FB84-4D42-9B43-F697F53B0221}"\r
ProjectSection(ProjectDependencies) = postProject\r
{61179F2F-07E1-490D-B64D-D85A90B6EF81} = {61179F2F-07E1-490D-B64D-D85A90B6EF81}\r
{408FE9BC-44F0-4E6A-89FA-D6F952584239} = {408FE9BC-44F0-4E6A-89FA-D6F952584239}\r
EndProjectSection\r
EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unit-set-insdel", "unit-set-insdel.vcxproj", "{BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {61179F2F-07E1-490D-B64D-D85A90B6EF81} = {61179F2F-07E1-490D-B64D-D85A90B6EF81}\r
- {408FE9BC-44F0-4E6A-89FA-D6F952584239} = {408FE9BC-44F0-4E6A-89FA-D6F952584239}\r
- EndProjectSection\r
-EndProject\r
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unit-map-insdel-item", "unit-map-insdel-item.vcxproj", "{7521DD92-56FF-4ECA-93E5-CCE50862354B}"\r
ProjectSection(ProjectDependencies) = postProject\r
{61179F2F-07E1-490D-B64D-D85A90B6EF81} = {61179F2F-07E1-490D-B64D-D85A90B6EF81}\r
EndProject\r
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stress-set-insdel-func", "stress-set-insdel_func.vcxproj", "{EE7A269E-83E4-402B-9C79-85058826E81E}"\r
EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stress-set-insdel-string", "stress-set-insdel_string.vcxproj", "{937D82C6-92AB-4C58-ACE8-F88E7063BFA9}"\r
+EndProject\r
Global\r
GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
Debug|Win32 = Debug|Win32\r
{CA25BDBF-B354-4597-B6D2-220ABBB0D2F4}.Release|Win32.Build.0 = Release|Win32\r
{CA25BDBF-B354-4597-B6D2-220ABBB0D2F4}.Release|x64.ActiveCfg = Release|x64\r
{CA25BDBF-B354-4597-B6D2-220ABBB0D2F4}.Release|x64.Build.0 = Release|x64\r
- {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}.Debug|Win32.Build.0 = Debug|Win32\r
- {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}.Debug|x64.ActiveCfg = Debug|x64\r
- {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}.Debug|x64.Build.0 = Debug|x64\r
- {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}.DebugVLD|Win32.ActiveCfg = DebugVLD|Win32\r
- {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}.DebugVLD|Win32.Build.0 = DebugVLD|Win32\r
- {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}.DebugVLD|x64.ActiveCfg = DebugVLD|x64\r
- {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}.DebugVLD|x64.Build.0 = DebugVLD|x64\r
- {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}.Release|Win32.ActiveCfg = Release|Win32\r
- {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}.Release|Win32.Build.0 = Release|Win32\r
- {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}.Release|x64.ActiveCfg = Release|x64\r
- {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}.Release|x64.Build.0 = Release|x64\r
{7521DD92-56FF-4ECA-93E5-CCE50862354B}.Debug|Win32.ActiveCfg = Debug|Win32\r
{7521DD92-56FF-4ECA-93E5-CCE50862354B}.Debug|Win32.Build.0 = Debug|Win32\r
{7521DD92-56FF-4ECA-93E5-CCE50862354B}.Debug|x64.ActiveCfg = Debug|x64\r
{EE7A269E-83E4-402B-9C79-85058826E81E}.Release|Win32.Build.0 = Release|Win32\r
{EE7A269E-83E4-402B-9C79-85058826E81E}.Release|x64.ActiveCfg = Release|x64\r
{EE7A269E-83E4-402B-9C79-85058826E81E}.Release|x64.Build.0 = Release|x64\r
+ {937D82C6-92AB-4C58-ACE8-F88E7063BFA9}.Debug|Win32.ActiveCfg = Debug|Win32\r
+ {937D82C6-92AB-4C58-ACE8-F88E7063BFA9}.Debug|Win32.Build.0 = Debug|Win32\r
+ {937D82C6-92AB-4C58-ACE8-F88E7063BFA9}.Debug|x64.ActiveCfg = Debug|x64\r
+ {937D82C6-92AB-4C58-ACE8-F88E7063BFA9}.Debug|x64.Build.0 = Debug|x64\r
+ {937D82C6-92AB-4C58-ACE8-F88E7063BFA9}.DebugVLD|Win32.ActiveCfg = DebugVLD|Win32\r
+ {937D82C6-92AB-4C58-ACE8-F88E7063BFA9}.DebugVLD|Win32.Build.0 = DebugVLD|Win32\r
+ {937D82C6-92AB-4C58-ACE8-F88E7063BFA9}.DebugVLD|x64.ActiveCfg = DebugVLD|x64\r
+ {937D82C6-92AB-4C58-ACE8-F88E7063BFA9}.DebugVLD|x64.Build.0 = DebugVLD|x64\r
+ {937D82C6-92AB-4C58-ACE8-F88E7063BFA9}.Release|Win32.ActiveCfg = Release|Win32\r
+ {937D82C6-92AB-4C58-ACE8-F88E7063BFA9}.Release|Win32.Build.0 = Release|Win32\r
+ {937D82C6-92AB-4C58-ACE8-F88E7063BFA9}.Release|x64.ActiveCfg = Release|x64\r
+ {937D82C6-92AB-4C58-ACE8-F88E7063BFA9}.Release|x64.Build.0 = Release|x64\r
EndGlobalSection\r
GlobalSection(SolutionProperties) = preSolution\r
HideSolutionNode = FALSE\r
{61179F2F-07E1-490D-B64D-D85A90B6EF81} = {B30CA283-1796-4763-92C3-2E4848D443F7}\r
{77350FDC-9E51-438B-9A8F-D2FEA11D46B2} = {B30CA283-1796-4763-92C3-2E4848D443F7}\r
{6BB7A27F-FC59-4267-B6FA-D034176D1459} = {B30CA283-1796-4763-92C3-2E4848D443F7}\r
- {A64449B7-90FB-4E2B-A686-9EFC0E298644} = {B30CA283-1796-4763-92C3-2E4848D443F7}\r
{3C598F96-FB84-4D42-9B43-F697F53B0221} = {6BB7A27F-FC59-4267-B6FA-D034176D1459}\r
{BA2A9239-0299-4069-BB0E-16DACE87ADE0} = {6BB7A27F-FC59-4267-B6FA-D034176D1459}\r
{CA25BDBF-B354-4597-B6D2-220ABBB0D2F4} = {6BB7A27F-FC59-4267-B6FA-D034176D1459}\r
- {BA23811C-D4CB-4836-B2F3-6791BD6FFCD1} = {A64449B7-90FB-4E2B-A686-9EFC0E298644}\r
{7521DD92-56FF-4ECA-93E5-CCE50862354B} = {6BB7A27F-FC59-4267-B6FA-D034176D1459}\r
{CA6F0834-0628-4CD7-8800-AEABCD636360} = {6BB7A27F-FC59-4267-B6FA-D034176D1459}\r
{5407E9D2-67D9-4266-976E-7A90BDE2541D} = {810490B7-31E5-49AE-8455-CAF99A9658B6}\r
{D968B0F5-52BD-40C1-B230-28104567CE97} = {0D83E8C7-97D1-4BA1-928A-6846E7089652}\r
{133D1AEE-3BAF-42D1-B1AB-93D5239F4926} = {0D83E8C7-97D1-4BA1-928A-6846E7089652}\r
{EE7A269E-83E4-402B-9C79-85058826E81E} = {0D83E8C7-97D1-4BA1-928A-6846E7089652}\r
+ {937D82C6-92AB-4C58-ACE8-F88E7063BFA9} = {0D83E8C7-97D1-4BA1-928A-6846E7089652}\r
EndGlobalSection\r
GlobalSection(DPCodeReviewSolutionGUID) = preSolution\r
DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="DebugVLD|Win32">
+ <Configuration>DebugVLD</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DebugVLD|x64">
+ <Configuration>DebugVLD</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\test\stress\main.cpp" />
+ <ClCompile Include="..\..\..\test\stress\set\insdel_string\set_insdel_string.cpp" />
+ <ClCompile Include="..\..\..\test\stress\set\insdel_string\set_insdel_string_cuckoo.cpp">
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="..\..\..\test\stress\set\insdel_string\set_insdel_string_ellentree.cpp">
+ <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4503</DisableSpecificWarnings>
+ <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">4503</DisableSpecificWarnings>
+ <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4503</DisableSpecificWarnings>
+ <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4503</DisableSpecificWarnings>
+ <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">4503</DisableSpecificWarnings>
+ <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4503</DisableSpecificWarnings>
+ </ClCompile>
+ <ClCompile Include="..\..\..\test\stress\set\insdel_string\set_insdel_string_feldman_hashset.cpp" />
+ <ClCompile Include="..\..\..\test\stress\set\insdel_string\set_insdel_string_michael.cpp" />
+ <ClCompile Include="..\..\..\test\stress\set\insdel_string\set_insdel_string_skip.cpp" />
+ <ClCompile Include="..\..\..\test\stress\set\insdel_string\set_insdel_string_split.cpp">
+ <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4503</DisableSpecificWarnings>
+ <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">4503</DisableSpecificWarnings>
+ <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4503</DisableSpecificWarnings>
+ <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4503</DisableSpecificWarnings>
+ <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">4503</DisableSpecificWarnings>
+ <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4503</DisableSpecificWarnings>
+ </ClCompile>
+ <ClCompile Include="..\..\..\test\stress\set\insdel_string\set_insdel_string_std.cpp" />
+ <ClCompile Include="..\..\..\test\stress\set\insdel_string\set_insdel_string_striped.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\test\stress\set\insdel_string\set_insdel_string.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <Text Include="..\..\..\test\stress\set\insdel_string\CMakeLists.txt" />
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{937D82C6-92AB-4C58-ACE8-F88E7063BFA9}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>stress_set_insdel_string</RootNamespace>
+ <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ <ProjectName>stress-set-insdel-string</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="Shared">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>
+ <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
+ <TargetName>$(ProjectName)_d</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>
+ <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
+ <TargetName>$(ProjectName)_d</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>
+ <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
+ <TargetName>$(ProjectName)_d</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>
+ <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
+ <TargetName>$(ProjectName)_d</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-release\</OutDir>
+ <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-release\</OutDir>
+ <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>_ENABLE_ATOMIC_ALIGNMENT_FIX;CDSUNIT_USE_URCU;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalLibraryDirectories>$(GTEST_LIB32);$(GTEST_ROOT)/lib/x86;$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>gtestd.lib;stress-framework_d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>_ENABLE_ATOMIC_ALIGNMENT_FIX;CDSUNIT_USE_URCU;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalLibraryDirectories>$(GTEST_LIB32);$(GTEST_ROOT)/lib/x86;$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>gtestd.lib;stress-framework_d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>_ENABLE_ATOMIC_ALIGNMENT_FIX;CDSUNIT_USE_URCU;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalLibraryDirectories>$(GTEST_LIB64);$(GTEST_ROOT)/lib/x64;$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>gtestd.lib;stress-framework_d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>_ENABLE_ATOMIC_ALIGNMENT_FIX;CDSUNIT_USE_URCU;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalLibraryDirectories>$(GTEST_LIB64);$(GTEST_ROOT)/lib/x64;$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>gtestd.lib;stress-framework_d.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>_ENABLE_ATOMIC_ALIGNMENT_FIX;CDSUNIT_USE_URCU;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalLibraryDirectories>$(GTEST_LIB32);$(GTEST_ROOT)/lib/x86;$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>gtest.lib;stress-framework.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>_ENABLE_ATOMIC_ALIGNMENT_FIX;CDSUNIT_USE_URCU;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalLibraryDirectories>$(GTEST_LIB64);$(GTEST_ROOT)/lib/x64;$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>gtest.lib;stress-framework.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\test\stress\main.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\test\stress\set\insdel_string\set_insdel_string.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\test\stress\set\insdel_string\set_insdel_string_michael.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\test\stress\set\insdel_string\set_insdel_string_cuckoo.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\test\stress\set\insdel_string\set_insdel_string_ellentree.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\test\stress\set\insdel_string\set_insdel_string_feldman_hashset.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\test\stress\set\insdel_string\set_insdel_string_skip.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\test\stress\set\insdel_string\set_insdel_string_split.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\test\stress\set\insdel_string\set_insdel_string_striped.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\..\test\stress\set\insdel_string\set_insdel_string_std.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\..\test\stress\set\insdel_string\set_insdel_string.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <Text Include="..\..\..\test\stress\set\insdel_string\CMakeLists.txt" />
+ </ItemGroup>
+</Project>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="DebugVLD|Win32">\r
- <Configuration>DebugVLD</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="DebugVLD|x64">\r
- <Configuration>DebugVLD</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string.cpp" />\r
- <ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_cuckoo.cpp" />\r
- <ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_ellentree.cpp" />\r
- <ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_michael.cpp" />\r
- <ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_feldmanhashset.cpp" />\r
- <ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_skip.cpp" />\r
- <ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_split.cpp" />\r
- <ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_std.cpp" />\r
- <ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_striped.cpp" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="..\..\..\tests\unit\set2\set_insdel_string.h" />\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectGuid>{BA23811C-D4CB-4836-B2F3-6791BD6FFCD1}</ProjectGuid>\r
- <RootNamespace>unitset</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <PlatformToolset>v140</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v140</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v140</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <PlatformToolset>v140</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v140</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v140</PlatformToolset>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">false</LinkIncremental>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">false</LinkIncremental>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-release\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-release\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'" />\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'" />\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)_d</TargetName>\r
- <TargetName Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">$(ProjectName)_d</TargetName>\r
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectName)_d</TargetName>\r
- <TargetName Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">$(ProjectName)_d</TargetName>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <AdditionalOptions>/bigobj /Zc:inline %(AdditionalOptions)</AdditionalOptions>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <MinimalRebuild>true</MinimalRebuild>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
- <DisableSpecificWarnings>4503;4520;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>unit-prerequisites_d.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
- <OutputFile>$(TargetPath)</OutputFile>\r
- <AdditionalLibraryDirectories>$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- <ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">\r
- <ClCompile>\r
- <AdditionalOptions>/bigobj /Zc:inline %(AdditionalOptions)</AdditionalOptions>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <MinimalRebuild>true</MinimalRebuild>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
- <DisableSpecificWarnings>4503;4520;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>unit-prerequisites_d.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
- <OutputFile>$(TargetPath)</OutputFile>\r
- <AdditionalLibraryDirectories>$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- <ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalOptions>/bigobj /Zc:inline %(AdditionalOptions)</AdditionalOptions>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <MinimalRebuild>true</MinimalRebuild>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <DisableSpecificWarnings>4503;4520;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>unit-prerequisites_d.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
- <OutputFile>$(TargetPath)</OutputFile>\r
- <AdditionalLibraryDirectories>$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <TargetMachine>MachineX64</TargetMachine>\r
- <ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalOptions>/bigobj /Zc:inline %(AdditionalOptions)</AdditionalOptions>\r
- <Optimization>Disabled</Optimization>\r
- <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <MinimalRebuild>true</MinimalRebuild>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <DisableSpecificWarnings>4503;4520;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>unit-prerequisites_d.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
- <OutputFile>$(TargetPath)</OutputFile>\r
- <AdditionalLibraryDirectories>$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <TargetMachine>MachineX64</TargetMachine>\r
- <ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <AdditionalOptions>/bigobj /Zc:inline %(AdditionalOptions)</AdditionalOptions>\r
- <Optimization>MaxSpeed</Optimization>\r
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>\r
- <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
- <FunctionLevelLinking>true</FunctionLevelLinking>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <DisableSpecificWarnings>4503;4520;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>unit-prerequisites.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
- <AdditionalLibraryDirectories>$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- <OutputFile>$(TargetPath)</OutputFile>\r
- <ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalOptions>/bigobj /Zc:inline %(AdditionalOptions)</AdditionalOptions>\r
- <Optimization>MaxSpeed</Optimization>\r
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>\r
- <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\unit;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
- <FunctionLevelLinking>true</FunctionLevelLinking>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <DisableSpecificWarnings>4503;4520;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>unit-prerequisites.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
- <AdditionalLibraryDirectories>$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Console</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- <TargetMachine>MachineX64</TargetMachine>\r
- <OutputFile>$(TargetPath)</OutputFile>\r
- <ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
-</Project>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup>\r
- <ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string.cpp">\r
- <Filter>set_insdel_string</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_cuckoo.cpp">\r
- <Filter>set_insdel_string</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_ellentree.cpp">\r
- <Filter>set_insdel_string</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_michael.cpp">\r
- <Filter>set_insdel_string</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_skip.cpp">\r
- <Filter>set_insdel_string</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_split.cpp">\r
- <Filter>set_insdel_string</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_std.cpp">\r
- <Filter>set_insdel_string</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_striped.cpp">\r
- <Filter>set_insdel_string</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_feldmanhashset.cpp">\r
- <Filter>set_insdel_string</Filter>\r
- </ClCompile>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <Filter Include="set_insdel_string">\r
- <UniqueIdentifier>{8a51ae1e-c41c-4394-bf84-3de8c45ea8bb}</UniqueIdentifier>\r
- </Filter>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="..\..\..\tests\unit\set2\set_insdel_string.h">\r
- <Filter>set_insdel_string</Filter>\r
- </ClInclude>\r
- </ItemGroup>\r
-</Project>
\ No newline at end of file
+++ /dev/null
-
-CDSUNIT_SET_SOURCES := \
- tests/unit/set2/set_insdel_string.cpp \
- tests/unit/set2/set_insdel_string_cuckoo.cpp \
- tests/unit/set2/set_insdel_string_ellentree.cpp \
- tests/unit/set2/set_insdel_string_michael.cpp \
- tests/unit/set2/set_insdel_string_feldmanhashset.cpp \
- tests/unit/set2/set_insdel_string_skip.cpp \
- tests/unit/set2/set_insdel_string_split.cpp \
- tests/unit/set2/set_insdel_string_striped.cpp \
- tests/unit/set2/set_insdel_string_std.cpp \
static config const& get_config( char const * slot );\r
static config const& get_config( std::string const& slot );\r
\r
+ static std::vector<std::string> load_dictionary();\r
+\r
private:\r
thread_pool m_thread_pool;\r
};
FeldmanMapHeadBits=8\r
FeldmanMapArrayBits=4\r
\r
-[Map_InsDel_string]\r
+[map_insdel_string]\r
InsertThreadCount=4\r
DeleteThreadCount=4\r
ThreadPassCount=8\r
MapSize=10000\r
MaxLoadFactor=4\r
PrintGCStateFlag=1\r
+\r
# *** Cuckoo map properties\r
CuckooInitialSize=256\r
CuckooProbesetSize=8\r
FeldmanMapHeadBits=8\r
FeldmanMapArrayBits=4\r
\r
-[Map_InsDel_string]\r
+[map_insdel_string]\r
InsertThreadCount=4\r
DeleteThreadCount=4\r
ThreadPassCount=2\r
MapSize=100000\r
MaxLoadFactor=4\r
PrintGCStateFlag=1\r
+\r
# *** Cuckoo map properties\r
CuckooInitialSize=1024\r
CuckooProbesetSize=16\r
FeldmanMapHeadBits=10\r
FeldmanMapArrayBits=4\r
\r
-[Map_InsDel_string]\r
+[map_insdel_string]\r
InsertThreadCount=4\r
DeleteThreadCount=4\r
ThreadPassCount=2\r
MapSize=500000\r
MaxLoadFactor=4\r
-PrintGCStateFlag=1\r
+\r
# *** Cuckoo map properties\r
CuckooInitialSize=1024\r
CuckooProbesetSize=16\r
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <fstream>
+#include <iostream>
#include <cds_test/stress_test.h>
\r
namespace cds_test {\r
static property_stream s_prop_stream;\r
return s_prop_stream;\r
}\r
+\r
+ /*static*/ std::vector<std::string> stress_fixture::load_dictionary()\r
+ {\r
+ std::vector<std::string> arrString;\r
+\r
+ std::ifstream s;
+ char const* filename = "./dictionary.txt";
+ s.open( filename );
+ if ( !s.is_open() ) {
+ std::cerr << "WARNING: Cannot open test file " << filename << std::endl;
+ return arrString;
+ }
+\r
+ std::string line;\r
+ std::getline( s, line );\r
+\r
+ arrString.reserve( std::stoul( line ));\r
+\r
+ while ( !s.eof() ) {\r
+ std::getline( s, line );\r
+ if ( !line.empty() )\r
+ arrString.push_back( std::move( line ));\r
+ }\r
+\r
+ s.close();\r
+\r
+ return arrString;\r
+ }\r
+\r
} // namespace\r
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/delodd)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_find)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_func)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/insdel_string)
add_custom_target( stress-set
DEPENDS
stress-set-delodd
stress-set-insdelfind
stress-set-insdel-func
+ stress-set-insdel-string
)
namespace set {
- CDSSTRESS_FeldmanHashSet( Set_DelOdd, run_test_extract, key_thread, size_t )
+ CDSSTRESS_FeldmanHashSet_fixed( Set_DelOdd, run_test_extract, key_thread, size_t )
} // namespace set
set(PACKAGE_NAME stress-set-insdelfind)
-set(CDSSTRESS_SET_DELODD_SOURCES
+set(CDSSTRESS_SET_INSDELFIND_SOURCES
../../main.cpp
set_insdelfind.cpp
set_insdelfind_cuckoo.cpp
${CMAKE_CURRENT_SOURCE_DIR}/..
)
-add_executable(${PACKAGE_NAME} ${CDSSTRESS_SET_DELODD_SOURCES} $<TARGET_OBJECTS:${CDSSTRESS_FRAMEWORK_LIBRARY}>)
+add_executable(${PACKAGE_NAME} ${CDSSTRESS_SET_INSDELFIND_SOURCES} $<TARGET_OBJECTS:${CDSSTRESS_FRAMEWORK_LIBRARY}>)
target_link_libraries(${PACKAGE_NAME}
${CDS_SHARED_LIBRARY}
${GTEST_LIBRARY}
namespace set {
- CDSSTRESS_FeldmanHashSet( Set_InsDelFind, run_test, size_t, size_t )
+ CDSSTRESS_FeldmanHashSet_fixed( Set_InsDelFind, run_test, size_t, size_t )
} // namespace set
set(PACKAGE_NAME stress-set-insdel-func)
-set(CDSSTRESS_SET_DELODD_SOURCES
+set(CDSSTRESS_SET_INSDEL_FUNC_SOURCES
../../main.cpp
set_insdel_func.cpp
set_insdel_func_cuckoo.cpp
${CMAKE_CURRENT_SOURCE_DIR}/..
)
-add_executable(${PACKAGE_NAME} ${CDSSTRESS_SET_DELODD_SOURCES} $<TARGET_OBJECTS:${CDSSTRESS_FRAMEWORK_LIBRARY}>)
+add_executable(${PACKAGE_NAME} ${CDSSTRESS_SET_INSDEL_FUNC_SOURCES} $<TARGET_OBJECTS:${CDSSTRESS_FRAMEWORK_LIBRARY}>)
target_link_libraries(${PACKAGE_NAME}
${CDS_SHARED_LIBRARY}
${GTEST_LIBRARY}
public:
size_t m_nInsertSuccess = 0;
size_t m_nInsertFailed = 0;
-
size_t m_nTestFunctorRef = 0;
public:
public:
size_t m_nDeleteSuccess = 0;
size_t m_nDeleteFailed = 0;
-
size_t m_nValueSuccess = 0;
size_t m_nValueFailed = 0;
namespace set {
- CDSSTRESS_FeldmanHashSet( Set_InsDel_func, run_test, size_t, value )
+ CDSSTRESS_FeldmanHashSet_fixed( Set_InsDel_func, run_test, size_t, value )
} // namespace set
--- /dev/null
+set(PACKAGE_NAME stress-set-insdel-string)
+
+set(CDSSTRESS_SET_INSDEL_STRING_SOURCES
+ ../../main.cpp
+ set_insdel_string.cpp
+ set_insdel_string_cuckoo.cpp
+ set_insdel_string_ellentree.cpp
+ set_insdel_string_feldman_hashset.cpp
+ set_insdel_string_michael.cpp
+ set_insdel_string_skip.cpp
+ set_insdel_string_split.cpp
+ set_insdel_string_std.cpp
+ set_insdel_string_striped.cpp
+)
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/..
+)
+
+add_executable(${PACKAGE_NAME} ${CDSSTRESS_SET_INSDEL_STRING_SOURCES} $<TARGET_OBJECTS:${CDSSTRESS_FRAMEWORK_LIBRARY}>)
+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
--- /dev/null
+/*
+ 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 "set_insdel_string.h"
+
+namespace set {
+
+ size_t Set_InsDel_string::s_nSetSize = 1000000; // set size
+ size_t Set_InsDel_string::s_nInsertThreadCount = 4; // count of insertion thread
+ size_t Set_InsDel_string::s_nDeleteThreadCount = 4; // count of deletion thread
+ size_t Set_InsDel_string::s_nThreadPassCount = 4; // pass count for each thread
+ size_t Set_InsDel_string::s_nMaxLoadFactor = 8; // maximum load factor
+
+ size_t Set_InsDel_string::s_nCuckooInitialSize = 1024;// initial size for CuckooSet
+ size_t Set_InsDel_string::s_nCuckooProbesetSize = 16; // CuckooSet probeset size (only for list-based probeset)
+ size_t Set_InsDel_string::s_nCuckooProbesetThreshold = 0; // CUckooSet probeset threshold (0 - use default)
+
+ size_t Set_InsDel_string::s_nFeldmanSet_HeadBits = 10;
+ size_t Set_InsDel_string::s_nFeldmanSet_ArrayBits = 4;
+
+ size_t Set_InsDel_string::s_nLoadFactor = 1;
+ std::vector<std::string> Set_InsDel_string::m_arrString;
+
+ void Set_InsDel_string::SetUpTestCase()
+ {
+ cds_test::config const& cfg = get_config( "map_insdel_func" );
+
+ s_nSetSize = cfg.get_size_t( "MapSize", s_nSetSize );
+ if ( s_nSetSize < 1000 )
+ s_nSetSize = 1000;
+
+ s_nInsertThreadCount = cfg.get_size_t( "InsertThreadCount", s_nInsertThreadCount );
+ if ( s_nInsertThreadCount == 0 )
+ s_nInsertThreadCount = 2;
+
+ s_nDeleteThreadCount = cfg.get_size_t( "DeleteThreadCount", s_nDeleteThreadCount );
+ if ( s_nDeleteThreadCount == 0 )
+ s_nDeleteThreadCount = 2;
+
+ s_nThreadPassCount = cfg.get_size_t( "ThreadPassCount", s_nThreadPassCount );
+ if ( s_nThreadPassCount == 0 )
+ s_nThreadPassCount = 4;
+
+ 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_nFeldmanSet_HeadBits = cfg.get_size_t( "FeldmanMapHeadBits", s_nFeldmanSet_HeadBits );
+ if ( s_nFeldmanSet_HeadBits == 0 )
+ s_nFeldmanSet_HeadBits = 2;
+
+ s_nFeldmanSet_ArrayBits = cfg.get_size_t( "FeldmanMapArrayBits", s_nFeldmanSet_ArrayBits );
+ if ( s_nFeldmanSet_ArrayBits == 0 )
+ s_nFeldmanSet_ArrayBits = 2;
+
+ // Load string dictionary
+ m_arrString = load_dictionary();
+ }
+
+ void Set_InsDel_string::TearDownTestCase()
+ {
+ m_arrString.clear();
+ }
+
+ std::vector<size_t> Set_InsDel_string_LF::get_load_factors()
+ {
+ cds_test::config const& cfg = get_config( "map_insdel_func" );
+
+ s_nMaxLoadFactor = cfg.get_size_t( "MaxLoadFactor", s_nMaxLoadFactor );
+ if ( s_nMaxLoadFactor == 0 )
+ s_nMaxLoadFactor = 1;
+
+ std::vector<size_t> lf;
+ for ( size_t n = 1; n <= s_nMaxLoadFactor; n *= 2 )
+ lf.push_back( n );
+
+ return lf;
+ }
+
+ INSTANTIATE_TEST_CASE_P( a, Set_InsDel_string_LF, ::testing::ValuesIn( Set_InsDel_string_LF::get_load_factors()));
+} // namespace set
--- /dev/null
+/*
+ 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 "set_type.h"
+
+namespace set {
+
+#define TEST_CASE(TAG, X) void X();
+
+ class Set_InsDel_string: public cds_test::stress_fixture
+ {
+ public:
+ static size_t s_nSetSize; // set size
+ static size_t s_nInsertThreadCount; // count of insertion thread
+ static size_t s_nDeleteThreadCount; // count of deletion thread
+ static size_t s_nThreadPassCount; // pass count for each thread
+ static size_t s_nMaxLoadFactor; // maximum load factor
+
+ static size_t s_nCuckooInitialSize; // initial size for CuckooSet
+ static size_t s_nCuckooProbesetSize; // CuckooSet probeset size (only for list-based probeset)
+ static size_t s_nCuckooProbesetThreshold; // CUckooSet probeset threshold (0 - use default)
+
+ static size_t s_nFeldmanSet_HeadBits;
+ static size_t s_nFeldmanSet_ArrayBits;
+
+ static size_t s_nLoadFactor;
+ static std::vector<std::string> m_arrString;
+
+ static void SetUpTestCase();
+ static void TearDownTestCase();
+
+ private:
+ typedef std::string key_type;
+ typedef size_t value_type;
+
+ enum {
+ insert_thread,
+ delete_thread,
+ extract_thread
+ };
+
+ template <class Set>
+ class Inserter: public cds_test::thread
+ {
+ typedef cds_test::thread base_class;
+
+ Set& m_Set;
+ typedef typename Set::value_type keyval_type;
+
+ public:
+ size_t m_nInsertSuccess = 0;
+ size_t m_nInsertFailed = 0;
+
+ public:
+ Inserter( cds_test::thread_pool& pool, Set& set )
+ : base_class( pool, insert_thread )
+ , m_Set( set )
+ {}
+
+ Inserter( Inserter& src )
+ : base_class( src )
+ , m_Set( src.m_Set )
+ {}
+
+ virtual thread * clone()
+ {
+ return new Inserter( *this );
+ }
+
+ virtual void test()
+ {
+ Set& rSet = m_Set;
+
+ Set_InsDel_string& fixture = pool().template fixture<Set_InsDel_string>();
+ size_t nArrSize = m_arrString.size();
+ size_t const nSetSize = fixture.s_nSetSize;
+ size_t const nPassCount = fixture.s_nThreadPassCount;
+
+ if ( id() & 1 ) {
+ for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
+ for ( size_t nItem = 0; nItem < nSetSize; ++nItem ) {
+ if ( rSet.insert( keyval_type( m_arrString[nItem % nArrSize], nItem * 8 )))
+ ++m_nInsertSuccess;
+ else
+ ++m_nInsertFailed;
+ }
+ }
+ }
+ else {
+ for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
+ for ( size_t nItem = nSetSize; nItem > 0; --nItem ) {
+ if ( rSet.insert( keyval_type( m_arrString[nItem % nArrSize], nItem * 8 )))
+ ++m_nInsertSuccess;
+ else
+ ++m_nInsertFailed;
+ }
+ }
+ }
+ }
+ };
+
+ template <class Set>
+ class Deleter: public cds_test::thread
+ {
+ typedef cds_test::thread base_class;
+
+ Set& m_Set;
+ public:
+ size_t m_nDeleteSuccess = 0;
+ size_t m_nDeleteFailed = 0;
+
+ public:
+ Deleter( cds_test::thread_pool& pool, Set& set )
+ : base_class( pool, delete_thread )
+ , m_Set( set )
+ {}
+
+ Deleter( Deleter& src )
+ : base_class( src )
+ , m_Set( src.m_Set )
+ {}
+
+ virtual thread * clone()
+ {
+ return new Deleter( *this );
+ }
+
+ virtual void test()
+ {
+ Set& rSet = m_Set;
+
+ Set_InsDel_string& fixture = pool().template fixture<Set_InsDel_string>();
+ size_t nArrSize = m_arrString.size();
+ size_t const nSetSize = fixture.s_nSetSize;
+ size_t const nPassCount = fixture.s_nThreadPassCount;
+
+ if ( id() & 1 ) {
+ for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
+ for ( size_t nItem = 0; nItem < nSetSize; ++nItem ) {
+ if ( rSet.erase( m_arrString[nItem % nArrSize] ))
+ ++m_nDeleteSuccess;
+ else
+ ++m_nDeleteFailed;
+ }
+ }
+ }
+ else {
+ for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
+ for ( size_t nItem = nSetSize; nItem > 0; --nItem ) {
+ if ( rSet.erase( m_arrString[nItem % nArrSize] ))
+ ++m_nDeleteSuccess;
+ else
+ ++m_nDeleteFailed;
+ }
+ }
+ }
+ }
+ };
+
+ template <typename GC, class Set>
+ class Extractor: public cds_test::thread
+ {
+ typedef cds_test::thread base_class;
+ Set& m_Set;
+
+ public:
+ size_t m_nDeleteSuccess = 0;
+ size_t m_nDeleteFailed = 0;
+
+ public:
+ Extractor( cds_test::thread_pool& pool, Set& set )
+ : base_class( pool, extract_thread )
+ , m_Set( set )
+ {}
+
+ Extractor( Extractor& src )
+ : base_class( src )
+ , m_Set( src.m_Set )
+ {}
+
+ virtual thread * clone()
+ {
+ return new Extractor( *this );
+ }
+
+ virtual void test()
+ {
+ Set& rSet = m_Set;
+
+ typename Set::guarded_ptr gp;
+
+ Set_InsDel_string& fixture = pool().template fixture<Set_InsDel_string>();
+ size_t nArrSize = m_arrString.size();
+ size_t const nSetSize = fixture.s_nSetSize;
+ size_t const nPassCount = fixture.s_nThreadPassCount;
+
+ if ( id() & 1 ) {
+ for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
+ for ( size_t nItem = 0; nItem < nSetSize; ++nItem ) {
+ gp = rSet.extract( m_arrString[nItem % nArrSize] );
+ if ( gp )
+ ++m_nDeleteSuccess;
+ else
+ ++m_nDeleteFailed;
+ gp.release();
+ }
+ }
+ }
+ else {
+ for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
+ for ( size_t nItem = nSetSize; nItem > 0; --nItem ) {
+ gp = rSet.extract( m_arrString[nItem % nArrSize] );
+ if ( gp )
+ ++m_nDeleteSuccess;
+ else
+ ++m_nDeleteFailed;
+ gp.release();
+ }
+ }
+ }
+ }
+ };
+
+ template <typename RCU, class Set>
+ class Extractor<cds::urcu::gc<RCU>, Set >: public cds_test::thread
+ {
+ typedef cds_test::thread base_class;
+ Set& m_Set;
+
+ public:
+ size_t m_nDeleteSuccess = 0;
+ size_t m_nDeleteFailed = 0;
+
+ public:
+ Extractor( cds_test::thread_pool& pool, Set& set )
+ : base_class( pool, extract_thread )
+ , m_Set( set )
+ {}
+
+ Extractor( Extractor& src )
+ : base_class( src )
+ , m_Set( src.m_Set )
+ {}
+
+ virtual thread * clone()
+ {
+ return new Extractor( *this );
+ }
+
+ virtual void test()
+ {
+ Set& rSet = m_Set;
+
+ typename Set::exempt_ptr xp;
+
+ Set_InsDel_string& fixture = pool().template fixture<Set_InsDel_string>();
+ size_t nArrSize = m_arrString.size();
+ size_t const nSetSize = fixture.s_nSetSize;
+ size_t const nPassCount = fixture.s_nThreadPassCount;
+
+ if ( id() & 1 ) {
+ for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
+ for ( size_t nItem = 0; nItem < nSetSize; ++nItem ) {
+ if ( Set::c_bExtractLockExternal ) {
+ typename Set::rcu_lock l;
+ xp = rSet.extract( m_arrString[nItem % nArrSize] );
+ if ( xp )
+ ++m_nDeleteSuccess;
+ else
+ ++m_nDeleteFailed;
+ }
+ else {
+ xp = rSet.extract( m_arrString[nItem % nArrSize] );
+ if ( xp )
+ ++m_nDeleteSuccess;
+ else
+ ++m_nDeleteFailed;
+ }
+ xp.release();
+ }
+ }
+ }
+ else {
+ for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
+ for ( size_t nItem = nSetSize; nItem > 0; --nItem ) {
+ if ( Set::c_bExtractLockExternal ) {
+ typename Set::rcu_lock l;
+ xp = rSet.extract( m_arrString[nItem % nArrSize] );
+ if ( xp )
+ ++m_nDeleteSuccess;
+ else
+ ++m_nDeleteFailed;
+ }
+ else {
+ xp = rSet.extract( m_arrString[nItem % nArrSize] );
+ if ( xp )
+ ++m_nDeleteSuccess;
+ else
+ ++m_nDeleteFailed;
+ }
+ xp.release();
+ }
+ }
+ }
+ }
+ };
+
+ protected:
+ template <class Set>
+ void do_test( Set& testSet )
+ {
+ typedef Inserter<Set> InserterThread;
+ typedef Deleter<Set> DeleterThread;
+
+ cds_test::thread_pool& pool = get_pool();
+ pool.add( new InserterThread( pool, testSet ), s_nInsertThreadCount );
+ pool.add( new DeleterThread( pool, testSet ), s_nDeleteThreadCount );
+
+ propout() << std::make_pair( "insert_thread_count", s_nInsertThreadCount )
+ << std::make_pair( "delete_thread_count", s_nDeleteThreadCount )
+ << std::make_pair( "thread_pass_count", s_nThreadPassCount )
+ << std::make_pair( "set_size", s_nSetSize );
+
+ std::chrono::milliseconds duration = pool.run();
+
+ propout() << std::make_pair( "duration", duration );
+
+ size_t nInsertSuccess = 0;
+ size_t nInsertFailed = 0;
+ size_t nDeleteSuccess = 0;
+ size_t nDeleteFailed = 0;
+ for ( size_t i = 0; i < pool.size(); ++i ) {
+ cds_test::thread& thr = pool.get( i );
+ switch ( thr.type() ) {
+ case insert_thread:
+ {
+ InserterThread& inserter = static_cast<InserterThread&>( thr );
+ nInsertSuccess += inserter.m_nInsertSuccess;
+ nInsertFailed += inserter.m_nInsertFailed;
+ }
+ break;
+ case delete_thread:
+ {
+ DeleterThread& deleter = static_cast<DeleterThread&>(thr);
+ nDeleteSuccess += deleter.m_nDeleteSuccess;
+ nDeleteFailed += deleter.m_nDeleteFailed;
+ }
+ break;
+ default:
+ assert( false ); // Forgot anything?..
+ }
+ }
+
+ propout()
+ << std::make_pair( "insert_success", nInsertSuccess )
+ << std::make_pair( "delete_success", nDeleteSuccess )
+ << std::make_pair( "insert_failed", nInsertFailed )
+ << std::make_pair( "delete_failed", nDeleteFailed )
+ << std::make_pair( "final_set_size", testSet.size() );
+
+ testSet.clear();
+ EXPECT_TRUE( testSet.empty() );
+
+ additional_check( testSet );
+ print_stat( propout(), testSet );
+ additional_cleanup( testSet );
+ }
+
+ template <class Set>
+ void do_test_extract( Set& testSet )
+ {
+ typedef Inserter<Set> InserterThread;
+ typedef Deleter<Set> DeleterThread;
+ typedef Extractor<typename Set::gc, Set> ExtractThread;
+
+ size_t const nDelThreadCount = s_nDeleteThreadCount / 2;
+ size_t const nExtractThreadCount = s_nDeleteThreadCount - nDelThreadCount;
+
+ cds_test::thread_pool& pool = get_pool();
+ pool.add( new InserterThread( pool, testSet ), s_nInsertThreadCount );
+ pool.add( new DeleterThread( pool, testSet ), nDelThreadCount );
+ pool.add( new ExtractThread( pool, testSet ), nExtractThreadCount );
+
+ propout() << std::make_pair( "insert_thread_count", s_nInsertThreadCount )
+ << std::make_pair( "delete_thread_count", nDelThreadCount )
+ << std::make_pair( "extract_thread_count", nExtractThreadCount )
+ << std::make_pair( "thread_pass_count", s_nThreadPassCount )
+ << std::make_pair( "set_size", s_nSetSize );
+
+ std::chrono::milliseconds duration = pool.run();
+
+ propout() << std::make_pair( "duration", duration );
+
+ size_t nInsertSuccess = 0;
+ size_t nInsertFailed = 0;
+ size_t nDeleteSuccess = 0;
+ size_t nDeleteFailed = 0;
+ size_t nExtractSuccess = 0;
+ size_t nExtractFailed = 0;
+ for ( size_t i = 0; i < pool.size(); ++i ) {
+ cds_test::thread& thr = pool.get( i );
+ switch ( thr.type() ) {
+ case insert_thread:
+ {
+ InserterThread& inserter = static_cast<InserterThread&>(thr);
+ nInsertSuccess += inserter.m_nInsertSuccess;
+ nInsertFailed += inserter.m_nInsertFailed;
+ }
+ break;
+ case delete_thread:
+ {
+ DeleterThread& deleter = static_cast<DeleterThread&>(thr);
+ nDeleteSuccess += deleter.m_nDeleteSuccess;
+ nDeleteFailed += deleter.m_nDeleteFailed;
+ }
+ break;
+ case extract_thread:
+ {
+ ExtractThread& extractor = static_cast<ExtractThread&>(thr);
+ nExtractSuccess += extractor.m_nDeleteSuccess;
+ nExtractFailed += extractor.m_nDeleteFailed;
+ }
+ break;
+ default:
+ assert( false ); // Forgot anything?..
+ }
+ }
+
+ propout()
+ << std::make_pair( "insert_success", nInsertSuccess )
+ << std::make_pair( "delete_success", nDeleteSuccess )
+ << std::make_pair( "extract_success", nExtractSuccess )
+ << std::make_pair( "insert_failed", nInsertFailed )
+ << std::make_pair( "delete_failed", nDeleteFailed )
+ << std::make_pair( "extract_failed", nExtractFailed )
+ << std::make_pair( "final_set_size", testSet.size() );
+
+ testSet.clear();
+ EXPECT_TRUE( testSet.empty() );
+
+ additional_check( testSet );
+ print_stat( propout(), testSet );
+ additional_cleanup( testSet );
+ }
+
+ template <class Set>
+ void run_test()
+ {
+ ASSERT_TRUE( m_arrString.size() > 0 );
+
+ Set s( *this );
+ do_test( s );
+ }
+
+ template <class Set>
+ void run_test_extract()
+ {
+ ASSERT_TRUE( m_arrString.size() > 0 );
+
+ Set s( *this );
+ do_test_extract( s );
+ }
+ };
+
+ class Set_InsDel_string_LF: public Set_InsDel_string
+ , public ::testing::WithParamInterface<size_t>
+ {
+ public:
+ template <class Set>
+ void run_test()
+ {
+ s_nLoadFactor = GetParam();
+ propout() << std::make_pair( "load_factor", s_nLoadFactor );
+ Set_InsDel_string::run_test<Set>();
+ }
+
+ template <class Set>
+ void run_test_extract()
+ {
+ s_nLoadFactor = GetParam();
+ propout() << std::make_pair( "load_factor", s_nLoadFactor );
+ Set_InsDel_string::run_test_extract<Set>();
+ }
+
+ static std::vector<size_t> get_load_factors();
+ };
+
+} // namespace set
--- /dev/null
+/*
+ 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 "set_insdel_string.h"
+#include "set_type_cuckoo.h"
+
+namespace set {
+
+ CDSSTRESS_CuckooSet( Set_InsDel_string, run_test, std::string, size_t )
+
+} // namespace set
--- /dev/null
+/*
+ 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 "set_insdel_string.h"
+#include "set_type_ellen_bintree.h"
+
+namespace set {
+
+ CDSSTRESS_EllenBinTreeSet( Set_InsDel_string, run_test_extract, std::string, size_t )
+
+} // namespace set
--- /dev/null
+/*
+ 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 "set_insdel_string.h"
+#include "set_type_feldman_hashset.h"
+
+namespace set {
+
+ CDSSTRESS_FeldmanHashSet_stdhash( Set_InsDel_string, run_test_extract, std::string, size_t )
+ CDSSTRESS_FeldmanHashSet_city( Set_InsDel_string, run_test_extract, std::string, size_t )
+
+} // namespace set
--- /dev/null
+/*
+ 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 "set_insdel_string.h"
+#include "set_type_michael.h"
+
+namespace set {
+
+ CDSSTRESS_MichaelSet( Set_InsDel_string_LF, run_test_extract, std::string, size_t )
+
+} // namespace set
--- /dev/null
+/*
+ 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 "set_insdel_string.h"
+#include "set_type_skip_list.h"
+
+namespace set {
+
+ CDSSTRESS_SkipListSet( Set_InsDel_string, run_test_extract, std::string, size_t )
+
+} // namespace set
--- /dev/null
+/*
+ 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 "set_insdel_string.h"
+#include "set_type_split_list.h"
+
+namespace set {
+
+ CDSSTRESS_SplitListSet( Set_InsDel_string_LF, run_test_extract, std::string, size_t )
+
+} // namespace set
--- /dev/null
+/*
+ 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 "set_insdel_string.h"
+#include "set_type_std.h"
+
+namespace set {
+ CDSSTRESS_StdSet( Set_InsDel_string, run_test, std::string, size_t )
+} // namespace set
+
--- /dev/null
+/*
+ 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 "set_insdel_string.h"
+#include "set_type_striped.h"
+
+namespace set {
+
+ CDSSTRESS_StripedSet( Set_InsDel_string_LF, run_test, std::string, size_t )
+
+} // namespace set
+
}
};
+ template <>
+ struct less<std::string>
+ {
+ bool operator ()( std::string const& k1, std::string const& k2 ) const
+ {
+ return cmp<std::string>()( k1, k2 ) < 0;
+ }
+ bool operator ()( std::string const& k1, char const* k2 ) const
+ {
+ return cmp<std::string>()( k1, k2 ) < 0;
+ }
+ bool operator ()( char const* k1, std::string const& k2 ) const
+ {
+ return cmp<std::string>()( k1, k2 ) < 0;
+ }
+ };
+
template <typename T>
struct hash
{
}
};
+ template <>
+ struct hash<std::string>
+ {
+ typedef size_t result_type;
+ typedef std::string argument_type;
+
+ size_t operator()( std::string const& k ) const
+ {
+ return std::hash<std::string>()(k);
+ }
+ };
// forward
template <typename ImplSelector, typename Key, typename Value>
hash_type hash;
- /*explicit*/ key_val( key_type const& k ): base(k), hash( hasher()( k )) {}
+ explicit key_val( key_type const& k ): base(k), hash( hasher()( k )) {}
key_val( key_type const& k, value_type const& v ): base(k, v), hash( hasher()( k )) {}
template <typename K>
- /*explicit*/ key_val( K const& k ): base(k), hash( hasher()( k )) {}
+ explicit key_val( K const& k ): base(k), hash( hasher()( k )) {}
template <typename K, typename T>
key_val( K const& k, T const& v ): base(k, v), hash( hasher()( k )) {}
}
#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-# define CDSSTRESS_FeldmanHashSet_SHRCU( fixture, test_case, key_type, value_type ) \
+# define CDSSTRESS_FeldmanHashSet_fixed_SHRCU( fixture, test_case, key_type, value_type ) \
CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_fixed, key_type, value_type ) \
CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_fixed, key_type, value_type ) \
CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_fixed_stat, key_type, value_type ) \
CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_fixed_stat, key_type, value_type )
+
+# define CDSSTRESS_FeldmanHashSet_stdhash_SHRCU( fixture, test_case, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_stdhash, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_stdhash, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_stdhash_stat, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_stdhash_stat, key_type, value_type )
+
+# if CDS_BUILD_BITS == 64
+# define CDSSTRESS_FeldmanHashSet_city_SHRCU( fixture, test_case, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_city64, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_city64, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_city64_stat, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_city64_stat, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_city128, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_city128, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_shb_city128_stat, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_sht_city128_stat, key_type, value_type )
+# else
+# define CDSSTRESS_FeldmanHashSet_city_SHRCU( fixture, test_case, key_type, value_type )
+# endif
+
#else
-# define CDSSTRESS_FeldmanHashSet_SHRCU( fixture, test_case, key_type, value_type )
+# define CDSSTRESS_FeldmanHashSet_fixed_SHRCU( fixture, test_case, key_type, value_type )
+# define CDSSTRESS_FeldmanHashSet_stdhash_SHRCU( fixture, test_case, key_type, value_type )
+# define CDSSTRESS_FeldmanHashSet_city_SHRCU( fixture, test_case, key_type, value_type )
#endif
-#define CDSSTRESS_FeldmanHashSet( fixture, test_case, key_type, value_type ) \
+#define CDSSTRESS_FeldmanHashSet_fixed( fixture, test_case, key_type, value_type ) \
CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_fixed, key_type, value_type ) \
CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_fixed, key_type, value_type ) \
CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_fixed, key_type, value_type ) \
CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_fixed_stat, key_type, value_type ) \
CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_fixed_stat, key_type, value_type ) \
CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_fixed_stat, key_type, value_type ) \
- CDSSTRESS_FeldmanHashSet_SHRCU( fixture, test_case, key_type, value_type )
+ CDSSTRESS_FeldmanHashSet_fixed_SHRCU( fixture, test_case, key_type, value_type )
+
+#define CDSSTRESS_FeldmanHashSet_stdhash( fixture, test_case, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_stdhash, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_stdhash, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_stdhash, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_stdhash, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_stdhash, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_stdhash_stat, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_stdhash_stat, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_stdhash_stat, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_stdhash_stat, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_stdhash_stat, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_stdhash_SHRCU( fixture, test_case, key_type, value_type )
+
+#if CDS_BUILD_BITS == 64
+# define CDSSTRESS_FeldmanHashSet_city( fixture, test_case, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_city64, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_city64, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_city64, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_city64, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_city64, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_city64_stat, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_city64_stat, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_city64_stat, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_city64_stat, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_city64_stat, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_city128, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_city128, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_city128, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_city128, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_city128, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_hp_city128_stat, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_dhp_city128_stat, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpi_city128_stat, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpb_city128_stat, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_case( fixture, test_case, FeldmanHashSet_rcu_gpt_city128_stat, key_type, value_type ) \
+ CDSSTRESS_FeldmanHashSet_city_SHRCU( fixture, test_case, key_type, value_type )
+#else
+# define CDSSTRESS_FeldmanHashSet_city( fixture, test_case, key_type, value_type )
+#endif
#endif // #ifndef CDSUNIT_SET_TYPE_FELDMAN_HASHSET_H
add_test(NAME ${PACKAGE_NAME} COMMAND ${PACKAGE_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/map2)
-add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/set2)
CDSUNIT_DECLARE_CuckooMap
CDSUNIT_DECLARE_StdMap
- CPPUNIT_TEST_SUITE(Map_InsDel_string)
+ CPPUNIT_TEST_SUITE_(Map_InsDel_string, "map_insdel_func")
CDSUNIT_TEST_MichaelMap
CDSUNIT_TEST_SplitList
CDSUNIT_TEST_SkipListMap
+++ /dev/null
-set(PACKAGE_NAME cdsu-set)
-
-set(CDSUNIT_SET_SOURCES
- set_insdel_string.cpp
- set_insdel_string_cuckoo.cpp
- set_insdel_string_ellentree.cpp
- set_insdel_string_michael.cpp
- set_insdel_string_feldmanhashset.cpp
- set_insdel_string_skip.cpp
- set_insdel_string_split.cpp
- set_insdel_string_striped.cpp
- set_insdel_string_std.cpp
-)
-
-add_executable(${PACKAGE_NAME} ${CDSUNIT_SET_SOURCES} $<TARGET_OBJECTS:${TEST_COMMON}>)
-target_link_libraries(${PACKAGE_NAME} ${CDS_SHARED_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
+++ /dev/null
-/*
- 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.
-*/
-
-#define CDSUNIT_DECLARE_StdSet \
- TEST_CASE( tag_StdSet, StdSet_Spin) \
- TEST_CASE( tag_StdSet, StdSet_Mutex) \
- TEST_CASE( tag_StdSet, StdHashSet_Spin)
-
-#define CDSUNIT_TEST_StdSet \
- CPPUNIT_TEST(StdSet_Spin) \
- CPPUNIT_TEST(StdSet_Mutex) \
- CPPUNIT_TEST(StdHashSet_Spin)
-
-//********************************************************************
-// MichaelHashSet
-
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-# define CDSUNIT_DECLARE_MichaelSet_RCU_signal \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_RCU_SHB_cmp_stdAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_RCU_SHB_less_michaelAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_RCU_SHT_cmp_stdAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_RCU_SHT_less_michaelAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_Lazy_RCU_SHB_cmp_stdAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_Lazy_RCU_SHB_less_michaelAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_Lazy_RCU_SHT_cmp_stdAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_Lazy_RCU_SHT_less_michaelAlloc)
-
-# define CDSUNIT_TEST_MichaelSet_RCU_signal \
- CPPUNIT_TEST(MichaelSet_RCU_SHB_cmp_stdAlloc) \
- CPPUNIT_TEST(MichaelSet_RCU_SHB_less_michaelAlloc) \
- CPPUNIT_TEST(MichaelSet_RCU_SHT_cmp_stdAlloc) \
- CPPUNIT_TEST(MichaelSet_RCU_SHT_less_michaelAlloc) \
- CPPUNIT_TEST(MichaelSet_Lazy_RCU_SHB_cmp_stdAlloc) \
- CPPUNIT_TEST(MichaelSet_Lazy_RCU_SHB_less_michaelAlloc) \
- CPPUNIT_TEST(MichaelSet_Lazy_RCU_SHT_cmp_stdAlloc) \
- CPPUNIT_TEST(MichaelSet_Lazy_RCU_SHT_less_michaelAlloc)
-#else
-# define CDSUNIT_DECLARE_MichaelSet_RCU_signal
-# define CDSUNIT_TEST_MichaelSet_RCU_signal
-#endif
-
-
-#define CDSUNIT_DECLARE_MichaelSet \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_HP_cmp_stdAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_HP_less_michaelAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_DHP_cmp_stdAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_DHP_less_michaelAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_RCU_GPI_cmp_stdAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_RCU_GPI_less_michaelAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_RCU_GPB_cmp_stdAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_RCU_GPB_less_michaelAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_RCU_GPT_cmp_stdAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_RCU_GPT_less_michaelAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_Lazy_HP_cmp_stdAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_Lazy_HP_less_michaelAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_Lazy_DHP_cmp_stdAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_Lazy_DHP_less_michaelAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_Lazy_RCU_GPI_cmp_stdAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_Lazy_RCU_GPI_less_michaelAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_Lazy_RCU_GPB_cmp_stdAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_Lazy_RCU_GPB_less_michaelAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_Lazy_RCU_GPT_cmp_stdAlloc) \
- TEST_CASE(tag_MichaelHashSet, MichaelSet_Lazy_RCU_GPT_less_michaelAlloc) \
- CDSUNIT_DECLARE_MichaelSet_RCU_signal
-
-#define CDSUNIT_TEST_MichaelSet \
- CPPUNIT_TEST(MichaelSet_HP_cmp_stdAlloc) \
- CPPUNIT_TEST(MichaelSet_HP_less_michaelAlloc) \
- CPPUNIT_TEST(MichaelSet_DHP_cmp_stdAlloc) \
- CPPUNIT_TEST(MichaelSet_DHP_less_michaelAlloc) \
- CPPUNIT_TEST(MichaelSet_RCU_GPI_cmp_stdAlloc) \
- CPPUNIT_TEST(MichaelSet_RCU_GPI_less_michaelAlloc) \
- CPPUNIT_TEST(MichaelSet_RCU_GPB_cmp_stdAlloc) \
- CPPUNIT_TEST(MichaelSet_RCU_GPB_less_michaelAlloc) \
- CPPUNIT_TEST(MichaelSet_RCU_GPT_cmp_stdAlloc) \
- CPPUNIT_TEST(MichaelSet_RCU_GPT_less_michaelAlloc) \
- CPPUNIT_TEST(MichaelSet_Lazy_HP_cmp_stdAlloc) \
- CPPUNIT_TEST(MichaelSet_Lazy_HP_less_michaelAlloc) \
- CPPUNIT_TEST(MichaelSet_Lazy_DHP_cmp_stdAlloc) \
- CPPUNIT_TEST(MichaelSet_Lazy_DHP_less_michaelAlloc) \
- CPPUNIT_TEST(MichaelSet_Lazy_RCU_GPI_cmp_stdAlloc) \
- CPPUNIT_TEST(MichaelSet_Lazy_RCU_GPI_less_michaelAlloc) \
- CPPUNIT_TEST(MichaelSet_Lazy_RCU_GPB_cmp_stdAlloc) \
- CPPUNIT_TEST(MichaelSet_Lazy_RCU_GPB_less_michaelAlloc) \
- CPPUNIT_TEST(MichaelSet_Lazy_RCU_GPT_cmp_stdAlloc) \
- CPPUNIT_TEST(MichaelSet_Lazy_RCU_GPT_less_michaelAlloc) \
- CDSUNIT_TEST_MichaelSet_RCU_signal
-
-//********************************************************************
-// SplitListSet
-
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-# define CDSUNIT_DECLARE_SplitList_RCU_signal \
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_SHB_dyn_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_SHB_dyn_cmp_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_SHB_st_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_SHB_dyn_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_SHB_st_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_SHB_st_less_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_SHT_dyn_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_SHT_dyn_cmp_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_SHT_st_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_SHT_dyn_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_SHT_st_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_SHT_st_less_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_SHB_dyn_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_SHB_dyn_cmp_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_SHB_st_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_SHB_dyn_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_SHB_st_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_SHB_st_less_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_SHT_dyn_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_SHT_dyn_cmp_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_SHT_st_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_SHT_dyn_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_SHT_st_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_SHT_st_less_stat)
-
-# define CDSUNIT_TEST_SplitList_RCU_signal \
- CPPUNIT_TEST(SplitList_Michael_RCU_SHB_dyn_cmp)\
- CPPUNIT_TEST(SplitList_Michael_RCU_SHB_dyn_cmp_stat)\
- CPPUNIT_TEST(SplitList_Michael_RCU_SHB_st_cmp)\
- CPPUNIT_TEST(SplitList_Michael_RCU_SHB_dyn_less)\
- CPPUNIT_TEST(SplitList_Michael_RCU_SHB_st_less)\
- CPPUNIT_TEST(SplitList_Michael_RCU_SHB_st_less_stat)\
- CPPUNIT_TEST(SplitList_Michael_RCU_SHT_dyn_cmp)\
- CPPUNIT_TEST(SplitList_Michael_RCU_SHT_dyn_cmp_stat)\
- CPPUNIT_TEST(SplitList_Michael_RCU_SHT_st_cmp)\
- CPPUNIT_TEST(SplitList_Michael_RCU_SHT_dyn_less)\
- CPPUNIT_TEST(SplitList_Michael_RCU_SHT_st_less)\
- CPPUNIT_TEST(SplitList_Michael_RCU_SHT_st_less_stat)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_SHB_dyn_cmp)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_SHB_dyn_cmp_stat)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_SHB_st_cmp)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_SHB_dyn_less)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_SHB_st_less)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_SHB_st_less_stat)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_SHT_dyn_cmp)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_SHT_dyn_cmp_stat)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_SHT_st_cmp)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_SHT_dyn_less)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_SHT_st_less)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_SHT_st_less_stat)
-
-#else
-# define CDSUNIT_DECLARE_SplitList_RCU_signal
-# define CDSUNIT_TEST_SplitList_RCU_signal
-#endif
-
-#define CDSUNIT_DECLARE_SplitList \
- TEST_CASE(tag_SplitListSet, SplitList_Michael_HP_dyn_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_HP_dyn_cmp_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_HP_st_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_HP_dyn_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_HP_st_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_HP_st_less_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_DHP_dyn_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_DHP_dyn_cmp_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_DHP_st_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_DHP_dyn_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_DHP_st_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_DHP_st_less_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_GPI_dyn_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_GPI_dyn_cmp_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_GPI_st_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_GPI_dyn_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_GPI_st_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_GPI_st_less_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_GPB_dyn_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_GPB_dyn_cmp_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_GPB_st_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_GPB_dyn_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_GPB_st_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_GPB_st_less_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_GPT_dyn_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_GPT_dyn_cmp_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_GPT_st_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_GPT_dyn_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_GPT_st_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Michael_RCU_GPT_st_less_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_HP_dyn_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_HP_dyn_cmp_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_HP_st_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_HP_dyn_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_HP_st_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_HP_st_less_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_DHP_dyn_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_DHP_dyn_cmp_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_DHP_st_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_DHP_dyn_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_DHP_st_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_DHP_st_less_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_GPI_dyn_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_GPI_dyn_cmp_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_GPI_st_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_GPI_dyn_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_GPI_st_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_GPI_st_less_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_GPB_dyn_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_GPB_dyn_cmp_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_GPB_st_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_GPB_dyn_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_GPB_st_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_GPB_st_less_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_GPT_dyn_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_GPT_dyn_cmp_stat)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_GPT_st_cmp)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_GPT_dyn_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_GPT_st_less)\
- TEST_CASE(tag_SplitListSet, SplitList_Lazy_RCU_GPT_st_less_stat)\
- CDSUNIT_DECLARE_SplitList_RCU_signal
-
-#define CDSUNIT_TEST_SplitList \
- CPPUNIT_TEST(SplitList_Michael_HP_dyn_cmp)\
- CPPUNIT_TEST(SplitList_Michael_HP_dyn_cmp_stat)\
- CPPUNIT_TEST(SplitList_Michael_HP_st_cmp)\
- CPPUNIT_TEST(SplitList_Michael_HP_dyn_less)\
- CPPUNIT_TEST(SplitList_Michael_HP_st_less)\
- CPPUNIT_TEST(SplitList_Michael_HP_st_less_stat)\
- CPPUNIT_TEST(SplitList_Michael_DHP_dyn_cmp)\
- CPPUNIT_TEST(SplitList_Michael_DHP_dyn_cmp_stat)\
- CPPUNIT_TEST(SplitList_Michael_DHP_st_cmp)\
- CPPUNIT_TEST(SplitList_Michael_DHP_dyn_less)\
- CPPUNIT_TEST(SplitList_Michael_DHP_st_less)\
- CPPUNIT_TEST(SplitList_Michael_DHP_st_less_stat)\
- CPPUNIT_TEST(SplitList_Michael_RCU_GPI_dyn_cmp)\
- CPPUNIT_TEST(SplitList_Michael_RCU_GPI_dyn_cmp_stat)\
- CPPUNIT_TEST(SplitList_Michael_RCU_GPI_st_cmp)\
- CPPUNIT_TEST(SplitList_Michael_RCU_GPI_dyn_less)\
- CPPUNIT_TEST(SplitList_Michael_RCU_GPI_st_less)\
- CPPUNIT_TEST(SplitList_Michael_RCU_GPI_st_less_stat)\
- CPPUNIT_TEST(SplitList_Michael_RCU_GPB_dyn_cmp)\
- CPPUNIT_TEST(SplitList_Michael_RCU_GPB_dyn_cmp_stat)\
- CPPUNIT_TEST(SplitList_Michael_RCU_GPB_st_cmp)\
- CPPUNIT_TEST(SplitList_Michael_RCU_GPB_dyn_less)\
- CPPUNIT_TEST(SplitList_Michael_RCU_GPB_st_less)\
- CPPUNIT_TEST(SplitList_Michael_RCU_GPB_st_less_stat)\
- CPPUNIT_TEST(SplitList_Michael_RCU_GPT_dyn_cmp)\
- CPPUNIT_TEST(SplitList_Michael_RCU_GPT_dyn_cmp_stat)\
- CPPUNIT_TEST(SplitList_Michael_RCU_GPT_st_cmp)\
- CPPUNIT_TEST(SplitList_Michael_RCU_GPT_dyn_less)\
- CPPUNIT_TEST(SplitList_Michael_RCU_GPT_st_less)\
- CPPUNIT_TEST(SplitList_Michael_RCU_GPT_st_less_stat)\
- CPPUNIT_TEST(SplitList_Lazy_HP_dyn_cmp)\
- CPPUNIT_TEST(SplitList_Lazy_HP_dyn_cmp_stat)\
- CPPUNIT_TEST(SplitList_Lazy_HP_st_cmp)\
- CPPUNIT_TEST(SplitList_Lazy_HP_dyn_less)\
- CPPUNIT_TEST(SplitList_Lazy_HP_st_less)\
- CPPUNIT_TEST(SplitList_Lazy_HP_st_less_stat)\
- CPPUNIT_TEST(SplitList_Lazy_DHP_dyn_cmp)\
- CPPUNIT_TEST(SplitList_Lazy_HP_st_less_stat)\
- CPPUNIT_TEST(SplitList_Lazy_DHP_st_cmp)\
- CPPUNIT_TEST(SplitList_Lazy_DHP_dyn_less)\
- CPPUNIT_TEST(SplitList_Lazy_DHP_st_less)\
- CPPUNIT_TEST(SplitList_Lazy_DHP_st_less_stat)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_GPI_dyn_cmp)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_GPI_dyn_cmp_stat)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_GPI_st_cmp)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_GPI_dyn_less)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_GPI_st_less)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_GPI_st_less_stat)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_GPB_dyn_cmp)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_GPB_dyn_cmp_stat)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_GPB_st_cmp)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_GPB_dyn_less)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_GPB_st_less)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_GPB_st_less_stat)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_GPT_dyn_cmp)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_GPT_dyn_cmp_stat)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_GPT_st_cmp)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_GPT_dyn_less)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_GPT_st_less)\
- CPPUNIT_TEST(SplitList_Lazy_RCU_GPT_st_less_stat)\
- CDSUNIT_TEST_SplitList_RCU_signal
-
-//********************************************************************
-// CuckooSet
-
-#define CDSUNIT_DECLARE_CuckooSet \
- TEST_CASE(tag_CuckooSet, CuckooStripedSet_list_unord)\
- TEST_CASE(tag_CuckooSet, CuckooStripedSet_list_unord_stat)\
- TEST_CASE(tag_CuckooSet, CuckooStripedSet_list_ord)\
- TEST_CASE(tag_CuckooSet, CuckooStripedSet_list_ord_stat)\
- TEST_CASE(tag_CuckooSet, CuckooStripedSet_vector_unord)\
- TEST_CASE(tag_CuckooSet, CuckooStripedSet_vector_ord)\
- TEST_CASE(tag_CuckooSet, CuckooStripedSet_vector_unord_stat)\
- TEST_CASE(tag_CuckooSet, CuckooStripedSet_vector_ord_stat)\
- TEST_CASE(tag_CuckooSet, CuckooRefinableSet_list_unord)\
- TEST_CASE(tag_CuckooSet, CuckooRefinableSet_list_ord)\
- TEST_CASE(tag_CuckooSet, CuckooRefinableSet_list_unord_stat)\
- TEST_CASE(tag_CuckooSet, CuckooRefinableSet_list_ord_stat)\
- TEST_CASE(tag_CuckooSet, CuckooRefinableSet_vector_unord)\
- TEST_CASE(tag_CuckooSet, CuckooRefinableSet_vector_unord_stat)\
- TEST_CASE(tag_CuckooSet, CuckooRefinableSet_vector_ord) \
- TEST_CASE(tag_CuckooSet, CuckooRefinableSet_vector_ord_stat) \
- TEST_CASE(tag_CuckooSet, CuckooStripedSet_list_unord_storehash)\
- TEST_CASE(tag_CuckooSet, CuckooStripedSet_list_ord_storehash)\
- TEST_CASE(tag_CuckooSet, CuckooStripedSet_vector_unord_storehash)\
- TEST_CASE(tag_CuckooSet, CuckooStripedSet_vector_ord_storehash)\
- TEST_CASE(tag_CuckooSet, CuckooRefinableSet_list_unord_storehash)\
- TEST_CASE(tag_CuckooSet, CuckooRefinableSet_list_ord_storehash)\
- TEST_CASE(tag_CuckooSet, CuckooRefinableSet_vector_unord_storehash)\
- TEST_CASE(tag_CuckooSet, CuckooRefinableSet_vector_ord_storehash)
-
-#define CDSUNIT_TEST_CuckooSet \
- CPPUNIT_TEST(CuckooStripedSet_list_unord)\
- CPPUNIT_TEST(CuckooStripedSet_list_unord_stat)\
- CPPUNIT_TEST(CuckooStripedSet_list_unord_storehash)\
- CPPUNIT_TEST(CuckooStripedSet_list_ord)\
- CPPUNIT_TEST(CuckooStripedSet_list_ord_stat)\
- CPPUNIT_TEST(CuckooStripedSet_list_ord_storehash)\
- CPPUNIT_TEST(CuckooStripedSet_vector_unord)\
- CPPUNIT_TEST(CuckooStripedSet_vector_unord_stat)\
- CPPUNIT_TEST(CuckooStripedSet_vector_unord_storehash)\
- CPPUNIT_TEST(CuckooStripedSet_vector_ord)\
- CPPUNIT_TEST(CuckooStripedSet_vector_ord_stat)\
- CPPUNIT_TEST(CuckooStripedSet_vector_ord_storehash)\
- CPPUNIT_TEST(CuckooRefinableSet_list_unord)\
- CPPUNIT_TEST(CuckooRefinableSet_list_unord_stat)\
- CPPUNIT_TEST(CuckooRefinableSet_list_unord_storehash)\
- CPPUNIT_TEST(CuckooRefinableSet_list_ord)\
- CPPUNIT_TEST(CuckooRefinableSet_list_ord_stat)\
- CPPUNIT_TEST(CuckooRefinableSet_list_ord_storehash)\
- CPPUNIT_TEST(CuckooRefinableSet_vector_unord)\
- CPPUNIT_TEST(CuckooRefinableSet_vector_unord_stat)\
- CPPUNIT_TEST(CuckooRefinableSet_vector_unord_storehash)\
- CPPUNIT_TEST(CuckooRefinableSet_vector_ord) \
- CPPUNIT_TEST(CuckooRefinableSet_vector_ord_stat) \
- CPPUNIT_TEST(CuckooRefinableSet_vector_ord_storehash)
-
-//********************************************************************
-// SkipListSet
-
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-# define CDSUNIT_DECLARE_SkipListSet_RCU_signal \
- TEST_CASE(tag_SkipListSet, SkipListSet_rcu_shb_less_pascal)\
- TEST_CASE(tag_SkipListSet, SkipListSet_rcu_shb_cmp_pascal_stat)\
- TEST_CASE(tag_SkipListSet, SkipListSet_rcu_shb_less_xorshift)\
- TEST_CASE(tag_SkipListSet, SkipListSet_rcu_shb_cmp_xorshift_stat)\
- TEST_CASE(tag_SkipListSet, SkipListSet_rcu_sht_less_pascal)\
- TEST_CASE(tag_SkipListSet, SkipListSet_rcu_sht_cmp_pascal_stat)\
- TEST_CASE(tag_SkipListSet, SkipListSet_rcu_sht_less_xorshift)\
- TEST_CASE(tag_SkipListSet, SkipListSet_rcu_sht_cmp_xorshift_stat)
-
-# define CDSUNIT_TEST_SkipListSet_RCU_signal \
- CPPUNIT_TEST(SkipListSet_rcu_shb_less_pascal)\
- CPPUNIT_TEST(SkipListSet_rcu_shb_cmp_pascal_stat)\
- CPPUNIT_TEST(SkipListSet_rcu_shb_less_xorshift)\
- CPPUNIT_TEST(SkipListSet_rcu_shb_cmp_xorshift_stat)\
- CPPUNIT_TEST(SkipListSet_rcu_sht_less_pascal)\
- CPPUNIT_TEST(SkipListSet_rcu_sht_cmp_pascal_stat)\
- CPPUNIT_TEST(SkipListSet_rcu_sht_less_xorshift)\
- CPPUNIT_TEST(SkipListSet_rcu_sht_cmp_xorshift_stat)
-
-#else
-# define CDSUNIT_DECLARE_SkipListSet_RCU_signal
-# define CDSUNIT_TEST_SkipListSet_RCU_signal
-#endif
-
-#define CDSUNIT_DECLARE_SkipListSet \
- TEST_CASE(tag_SkipListSet, SkipListSet_hp_less_pascal)\
- TEST_CASE(tag_SkipListSet, SkipListSet_hp_cmp_pascal_stat)\
- TEST_CASE(tag_SkipListSet, SkipListSet_hp_less_xorshift)\
- TEST_CASE(tag_SkipListSet, SkipListSet_hp_cmp_xorshift_stat)\
- TEST_CASE(tag_SkipListSet, SkipListSet_dhp_less_pascal)\
- TEST_CASE(tag_SkipListSet, SkipListSet_dhp_cmp_pascal_stat)\
- TEST_CASE(tag_SkipListSet, SkipListSet_dhp_less_xorshift)\
- TEST_CASE(tag_SkipListSet, SkipListSet_dhp_cmp_xorshift_stat)\
- TEST_CASE(tag_SkipListSet, SkipListSet_rcu_gpi_less_pascal)\
- TEST_CASE(tag_SkipListSet, SkipListSet_rcu_gpi_cmp_pascal_stat)\
- TEST_CASE(tag_SkipListSet, SkipListSet_rcu_gpi_less_xorshift)\
- TEST_CASE(tag_SkipListSet, SkipListSet_rcu_gpi_cmp_xorshift_stat)\
- TEST_CASE(tag_SkipListSet, SkipListSet_rcu_gpb_less_pascal)\
- TEST_CASE(tag_SkipListSet, SkipListSet_rcu_gpb_cmp_pascal_stat)\
- TEST_CASE(tag_SkipListSet, SkipListSet_rcu_gpb_less_xorshift)\
- TEST_CASE(tag_SkipListSet, SkipListSet_rcu_gpb_cmp_xorshift_stat)\
- TEST_CASE(tag_SkipListSet, SkipListSet_rcu_gpt_less_pascal)\
- TEST_CASE(tag_SkipListSet, SkipListSet_rcu_gpt_cmp_pascal_stat)\
- TEST_CASE(tag_SkipListSet, SkipListSet_rcu_gpt_less_xorshift)\
- TEST_CASE(tag_SkipListSet, SkipListSet_rcu_gpt_cmp_xorshift_stat)\
- CDSUNIT_DECLARE_SkipListSet_RCU_signal
-
-#define CDSUNIT_TEST_SkipListSet \
- CPPUNIT_TEST(SkipListSet_hp_less_pascal)\
- CPPUNIT_TEST(SkipListSet_hp_cmp_pascal_stat)\
- CPPUNIT_TEST(SkipListSet_hp_less_xorshift)\
- CPPUNIT_TEST(SkipListSet_hp_cmp_xorshift_stat)\
- CPPUNIT_TEST(SkipListSet_dhp_less_pascal)\
- CPPUNIT_TEST(SkipListSet_dhp_cmp_pascal_stat)\
- CPPUNIT_TEST(SkipListSet_dhp_less_xorshift)\
- CPPUNIT_TEST(SkipListSet_dhp_cmp_xorshift_stat)\
- CPPUNIT_TEST(SkipListSet_rcu_gpi_less_pascal)\
- CPPUNIT_TEST(SkipListSet_rcu_gpi_cmp_pascal_stat)\
- CPPUNIT_TEST(SkipListSet_rcu_gpi_less_xorshift)\
- CPPUNIT_TEST(SkipListSet_rcu_gpi_cmp_xorshift_stat)\
- CPPUNIT_TEST(SkipListSet_rcu_gpb_less_pascal)\
- CPPUNIT_TEST(SkipListSet_rcu_gpb_cmp_pascal_stat)\
- CPPUNIT_TEST(SkipListSet_rcu_gpb_less_xorshift)\
- CPPUNIT_TEST(SkipListSet_rcu_gpb_cmp_xorshift_stat)\
- CPPUNIT_TEST(SkipListSet_rcu_gpt_less_pascal)\
- CPPUNIT_TEST(SkipListSet_rcu_gpt_cmp_pascal_stat)\
- CPPUNIT_TEST(SkipListSet_rcu_gpt_less_xorshift)\
- CPPUNIT_TEST(SkipListSet_rcu_gpt_cmp_xorshift_stat)\
- CDSUNIT_TEST_SkipListSet_RCU_signal
-
-//********************************************************************
-// EllenBinTreeSet
-
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-# define CDSUNIT_DECLARE_EllenBinTreeSet_RCU_signal \
- TEST_CASE(tag_EllenBinTreeSet, EllenBinTreeSet_rcu_shb)\
- TEST_CASE(tag_EllenBinTreeSet, EllenBinTreeSet_rcu_shb_stat)\
- TEST_CASE(tag_EllenBinTreeSet, EllenBinTreeSet_rcu_sht)\
- TEST_CASE(tag_EllenBinTreeSet, EllenBinTreeSet_rcu_sht_stat)
-
-# define CDSUNIT_TEST_EllenBinTreeSet_RCU_signal \
- CPPUNIT_TEST(EllenBinTreeSet_rcu_shb)\
- CPPUNIT_TEST(EllenBinTreeSet_rcu_shb_stat)\
- CPPUNIT_TEST(EllenBinTreeSet_rcu_sht)\
- CPPUNIT_TEST(EllenBinTreeSet_rcu_sht_stat)
-#else
-# define CDSUNIT_DECLARE_EllenBinTreeSet_RCU_signal
-# define CDSUNIT_TEST_EllenBinTreeSet_RCU_signal
-#endif
-
-#define CDSUNIT_DECLARE_EllenBinTreeSet \
- TEST_CASE(tag_EllenBinTreeSet, EllenBinTreeSet_hp)\
- TEST_CASE(tag_EllenBinTreeSet, EllenBinTreeSet_yield_hp)\
- TEST_CASE(tag_EllenBinTreeSet, EllenBinTreeSet_hp_stat)\
- TEST_CASE(tag_EllenBinTreeSet, EllenBinTreeSet_dhp)\
- TEST_CASE(tag_EllenBinTreeSet, EllenBinTreeSet_yield_dhp)\
- TEST_CASE(tag_EllenBinTreeSet, EllenBinTreeSet_dhp_stat)\
- TEST_CASE(tag_EllenBinTreeSet, EllenBinTreeSet_rcu_gpi)\
- TEST_CASE(tag_EllenBinTreeSet, EllenBinTreeSet_rcu_gpi_stat)\
- TEST_CASE(tag_EllenBinTreeSet, EllenBinTreeSet_rcu_gpb)\
- TEST_CASE(tag_EllenBinTreeSet, EllenBinTreeSet_yield_rcu_gpb)\
- TEST_CASE(tag_EllenBinTreeSet, EllenBinTreeSet_rcu_gpb_stat)\
- TEST_CASE(tag_EllenBinTreeSet, EllenBinTreeSet_rcu_gpt)\
- TEST_CASE(tag_EllenBinTreeSet, EllenBinTreeSet_rcu_gpt_stat)\
- CDSUNIT_DECLARE_EllenBinTreeSet_RCU_signal
-
-#define CDSUNIT_TEST_EllenBinTreeSet \
- CPPUNIT_TEST(EllenBinTreeSet_hp)\
- CPPUNIT_TEST(EllenBinTreeSet_yield_hp)\
- CPPUNIT_TEST(EllenBinTreeSet_hp_stat)\
- CPPUNIT_TEST(EllenBinTreeSet_dhp)\
- CPPUNIT_TEST(EllenBinTreeSet_yield_dhp)\
- CPPUNIT_TEST(EllenBinTreeSet_dhp_stat)\
- CPPUNIT_TEST(EllenBinTreeSet_rcu_gpi)\
- /*CPPUNIT_TEST(EllenBinTreeSet_rcu_gpi_stat)*/\
- CPPUNIT_TEST(EllenBinTreeSet_rcu_gpb)\
- CPPUNIT_TEST(EllenBinTreeSet_yield_rcu_gpb)\
- CPPUNIT_TEST(EllenBinTreeSet_rcu_gpb_stat)\
- CPPUNIT_TEST(EllenBinTreeSet_rcu_gpt)\
- CPPUNIT_TEST(EllenBinTreeSet_rcu_gpt_stat)\
- CDSUNIT_TEST_EllenBinTreeSet_RCU_signal
-
-//********************************************************************
-// StripedSet
-
-#define CDSUNIT_DECLARE_StripedSet_common \
- TEST_CASE( tag_StripedSet, StripedSet_list) \
- TEST_CASE( tag_StripedSet, StripedSet_vector) \
- TEST_CASE( tag_StripedSet, StripedSet_set) \
- TEST_CASE( tag_StripedSet, StripedSet_hashset) \
- TEST_CASE( tag_StripedSet, StripedSet_boost_unordered_set) \
- TEST_CASE( tag_StripedSet, StripedSet_rational_list) \
- TEST_CASE( tag_StripedSet, StripedSet_rational_vector) \
- TEST_CASE( tag_StripedSet, StripedSet_rational_set) \
- TEST_CASE( tag_StripedSet, StripedSet_rational_hashset) \
- TEST_CASE( tag_StripedSet, StripedSet_rational_boost_unordered_set)
-
-#define CDSUNIT_TEST_StripedSet_common \
- CPPUNIT_TEST(StripedSet_list) \
- CPPUNIT_TEST(StripedSet_vector) \
- CPPUNIT_TEST(StripedSet_set) \
- CPPUNIT_TEST(StripedSet_hashset) \
- CPPUNIT_TEST(StripedSet_boost_unordered_set) \
- CPPUNIT_TEST(StripedSet_rational_list) \
- CPPUNIT_TEST(StripedSet_rational_vector) \
- CPPUNIT_TEST(StripedSet_rational_set) \
- CPPUNIT_TEST(StripedSet_rational_hashset) \
- CPPUNIT_TEST(StripedSet_rational_boost_unordered_set)
-
-#if BOOST_VERSION >= 104800
-# define CDSUNIT_DECLARE_StripedSet_boost_container \
- TEST_CASE( tag_StripedSet, StripedSet_boost_list) \
- TEST_CASE( tag_StripedSet, StripedSet_boost_slist) \
- TEST_CASE( tag_StripedSet, StripedSet_boost_vector) \
- TEST_CASE( tag_StripedSet, StripedSet_boost_stable_vector) \
- TEST_CASE( tag_StripedSet, StripedSet_boost_set) \
- TEST_CASE( tag_StripedSet, StripedSet_rational_boost_list) \
- TEST_CASE( tag_StripedSet, StripedSet_rational_boost_slist) \
- TEST_CASE( tag_StripedSet, StripedSet_rational_boost_vector) \
- TEST_CASE( tag_StripedSet, StripedSet_rational_boost_stable_vector) \
- TEST_CASE( tag_StripedSet, StripedSet_rational_boost_set)
-
-# define CDSUNIT_TEST_StripedSet_boost_container \
- CPPUNIT_TEST(StripedSet_boost_list) \
- CPPUNIT_TEST(StripedSet_boost_slist) \
- CPPUNIT_TEST(StripedSet_boost_vector) \
- CPPUNIT_TEST(StripedSet_boost_stable_vector) \
- CPPUNIT_TEST(StripedSet_boost_set) \
- CPPUNIT_TEST(StripedSet_rational_boost_list) \
- CPPUNIT_TEST(StripedSet_rational_boost_slist) \
- CPPUNIT_TEST(StripedSet_rational_boost_vector) \
- CPPUNIT_TEST(StripedSet_rational_boost_stable_vector) \
- CPPUNIT_TEST(StripedSet_rational_boost_set)
-#else
-# define CDSUNIT_DECLARE_StripedSet_boost_container
-# define CDSUNIT_TEST_StripedSet_boost_container
-#endif
-
-#if BOOST_VERSION >= 104800 && defined(CDS_UNIT_SET_TYPES_ENABLE_BOOST_FLAT_CONTAINERS)
-# define CDSUNIT_DECLARE_StripedSet_boost_flat_container \
- TEST_CASE( tag_StripedSet, StripedSet_boost_flat_set) \
- TEST_CASE( tag_StripedSet, StripedSet_rational_boost_flat_set)
-
-# define CDSUNIT_TEST_StripedSet_boost_flat_container \
- CPPUNIT_TEST(StripedSet_boost_flat_set) \
- CPPUNIT_TEST(StripedSet_rational_boost_flat_set)
-#else
-# define CDSUNIT_DECLARE_StripedSet_boost_flat_container
-# define CDSUNIT_TEST_StripedSet_boost_flat_container
-#endif
-
-#define CDSUNIT_DECLARE_StripedSet \
- CDSUNIT_DECLARE_StripedSet_common \
- CDSUNIT_DECLARE_StripedSet_boost_container \
- CDSUNIT_DECLARE_StripedSet_boost_flat_container
-
-#define CDSUNIT_TEST_StripedSet \
- CDSUNIT_TEST_StripedSet_common \
- CDSUNIT_TEST_StripedSet_boost_container \
- CDSUNIT_TEST_StripedSet_boost_flat_container
-
-
-#define CDSUNIT_DECLARE_RefinableSet_common \
- TEST_CASE( tag_StripedSet, RefinableSet_list) \
- TEST_CASE( tag_StripedSet, RefinableSet_vector) \
- TEST_CASE( tag_StripedSet, RefinableSet_set) \
- TEST_CASE( tag_StripedSet, RefinableSet_hashset) \
- TEST_CASE( tag_StripedSet, RefinableSet_boost_unordered_set) \
- TEST_CASE( tag_StripedSet, RefinableSet_rational_list) \
- TEST_CASE( tag_StripedSet, RefinableSet_rational_vector) \
- TEST_CASE( tag_StripedSet, RefinableSet_rational_set) \
- TEST_CASE( tag_StripedSet, RefinableSet_rational_hashset) \
- TEST_CASE( tag_StripedSet, RefinableSet_rational_boost_unordered_set)
-
-
-//********************************************************************
-// RefinableSet
-
-#define CDSUNIT_TEST_RefinableSet_common \
- CPPUNIT_TEST(RefinableSet_list) \
- CPPUNIT_TEST(RefinableSet_vector) \
- CPPUNIT_TEST(RefinableSet_set) \
- CPPUNIT_TEST(RefinableSet_hashset) \
- CPPUNIT_TEST(RefinableSet_boost_unordered_set) \
- CPPUNIT_TEST(RefinableSet_rational_list) \
- CPPUNIT_TEST(RefinableSet_rational_vector) \
- CPPUNIT_TEST(RefinableSet_rational_set) \
- CPPUNIT_TEST(RefinableSet_rational_hashset) \
- CPPUNIT_TEST(RefinableSet_rational_boost_unordered_set)
-
-#if BOOST_VERSION >= 104800
-# define CDSUNIT_DECLARE_RefinableSet_boost_container \
- TEST_CASE( tag_StripedSet, RefinableSet_boost_list) \
- TEST_CASE( tag_StripedSet, RefinableSet_boost_slist) \
- TEST_CASE( tag_StripedSet, RefinableSet_boost_vector) \
- TEST_CASE( tag_StripedSet, RefinableSet_boost_stable_vector) \
- TEST_CASE( tag_StripedSet, RefinableSet_boost_set) \
- TEST_CASE( tag_StripedSet, RefinableSet_rational_boost_list) \
- TEST_CASE( tag_StripedSet, RefinableSet_rational_boost_slist) \
- TEST_CASE( tag_StripedSet, RefinableSet_rational_boost_vector) \
- TEST_CASE( tag_StripedSet, RefinableSet_rational_boost_stable_vector) \
- TEST_CASE( tag_StripedSet, RefinableSet_rational_boost_set)
-
-# define CDSUNIT_TEST_RefinableSet_boost_container \
- CPPUNIT_TEST(RefinableSet_boost_list) \
- CPPUNIT_TEST(RefinableSet_boost_slist) \
- CPPUNIT_TEST(RefinableSet_boost_vector) \
- CPPUNIT_TEST(RefinableSet_boost_stable_vector) \
- CPPUNIT_TEST(RefinableSet_boost_set) \
- CPPUNIT_TEST(RefinableSet_rational_boost_list) \
- CPPUNIT_TEST(RefinableSet_rational_boost_slist) \
- CPPUNIT_TEST(RefinableSet_rational_boost_vector) \
- CPPUNIT_TEST(RefinableSet_rational_boost_stable_vector) \
- CPPUNIT_TEST(RefinableSet_rational_boost_set)
-#else
-# define CDSUNIT_DECLARE_RefinableSet_boost_container
-# define CDSUNIT_TEST_RefinableSet_boost_container
-#endif
-
-#if BOOST_VERSION >= 104800 && defined(CDS_UNIT_SET_TYPES_ENABLE_BOOST_FLAT_CONTAINERS)
-# define CDSUNIT_DECLARE_RefinableSet_boost_flat_container \
- TEST_CASE( tag_StripedSet, RefinableSet_boost_flat_set) \
- TEST_CASE( tag_StripedSet, RefinableSet_rational_boost_flat_set)
-
-# define CDSUNIT_TEST_RefinableSet_boost_flat_container \
- CPPUNIT_TEST(RefinableSet_boost_flat_set) \
- CPPUNIT_TEST(RefinableSet_rational_boost_flat_set)
-#else
-# define CDSUNIT_DECLARE_RefinableSet_boost_flat_container
-# define CDSUNIT_TEST_RefinableSet_boost_flat_container
-#endif
-
-#define CDSUNIT_DECLARE_RefinableSet \
- CDSUNIT_DECLARE_RefinableSet_common \
- CDSUNIT_DECLARE_RefinableSet_boost_container \
- CDSUNIT_DECLARE_RefinableSet_boost_flat_container
-
-#define CDSUNIT_TEST_RefinableSet \
- CDSUNIT_TEST_RefinableSet_common \
- CDSUNIT_TEST_RefinableSet_boost_container \
- CDSUNIT_TEST_RefinableSet_boost_flat_container
-
-
-//***********************************************
-// FeldmanHashSet
-
-// For fixed-sized key - no hash function is needed
-
-#undef CDSUNIT_DECLARE_FeldmanHashSet_fixed
-#undef CDSUNIT_DECLARE_FeldmanHashSet_fixed_RCU_signal
-#undef CDSUNIT_TEST_FeldmanHashSet_fixed
-#undef CDSUNIT_TEST_FeldmanHashSet_fixed_RCU_signal
-
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-# define CDSUNIT_DECLARE_FeldmanHashSet_fixed_RCU_signal \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_shb_fixed) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_shb_fixed_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_sht_fixed) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_sht_fixed_stat) \
-
-# define CDSUNIT_TEST_FeldmanHashSet_fixed_RCU_signal \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_shb_fixed) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_shb_fixed_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_sht_fixed) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_sht_fixed_stat) \
-
-#else
-# define CDSUNIT_DECLARE_FeldmanHashSet_fixed_RCU_signal
-# define CDSUNIT_TEST_FeldmanHashSet_fixed_RCU_signal
-#endif
-
-#define CDSUNIT_DECLARE_FeldmanHashSet_fixed \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_hp_fixed) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_hp_fixed_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_dhp_fixed) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_dhp_fixed_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpi_fixed) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpi_fixed_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpb_fixed) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpb_fixed_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpt_fixed) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpt_fixed_stat) \
- CDSUNIT_DECLARE_FeldmanHashSet_fixed_RCU_signal
-
-#define CDSUNIT_TEST_FeldmanHashSet_fixed \
- CPPUNIT_TEST(FeldmanHashSet_hp_fixed) \
- CPPUNIT_TEST(FeldmanHashSet_hp_fixed_stat) \
- CPPUNIT_TEST(FeldmanHashSet_dhp_fixed) \
- CPPUNIT_TEST(FeldmanHashSet_dhp_fixed_stat) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpi_fixed) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpi_fixed_stat) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpb_fixed) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpb_fixed_stat) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpt_fixed) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpt_fixed_stat) \
- CDSUNIT_TEST_FeldmanHashSet_fixed_RCU_signal
-
-// std::hash
-#undef CDSUNIT_DECLARE_FeldmanHashSet_stdhash
-#undef CDSUNIT_DECLARE_FeldmanHashSet_stdhash_RCU_signal
-#undef CDSUNIT_TEST_FeldmanHashSet_stdhash
-#undef CDSUNIT_TEST_FeldmanHashSet_stdhash_RCU_signal
-
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-# define CDSUNIT_DECLARE_FeldmanHashSet_stdhash_RCU_signal \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_shb_stdhash) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_shb_stdhash_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_sht_stdhash) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_sht_stdhash_stat) \
-
-# define CDSUNIT_TEST_FeldmanHashSet_stdhash_RCU_signal \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_shb_stdhash) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_shb_stdhash_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_sht_stdhash) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_sht_stdhash_stat) \
-
-#else
-# define CDSUNIT_DECLARE_FeldmanHashSet_stdhash_RCU_signal
-# define CDSUNIT_TEST_FeldmanHashSet_stdhash_RCU_signal
-#endif
-
-#define CDSUNIT_DECLARE_FeldmanHashSet_stdhash \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_hp_stdhash) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_hp_stdhash_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_dhp_stdhash) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_dhp_stdhash_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpi_stdhash) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpi_stdhash_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpb_stdhash) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpb_stdhash_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpt_stdhash) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpt_stdhash_stat) \
- CDSUNIT_DECLARE_FeldmanHashSet_stdhash_RCU_signal
-
-#define CDSUNIT_TEST_FeldmanHashSet_stdhash \
- CPPUNIT_TEST(FeldmanHashSet_hp_stdhash) \
- CPPUNIT_TEST(FeldmanHashSet_hp_stdhash_stat) \
- CPPUNIT_TEST(FeldmanHashSet_dhp_stdhash) \
- CPPUNIT_TEST(FeldmanHashSet_dhp_stdhash_stat) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpi_stdhash) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpi_stdhash_stat) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpb_stdhash) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpb_stdhash_stat) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpt_stdhash) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpt_stdhash_stat) \
- CDSUNIT_TEST_FeldmanHashSet_stdhash_RCU_signal
-
-
-// CityHash -only for 64bit
-
-#undef CDSUNIT_DECLARE_FeldmanHashSet_city
-#undef CDSUNIT_DECLARE_FeldmanHashSet_city_RCU_signal
-#undef CDSUNIT_TEST_FeldmanHashSet_city
-#undef CDSUNIT_TEST_FeldmanHashSet_city_RCU_signal
-
-#if CDS_BUILD_BITS == 64
-
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-# define CDSUNIT_DECLARE_FeldmanHashSet_city_RCU_signal \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_shb_city64) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_shb_city64_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_sht_city64) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_sht_city64_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_shb_city128) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_shb_city128_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_sht_city128) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_sht_city128_stat) \
-
-# define CDSUNIT_TEST_FeldmanHashSet_city_RCU_signal \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_shb_city64) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_shb_city64_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_sht_city64) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_sht_city64_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_shb_city128) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_shb_city128_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_sht_city128) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_sht_city128_stat) \
-
-#else
-# define CDSUNIT_DECLARE_FeldmanHashSet_city_RCU_signal
-# define CDSUNIT_TEST_FeldmanHashSet_city_RCU_signal
-#endif
-
-#define CDSUNIT_DECLARE_FeldmanHashSet_city \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_hp_city64) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_hp_city64_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_dhp_city64) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_dhp_city64_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpi_city64) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpi_city64_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpb_city64) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpb_city64_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpt_city64) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpt_city64_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_hp_city128) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_hp_city128_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_dhp_city128) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_dhp_city128_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpi_city128) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpi_city128_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpb_city128) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpb_city128_stat) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpt_city128) \
- TEST_CASE(tag_FeldmanHashSet, FeldmanHashSet_rcu_gpt_city128_stat) \
- CDSUNIT_DECLARE_FeldmanHashSet_city_RCU_signal
-
-#define CDSUNIT_TEST_FeldmanHashSet_city \
- CPPUNIT_TEST(FeldmanHashSet_hp_city64) \
- CPPUNIT_TEST(FeldmanHashSet_hp_city64_stat) \
- CPPUNIT_TEST(FeldmanHashSet_dhp_city64) \
- CPPUNIT_TEST(FeldmanHashSet_dhp_city64_stat) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpi_city64) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpi_city64_stat) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpb_city64) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpb_city64_stat) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpt_city64) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpt_city64_stat) \
- CPPUNIT_TEST(FeldmanHashSet_hp_city128) \
- CPPUNIT_TEST(FeldmanHashSet_hp_city128_stat) \
- CPPUNIT_TEST(FeldmanHashSet_dhp_city128) \
- CPPUNIT_TEST(FeldmanHashSet_dhp_city128_stat) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpi_city128) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpi_city128_stat) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpb_city128) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpb_city128_stat) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpt_city128) \
- CPPUNIT_TEST(FeldmanHashSet_rcu_gpt_city128_stat) \
- CDSUNIT_TEST_FeldmanHashSet_city_RCU_signal
-
-#else
-# define CDSUNIT_DECLARE_FeldmanHashSet_city
-# define CDSUNIT_DECLARE_FeldmanHashSet_city_RCU_signal
-# define CDSUNIT_TEST_FeldmanHashSet_city
-# define CDSUNIT_TEST_FeldmanHashSet_city_RCU_signal
-#endif // CDS_BUILD_BITS == 64
-
-
-// All
-
-#define CDSUNIT_DECLARE_FeldmanHashSet \
- CDSUNIT_DECLARE_FeldmanHashSet_fixed \
- CDSUNIT_DECLARE_FeldmanHashSet_stdhash \
- CDSUNIT_DECLARE_FeldmanHashSet_city
-
-#define CDSUNIT_TEST_FeldmanHashSet \
- CDSUNIT_TEST_FeldmanHashSet_fixed \
- CDSUNIT_TEST_FeldmanHashSet_stdhash \
- CDSUNIT_TEST_FeldmanHashSet_city
+++ /dev/null
-/*
- 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 "set2/set_delodd.h"
-
-namespace set2 {
- CPPUNIT_TEST_SUITE_REGISTRATION( Set_DelOdd );
-
- void Set_DelOdd::setUpParams( const CppUnitMini::TestCfg& cfg )
- {
- c_nSetSize = cfg.getSizeT("MapSize", c_nSetSize );
- c_nInsThreadCount = cfg.getSizeT("InsThreadCount", c_nInsThreadCount);
- c_nDelThreadCount = cfg.getSizeT("DelThreadCount", c_nDelThreadCount);
- c_nExtractThreadCount = cfg.getSizeT("ExtractThreadCount", c_nExtractThreadCount);
- c_nMaxLoadFactor = cfg.getSizeT("MaxLoadFactor", c_nMaxLoadFactor);
- c_bPrintGCState = cfg.getBool("PrintGCStateFlag", true );
-
- c_nCuckooInitialSize = cfg.getSizeT("CuckooInitialSize", c_nCuckooInitialSize );
- c_nCuckooProbesetSize = cfg.getSizeT("CuckooProbesetSize", c_nCuckooProbesetSize );
- c_nCuckooProbesetThreshold = cfg.getSizeT("CuckooProbesetThreshold", c_nCuckooProbesetThreshold );
-
- c_nFeldmanSet_HeadBits = cfg.getSizeT("FeldmanMapHeadBits", c_nFeldmanSet_HeadBits);
- c_nFeldmanSet_ArrayBits = cfg.getSizeT("FeldmanMapArrayBits", c_nFeldmanSet_ArrayBits);
-
- if ( c_nInsThreadCount == 0 )
- c_nInsThreadCount = std::thread::hardware_concurrency();
- if ( c_nDelThreadCount == 0 && c_nExtractThreadCount == 0 ) {
- c_nExtractThreadCount = std::thread::hardware_concurrency() / 2;
- c_nDelThreadCount = std::thread::hardware_concurrency() - c_nExtractThreadCount;
- }
-
- m_arrData.resize( c_nSetSize );
- for ( size_t i = 0; i < c_nSetSize; ++i )
- m_arrData[i] = i;
- shuffle( m_arrData.begin(), m_arrData.end() );
- }
-
- void Set_DelOdd::endTestCase()
- {
- m_arrData.resize( 0 );
- }
-
-} // namespace set2
+++ /dev/null
-/*
- 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 "cppunit/thread.h"
-#include "set2/set_type.h"
-
-namespace set2 {
-
-#define TEST_CASE(TAG, X) void X();
-
- namespace {
- struct key_thread
- {
- uint32_t nKey;
- uint16_t nThread;
- uint16_t pad_;
-
- key_thread( size_t key, size_t threadNo )
- : nKey( static_cast<uint32_t>(key))
- , nThread( static_cast<uint16_t>(threadNo))
- , pad_(0)
- {}
-
- key_thread()
- {}
- };
-
- typedef set_type_base<key_thread, size_t>::key_val key_value_pair;
- }
-
- template <>
- struct cmp<key_thread> {
- int operator ()(key_thread const& k1, key_thread const& k2) const
- {
- if ( k1.nKey < k2.nKey )
- return -1;
- if ( k1.nKey > k2.nKey )
- return 1;
- if ( k1.nThread < k2.nThread )
- return -1;
- if ( k1.nThread > k2.nThread )
- return 1;
- return 0;
- }
- int operator ()(key_thread const& k1, size_t k2) const
- {
- if ( k1.nKey < k2 )
- return -1;
- if ( k1.nKey > k2 )
- return 1;
- return 0;
- }
- int operator ()(size_t k1, key_thread const& k2) const
- {
- if ( k1 < k2.nKey )
- return -1;
- if ( k1 > k2.nKey )
- return 1;
- return 0;
- }
- };
-
-} // namespace set2
-
-namespace std {
- template <>
- struct less<set2::key_thread>
- {
- bool operator()(set2::key_thread const& k1, set2::key_thread const& k2) const
- {
- if ( k1.nKey <= k2.nKey )
- return k1.nKey < k2.nKey || k1.nThread < k2.nThread;
- return false;
- }
- };
-
- template <>
- struct hash<set2::key_thread>
- {
- typedef size_t result_type;
- typedef set2::key_thread argument_type;
-
- size_t operator()( set2::key_thread const& k ) const
- {
- return std::hash<size_t>()(k.nKey);
- }
- size_t operator()( size_t k ) const
- {
- return std::hash<size_t>()(k);
- }
- };
-
-} // namespace std
-
-namespace boost {
- inline size_t hash_value( set2::key_thread const& k )
- {
- return std::hash<size_t>()( k.nKey );
- }
-
- template <>
- struct hash<set2::key_thread>
- {
- typedef size_t result_type;
- typedef set2::key_thread argument_type;
-
- size_t operator()(set2::key_thread const& k) const
- {
- return boost::hash<size_t>()( k.nKey );
- }
- size_t operator()(size_t k) const
- {
- return boost::hash<size_t>()( k );
- }
- };
-} // namespace boost
-
-namespace set2 {
-
- class Set_DelOdd: public CppUnitMini::TestCase
- {
- public:
- size_t c_nSetSize =1000000; // max set size
- size_t c_nInsThreadCount = 4; // insert thread count
- size_t c_nDelThreadCount = 4; // delete thread count
- size_t c_nExtractThreadCount = 4; // extract thread count
- size_t c_nMaxLoadFactor = 8; // maximum load factor
- bool c_bPrintGCState = true;
-
- size_t c_nCuckooInitialSize = 1024;// initial size for CuckooSet
- size_t c_nCuckooProbesetSize = 16; // CuckooSet probeset size (only for list-based probeset)
- size_t c_nCuckooProbesetThreshold = 0; // CUckooSet probeset threshold (0 - use default)
-
- size_t c_nFeldmanSet_HeadBits = 10;
- size_t c_nFeldmanSet_ArrayBits = 4;
-
- size_t c_nLoadFactor = 2;
- std::vector<size_t> m_arrData;
-
- protected:
- typedef key_thread key_type;
- typedef size_t value_type;
-
- atomics::atomic<size_t> m_nInsThreadCount;
-
- // Inserts keys from [0..N)
- template <class Set>
- class InsertThread: public CppUnitMini::TestThread
- {
- Set& m_Set;
-
- virtual InsertThread * clone()
- {
- return new InsertThread( *this );
- }
-
- struct update_functor
- {
- template <typename Q>
- void operator()( bool /*bNew*/, key_value_pair const&, Q const& )
- {}
-
- void operator()(key_value_pair& /*cur*/, key_value_pair * /*prev*/)
- {}
- };
- public:
- size_t m_nInsertSuccess;
- size_t m_nInsertFailed;
-
- public:
- InsertThread( CppUnitMini::ThreadPool& pool, Set& rMap )
- : CppUnitMini::TestThread( pool )
- , m_Set( rMap )
- {}
- InsertThread( InsertThread& src )
- : CppUnitMini::TestThread( src )
- , m_Set( src.m_Set )
- {}
-
- Set_DelOdd& getTest()
- {
- return reinterpret_cast<Set_DelOdd&>( m_Pool.m_Test );
- }
-
- virtual void init() { cds::threading::Manager::attachThread() ; }
- virtual void fini() { cds::threading::Manager::detachThread() ; }
-
- virtual void test()
- {
- Set& rSet = m_Set;
-
- m_nInsertSuccess =
- m_nInsertFailed = 0;
-
- std::vector<size_t>& arrData = getTest().m_arrData;
- for ( size_t i = 0; i < arrData.size(); ++i ) {
- if ( rSet.insert( key_type( arrData[i], m_nThreadNo )))
- ++m_nInsertSuccess;
- else
- ++m_nInsertFailed;
- }
-
- update_functor f;
- for ( size_t i = arrData.size() - 1; i > 0; --i ) {
- if ( arrData[i] & 1 ) {
- rSet.update( key_type( arrData[i], m_nThreadNo ), f, true );
- }
- }
-
- getTest().m_nInsThreadCount.fetch_sub( 1, atomics::memory_order_release );
- }
- };
-
- struct key_equal {
- bool operator()( key_type const& k1, key_type const& k2 ) const
- {
- return k1.nKey == k2.nKey;
- }
- bool operator()( size_t k1, key_type const& k2 ) const
- {
- return k1 == k2.nKey;
- }
- bool operator()( key_type const& k1, size_t k2 ) const
- {
- return k1.nKey == k2;
- }
- bool operator ()( key_value_pair const& k1, key_value_pair const& k2 ) const
- {
- return operator()( k1.key, k2.key );
- }
- bool operator ()( key_value_pair const& k1, key_type const& k2 ) const
- {
- return operator()( k1.key, k2 );
- }
- bool operator ()( key_type const& k1, key_value_pair const& k2 ) const
- {
- return operator()( k1, k2.key );
- }
- bool operator ()( key_value_pair const& k1, size_t k2 ) const
- {
- return operator()( k1.key, k2 );
- }
- bool operator ()( size_t k1, key_value_pair const& k2 ) const
- {
- return operator()( k1, k2.key );
- }
- };
-
- struct key_less {
- bool operator()( key_type const& k1, key_type const& k2 ) const
- {
- return k1.nKey < k2.nKey;
- }
- bool operator()( size_t k1, key_type const& k2 ) const
- {
- return k1 < k2.nKey;
- }
- bool operator()( key_type const& k1, size_t k2 ) const
- {
- return k1.nKey < k2;
- }
- bool operator ()( key_value_pair const& k1, key_value_pair const& k2 ) const
- {
- return operator()( k1.key, k2.key );
- }
- bool operator ()( key_value_pair const& k1, key_type const& k2 ) const
- {
- return operator()( k1.key, k2 );
- }
- bool operator ()( key_type const& k1, key_value_pair const& k2 ) const
- {
- return operator()( k1, k2.key );
- }
- bool operator ()( key_value_pair const& k1, size_t k2 ) const
- {
- return operator()( k1.key, k2 );
- }
- bool operator ()( size_t k1, key_value_pair const& k2 ) const
- {
- return operator()( k1, k2.key );
- }
-
- typedef key_equal equal_to;
- };
-
- // Deletes odd keys from [0..N)
- template <class Set>
- class DeleteThread: public CppUnitMini::TestThread
- {
- Set& m_Set;
-
- virtual DeleteThread * clone()
- {
- return new DeleteThread( *this );
- }
- public:
- size_t m_nDeleteSuccess;
- size_t m_nDeleteFailed;
-
- public:
- DeleteThread( CppUnitMini::ThreadPool& pool, Set& rMap )
- : CppUnitMini::TestThread( pool )
- , m_Set( rMap )
- {}
- DeleteThread( DeleteThread& src )
- : CppUnitMini::TestThread( src )
- , m_Set( src.m_Set )
- {}
-
- Set_DelOdd& getTest()
- {
- return reinterpret_cast<Set_DelOdd&>( m_Pool.m_Test );
- }
-
- virtual void init() { cds::threading::Manager::attachThread() ; }
- virtual void fini() { cds::threading::Manager::detachThread() ; }
-
- template <typename SetType, bool>
- struct eraser {
- static bool erase( SetType& s, size_t key, size_t /*thread*/)
- {
- return s.erase_with( key, key_less() );
- }
- };
-
- template <typename SetType>
- struct eraser<SetType, true> {
- static bool erase(SetType& s, size_t key, size_t thread)
- {
- return s.erase( key_type(key, thread));
- }
- };
-
- virtual void test()
- {
- Set& rSet = m_Set;
-
- m_nDeleteSuccess =
- m_nDeleteFailed = 0;
-
- size_t const nInsThreadCount = getTest().c_nInsThreadCount;
- std::vector<size_t>& arrData = getTest().m_arrData;
-
- if ( m_nThreadNo & 1 ) {
- for (size_t i = 0; i < arrData.size(); ++i) {
- if (arrData[i] & 1) {
- for ( size_t k = 0; k < nInsThreadCount; ++k ) {
- if ( eraser<Set, Set::c_bEraseExactKey>::erase( rSet, arrData[i], k ))
- ++m_nDeleteSuccess;
- else
- ++m_nDeleteFailed;
- }
- }
- if ( getTest().m_nInsThreadCount.load( atomics::memory_order_acquire ) == 0 )
- break;
- }
- }
- else {
- for (size_t i = arrData.size() - 1; i > 0; --i) {
- if (arrData[i] & 1) {
- for ( size_t k = 0; k < nInsThreadCount; ++k ) {
- if (eraser<Set, Set::c_bEraseExactKey>::erase(rSet, arrData[i], k))
- ++m_nDeleteSuccess;
- else
- ++m_nDeleteFailed;
- }
- }
- if ( getTest().m_nInsThreadCount.load( atomics::memory_order_acquire ) == 0 )
- break;
- }
- }
- }
- };
-
- // Extracts odd keys from [0..N)
- template <typename GC, class Set>
- class ExtractThread: public CppUnitMini::TestThread
- {
- Set& m_Set;
-
- virtual ExtractThread * clone()
- {
- return new ExtractThread( *this );
- }
- public:
- size_t m_nExtractSuccess;
- size_t m_nExtractFailed;
-
- public:
- ExtractThread( CppUnitMini::ThreadPool& pool, Set& rMap )
- : CppUnitMini::TestThread( pool )
- , m_Set( rMap )
- {}
- ExtractThread( ExtractThread& src )
- : CppUnitMini::TestThread( src )
- , m_Set( src.m_Set )
- {}
-
- Set_DelOdd& getTest()
- {
- return reinterpret_cast<Set_DelOdd&>( m_Pool.m_Test );
- }
-
- virtual void init() { cds::threading::Manager::attachThread() ; }
- virtual void fini() { cds::threading::Manager::detachThread() ; }
-
- template <typename SetType, bool>
- struct extractor {
- static typename SetType::guarded_ptr extract(SetType& s, size_t key, size_t /*thread*/)
- {
- return s.extract_with( key, key_less());
- }
- };
-
- template <typename SetType>
- struct extractor<SetType, true> {
- static typename SetType::guarded_ptr extract(SetType& s, size_t key, size_t thread)
- {
- return s.extract( key_type(key, thread));
- }
- };
-
- virtual void test()
- {
- Set& rSet = m_Set;
-
- m_nExtractSuccess =
- m_nExtractFailed = 0;
-
- typename Set::guarded_ptr gp;
-
- std::vector<size_t>& arrData = getTest().m_arrData;
- size_t const nInsThreadCount = getTest().c_nInsThreadCount;
-
- if ( m_nThreadNo & 1 ) {
- for ( size_t i = 0; i < arrData.size(); ++i ) {
- if (arrData[i] & 1) {
- for ( size_t k = 0; k < nInsThreadCount; ++k ) {
- gp = extractor<Set, Set::c_bEraseExactKey>::extract( rSet, arrData[i], k );
- if ( gp )
- ++m_nExtractSuccess;
- else
- ++m_nExtractFailed;
- gp.release();
- }
- }
- if ( getTest().m_nInsThreadCount.load( atomics::memory_order_acquire ) == 0 )
- break;
- }
- }
- else {
- for (size_t i = arrData.size() - 1; i > 0; --i) {
- if (arrData[i] & 1) {
- for ( size_t k = 0; k < nInsThreadCount; ++k ) {
- gp = extractor<Set, Set::c_bEraseExactKey>::extract( rSet, arrData[i], k);
- if ( gp )
- ++m_nExtractSuccess;
- else
- ++m_nExtractFailed;
- gp.release();
- }
- }
- if ( getTest().m_nInsThreadCount.load( atomics::memory_order_acquire ) == 0 )
- break;
- }
- }
- }
- };
-
- template <typename RCU, class Set>
- class ExtractThread< cds::urcu::gc<RCU>, Set >: public CppUnitMini::TestThread
- {
- Set& m_Set;
-
- virtual ExtractThread * clone()
- {
- return new ExtractThread( *this );
- }
- public:
- size_t m_nExtractSuccess;
- size_t m_nExtractFailed;
-
- public:
- ExtractThread( CppUnitMini::ThreadPool& pool, Set& rMap )
- : CppUnitMini::TestThread( pool )
- , m_Set( rMap )
- {}
- ExtractThread( ExtractThread& src )
- : CppUnitMini::TestThread( src )
- , m_Set( src.m_Set )
- {}
-
- Set_DelOdd& getTest()
- {
- return reinterpret_cast<Set_DelOdd&>( m_Pool.m_Test );
- }
-
- virtual void init() { cds::threading::Manager::attachThread() ; }
- virtual void fini() { cds::threading::Manager::detachThread() ; }
-
- template <typename SetType, bool>
- struct extractor {
- static typename SetType::exempt_ptr extract(SetType& s, size_t key, size_t /*thread*/)
- {
- return s.extract_with(key, key_less());
- }
- };
-
- template <typename SetType>
- struct extractor<SetType, true> {
- static typename SetType::exempt_ptr extract(SetType& s, size_t key, size_t thread)
- {
- return s.extract(key_type(key, thread));
- }
- };
-
- virtual void test()
- {
- Set& rSet = m_Set;
-
- m_nExtractSuccess =
- m_nExtractFailed = 0;
-
- typename Set::exempt_ptr xp;
-
- std::vector<size_t>& arrData = getTest().m_arrData;
- size_t const nInsThreadCount = getTest().c_nInsThreadCount;
-
- if ( m_nThreadNo & 1 ) {
- for (size_t i = 0; i < arrData.size(); ++i) {
- if (arrData[i] & 1) {
- for ( size_t k = 0; k < nInsThreadCount; ++k ) {
- if ( Set::c_bExtractLockExternal ) {
- typename Set::rcu_lock l;
- xp = extractor<Set, Set::c_bEraseExactKey>::extract( rSet, arrData[i], k);
- if ( xp )
- ++m_nExtractSuccess;
- else
- ++m_nExtractFailed;
- }
- else {
- xp = extractor<Set, Set::c_bEraseExactKey>::extract(rSet, arrData[i], k);
- if ( xp )
- ++m_nExtractSuccess;
- else
- ++m_nExtractFailed;
- }
- xp.release();
- }
- }
- if ( getTest().m_nInsThreadCount.load( atomics::memory_order_acquire ) == 0 )
- break;
- }
- }
- else {
- for (size_t i = arrData.size() - 1; i > 0; --i) {
- if (arrData[i] & 1) {
- for ( size_t k = 0; k < nInsThreadCount; ++k ) {
- if ( Set::c_bExtractLockExternal ) {
- typename Set::rcu_lock l;
- xp = extractor<Set, Set::c_bEraseExactKey>::extract(rSet, arrData[i], k);
- if ( xp )
- ++m_nExtractSuccess;
- else
- ++m_nExtractFailed;
- }
- else {
- xp = extractor<Set, Set::c_bEraseExactKey>::extract(rSet, arrData[i], k);
- if ( xp )
- ++m_nExtractSuccess;
- else
- ++m_nExtractFailed;
- }
- xp.release();
- }
- }
- if ( getTest().m_nInsThreadCount.load( atomics::memory_order_acquire ) == 0 )
- break;
- }
- }
- }
- };
-
- protected:
- template <class Set>
- void do_test( size_t nLoadFactor )
- {
- Set testSet( c_nSetSize, nLoadFactor );
- do_test_with( testSet );
- analyze( testSet );
- }
-
- template <class Set>
- void do_test_extract( size_t nLoadFactor )
- {
- Set testSet( c_nSetSize, nLoadFactor );
- do_test_extract_with( testSet );
- analyze( testSet );
- }
-
- template <class Set>
- void do_test_with( Set& testSet )
- {
- typedef InsertThread<Set> insert_thread;
- typedef DeleteThread<Set> delete_thread;
-
- m_nInsThreadCount.store( c_nInsThreadCount, atomics::memory_order_release );
-
- CppUnitMini::ThreadPool pool( *this );
- pool.add( new insert_thread( pool, testSet ), c_nInsThreadCount );
- pool.add( new delete_thread( pool, testSet ), c_nDelThreadCount ? c_nDelThreadCount : cds::OS::topology::processor_count());
- pool.run();
- CPPUNIT_MSG( " Duration=" << pool.avgDuration() );
-
- size_t nInsertSuccess = 0;
- size_t nInsertFailed = 0;
- size_t nDeleteSuccess = 0;
- size_t nDeleteFailed = 0;
- for ( CppUnitMini::ThreadPool::iterator it = pool.begin(); it != pool.end(); ++it ) {
- insert_thread * pThread = dynamic_cast<insert_thread *>( *it );
- if ( pThread ) {
- nInsertSuccess += pThread->m_nInsertSuccess;
- nInsertFailed += pThread->m_nInsertFailed;
- }
- else {
- delete_thread * p = static_cast<delete_thread *>( *it );
- nDeleteSuccess += p->m_nDeleteSuccess;
- nDeleteFailed += p->m_nDeleteFailed;
- }
- }
-
- CPPUNIT_CHECK( nInsertSuccess == c_nSetSize * c_nInsThreadCount );
- CPPUNIT_CHECK( nInsertFailed == 0 );
-
- CPPUNIT_MSG( " Totals (success/failed): \n\t"
- << " Insert=" << nInsertSuccess << '/' << nInsertFailed << "\n\t"
- << " Delete=" << nDeleteSuccess << '/' << nDeleteFailed << "\n\t"
- );
- }
-
- template <class Set>
- void do_test_extract_with( Set& testSet )
- {
- typedef InsertThread<Set> insert_thread;
- typedef DeleteThread<Set> delete_thread;
- typedef ExtractThread< typename Set::gc, Set > extract_thread;
-
- m_nInsThreadCount.store( c_nInsThreadCount, atomics::memory_order_release );
-
- CppUnitMini::ThreadPool pool( *this );
- pool.add( new insert_thread( pool, testSet ), c_nInsThreadCount );
- if ( c_nDelThreadCount )
- pool.add( new delete_thread( pool, testSet ), c_nDelThreadCount );
- if ( c_nExtractThreadCount )
- pool.add( new extract_thread( pool, testSet ), c_nExtractThreadCount );
- pool.run();
- CPPUNIT_MSG( " Duration=" << pool.avgDuration() );
-
- size_t nInsertSuccess = 0;
- size_t nInsertFailed = 0;
- size_t nDeleteSuccess = 0;
- size_t nDeleteFailed = 0;
- size_t nExtractSuccess = 0;
- size_t nExtractFailed = 0;
- for ( CppUnitMini::ThreadPool::iterator it = pool.begin(); it != pool.end(); ++it ) {
- insert_thread * pThread = dynamic_cast<insert_thread *>( *it );
- if ( pThread ) {
- nInsertSuccess += pThread->m_nInsertSuccess;
- nInsertFailed += pThread->m_nInsertFailed;
- }
- else {
- delete_thread * p = dynamic_cast<delete_thread *>( *it );
- if ( p ) {
- nDeleteSuccess += p->m_nDeleteSuccess;
- nDeleteFailed += p->m_nDeleteFailed;
- }
- else {
- extract_thread * pExt = dynamic_cast<extract_thread *>( *it );
- assert( pExt );
- nExtractSuccess += pExt->m_nExtractSuccess;
- nExtractFailed += pExt->m_nExtractFailed;
- }
- }
- }
-
- CPPUNIT_CHECK( nInsertSuccess == c_nSetSize * c_nInsThreadCount );
- CPPUNIT_CHECK( nInsertFailed == 0 );
-
- CPPUNIT_MSG( " Totals (success/failed): \n\t"
- << " Insert=" << nInsertSuccess << '/' << nInsertFailed << "\n\t"
- << " Delete=" << nDeleteSuccess << '/' << nDeleteFailed << "\n\t"
- << " Extract=" << nExtractSuccess << '/' << nExtractFailed << "\n\t"
- );
- }
-
- template <typename Set>
- void analyze( Set& testSet )
- {
- // All even keys must be in the set
- {
- CPPUNIT_MSG( " Check even keys..." );
- size_t nErrorCount = 0;
- for ( size_t n = 0; n < c_nSetSize; n +=2 ) {
- for ( size_t i = 0; i < c_nInsThreadCount; ++i ) {
- if ( !testSet.contains( key_type(n, i) ) ) {
- if ( ++nErrorCount < 10 ) {
- CPPUNIT_MSG( "key " << n << "-" << i << " is not found!");
- }
- }
- }
- }
- CPPUNIT_CHECK_EX( nErrorCount == 0, "Totals: " << nErrorCount << " keys is not found");
- }
-
- check_before_clear( testSet );
-
- CPPUNIT_MSG( " Clear map (single-threaded)..." );
- cds::OS::Timer timer;
- testSet.clear();
- CPPUNIT_MSG( " Duration=" << timer.duration() );
- CPPUNIT_CHECK_EX( testSet.empty(), ((long long) testSet.size()) );
-
- additional_check( testSet );
- print_stat( testSet );
- additional_cleanup( testSet );
- }
-
- template <class Set>
- void run_test()
- {
- static_assert( !Set::c_bExtractSupported, "Set class must not support extract() method" );
-
- CPPUNIT_MSG( "Insert thread count=" << c_nInsThreadCount
- << " delete thread count=" << c_nDelThreadCount
- << " set size=" << c_nSetSize
- );
-
- if ( Set::c_bLoadFactorDepended ) {
- for ( c_nLoadFactor = 1; c_nLoadFactor <= c_nMaxLoadFactor; c_nLoadFactor *= 2 ) {
- CPPUNIT_MSG( "Load factor=" << c_nLoadFactor );
-
- Set testSet( *this );
- do_test_with( testSet );
- analyze( testSet );
-
- if ( c_bPrintGCState )
- print_gc_state();
- }
- }
- else {
- Set testSet( *this );
- do_test_with( testSet );
- analyze( testSet );
-
- if ( c_bPrintGCState )
- print_gc_state();
- }
- }
-
- template <class Set>
- void run_test_extract()
- {
- static_assert( Set::c_bExtractSupported, "Set class must support extract() method" );
-
- CPPUNIT_MSG( "Insert thread count=" << c_nInsThreadCount
- << " delete thread count=" << c_nDelThreadCount
- << " extract thread count=" << c_nExtractThreadCount
- << " set size=" << c_nSetSize
- );
-
- if ( Set::c_bLoadFactorDepended ) {
- for ( c_nLoadFactor = 1; c_nLoadFactor <= c_nMaxLoadFactor; c_nLoadFactor *= 2 ) {
- CPPUNIT_MSG( "Load factor=" << c_nLoadFactor );
-
- Set testSet( *this );
- do_test_extract_with( testSet );
- analyze( testSet );
-
- if ( c_bPrintGCState )
- print_gc_state();
- }
- }
- else {
- Set testSet( *this );
- do_test_extract_with( testSet );
- analyze( testSet );
-
- if ( c_bPrintGCState )
- print_gc_state();
- }
- }
-
- void setUpParams( const CppUnitMini::TestCfg& cfg );
- virtual void endTestCase();
-
-# include "set2/set_defs.h"
- CDSUNIT_DECLARE_MichaelSet
- CDSUNIT_DECLARE_SplitList
- CDSUNIT_DECLARE_SkipListSet
- CDSUNIT_DECLARE_EllenBinTreeSet
- CDSUNIT_DECLARE_CuckooSet
- CDSUNIT_DECLARE_FeldmanHashSet_fixed
- CDSUNIT_DECLARE_FeldmanHashSet_city
-
- CPPUNIT_TEST_SUITE_(Set_DelOdd, "Map_DelOdd")
- CDSUNIT_TEST_MichaelSet
- CDSUNIT_TEST_SplitList
- CDSUNIT_TEST_SkipListSet
- CDSUNIT_TEST_EllenBinTreeSet
- CDSUNIT_TEST_FeldmanHashSet_fixed
- CDSUNIT_TEST_FeldmanHashSet_city
- CDSUNIT_TEST_CuckooSet
- CPPUNIT_TEST_SUITE_END();
- };
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_delodd.h"
-#include "set2/set_type_cuckoo.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_DelOdd::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_CuckooSet
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_delodd.h"
-#include "set2/set_type_ellen_bintree.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_DelOdd::X() { run_test_extract<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_EllenBinTreeSet
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_delodd.h"
-#include "set2/set_type_feldman_hashset.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_DelOdd::X() { run_test_extract<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_FeldmanHashSet_fixed
- CDSUNIT_DECLARE_FeldmanHashSet_city
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_delodd.h"
-#include "set2/set_type_michael.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_DelOdd::X() { run_test_extract<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_MichaelSet
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_delodd.h"
-#include "set2/set_type_skip_list.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_DelOdd::X() { run_test_extract<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_SkipListSet
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_delodd.h"
-#include "set2/set_type_split_list.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_DelOdd::X() { run_test_extract<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_SplitList
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdel_func.h"
-
-namespace set2 {
- CPPUNIT_TEST_SUITE_REGISTRATION( Set_InsDel_func );
-
- void Set_InsDel_func::setUpParams( const CppUnitMini::TestCfg& cfg )
- {
- c_nSetSize = cfg.getSizeT("MapSize", c_nSetSize );
- c_nInsertThreadCount = cfg.getSizeT("InsertThreadCount", c_nInsertThreadCount );
- c_nDeleteThreadCount = cfg.getSizeT("DeleteThreadCount", c_nDeleteThreadCount );
- c_nUpdateThreadCount = cfg.getSizeT("UpdateThreadCount", c_nUpdateThreadCount );
- c_nThreadPassCount = cfg.getSizeT("ThreadPassCount", c_nThreadPassCount );
- c_nMaxLoadFactor = cfg.getSizeT("MaxLoadFactor", c_nMaxLoadFactor );
- c_bPrintGCState = cfg.getBool("PrintGCStateFlag", c_bPrintGCState );
-
- c_nCuckooInitialSize = cfg.getSizeT("CuckooInitialSize", c_nCuckooInitialSize );
- c_nCuckooProbesetSize = cfg.getSizeT("CuckooProbesetSize", c_nCuckooProbesetSize );
- c_nCuckooProbesetThreshold = cfg.getSizeT("CuckooProbesetThreshold", c_nCuckooProbesetThreshold );
-
- c_nFeldmanSet_HeadBits = cfg.getSizeT("FeldmanMapHeadBits", c_nFeldmanSet_HeadBits);
- c_nFeldmanSet_ArrayBits = cfg.getSizeT("FeldmanMapArrayBits", c_nFeldmanSet_ArrayBits);
-
- if ( c_nInsertThreadCount == 0 )
- c_nInsertThreadCount = std::thread::hardware_concurrency();
- if ( c_nDeleteThreadCount == 0 )
- c_nDeleteThreadCount = std::thread::hardware_concurrency();
- if ( c_nUpdateThreadCount == 0 )
- c_nUpdateThreadCount = std::thread::hardware_concurrency();
- }
-} // namespace set2
+++ /dev/null
-/*
- 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 <functional>
-#include <vector>
-#include <mutex> //unique_lock
-
-#include "set2/set_type.h"
-#include "cppunit/thread.h"
-#include <cds/sync/spinlock.h>
-
-namespace set2 {
-
-#define TEST_CASE(TAG, X) void X();
-
- class Set_InsDel_func: public CppUnitMini::TestCase
- {
- public:
- size_t c_nSetSize = 1000000; // set size
- size_t c_nInsertThreadCount = 4; // count of insertion thread
- size_t c_nDeleteThreadCount = 4; // count of deletion thread
- size_t c_nUpdateThreadCount = 4; // count of ensure thread
- size_t c_nThreadPassCount = 4; // pass count for each thread
- size_t c_nMaxLoadFactor = 8; // maximum load factor
- bool c_bPrintGCState;
-
- size_t c_nCuckooInitialSize = 1024;// initial size for CuckooSet
- size_t c_nCuckooProbesetSize = 16; // CuckooSet probeset size (only for list-based probeset)
- size_t c_nCuckooProbesetThreshold = 0; // CUckooSet probeset threshold (0 - use default)
-
- size_t c_nFeldmanSet_HeadBits = 10;
- size_t c_nFeldmanSet_ArrayBits = 4;
-
- size_t c_nLoadFactor = 2;
-
- private:
- typedef size_t key_type;
- struct value_type {
- size_t nKey;
- size_t nData;
- atomics::atomic<size_t> nUpdateCall;
- bool volatile bInitialized;
- cds::OS::ThreadId threadId ; // insert thread id
-
- typedef cds::sync::spin_lock< cds::backoff::pause > lock_type;
- mutable lock_type m_access;
-
- value_type()
- : nKey(0)
- , nData(0)
- , nUpdateCall(0)
- , bInitialized( false )
- , threadId( cds::OS::get_current_thread_id() )
- {}
-
- value_type( value_type const& s )
- : nKey(s.nKey)
- , nData(s.nData)
- , nUpdateCall(s.nUpdateCall.load(atomics::memory_order_relaxed))
- , bInitialized( s.bInitialized )
- , threadId( cds::OS::get_current_thread_id() )
- {}
-
- // boost::container::flat_map requires operator =
- value_type& operator=( value_type const& v )
- {
- nKey = v.nKey;
- nData = v.nData;
- nUpdateCall.store( v.nUpdateCall.load(atomics::memory_order_relaxed), atomics::memory_order_relaxed );
- bInitialized = v.bInitialized;
-
- return *this;
- }
-
- };
-
-
- size_t * m_pKeyFirst;
- size_t * m_pKeyLast;
- size_t * m_pKeyArr;
-
- template <class Set>
- class Inserter: public CppUnitMini::TestThread
- {
- Set& m_Set;
- typedef typename Set::value_type keyval_type;
-
- virtual Inserter * clone()
- {
- return new Inserter( *this );
- }
-
- struct insert_functor {
- size_t nTestFunctorRef;
-
- insert_functor()
- : nTestFunctorRef(0)
- {}
-
- void operator()( keyval_type& val )
- {
- std::unique_lock< typename value_type::lock_type> ac( val.val.m_access );
-
- val.val.nKey = val.key;
- val.val.nData = val.key * 8;
-
- ++nTestFunctorRef;
- val.val.bInitialized = true;
- }
- };
-
- public:
- size_t m_nInsertSuccess;
- size_t m_nInsertFailed;
-
- size_t m_nTestFunctorRef;
-
- public:
- Inserter( CppUnitMini::ThreadPool& pool, Set& rSet )
- : CppUnitMini::TestThread( pool )
- , m_Set( rSet )
- {}
- Inserter( Inserter& src )
- : CppUnitMini::TestThread( src )
- , m_Set( src.m_Set )
- {}
-
- Set_InsDel_func& getTest()
- {
- return reinterpret_cast<Set_InsDel_func&>( m_Pool.m_Test );
- }
-
- virtual void init() { cds::threading::Manager::attachThread() ; }
- virtual void fini() { cds::threading::Manager::detachThread() ; }
-
- virtual void test()
- {
- Set& rSet = m_Set;
-
- m_nInsertSuccess =
- m_nInsertFailed =
- m_nTestFunctorRef = 0;
-
- size_t * pKeyFirst = getTest().m_pKeyFirst;
- size_t * pKeyLast = getTest().m_pKeyLast;
- size_t const nPassCount = getTest().c_nThreadPassCount;
-
- // func is passed by reference
- insert_functor func;
-
- if ( m_nThreadNo & 1 ) {
- for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
- for ( size_t * p = pKeyFirst; p < pKeyLast; ++p ) {
- if ( rSet.insert( *p, std::ref(func) ) )
- ++m_nInsertSuccess;
- else
- ++m_nInsertFailed;
- }
- }
- }
- else {
- for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
- for ( size_t * p = pKeyLast - 1; p >= pKeyFirst; --p ) {
- if ( rSet.insert( *p, std::ref(func) ) )
- ++m_nInsertSuccess;
- else
- ++m_nInsertFailed;
- }
- }
- }
-
- m_nTestFunctorRef = func.nTestFunctorRef;
- }
- };
-
- template <class Set>
- class Updater: public CppUnitMini::TestThread
- {
- Set& m_Set;
- typedef typename Set::value_type keyval_type;
-
- virtual Updater * clone()
- {
- return new Updater( *this );
- }
-
- struct update_functor {
- size_t nCreated;
- size_t nModified;
-
- update_functor()
- : nCreated(0)
- , nModified(0)
- {}
-
- void operator()( bool bNew, keyval_type& val, size_t /*nKey*/ )
- {
- std::unique_lock<typename value_type::lock_type> ac( val.val.m_access );
- if ( !val.val.bInitialized )
- {
- val.val.nKey = val.key;
- val.val.nData = val.key * 8;
- val.val.bInitialized = true;
- }
-
- if ( bNew ) {
- ++nCreated;
- }
- else {
- val.val.nUpdateCall.fetch_add( 1, atomics::memory_order_relaxed );
- ++nModified;
- }
- }
-
- void operator()( keyval_type& cur, keyval_type * old )
- {
- operator()( old == nullptr, cur, 0 );
- }
-
- private:
- update_functor(const update_functor& );
- };
-
- public:
- size_t m_nUpdateFailed;
- size_t m_nUpdateCreated;
- size_t m_nUpdateExisted;
- size_t m_nFunctorCreated;
- size_t m_nFunctorModified;
-
- public:
- Updater( CppUnitMini::ThreadPool& pool, Set& rSet )
- : CppUnitMini::TestThread( pool )
- , m_Set( rSet )
- {}
- Updater( Updater& src )
- : CppUnitMini::TestThread( src )
- , m_Set( src.m_Set )
- {}
-
- Set_InsDel_func& getTest()
- {
- return reinterpret_cast<Set_InsDel_func&>( m_Pool.m_Test );
- }
-
- virtual void init() { cds::threading::Manager::attachThread() ; }
- virtual void fini() { cds::threading::Manager::detachThread() ; }
-
- virtual void test()
- {
- Set& rSet = m_Set;
-
- m_nUpdateCreated =
- m_nUpdateExisted =
- m_nUpdateFailed = 0;
-
- size_t * pKeyFirst = getTest().m_pKeyFirst;
- size_t * pKeyLast = getTest().m_pKeyLast;
- size_t const nPassCount = getTest().c_nThreadPassCount;
-
- update_functor func;
-
- if ( m_nThreadNo & 1 ) {
- for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
- for ( size_t * p = pKeyFirst; p < pKeyLast; ++p ) {
- std::pair<bool, bool> ret = rSet.update( *p, std::ref( func ), true );
- if ( ret.first ) {
- if ( ret.second )
- ++m_nUpdateCreated;
- else
- ++m_nUpdateExisted;
- }
- else
- ++m_nUpdateFailed;
- }
- }
- }
- else {
- for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
- for ( size_t * p = pKeyLast - 1 ; p >= pKeyFirst; --p ) {
- std::pair<bool, bool> ret = rSet.update( *p, std::ref( func ), true );
- if ( ret.first ) {
- if ( ret.second )
- ++m_nUpdateCreated;
- else
- ++m_nUpdateExisted;
- }
- else
- ++m_nUpdateFailed;
- }
- }
- }
-
- m_nFunctorCreated = func.nCreated;
- m_nFunctorModified = func.nModified;
- }
- };
-
- template <class Set>
- class Deleter: public CppUnitMini::TestThread
- {
- Set& m_Set;
- typedef typename Set::value_type keyval_type;
-
- virtual Deleter * clone()
- {
- return new Deleter( *this );
- }
-
- struct value_container
- {
- size_t nKeyExpected;
-
- size_t nSuccessItem;
- size_t nFailedItem;
-
- value_container()
- : nSuccessItem(0)
- , nFailedItem(0)
- {}
- };
-
- struct erase_functor {
- value_container m_cnt;
-
- void operator ()( keyval_type const& itm )
- {
- keyval_type& item = const_cast<keyval_type&>(itm);
- while ( true ) {
- bool bBkoff = false;
- {
- std::unique_lock< typename value_type::lock_type> ac( item.val.m_access );
- if ( item.val.bInitialized ) {
- if ( m_cnt.nKeyExpected == item.val.nKey && m_cnt.nKeyExpected * 8 == item.val.nData )
- ++m_cnt.nSuccessItem;
- else
- ++m_cnt.nFailedItem;
- item.val.nData++;
- item.val.nKey = 0;
- break;
- }
- else
- bBkoff = true;
- }
- if ( bBkoff )
- cds::backoff::yield()();
- }
- }
- };
-
- public:
- size_t m_nDeleteSuccess;
- size_t m_nDeleteFailed;
-
- size_t m_nValueSuccess;
- size_t m_nValueFailed;
-
- public:
- Deleter( CppUnitMini::ThreadPool& pool, Set& rSet )
- : CppUnitMini::TestThread( pool )
- , m_Set( rSet )
- {}
- Deleter( Deleter& src )
- : CppUnitMini::TestThread( src )
- , m_Set( src.m_Set )
- {}
-
- Set_InsDel_func& getTest()
- {
- return reinterpret_cast<Set_InsDel_func&>( m_Pool.m_Test );
- }
-
- virtual void init() { cds::threading::Manager::attachThread() ; }
- virtual void fini() { cds::threading::Manager::detachThread() ; }
-
- virtual void test()
- {
- Set& rSet = m_Set;
-
- m_nDeleteSuccess =
- m_nDeleteFailed = 0;
-
- size_t * pKeyFirst = getTest().m_pKeyFirst;
- size_t * pKeyLast = getTest().m_pKeyLast;
- size_t const nPassCount = getTest().c_nThreadPassCount;
-
- erase_functor func;
-
- if ( m_nThreadNo & 1 ) {
- for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
- for ( size_t * p = pKeyFirst; p < pKeyLast; ++p ) {
- func.m_cnt.nKeyExpected = *p;
- if ( rSet.erase( *p, std::ref(func) ))
- ++m_nDeleteSuccess;
- else
- ++m_nDeleteFailed;
- }
- }
- }
- else {
- for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
- for ( size_t * p = pKeyLast - 1; p >= pKeyFirst; --p ) {
- func.m_cnt.nKeyExpected = *p;
- if ( rSet.erase( *p, std::ref(func) ))
- ++m_nDeleteSuccess;
- else
- ++m_nDeleteFailed;
- }
- }
- }
-
- m_nValueSuccess = func.m_cnt.nSuccessItem;
- m_nValueFailed = func.m_cnt.nFailedItem;
- }
- };
-
- protected:
-
- template <class Set>
- void do_test( Set& testSet )
- {
- typedef Inserter<Set> InserterThread;
- typedef Deleter<Set> DeleterThread;
- typedef Updater<Set> UpdaterThread;
-
- m_pKeyArr = new size_t[ c_nSetSize ];
- m_pKeyFirst = m_pKeyArr;
- m_pKeyLast = m_pKeyFirst + c_nSetSize;
- for ( size_t i = 0; i < c_nSetSize; ++i )
- m_pKeyArr[i] = i;
- shuffle( m_pKeyFirst, m_pKeyLast );
-
- cds::OS::Timer timer;
-
- CppUnitMini::ThreadPool pool( *this );
- pool.add( new InserterThread( pool, testSet ), c_nInsertThreadCount );
- pool.add( new DeleterThread( pool, testSet ), c_nDeleteThreadCount );
- pool.add( new UpdaterThread( pool, testSet ), c_nUpdateThreadCount );
- pool.run();
- CPPUNIT_MSG( " Duration=" << pool.avgDuration() );
-
- delete [] m_pKeyArr;
-
- size_t nInsertSuccess = 0;
- size_t nInsertFailed = 0;
- size_t nDeleteSuccess = 0;
- size_t nDeleteFailed = 0;
- size_t nDelValueSuccess = 0;
- size_t nDelValueFailed = 0;
- size_t nUpdateFailed = 0;
- size_t nUpdateCreated = 0;
- size_t nUpdateModified = 0;
- size_t nEnsFuncCreated = 0;
- size_t nEnsFuncModified = 0;
- size_t nTestFunctorRef = 0;
-
- for ( CppUnitMini::ThreadPool::iterator it = pool.begin(); it != pool.end(); ++it ) {
- InserterThread * pThread = dynamic_cast<InserterThread *>( *it );
- if ( pThread ) {
- nInsertSuccess += pThread->m_nInsertSuccess;
- nInsertFailed += pThread->m_nInsertFailed;
- nTestFunctorRef += pThread->m_nTestFunctorRef;
- }
- else {
- DeleterThread * p = dynamic_cast<DeleterThread *>( *it );
- if ( p ) {
- nDeleteSuccess += p->m_nDeleteSuccess;
- nDeleteFailed += p->m_nDeleteFailed;
- nDelValueSuccess += p->m_nValueSuccess;
- nDelValueFailed += p->m_nValueFailed;
- }
- else {
- UpdaterThread * pEns = static_cast<UpdaterThread *>( *it );
- nUpdateCreated += pEns->m_nUpdateCreated;
- nUpdateModified += pEns->m_nUpdateExisted;
- nUpdateFailed += pEns->m_nUpdateFailed;
- nEnsFuncCreated += pEns->m_nFunctorCreated;
- nEnsFuncModified += pEns->m_nFunctorModified;
- }
- }
- }
-
- CPPUNIT_MSG(
- " Totals: Ins succ=" << nInsertSuccess
- << " Del succ=" << nDeleteSuccess << "\n"
- << " : Ins fail=" << nInsertFailed
- << " Del fail=" << nDeleteFailed << "\n"
- << " : Update succ=" << (nUpdateCreated + nUpdateModified) << " fail=" << nUpdateFailed
- << " create=" << nUpdateCreated << " modify=" << nUpdateModified << "\n"
- << " Set size=" << testSet.size()
- );
-
- CPPUNIT_CHECK_EX( nDelValueFailed == 0, "Functor del failed=" << nDelValueFailed );
- CPPUNIT_CHECK_EX( nDelValueSuccess == nDeleteSuccess, "Delete success=" << nDeleteSuccess << " functor=" << nDelValueSuccess );
-
- CPPUNIT_CHECK( nUpdateFailed == 0 );
-
- CPPUNIT_CHECK_EX( nUpdateCreated == nEnsFuncCreated, "Update created=" << nUpdateCreated << " functor=" << nEnsFuncCreated );
- CPPUNIT_CHECK_EX( nUpdateModified == nEnsFuncModified, "Update modified=" << nUpdateModified << " functor=" << nEnsFuncModified );
-
- // nTestFunctorRef is call count of insert functor
- CPPUNIT_CHECK_EX( nTestFunctorRef == nInsertSuccess, "nInsertSuccess=" << nInsertSuccess << " functor nTestFunctorRef=" << nTestFunctorRef );
-
- CPPUNIT_MSG( " Clear set (single-threaded)..." );
- timer.reset();
- testSet.clear();
- CPPUNIT_MSG( " Duration=" << timer.duration() );
- CPPUNIT_CHECK( testSet.empty() );
-
- additional_check( testSet );
- print_stat( testSet );
-
- additional_cleanup( testSet );
- }
-
- template <class Set>
- void run_test()
- {
- CPPUNIT_MSG( "Thread count: insert=" << c_nInsertThreadCount
- << " delete=" << c_nDeleteThreadCount
- << " ensure=" << c_nUpdateThreadCount
- << " pass count=" << c_nThreadPassCount
- << " set size=" << c_nSetSize
- );
-
- if ( Set::c_bLoadFactorDepended ) {
- for ( c_nLoadFactor = 1; c_nLoadFactor <= c_nMaxLoadFactor; c_nLoadFactor *= 2 ) {
- CPPUNIT_MSG(" LoadFactor = " << c_nLoadFactor );
- Set s( *this );
- do_test( s );
- if ( c_bPrintGCState )
- print_gc_state();
- }
- }
- else {
- Set s( *this );
- do_test( s );
- if ( c_bPrintGCState )
- print_gc_state();
- }
- }
-
- void setUpParams( const CppUnitMini::TestCfg& cfg );
-
-# include "set2/set_defs.h"
- CDSUNIT_DECLARE_MichaelSet
- CDSUNIT_DECLARE_SkipListSet
- CDSUNIT_DECLARE_SplitList
- CDSUNIT_DECLARE_StripedSet
- CDSUNIT_DECLARE_RefinableSet
- CDSUNIT_DECLARE_CuckooSet
- CDSUNIT_DECLARE_EllenBinTreeSet
- CDSUNIT_DECLARE_FeldmanHashSet_fixed
- CDSUNIT_DECLARE_FeldmanHashSet_city
-
- CPPUNIT_TEST_SUITE_(Set_InsDel_func, "Map_InsDel_func")
- CDSUNIT_TEST_MichaelSet
- CDSUNIT_TEST_SplitList
- CDSUNIT_TEST_SkipListSet
- CDSUNIT_TEST_FeldmanHashSet_fixed
- CDSUNIT_TEST_FeldmanHashSet_city
- CDSUNIT_TEST_EllenBinTreeSet
- CDSUNIT_TEST_StripedSet
- CDSUNIT_TEST_RefinableSet
- CDSUNIT_TEST_CuckooSet
- CPPUNIT_TEST_SUITE_END();
-
- };
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdel_func.h"
-#include "set2/set_type_cuckoo.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDel_func::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_CuckooSet
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdel_func.h"
-#include "set2/set_type_ellen_bintree.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDel_func::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_EllenBinTreeSet
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdel_func.h"
-#include "set2/set_type_feldman_hashset.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDel_func::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_FeldmanHashSet_fixed
- CDSUNIT_DECLARE_FeldmanHashSet_city
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdel_func.h"
-#include "set2/set_type_michael.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDel_func::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_MichaelSet
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdel_func.h"
-#include "set2/set_type_skip_list.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDel_func::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_SkipListSet
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdel_func.h"
-#include "set2/set_type_split_list.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDel_func::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_SplitList
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdel_func.h"
-#include "set2/set_type_striped.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDel_func::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_StripedSet
- CDSUNIT_DECLARE_RefinableSet
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdel_string.h"
-
-namespace set2 {
- CPPUNIT_TEST_SUITE_REGISTRATION( Set_InsDel_string );
-
- void Set_InsDel_string::setUpParams( const CppUnitMini::TestCfg& cfg )
- {
- c_nSetSize = cfg.getSizeT("MapSize", c_nSetSize );
- c_nInsertThreadCount = cfg.getSizeT("InsertThreadCount", c_nInsertThreadCount );
- c_nDeleteThreadCount = cfg.getSizeT("DeleteThreadCount", c_nDeleteThreadCount );
- c_nThreadPassCount = cfg.getSizeT("ThreadPassCount", c_nThreadPassCount );
- c_nMaxLoadFactor = cfg.getSizeT("MaxLoadFactor", c_nMaxLoadFactor );
- c_bPrintGCState = cfg.getBool("PrintGCStateFlag", c_bPrintGCState );
-
- c_nCuckooInitialSize = cfg.getSizeT("CuckooInitialSize", c_nCuckooInitialSize );
- c_nCuckooProbesetSize = cfg.getSizeT("CuckooProbesetSize", c_nCuckooProbesetSize );
- c_nCuckooProbesetThreshold = cfg.getSizeT("CuckooProbesetThreshold", c_nCuckooProbesetThreshold );
-
- c_nFeldmanSet_HeadBits = cfg.getSizeT("FeldmanMapHeadBits", c_nFeldmanSet_HeadBits);
- c_nFeldmanSet_ArrayBits = cfg.getSizeT("FeldmanMapArrayBits", c_nFeldmanSet_ArrayBits);
-
- if ( c_nInsertThreadCount == 0 )
- c_nInsertThreadCount = std::thread::hardware_concurrency();
- if ( c_nDeleteThreadCount == 0 )
- c_nDeleteThreadCount = std::thread::hardware_concurrency();
- }
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_type.h"
-#include "cppunit/thread.h"
-
-#include <vector>
-
-namespace set2 {
-
-#define TEST_CASE(TAG, X) void X();
-
- class Set_InsDel_string: public CppUnitMini::TestCase
- {
- public:
- size_t c_nSetSize = 1000000; // set size
- size_t c_nInsertThreadCount = 4; // count of insertion thread
- size_t c_nDeleteThreadCount = 4; // count of deletion thread
- size_t c_nThreadPassCount = 4; // pass count for each thread
- size_t c_nMaxLoadFactor = 8; // maximum load factor
- bool c_bPrintGCState = true;
-
- size_t c_nCuckooInitialSize = 1024;// initial size for CuckooSet
- size_t c_nCuckooProbesetSize = 16; // CuckooSet probeset size (only for list-based probeset)
- size_t c_nCuckooProbesetThreshold = 0; // CUckooSet probeset threshold (0 - use default)
-
- size_t c_nFeldmanSet_HeadBits = 10;
- size_t c_nFeldmanSet_ArrayBits = 4;
-
- size_t c_nLoadFactor = 2;
-
- private:
- typedef std::string key_type;
- typedef size_t value_type;
-
- const std::vector<std::string> * m_parrString;
-
- template <class Set>
- class Inserter: public CppUnitMini::TestThread
- {
- Set& m_Set;
- typedef typename Set::value_type keyval_type;
-
- virtual Inserter * clone()
- {
- return new Inserter( *this );
- }
- public:
- size_t m_nInsertSuccess;
- size_t m_nInsertFailed;
-
- public:
- Inserter( CppUnitMini::ThreadPool& pool, Set& rSet )
- : CppUnitMini::TestThread( pool )
- , m_Set( rSet )
- {}
- Inserter( Inserter& src )
- : CppUnitMini::TestThread( src )
- , m_Set( src.m_Set )
- {}
-
- Set_InsDel_string& getTest()
- {
- return reinterpret_cast<Set_InsDel_string&>( m_Pool.m_Test );
- }
-
- virtual void init() { cds::threading::Manager::attachThread() ; }
- virtual void fini() { cds::threading::Manager::detachThread() ; }
-
- virtual void test()
- {
- Set& rSet = m_Set;
-
- m_nInsertSuccess =
- m_nInsertFailed = 0;
-
- const std::vector<std::string>& arrString = *getTest().m_parrString;
- size_t nArrSize = arrString.size();
- size_t const nSetSize = getTest().c_nSetSize;
- size_t const nPassCount = getTest().c_nThreadPassCount;
-
- if ( m_nThreadNo & 1 ) {
- for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
- for ( size_t nItem = 0; nItem < nSetSize; ++nItem ) {
- if ( rSet.insert( keyval_type(arrString[nItem % nArrSize], nItem * 8) ) )
- ++m_nInsertSuccess;
- else
- ++m_nInsertFailed;
- }
- }
- }
- else {
- for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
- for ( size_t nItem = nSetSize; nItem > 0; --nItem ) {
- if ( rSet.insert( keyval_type( arrString[nItem % nArrSize], nItem * 8) ) )
- ++m_nInsertSuccess;
- else
- ++m_nInsertFailed;
- }
- }
- }
- }
- };
-
- template <class Set>
- class Deleter: public CppUnitMini::TestThread
- {
- Set& m_Set;
-
- virtual Deleter * clone()
- {
- return new Deleter( *this );
- }
- public:
- size_t m_nDeleteSuccess;
- size_t m_nDeleteFailed;
-
- public:
- Deleter( CppUnitMini::ThreadPool& pool, Set& rSet )
- : CppUnitMini::TestThread( pool )
- , m_Set( rSet )
- {}
- Deleter( Deleter& src )
- : CppUnitMini::TestThread( src )
- , m_Set( src.m_Set )
- {}
-
- Set_InsDel_string& getTest()
- {
- return reinterpret_cast<Set_InsDel_string&>( m_Pool.m_Test );
- }
-
- virtual void init() { cds::threading::Manager::attachThread() ; }
- virtual void fini() { cds::threading::Manager::detachThread() ; }
-
- virtual void test()
- {
- Set& rSet = m_Set;
-
- m_nDeleteSuccess =
- m_nDeleteFailed = 0;
-
- const std::vector<std::string>& arrString = *getTest().m_parrString;
- size_t nArrSize = arrString.size();
- size_t const nSetSize = getTest().c_nSetSize;
- size_t const nPassCount = getTest().c_nThreadPassCount;
-
- if ( m_nThreadNo & 1 ) {
- for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
- for ( size_t nItem = 0; nItem < nSetSize; ++nItem ) {
- if ( rSet.erase( arrString[nItem % nArrSize] ) )
- ++m_nDeleteSuccess;
- else
- ++m_nDeleteFailed;
- }
- }
- }
- else {
- for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
- for ( size_t nItem = nSetSize; nItem > 0; --nItem ) {
- if ( rSet.erase( arrString[nItem % nArrSize] ) )
- ++m_nDeleteSuccess;
- else
- ++m_nDeleteFailed;
- }
- }
- }
- }
- };
-
- template <typename GC, class Set>
- class Extractor: public CppUnitMini::TestThread
- {
- Set& m_Set;
-
- virtual Extractor * clone()
- {
- return new Extractor( *this );
- }
- public:
- size_t m_nDeleteSuccess;
- size_t m_nDeleteFailed;
-
- public:
- Extractor( CppUnitMini::ThreadPool& pool, Set& rSet )
- : CppUnitMini::TestThread( pool )
- , m_Set( rSet )
- {}
- Extractor( Extractor& src )
- : CppUnitMini::TestThread( src )
- , m_Set( src.m_Set )
- {}
-
- Set_InsDel_string& getTest()
- {
- return reinterpret_cast<Set_InsDel_string&>( m_Pool.m_Test );
- }
-
- virtual void init() { cds::threading::Manager::attachThread() ; }
- virtual void fini() { cds::threading::Manager::detachThread() ; }
-
- virtual void test()
- {
- Set& rSet = m_Set;
-
- m_nDeleteSuccess =
- m_nDeleteFailed = 0;
-
- typename Set::guarded_ptr gp;
-
- const std::vector<std::string>& arrString = *getTest().m_parrString;
- size_t nArrSize = arrString.size();
- size_t const nSetSize = getTest().c_nSetSize;
- size_t const nPassCount = getTest().c_nThreadPassCount;
-
- if ( m_nThreadNo & 1 ) {
- for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
- for ( size_t nItem = 0; nItem < nSetSize; ++nItem ) {
- gp = rSet.extract( arrString[nItem % nArrSize]);
- if ( gp )
- ++m_nDeleteSuccess;
- else
- ++m_nDeleteFailed;
- gp.release();
- }
- }
- }
- else {
- for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
- for ( size_t nItem = nSetSize; nItem > 0; --nItem ) {
- gp = rSet.extract( arrString[nItem % nArrSize]);
- if ( gp )
- ++m_nDeleteSuccess;
- else
- ++m_nDeleteFailed;
- gp.release();
- }
- }
- }
- }
- };
-
- template <typename RCU, class Set>
- class Extractor<cds::urcu::gc<RCU>, Set >: public CppUnitMini::TestThread
- {
- Set& m_Set;
-
- virtual Extractor * clone()
- {
- return new Extractor( *this );
- }
- public:
- size_t m_nDeleteSuccess;
- size_t m_nDeleteFailed;
-
- public:
- Extractor( CppUnitMini::ThreadPool& pool, Set& rSet )
- : CppUnitMini::TestThread( pool )
- , m_Set( rSet )
- {}
- Extractor( Extractor& src )
- : CppUnitMini::TestThread( src )
- , m_Set( src.m_Set )
- {}
-
- Set_InsDel_string& getTest()
- {
- return reinterpret_cast<Set_InsDel_string&>( m_Pool.m_Test );
- }
-
- virtual void init() { cds::threading::Manager::attachThread() ; }
- virtual void fini() { cds::threading::Manager::detachThread() ; }
-
- virtual void test()
- {
- Set& rSet = m_Set;
-
- m_nDeleteSuccess =
- m_nDeleteFailed = 0;
-
- typename Set::exempt_ptr xp;
-
- const std::vector<std::string>& arrString = *getTest().m_parrString;
- size_t nArrSize = arrString.size();
- size_t const nSetSize = getTest().c_nSetSize;
- size_t const nPassCount = getTest().c_nThreadPassCount;
-
- if ( m_nThreadNo & 1 ) {
- for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
- for ( size_t nItem = 0; nItem < nSetSize; ++nItem ) {
- if ( Set::c_bExtractLockExternal ) {
- {
- typename Set::rcu_lock l;
- xp = rSet.extract( arrString[nItem % nArrSize] );
- if ( xp )
- ++m_nDeleteSuccess;
- else
- ++m_nDeleteFailed;
- }
- }
- else {
- xp = rSet.extract( arrString[nItem % nArrSize] );
- if ( xp )
- ++m_nDeleteSuccess;
- else
- ++m_nDeleteFailed;
- }
- xp.release();
- }
- }
- }
- else {
- for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
- for ( size_t nItem = nSetSize; nItem > 0; --nItem ) {
- if ( Set::c_bExtractLockExternal ) {
- {
- typename Set::rcu_lock l;
- xp = rSet.extract( arrString[nItem % nArrSize] );
- if ( xp )
- ++m_nDeleteSuccess;
- else
- ++m_nDeleteFailed;
- }
- }
- else {
- xp = rSet.extract( arrString[nItem % nArrSize] );
- if ( xp )
- ++m_nDeleteSuccess;
- else
- ++m_nDeleteFailed;
- }
- xp.release();
- }
- }
- }
- }
- };
-
- protected:
- template <class Set>
- void do_test( Set& testSet )
- {
- typedef Inserter<Set> InserterThread;
- typedef Deleter<Set> DeleterThread;
- cds::OS::Timer timer;
-
- CppUnitMini::ThreadPool pool( *this );
- pool.add( new InserterThread( pool, testSet ), c_nInsertThreadCount );
- pool.add( new DeleterThread( pool, testSet ), c_nDeleteThreadCount );
- pool.run();
- CPPUNIT_MSG( " Duration=" << pool.avgDuration() );
-
- size_t nInsertSuccess = 0;
- size_t nInsertFailed = 0;
- size_t nDeleteSuccess = 0;
- size_t nDeleteFailed = 0;
- for ( CppUnitMini::ThreadPool::iterator it = pool.begin(); it != pool.end(); ++it ) {
- InserterThread * pThread = dynamic_cast<InserterThread *>( *it );
- if ( pThread ) {
- nInsertSuccess += pThread->m_nInsertSuccess;
- nInsertFailed += pThread->m_nInsertFailed;
- }
- else {
- DeleterThread * p = static_cast<DeleterThread *>( *it );
- nDeleteSuccess += p->m_nDeleteSuccess;
- nDeleteFailed += p->m_nDeleteFailed;
- }
- }
-
- CPPUNIT_MSG( " Totals: Ins succ=" << nInsertSuccess
- << " Del succ=" << nDeleteSuccess << "\n"
- << " : Ins fail=" << nInsertFailed
- << " Del fail=" << nDeleteFailed
- << " Set size=" << testSet.size()
- );
-
-
- CPPUNIT_MSG( " Clear set (single-threaded)..." );
- timer.reset();
- for ( size_t i = 0; i < m_parrString->size(); ++i )
- testSet.erase( (*m_parrString)[i] );
- CPPUNIT_MSG( " Duration=" << timer.duration() );
- CPPUNIT_ASSERT( testSet.empty() );
-
- additional_check( testSet );
- print_stat( testSet );
- additional_cleanup( testSet );
- }
-
- template <class Set>
- void do_test_extract( Set& testSet )
- {
- typedef Inserter<Set> InserterThread;
- typedef Deleter<Set> DeleterThread;
- typedef Extractor<typename Set::gc, Set> ExtractThread;
-
- size_t nDelThreadCount = c_nDeleteThreadCount / 2;
-
- CppUnitMini::ThreadPool pool( *this );
- pool.add( new InserterThread( pool, testSet ), c_nInsertThreadCount );
- pool.add( new DeleterThread( pool, testSet ), nDelThreadCount );
- pool.add( new ExtractThread( pool, testSet ), c_nDeleteThreadCount - nDelThreadCount );
- pool.run();
- CPPUNIT_MSG( " Duration=" << pool.avgDuration() );
-
- size_t nInsertSuccess = 0;
- size_t nInsertFailed = 0;
- size_t nDeleteSuccess = 0;
- size_t nDeleteFailed = 0;
- size_t nExtractSuccess = 0;
- size_t nExtractFailed = 0;
- for ( CppUnitMini::ThreadPool::iterator it = pool.begin(); it != pool.end(); ++it ) {
- InserterThread * pThread = dynamic_cast<InserterThread *>( *it );
- if ( pThread ) {
- nInsertSuccess += pThread->m_nInsertSuccess;
- nInsertFailed += pThread->m_nInsertFailed;
- }
- else {
- DeleterThread * p = dynamic_cast<DeleterThread *>( *it );
- if ( p ) {
- nDeleteSuccess += p->m_nDeleteSuccess;
- nDeleteFailed += p->m_nDeleteFailed;
- }
- else {
- ExtractThread * pExtract = dynamic_cast<ExtractThread *>( *it );
- assert( pExtract );
- nExtractSuccess += pExtract->m_nDeleteSuccess;
- nExtractFailed += pExtract->m_nDeleteFailed;
- }
- }
- }
-
- CPPUNIT_MSG( " Totals: Ins succ=" << nInsertSuccess
- << " Del succ=" << nDeleteSuccess
- << " Extract succ= " << nExtractSuccess << "\n"
- << " : Ins fail=" << nInsertFailed
- << " Del fail=" << nDeleteFailed
- << " Extract fail=" << nExtractFailed
- << " Set size=" << testSet.size()
- );
-
-
- CPPUNIT_MSG( " Clear set (single-threaded)..." );
- cds::OS::Timer timer;
- for ( size_t i = 0; i < m_parrString->size(); ++i )
- testSet.erase( (*m_parrString)[i] );
- CPPUNIT_MSG( " Duration=" << timer.duration() );
- CPPUNIT_ASSERT( testSet.empty() );
-
- additional_check( testSet );
- print_stat( testSet );
- additional_cleanup( testSet );
- }
-
- template <class Set>
- void run_test()
- {
- m_parrString = &CppUnitMini::TestCase::getTestStrings();
-
- CPPUNIT_MSG( "Thread count: insert=" << c_nInsertThreadCount
- << " delete=" << c_nDeleteThreadCount
- << " pass count=" << c_nThreadPassCount
- << " set size=" << c_nSetSize
- );
-
- if ( Set::c_bLoadFactorDepended ) {
- for ( c_nLoadFactor = 1; c_nLoadFactor <= c_nMaxLoadFactor; c_nLoadFactor *= 2 ) {
- CPPUNIT_MSG(" LoadFactor = " << c_nLoadFactor );
- Set s( *this );
- do_test( s );
- if ( c_bPrintGCState )
- print_gc_state();
- }
- }
- else {
- Set s( *this );
- do_test( s );
- if ( c_bPrintGCState )
- print_gc_state();
- }
- }
-
- template <class Set>
- void run_test_extract()
- {
- m_parrString = &CppUnitMini::TestCase::getTestStrings();
-
- CPPUNIT_MSG( "Thread count: insert=" << c_nInsertThreadCount
- << " delete=" << c_nDeleteThreadCount
- << " pass count=" << c_nThreadPassCount
- << " set size=" << c_nSetSize
- );
-
- if ( Set::c_bLoadFactorDepended ) {
- for ( c_nLoadFactor = 1; c_nLoadFactor <= c_nMaxLoadFactor; c_nLoadFactor *= 2 ) {
- CPPUNIT_MSG(" LoadFactor = " << c_nLoadFactor );
- Set s( *this );
- do_test_extract( s );
- if ( c_bPrintGCState )
- print_gc_state();
- }
- }
- else {
- Set s( *this );
- do_test_extract( s );
- if ( c_bPrintGCState )
- print_gc_state();
- }
- }
-
- void setUpParams( const CppUnitMini::TestCfg& cfg );
-
-# include "set2/set_defs.h"
- CDSUNIT_DECLARE_MichaelSet
- CDSUNIT_DECLARE_SplitList
- CDSUNIT_DECLARE_StripedSet
- CDSUNIT_DECLARE_RefinableSet
- CDSUNIT_DECLARE_CuckooSet
- CDSUNIT_DECLARE_SkipListSet
- CDSUNIT_DECLARE_EllenBinTreeSet
- CDSUNIT_DECLARE_FeldmanHashSet_stdhash
- CDSUNIT_DECLARE_FeldmanHashSet_city
- CDSUNIT_DECLARE_StdSet
-
- CPPUNIT_TEST_SUITE_(Set_InsDel_string, "Map_InsDel_func")
- CDSUNIT_TEST_MichaelSet
- CDSUNIT_TEST_SplitList
- CDSUNIT_TEST_SkipListSet
- CDSUNIT_TEST_FeldmanHashSet_stdhash
- CDSUNIT_TEST_FeldmanHashSet_city
- CDSUNIT_TEST_EllenBinTreeSet
- CDSUNIT_TEST_StripedSet
- CDSUNIT_TEST_RefinableSet
- CDSUNIT_TEST_CuckooSet
- CDSUNIT_TEST_StdSet
- CPPUNIT_TEST_SUITE_END();
- };
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdel_string.h"
-#include "set2/set_type_cuckoo.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDel_string::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_CuckooSet
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdel_string.h"
-#include "set2/set_type_ellen_bintree.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDel_string::X() { run_test_extract<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_EllenBinTreeSet
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdel_string.h"
-#include "set2/set_type_feldman_hashset.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDel_string::X() { run_test_extract<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_FeldmanHashSet_stdhash
- CDSUNIT_DECLARE_FeldmanHashSet_city
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdel_string.h"
-#include "set2/set_type_michael.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDel_string::X() { run_test_extract<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_MichaelSet
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdel_string.h"
-#include "set2/set_type_skip_list.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDel_string::X() { run_test_extract<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_SkipListSet
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdel_string.h"
-#include "set2/set_type_split_list.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDel_string::X() { run_test_extract<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_SplitList
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdel_string.h"
-#include "set2/set_type_std.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDel_string::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_StdSet
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdel_string.h"
-#include "set2/set_type_striped.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDel_string::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_StripedSet
- CDSUNIT_DECLARE_RefinableSet
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdelfind.h"
-
-namespace set2 {
- CPPUNIT_TEST_SUITE_REGISTRATION( Set_InsDelFind );
-
- void Set_InsDelFind::setUpParams( const CppUnitMini::TestCfg& cfg )
- {
- c_nSetSize = cfg.getSizeT("InitialMapSize", c_nSetSize );
- c_nThreadCount = cfg.getSizeT("ThreadCount", c_nThreadCount );
- c_nMaxLoadFactor = cfg.getSizeT("MaxLoadFactor", c_nMaxLoadFactor );
- c_nInsertPercentage = cfg.getUInt("InsertPercentage", c_nInsertPercentage );
- c_nDeletePercentage = cfg.getUInt("DeletePercentage", c_nDeletePercentage );
- c_nDuration = cfg.getUInt("Duration", c_nDuration );
- c_bPrintGCState = cfg.getBool("PrintGCStateFlag", c_bPrintGCState );
-
- c_nCuckooInitialSize = cfg.getSizeT("CuckooInitialSize", c_nCuckooInitialSize );
- c_nCuckooProbesetSize = cfg.getSizeT("CuckooProbesetSize", c_nCuckooProbesetSize );
- c_nCuckooProbesetThreshold = cfg.getSizeT("CuckooProbesetThreshold", c_nCuckooProbesetThreshold );
-
- c_nFeldmanSet_HeadBits = cfg.getSizeT("FeldmanMapHeadBits", c_nFeldmanSet_HeadBits);
- c_nFeldmanSet_ArrayBits = cfg.getSizeT("FeldmanMapArrayBits", c_nFeldmanSet_ArrayBits);
-
- if ( c_nThreadCount == 0 )
- c_nThreadCount = std::thread::hardware_concurrency();
-
- CPPUNIT_ASSERT( c_nInsertPercentage + c_nDeletePercentage <= 100 );
-
- actions * pFirst = m_arrShuffle;
- actions * pLast = m_arrShuffle + c_nInsertPercentage;
- std::fill( pFirst, pLast, do_insert );
- pFirst = pLast;
- pLast += c_nDeletePercentage;
- std::fill( pFirst, pLast, do_delete );
- pFirst = pLast;
- pLast = m_arrShuffle + sizeof(m_arrShuffle)/sizeof(m_arrShuffle[0]);
- std::fill( pFirst, pLast, do_find );
- shuffle( m_arrShuffle, pLast );
- }
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_type.h"
-#include "cppunit/thread.h"
-
-namespace set2 {
-
-#define TEST_CASE(TAG, X) void X();
-
- class Set_InsDelFind: public CppUnitMini::TestCase
- {
- public:
- size_t c_nSetSize = 500000; // initial set size
- size_t c_nThreadCount = 8; // thread count
- size_t c_nMaxLoadFactor = 8; // maximum load factor
- unsigned int c_nInsertPercentage = 5;
- unsigned int c_nDeletePercentage = 5;
- unsigned int c_nDuration = 30; // test duration, seconds
- bool c_bPrintGCState = true;
-
- size_t c_nCuckooInitialSize = 1024;// initial size for CuckooSet
- size_t c_nCuckooProbesetSize = 16; // CuckooSet probeset size (only for list-based probeset)
- size_t c_nCuckooProbesetThreshold = 0; // CUckooSet probeset threshold (0 - use default)
-
- size_t c_nFeldmanSet_HeadBits = 10;
- size_t c_nFeldmanSet_ArrayBits = 4;
-
- size_t c_nLoadFactor = 2;
-
- public:
- enum actions
- {
- do_find,
- do_insert,
- do_delete
- };
- static const unsigned int c_nShuffleSize = 100;
- actions m_arrShuffle[c_nShuffleSize];
-
- protected:
- typedef size_t key_type;
- typedef size_t value_type;
-
- template <class Set>
- class WorkThread: public CppUnitMini::TestThread
- {
- Set& m_Map;
-
- virtual WorkThread * clone()
- {
- return new WorkThread( *this );
- }
- public:
- size_t m_nInsertSuccess;
- size_t m_nInsertFailed;
- size_t m_nDeleteSuccess;
- size_t m_nDeleteFailed;
- size_t m_nFindSuccess;
- size_t m_nFindFailed;
-
- public:
- WorkThread( CppUnitMini::ThreadPool& pool, Set& rMap )
- : CppUnitMini::TestThread( pool )
- , m_Map( rMap )
- {}
- WorkThread( WorkThread& src )
- : CppUnitMini::TestThread( src )
- , m_Map( src.m_Map )
- {}
-
- Set_InsDelFind& getTest()
- {
- return reinterpret_cast<Set_InsDelFind&>( m_Pool.m_Test );
- }
-
- virtual void init() { cds::threading::Manager::attachThread() ; }
- virtual void fini() { cds::threading::Manager::detachThread() ; }
-
- virtual void test()
- {
- Set& rMap = m_Map;
-
- m_nInsertSuccess =
- m_nInsertFailed =
- m_nDeleteSuccess =
- m_nDeleteFailed =
- m_nFindSuccess =
- m_nFindFailed = 0;
-
- actions * pAct = getTest().m_arrShuffle;
- unsigned int i = 0;
- size_t const nNormalize = size_t(-1) / ( getTest().c_nSetSize * 2);
-
- size_t nRand = 0;
- while ( !time_elapsed() ) {
- nRand = cds::bitop::RandXorShift(nRand);
- size_t n = nRand / nNormalize;
- switch ( pAct[i] ) {
- case do_find:
- if ( rMap.contains( n ))
- ++m_nFindSuccess;
- else
- ++m_nFindFailed;
- break;
- case do_insert:
- if ( rMap.insert( n ))
- ++m_nInsertSuccess;
- else
- ++m_nInsertFailed;
- break;
- case do_delete:
- if ( rMap.erase( n ))
- ++m_nDeleteSuccess;
- else
- ++m_nDeleteFailed;
- break;
- }
-
- if ( ++i >= c_nShuffleSize )
- i = 0;
- }
- }
- };
-
- protected:
- template <class Set>
- void do_test( Set& testSet )
- {
- typedef WorkThread<Set> work_thread;
-
- // fill map - only odd number
- {
- size_t * pInitArr = new size_t[ c_nSetSize ];
- size_t * pEnd = pInitArr + c_nSetSize;
- for ( size_t i = 0; i < c_nSetSize; ++i )
- pInitArr[i] = i * 2 + 1;
- shuffle( pInitArr, pEnd );
- for ( size_t * p = pInitArr; p < pEnd; ++p )
- testSet.insert( typename Set::value_type( *p, *p ) );
- delete [] pInitArr;
- }
-
- cds::OS::Timer timer;
-
- CppUnitMini::ThreadPool pool( *this );
- pool.add( new work_thread( pool, testSet ), c_nThreadCount );
- pool.run( c_nDuration );
- CPPUNIT_MSG( " Duration=" << pool.avgDuration() );
-
- size_t nInsertSuccess = 0;
- size_t nInsertFailed = 0;
- size_t nDeleteSuccess = 0;
- size_t nDeleteFailed = 0;
- size_t nFindSuccess = 0;
- size_t nFindFailed = 0;
- for ( CppUnitMini::ThreadPool::iterator it = pool.begin(); it != pool.end(); ++it ) {
- work_thread * pThread = static_cast<work_thread *>( *it );
- assert( pThread != nullptr );
- nInsertSuccess += pThread->m_nInsertSuccess;
- nInsertFailed += pThread->m_nInsertFailed;
- nDeleteSuccess += pThread->m_nDeleteSuccess;
- nDeleteFailed += pThread->m_nDeleteFailed;
- nFindSuccess += pThread->m_nFindSuccess;
- nFindFailed += pThread->m_nFindFailed;
- }
-
- size_t nTotalOps = nInsertSuccess + nInsertFailed + nDeleteSuccess + nDeleteFailed + nFindSuccess + nFindFailed;
-
- CPPUNIT_MSG( " Totals (success/failed): \n\t"
- << " Insert=" << nInsertSuccess << '/' << nInsertFailed << "\n\t"
- << " Delete=" << nDeleteSuccess << '/' << nDeleteFailed << "\n\t"
- << " Find=" << nFindSuccess << '/' << nFindFailed << "\n\t"
- << " Speed=" << (nFindSuccess + nFindFailed) / c_nDuration << " find/sec\n\t"
- << " " << (nInsertSuccess + nDeleteSuccess) / c_nDuration << " modify/sec\n\t"
- << " Total ops=" << nTotalOps << "\n\t"
- << " speed=" << nTotalOps / c_nDuration << " ops/sec\n\t"
- << " Set size=" << testSet.size()
- );
-
-
- CPPUNIT_MSG( " Clear map (single-threaded)..." );
- timer.reset();
- testSet.clear();
- CPPUNIT_MSG( " Duration=" << timer.duration() );
- CPPUNIT_CHECK_EX( testSet.empty(), ((long long) testSet.size()) );
-
- additional_check( testSet );
- print_stat( testSet );
- additional_cleanup( testSet );
- }
-
- template <class Set>
- void run_test()
- {
- CPPUNIT_MSG( "Thread count=" << c_nThreadCount
- << " initial map size=" << c_nSetSize
- << " insert=" << c_nInsertPercentage << '%'
- << " delete=" << c_nDeletePercentage << '%'
- << " duration=" << c_nDuration << "s"
- );
-
- if ( Set::c_bLoadFactorDepended ) {
- for ( c_nLoadFactor = 1; c_nLoadFactor <= c_nMaxLoadFactor; c_nLoadFactor *= 2 ) {
- CPPUNIT_MSG(" LoadFactor = " << c_nLoadFactor );
- Set s( *this );
- do_test( s );
- if ( c_bPrintGCState )
- print_gc_state();
- }
- }
- else {
- Set s( *this );
- do_test( s );
- if ( c_bPrintGCState )
- print_gc_state();
- }
- }
-
- void setUpParams( const CppUnitMini::TestCfg& cfg );
-
-# include "set2/set_defs.h"
- CDSUNIT_DECLARE_MichaelSet
- CDSUNIT_DECLARE_SplitList
- CDSUNIT_DECLARE_StripedSet
- CDSUNIT_DECLARE_RefinableSet
- CDSUNIT_DECLARE_CuckooSet
- CDSUNIT_DECLARE_SkipListSet
- CDSUNIT_DECLARE_EllenBinTreeSet
- CDSUNIT_DECLARE_FeldmanHashSet
- CDSUNIT_DECLARE_StdSet
-
- CPPUNIT_TEST_SUITE_(Set_InsDelFind, "Map_InsDelFind")
- CDSUNIT_TEST_MichaelSet
- CDSUNIT_TEST_SplitList
- CDSUNIT_TEST_SkipListSet
- CDSUNIT_TEST_FeldmanHashSet
- CDSUNIT_TEST_EllenBinTreeSet
- CDSUNIT_TEST_StripedSet
- CDSUNIT_TEST_RefinableSet
- CDSUNIT_TEST_CuckooSet
- CDSUNIT_TEST_StdSet
- CPPUNIT_TEST_SUITE_END();
-
- };
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdelfind.h"
-#include "set2/set_type_cuckoo.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDelFind::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_CuckooSet
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdelfind.h"
-#include "set2/set_type_ellen_bintree.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDelFind::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_EllenBinTreeSet
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdelfind.h"
-#include "set2/set_type_feldman_hashset.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDelFind::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_FeldmanHashSet
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdelfind.h"
-#include "set2/set_type_michael.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDelFind::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_MichaelSet
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdelfind.h"
-#include "set2/set_type_skip_list.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDelFind::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_SkipListSet
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdelfind.h"
-#include "set2/set_type_split_list.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDelFind::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_SplitList
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdelfind.h"
-#include "set2/set_type_std.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDelFind::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_StdSet
-} // namespace set2
+++ /dev/null
-/*
- 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 "set2/set_insdelfind.h"
-#include "set2/set_type_striped.h"
-
-#undef TEST_CASE
-#define TEST_CASE(TAG, X) void Set_InsDelFind::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
-#include "set2/set_defs.h"
-
-namespace set2 {
- CDSUNIT_DECLARE_StripedSet
- CDSUNIT_DECLARE_RefinableSet
-} // namespace set2
+++ /dev/null
-/*
- 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 CDSUNIT_SET_TYPE_H
-#define CDSUNIT_SET_TYPE_H
-
-#include <cds/urcu/general_instant.h>
-#include <cds/urcu/general_buffered.h>
-#include <cds/urcu/general_threaded.h>
-#include <cds/urcu/signal_buffered.h>
-#include <cds/urcu/signal_threaded.h>
-
-#include <cds/opt/hash.h>
-#include <cds/sync/spinlock.h>
-#include <boost/functional/hash/hash.hpp>
-
-#include "cppunit/cppunit_mini.h"
-#include "lock/nolock.h"
-#include "michael_alloc.h"
-
-namespace set2 {
- namespace cc = cds::container;
- namespace co = cds::opt;
-
- typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_gpi;
- typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_gpb;
- typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_gpt;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_shb;
- typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_sht;
-#endif
-
- template <typename Key>
- struct cmp {
- int operator ()(Key const& k1, Key const& k2) const
- {
- if ( std::less<Key>( k1, k2 ) )
- return -1;
- return std::less<Key>( k2, k1 ) ? 1 : 0;
- }
- };
-
-#define CDSUNIT_INT_COMPARE(t) template <> struct cmp<t> { int operator()( t k1, t k2 ){ return (int)(k1 - k2); } }
- CDSUNIT_INT_COMPARE(char);
- CDSUNIT_INT_COMPARE(unsigned char);
- CDSUNIT_INT_COMPARE(int);
- CDSUNIT_INT_COMPARE(unsigned int);
- CDSUNIT_INT_COMPARE(long);
- CDSUNIT_INT_COMPARE(unsigned long);
- CDSUNIT_INT_COMPARE(long long);
- CDSUNIT_INT_COMPARE(unsigned long long);
-#undef CDSUNIT_INT_COMPARE
-
- template <>
- struct cmp<std::string>
- {
- int operator()(std::string const& s1, std::string const& s2)
- {
- return s1.compare( s2 );
- }
- int operator()(std::string const& s1, char const * s2)
- {
- return s1.compare( s2 );
- }
- int operator()(char const * s1, std::string const& s2)
- {
- return -s2.compare( s1 );
- }
- };
-
- // forward
- template <typename ImplSelector, typename Key, typename Value>
- struct set_type;
-
- template <typename Key, typename Value>
- struct set_type_base
- {
- typedef Key key_type;
- typedef Value value_type;
-
- struct key_val {
- key_type key;
- value_type val;
-
- /*explicit*/ key_val( key_type const& k ): key(k), val() {}
- key_val( key_type const& k, value_type const& v ): key(k), val(v) {}
-
- template <typename K>
- /*explicit*/ key_val( K const& k ): key(k) {}
-
- template <typename K, typename T>
- key_val( K const& k, T const& v ): key(k), val(v) {}
- };
-
- typedef co::v::hash<key_type> key_hash;
- typedef std::less<key_type> key_less;
- typedef cmp<key_type> key_compare;
-
- struct less {
- bool operator()( key_val const& k1, key_val const& k2 ) const
- {
- return key_less()( k1.key, k2.key );
- }
- bool operator()( key_type const& k1, key_val const& k2 ) const
- {
- return key_less()( k1, k2.key );
- }
- bool operator()( key_val const& k1, key_type const& k2 ) const
- {
- return key_less()( k1.key, k2 );
- }
- };
-
- struct compare {
- int operator()( key_val const& k1, key_val const& k2 ) const
- {
- return key_compare()( k1.key, k2.key );
- }
- int operator()( key_type const& k1, key_val const& k2 ) const
- {
- return key_compare()( k1, k2.key );
- }
- int operator()( key_val const& k1, key_type const& k2 ) const
- {
- return key_compare()( k1.key, k2 );
- }
- };
-
- struct equal_to {
- bool operator()( key_val const& k1, key_val const& k2 ) const
- {
- return key_compare()( k1.key, k2.key ) == 0;
- }
- bool operator()( key_type const& k1, key_val const& k2 ) const
- {
- return key_compare()( k1, k2.key ) == 0;
- }
- bool operator()( key_val const& k1, key_type const& k2 ) const
- {
- return key_compare()( k1.key, k2 ) == 0;
- }
- };
-
-
- struct hash: public key_hash
- {
- size_t operator()( key_val const& v ) const
- {
- return key_hash::operator()( v.key );
- }
- size_t operator()( key_type const& key ) const
- {
- return key_hash::operator()( key );
- }
- template <typename Q>
- size_t operator()( Q const& k ) const
- {
- return key_hash::operator()( k );
- }
- };
-
- struct hash2: public hash
- {
- size_t operator()( key_val const& k ) const
- {
- size_t seed = ~hash::operator ()( k );
- boost::hash_combine( seed, k.key );
- return seed;
- }
- size_t operator()( key_type const& k ) const
- {
- size_t seed = ~hash::operator ()( k );
- boost::hash_combine( seed, k );
- return seed;
- }
- template <typename Q>
- size_t operator()( Q const& k ) const
- {
- return key_hash::operator()( k );
- }
- };
- };
-
-
- // *************************************************
- // print_stat
- // *************************************************
-
- template <typename Set>
- static inline void print_stat( Set const& /*s*/ )
- {}
-
-
- //*******************************************************
- // additional_check
- //*******************************************************
-
- template <typename Set>
- static inline void additional_check( Set& /*set*/ )
- {}
-
- template <typename Set>
- static inline void additional_cleanup( Set& /*set*/ )
- {}
-
- //*******************************************************
- // check_before_clear
- //*******************************************************
-
- template <typename Set>
- static inline void check_before_clear( Set& /*s*/ )
- {}
-
-} // namespace set2
-
-#endif // ifndef CDSUNIT_SET_TYPE_H
+++ /dev/null
-/*
- 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 CDSUNIT_SET_TYPE_CUCKOO_H
-#define CDSUNIT_SET_TYPE_CUCKOO_H
-
-#include "set2/set_type.h"
-
-#include <cds/container/cuckoo_set.h>
-#include "print_cuckoo_stat.h"
-
-namespace set2 {
-
- template <typename V, typename Traits>
- class CuckooSet : public cc::CuckooSet< V, Traits >
- {
- public:
- typedef cc::CuckooSet< V, Traits > cuckoo_base_class;
-
- public:
- template <typename Config>
- CuckooSet( Config const& cfg )
- : cuckoo_base_class(
-
- cfg.c_nCuckooInitialSize,
- static_cast<unsigned int>( cfg.c_nCuckooProbesetSize ),
- static_cast<unsigned int>( cfg.c_nCuckooProbesetThreshold )
- )
- {}
-
- template <typename Q, typename Pred>
- bool erase_with( Q const& key, Pred /*pred*/ )
- {
- return cuckoo_base_class::erase_with( key, typename std::conditional< cuckoo_base_class::c_isSorted, Pred, typename Pred::equal_to>::type() );
- }
-
- // for testing
- static CDS_CONSTEXPR bool const c_bExtractSupported = false;
- static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
- static CDS_CONSTEXPR bool const c_bEraseExactKey = false;
- };
-
- struct tag_CuckooSet;
-
- template <typename Key, typename Val>
- struct set_type< tag_CuckooSet, Key, Val >: public set_type_base< Key, Val >
- {
- typedef set_type_base< Key, Val > base_class;
- typedef typename base_class::key_val key_val;
- typedef typename base_class::compare compare;
- typedef typename base_class::equal_to equal_to;
- typedef typename base_class::less less;
- typedef typename base_class::hash hash;
- typedef typename base_class::hash2 hash2;
-
- // ***************************************************************************
- // CuckooSet
-
- template <typename Traits>
- struct traits_CuckooStripedSet : public Traits
- {
- typedef cc::cuckoo::striping<> mutex_policy;
- };
- template <typename Traits>
- struct traits_CuckooRefinableSet : public Traits
- {
- typedef cc::cuckoo::refinable<> mutex_policy;
- };
-
- struct traits_CuckooSet_list_unord :
- public cc::cuckoo::make_traits <
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- , co::equal_to< equal_to >
- , co::hash< std::tuple< hash, hash2 > >
- > ::type
- {};
- typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_list_unord>> CuckooStripedSet_list_unord;
- typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_list_unord>> CuckooRefinableSet_list_unord;
-
- struct traits_CuckooSet_list_unord_stat : public traits_CuckooSet_list_unord
- {
- typedef cc::cuckoo::stat stat;
- };
- typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_list_unord_stat>> CuckooStripedSet_list_unord_stat;
- typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_list_unord_stat>> CuckooRefinableSet_list_unord_stat;
-
- struct traits_CuckooSet_list_unord_storehash : public traits_CuckooSet_list_unord
- {
- static CDS_CONSTEXPR const bool store_hash = true;
- };
- typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_list_unord_storehash>> CuckooStripedSet_list_unord_storehash;
- typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_list_unord_storehash>> CuckooRefinableSet_list_unord_storehash;
-
- struct traits_CuckooSet_list_ord :
- public cc::cuckoo::make_traits <
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- , co::compare< compare >
- , co::hash< std::tuple< hash, hash2 > >
- > ::type
- {};
- typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_list_ord>> CuckooStripedSet_list_ord;
- typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_list_ord>> CuckooRefinableSet_list_ord;
-
- struct traits_CuckooSet_list_ord_stat : public traits_CuckooSet_list_ord
- {
- typedef cc::cuckoo::stat stat;
- };
- typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_list_ord_stat>> CuckooStripedSet_list_ord_stat;
- typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_list_ord_stat>> CuckooRefinableSet_list_ord_stat;
-
- struct traits_CuckooSet_list_ord_storehash : public traits_CuckooSet_list_ord
- {
- static CDS_CONSTEXPR const bool store_hash = true;
- };
- typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_list_ord_storehash>> CuckooStripedSet_list_ord_storehash;
- typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_list_ord_storehash>> CuckooRefinableSet_list_ord_storehash;
-
-
- struct traits_CuckooSet_vector_unord :
- public cc::cuckoo::make_traits <
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- , co::equal_to< equal_to >
- , co::hash< std::tuple< hash, hash2 > >
- > ::type
- {};
- typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_vector_unord>> CuckooStripedSet_vector_unord;
- typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_vector_unord>> CuckooRefinableSet_vector_unord;
-
- struct traits_CuckooSet_vector_unord_stat : public traits_CuckooSet_vector_unord
- {
- typedef cc::cuckoo::stat stat;
- };
- typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_vector_unord_stat>> CuckooStripedSet_vector_unord_stat;
- typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_vector_unord_stat>> CuckooRefinableSet_vector_unord_stat;
-
- struct traits_CuckooSet_vector_unord_storehash : public traits_CuckooSet_vector_unord
- {
- static CDS_CONSTEXPR const bool store_hash = true;
- };
- typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_vector_unord_storehash>> CuckooStripedSet_vector_unord_storehash;
- typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_vector_unord_storehash>> CuckooRefinableSet_vector_unord_storehash;
-
- struct traits_CuckooSet_vector_ord :
- public cc::cuckoo::make_traits <
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- , co::compare< compare >
- , co::hash< std::tuple< hash, hash2 > >
- > ::type
- {};
- typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_vector_ord>> CuckooStripedSet_vector_ord;
- typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_vector_ord>> CuckooRefinableSet_vector_ord;
-
- struct traits_CuckooSet_vector_ord_stat : public traits_CuckooSet_vector_ord
- {
- typedef cc::cuckoo::stat stat;
- };
- typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_vector_ord_stat>> CuckooStripedSet_vector_ord_stat;
- typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_vector_ord_stat>> CuckooRefinableSet_vector_ord_stat;
-
- struct traits_CuckooSet_vector_ord_storehash : public traits_CuckooSet_vector_ord
- {
- static CDS_CONSTEXPR const bool store_hash = true;
- };
- typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_vector_ord_storehash>> CuckooStripedSet_vector_ord_storehash;
- typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_vector_ord_storehash>> CuckooRefinableSet_vector_ord_storehash;
-
- };
-
- template <typename T, typename Traits >
- static inline void print_stat( cc::CuckooSet< T, Traits > const& s )
- {
- CPPUNIT_MSG( s.statistics() << s.mutex_policy_statistics() );
- }
-
- template <typename V, typename Traits>
- static inline void print_stat( CuckooSet< V, Traits > const& s )
- {
- typedef CuckooSet< V, Traits > set_type;
- print_stat( static_cast<typename set_type::cuckoo_base_class const&>(s) );
- }
-
-} // namespace set2
-
-#endif // #ifndef CDSUNIT_SET_TYPE_CUCKOO_H
+++ /dev/null
-/*
- 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 CDSUNIT_SET_TYPE_ELLEN_BINTREE_H
-#define CDSUNIT_SET_TYPE_ELLEN_BINTREE_H
-
-#include "set2/set_type.h"
-
-#include <cds/container/ellen_bintree_set_rcu.h>
-#include <cds/container/ellen_bintree_set_hp.h>
-#include <cds/container/ellen_bintree_set_dhp.h>
-
-#include "print_ellenbintree_stat.h"
-
-namespace set2 {
-
- template <class GC, typename Key, typename T, typename Traits = cc::ellen_bintree::traits >
- class EllenBinTreeSet : public cc::EllenBinTreeSet< GC, Key, T, Traits >
- {
- typedef cc::EllenBinTreeSet< GC, Key, T, Traits > base_class;
- public:
- template <typename Config>
- EllenBinTreeSet( Config const& /*cfg*/ )
- {}
-
- // for testing
- static CDS_CONSTEXPR bool const c_bExtractSupported = true;
- static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
- static CDS_CONSTEXPR bool const c_bEraseExactKey = false;
- };
-
- struct tag_EllenBinTreeSet;
-
- template <typename Key, typename Val>
- struct set_type< tag_EllenBinTreeSet, Key, Val >: public set_type_base< Key, Val >
- {
- typedef set_type_base< Key, Val > base_class;
- typedef typename base_class::key_type key_type;
- typedef typename base_class::key_val key_val;
- typedef typename base_class::compare compare;
- typedef typename base_class::less less;
- typedef typename base_class::key_less key_less;
-
- struct ellen_bintree_props {
- struct key_extractor {
- void operator()( key_type& dest, key_val const& src ) const
- {
- dest = src.key;
- }
- };
-
- struct less {
- bool operator()( key_val const& v1, key_val const& v2 ) const
- {
- return key_less()( v1.key, v2.key );
- }
- bool operator()( key_type const& k, key_val const& v ) const
- {
- return key_less()( k, v.key );
- }
- bool operator()( key_val const& v, key_type const& k ) const
- {
- return key_less()( v.key, k );
- }
- bool operator()( key_type const& k1, key_type const& k2 ) const
- {
- return key_less()( k1, k2 );
- }
- };
-
- struct hp_gc {
- typedef cc::ellen_bintree::node<cds::gc::HP, key_val> leaf_node;
- typedef cc::ellen_bintree::internal_node< key_type, leaf_node > internal_node;
- typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc;
- };
-
- struct dhp_gc {
- typedef cc::ellen_bintree::node<cds::gc::DHP, key_val> leaf_node;
- typedef cc::ellen_bintree::internal_node< key_type, leaf_node > internal_node;
- typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc;
- };
-
- struct gpi {
- typedef cc::ellen_bintree::node<rcu_gpi, key_val> leaf_node;
- typedef cc::ellen_bintree::internal_node< key_type, leaf_node > internal_node;
- typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc;
- };
- struct gpb {
- typedef cc::ellen_bintree::node<rcu_gpb, key_val> leaf_node;
- typedef cc::ellen_bintree::internal_node< key_type, leaf_node > internal_node;
- typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc;
- };
- struct gpt {
- typedef cc::ellen_bintree::node<rcu_gpt, key_val> leaf_node;
- typedef cc::ellen_bintree::internal_node< key_type, leaf_node > internal_node;
- typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc;
- };
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- struct shb {
- typedef cc::ellen_bintree::node<rcu_shb, key_val> leaf_node;
- typedef cc::ellen_bintree::internal_node< key_type, leaf_node > internal_node;
- typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc;
- };
- struct sht {
- typedef cc::ellen_bintree::node<rcu_sht, key_val> leaf_node;
- typedef cc::ellen_bintree::internal_node< key_type, leaf_node > internal_node;
- typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc;
- };
-#endif
- };
-
- struct traits_EllenBinTreeSet: public cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename ellen_bintree_props::key_extractor >
- ,co::less< typename ellen_bintree_props::less >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- >::type
- {};
-
- struct traits_EllenBinTreeSet_hp : public traits_EllenBinTreeSet
- {
- typedef cds::memory::pool_allocator< typename ellen_bintree_props::hp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
- };
- typedef EllenBinTreeSet< cds::gc::HP, key_type, key_val, traits_EllenBinTreeSet_hp > EllenBinTreeSet_hp;
-
- struct traits_EllenBinTreeSet_dhp : public traits_EllenBinTreeSet
- {
- typedef cds::memory::pool_allocator< typename ellen_bintree_props::dhp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
- };
- typedef EllenBinTreeSet< cds::gc::DHP, key_type, key_val, traits_EllenBinTreeSet_dhp > EllenBinTreeSet_dhp;
-
- struct traits_EllenBinTreeSet_gpi : public traits_EllenBinTreeSet
- {
- typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpi::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
- };
- typedef EllenBinTreeSet< rcu_gpi, key_type, key_val, traits_EllenBinTreeSet_gpi > EllenBinTreeSet_rcu_gpi;
-
- struct traits_EllenBinTreeSet_gpb : public traits_EllenBinTreeSet
- {
- typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
- };
- typedef EllenBinTreeSet< rcu_gpb, key_type, key_val, traits_EllenBinTreeSet_gpb > EllenBinTreeSet_rcu_gpb;
-
- struct traits_EllenBinTreeSet_gpt : public traits_EllenBinTreeSet
- {
- typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpt::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
- };
- typedef EllenBinTreeSet< rcu_gpt, key_type, key_val, traits_EllenBinTreeSet_gpt > EllenBinTreeSet_rcu_gpt;
-
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- struct traits_EllenBinTreeSet_shb : public traits_EllenBinTreeSet
- {
- typedef cds::memory::pool_allocator< typename ellen_bintree_props::shb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
- };
- typedef EllenBinTreeSet< rcu_shb, key_type, key_val, traits_EllenBinTreeSet_shb > EllenBinTreeSet_rcu_shb;
-
- struct traits_EllenBinTreeSet_sht : public traits_EllenBinTreeSet
- {
- typedef cds::memory::pool_allocator< typename ellen_bintree_props::sht::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
- };
- typedef EllenBinTreeSet< rcu_sht, key_type, key_val, traits_EllenBinTreeSet_sht > EllenBinTreeSet_rcu_sht;
-#endif
-
- //
- struct traits_EllenBinTreeSet_yield : public traits_EllenBinTreeSet
- {
- typedef cds::backoff::yield back_off;
- };
-
- struct traits_EllenBinTreeSet_yield_hp : public traits_EllenBinTreeSet_yield
- {
- typedef cds::memory::pool_allocator< typename ellen_bintree_props::hp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
- };
- typedef EllenBinTreeSet< cds::gc::HP, key_type, key_val, traits_EllenBinTreeSet_yield_hp > EllenBinTreeSet_yield_hp;
-
- struct traits_EllenBinTreeSet_yield_dhp : public traits_EllenBinTreeSet_yield
- {
- typedef cds::memory::pool_allocator< typename ellen_bintree_props::dhp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
- };
- typedef EllenBinTreeSet< cds::gc::DHP, key_type, key_val, traits_EllenBinTreeSet_yield_dhp > EllenBinTreeSet_yield_dhp;
-
-
- struct traits_EllenBinTreeSet_yield_gpb : public traits_EllenBinTreeSet_yield
- {
- typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
- };
- typedef EllenBinTreeSet< rcu_gpb, key_type, key_val, traits_EllenBinTreeSet_yield_gpb > EllenBinTreeSet_yield_rcu_gpb;
-
-
- struct traits_EllenBinTreeSet_stat: public cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename ellen_bintree_props::key_extractor >
- ,co::less< typename ellen_bintree_props::less >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- ,co::stat< cc::ellen_bintree::stat<> >
- >::type
- {};
-
- struct traits_EllenBinTreeSet_stat_hp : public traits_EllenBinTreeSet_stat
- {
- typedef cds::memory::pool_allocator< typename ellen_bintree_props::hp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
- };
- typedef EllenBinTreeSet< cds::gc::HP, key_type, key_val, traits_EllenBinTreeSet_stat_hp > EllenBinTreeSet_hp_stat;
-
- struct traits_EllenBinTreeSet_stat_dhp : public traits_EllenBinTreeSet_stat
- {
- typedef cds::memory::pool_allocator< typename ellen_bintree_props::dhp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
- };
- typedef EllenBinTreeSet< cds::gc::DHP, key_type, key_val, traits_EllenBinTreeSet_stat_dhp > EllenBinTreeSet_dhp_stat;
-
- struct traits_EllenBinTreeSet_stat_gpi : public traits_EllenBinTreeSet_stat
- {
- typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpi::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
- };
- typedef EllenBinTreeSet< rcu_gpi, key_type, key_val, traits_EllenBinTreeSet_stat_gpi > EllenBinTreeSet_rcu_gpi_stat;
-
- struct traits_EllenBinTreeSet_stat_gpb : public traits_EllenBinTreeSet_stat
- {
- typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
- };
- typedef EllenBinTreeSet< rcu_gpb, key_type, key_val, traits_EllenBinTreeSet_stat_gpb > EllenBinTreeSet_rcu_gpb_stat;
-
- struct traits_EllenBinTreeSet_stat_gpt : public traits_EllenBinTreeSet_stat
- {
- typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpt::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
- };
- typedef EllenBinTreeSet< rcu_gpt, key_type, key_val, traits_EllenBinTreeSet_stat_gpt > EllenBinTreeSet_rcu_gpt_stat;
-
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- struct traits_EllenBinTreeSet_stat_shb : public traits_EllenBinTreeSet_stat
- {
- typedef cds::memory::pool_allocator< typename ellen_bintree_props::shb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
- };
- typedef EllenBinTreeSet< rcu_shb, key_type, key_val, traits_EllenBinTreeSet_stat_shb > EllenBinTreeSet_rcu_shb_stat;
-
- struct traits_EllenBinTreeSet_stat_sht : public traits_EllenBinTreeSet_stat
- {
- typedef cds::memory::pool_allocator< typename ellen_bintree_props::sht::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
- };
- typedef EllenBinTreeSet< rcu_sht, key_type, key_val, traits_EllenBinTreeSet_stat_sht > EllenBinTreeSet_rcu_sht_stat;
-#endif
-
- };
-
- template <typename GC, typename Key, typename T, typename Traits>
- static inline void print_stat( EllenBinTreeSet<GC, Key, T, Traits> const& s )
- {
- CPPUNIT_MSG( s.statistics() );
- }
-
- namespace ellen_bintree_check {
- static inline void check_stat( cds::intrusive::ellen_bintree::empty_stat const& /*s*/ )
- {
- // Not true for threaded RCU
- /*
- CPPUNIT_CHECK_CURRENT_EX( ellen_bintree_pool::internal_node_counter::m_nAlloc.get() == ellen_bintree_pool::internal_node_counter::m_nFree.get(),
- "m_nAlloc=" << ellen_bintree_pool::internal_node_counter::m_nAlloc.get()
- << ", m_nFree=" << ellen_bintree_pool::internal_node_counter::m_nFree.get()
- );
- */
- }
-
- static inline void check_stat( cds::intrusive::ellen_bintree::stat<> const& stat )
- {
- CPPUNIT_CHECK_CURRENT( stat.m_nInternalNodeCreated == stat.m_nInternalNodeDeleted );
- CPPUNIT_CHECK_CURRENT( stat.m_nUpdateDescCreated == stat.m_nUpdateDescDeleted );
- //CPPUNIT_CHECK_CURRENT( ellen_bintree_pool::internal_node_counter::m_nAlloc.get() == ellen_bintree_pool::internal_node_counter::m_nFree.get() );
- CPPUNIT_CHECK_CURRENT( ellen_bintree_pool::internal_node_counter::m_nAlloc.get() == stat.m_nInternalNodeCreated );
- // true if RCU is not threaded
- //CPPUNIT_CHECK_CURRENT( stat.m_nInternalNodeDeleted == ellen_bintree_pool::internal_node_counter::m_nFree.get() );
- }
- } // namespace ellen_bintree_check
-
- template <typename GC, typename Key, typename T, typename Traits>
- static inline void additional_check( EllenBinTreeSet<GC, Key, T, Traits>& s )
- {
- GC::force_dispose();
- ellen_bintree_check::check_stat( s.statistics() );
- }
-
- template <typename GC, typename Key, typename T, typename Traits>
- static inline void additional_cleanup( EllenBinTreeSet<GC, Key, T, Traits>& /*s*/ )
- {
- ellen_bintree_pool::internal_node_counter::reset();
- }
-
- template <typename GC, typename Key, typename T, typename Traits>
- static inline void check_before_clear( cds::container::EllenBinTreeSet<GC, Key, T, Traits>& s )
- {
- CPPUNIT_CHECK_CURRENT( s.check_consistency() );
- }
-
-
-} // namespace set2
-
-#endif // #ifndef CDSUNIT_SET_TYPE_ELLEN_BINTREE_H
+++ /dev/null
-/*
- 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 CDSUNIT_SET_TYPE_MICHAEL_H
-#define CDSUNIT_SET_TYPE_MICHAEL_H
-
-#include "set2/set_type.h"
-
-#include <cds/container/feldman_hashset_hp.h>
-#include <cds/container/feldman_hashset_dhp.h>
-#include <cds/container/feldman_hashset_rcu.h>
-
-#include "print_feldman_hashset_stat.h"
-#include "hashing/hash_func.h"
-
-namespace set2 {
-
- template <class GC, typename T, typename Traits = cc::feldman_hashset::traits>
- class FeldmanHashSet : public cc::FeldmanHashSet< GC, T, Traits >
- {
- typedef cc::FeldmanHashSet< GC, T, Traits > base_class;
-
- template <typename G>
- struct get_extracted_ptr
- {
- typedef typename base_class::guarded_ptr extracted_ptr;
- };
-
- template <typename RCU>
- struct get_extracted_ptr<cds::urcu::gc<RCU>>
- {
- typedef typename base_class::exempt_ptr extracted_ptr;
- };
-
- public:
- typedef typename T::hasher hasher;
- typedef typename get_extracted_ptr<GC>::extracted_ptr extracted_ptr;
-
- template <class Config>
- FeldmanHashSet( Config const& cfg )
- : base_class( cfg.c_nFeldmanSet_HeadBits, cfg.c_nFeldmanSet_ArrayBits )
- {}
-
- template <typename Q>
- bool erase( Q const& key )
- {
- return base_class::erase( hasher()( key ));
- }
-
- template <typename Q, typename Func>
- bool erase( Q const& key, Func f )
- {
- return base_class::erase( hasher()( key ), f );
- }
-
- template <typename Q>
- extracted_ptr extract(Q const& key)
- {
- return base_class::extract( hasher()(key) );
- }
-
- template <typename Q>
- bool contains( Q const& key )
- {
- return base_class::contains( hasher()(key) );
- }
-
- // for testing
- static CDS_CONSTEXPR bool const c_bExtractSupported = true;
- static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
- static CDS_CONSTEXPR bool const c_bEraseExactKey = true;
- };
-
- struct tag_FeldmanHashSet;
-
- template <typename Key, typename Val>
- struct set_type< tag_FeldmanHashSet, Key, Val >: public set_type_base< Key, Val >
- {
- typedef set_type_base< Key, Val > base_class;
- typedef typename base_class::compare compare;
- typedef typename base_class::less less;
- typedef typename base_class::hash hash;
- typedef typename base_class::key_type key_type;
- typedef typename base_class::value_type value_type;
-
- template <typename Hasher>
- struct hash_type
- {
- typedef Hasher hasher;
- typedef typename hasher::hash_type type;
- };
-
- template <typename TH>
- struct hash_type<std::hash<TH>>
- {
- typedef std::hash<TH> hasher;
- typedef size_t type;
- };
-
- template <typename Hasher>
- struct key_val: base_class::key_val
- {
- typedef typename base_class::key_val base;
- typedef Hasher hasher;
- typedef typename hash_type<hasher>::type hash_type;
-
- hash_type hash;
-
- /*explicit*/ key_val( key_type const& k ): base(k), hash( hasher()( k )) {}
- key_val( key_type const& k, value_type const& v ): base(k, v), hash( hasher()( k )) {}
-
- template <typename K>
- /*explicit*/ key_val( K const& k ): base(k), hash( hasher()( k )) {}
-
- template <typename K, typename T>
- key_val( K const& k, T const& v ): base(k, v), hash( hasher()( k )) {}
- };
-
- struct default_traits : public cc::feldman_hashset::traits
- {
- struct hash_accessor {
- template <typename Hasher>
- typename key_val<Hasher>::hash_type const& operator()( key_val<Hasher> const& kv )
- {
- return kv.hash;
- }
- };
- };
-
- typedef FeldmanHashSet< cds::gc::HP, key_val<std::hash<key_type>>, default_traits > FeldmanHashSet_hp_stdhash;
- typedef FeldmanHashSet< cds::gc::DHP, key_val<std::hash<key_type>>, default_traits > FeldmanHashSet_dhp_stdhash;
- typedef FeldmanHashSet< rcu_gpi, key_val<std::hash<key_type>>, default_traits > FeldmanHashSet_rcu_gpi_stdhash;
- typedef FeldmanHashSet< rcu_gpb, key_val<std::hash<key_type>>, default_traits > FeldmanHashSet_rcu_gpb_stdhash;
- typedef FeldmanHashSet< rcu_gpt, key_val<std::hash<key_type>>, default_traits > FeldmanHashSet_rcu_gpt_stdhash;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef FeldmanHashSet< rcu_shb, key_val<std::hash<key_type>>, default_traits > FeldmanHashSet_rcu_shb_stdhash;
- typedef FeldmanHashSet< rcu_sht, key_val<std::hash<key_type>>, default_traits > FeldmanHashSet_rcu_sht_stdhash;
-#endif
-
- struct traits_FeldmanHashSet_stat: public cc::feldman_hashset::make_traits<
- co::type_traits< default_traits >,
- co::stat< cc::feldman_hashset::stat<>>
- >::type
- {};
-
- typedef FeldmanHashSet< cds::gc::HP, key_val<std::hash<key_type>>, traits_FeldmanHashSet_stat > FeldmanHashSet_hp_stdhash_stat;
- typedef FeldmanHashSet< cds::gc::DHP, key_val<std::hash<key_type>>, traits_FeldmanHashSet_stat > FeldmanHashSet_dhp_stdhash_stat;
- typedef FeldmanHashSet< rcu_gpi, key_val<std::hash<key_type>>, traits_FeldmanHashSet_stat > FeldmanHashSet_rcu_gpi_stdhash_stat;
- typedef FeldmanHashSet< rcu_gpb, key_val<std::hash<key_type>>, traits_FeldmanHashSet_stat > FeldmanHashSet_rcu_gpb_stdhash_stat;
- typedef FeldmanHashSet< rcu_gpt, key_val<std::hash<key_type>>, traits_FeldmanHashSet_stat > FeldmanHashSet_rcu_gpt_stdhash_stat;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef FeldmanHashSet< rcu_shb, key_val<std::hash<key_type>>, traits_FeldmanHashSet_stat > FeldmanHashSet_rcu_shb_stdhash_stat;
- typedef FeldmanHashSet< rcu_sht, key_val<std::hash<key_type>>, traits_FeldmanHashSet_stat > FeldmanHashSet_rcu_sht_stdhash_stat;
-#endif
-
- // CityHash
-#if CDS_BUILD_BITS == 64
- struct traits_FeldmanHashSet_city64 : public default_traits
- {
- typedef ::hashing::city64::less less;
- };
- typedef FeldmanHashSet< cds::gc::HP, key_val<::hashing::city64>, traits_FeldmanHashSet_city64 > FeldmanHashSet_hp_city64;
- typedef FeldmanHashSet< cds::gc::DHP, key_val<::hashing::city64>, traits_FeldmanHashSet_city64 > FeldmanHashSet_dhp_city64;
- typedef FeldmanHashSet< rcu_gpi, key_val<::hashing::city64>, traits_FeldmanHashSet_city64 > FeldmanHashSet_rcu_gpi_city64;
- typedef FeldmanHashSet< rcu_gpb, key_val<::hashing::city64>, traits_FeldmanHashSet_city64 > FeldmanHashSet_rcu_gpb_city64;
- typedef FeldmanHashSet< rcu_gpt, key_val<::hashing::city64>, traits_FeldmanHashSet_city64 > FeldmanHashSet_rcu_gpt_city64;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef FeldmanHashSet< rcu_shb, key_val<::hashing::city64>, traits_FeldmanHashSet_city64 > FeldmanHashSet_rcu_shb_city64;
- typedef FeldmanHashSet< rcu_sht, key_val<::hashing::city64>, traits_FeldmanHashSet_city64 > FeldmanHashSet_rcu_sht_city64;
-#endif
-
- struct traits_FeldmanHashSet_city64_stat : public traits_FeldmanHashSet_city64
- {
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef FeldmanHashSet< cds::gc::HP, key_val<::hashing::city64>, traits_FeldmanHashSet_city64_stat > FeldmanHashSet_hp_city64_stat;
- typedef FeldmanHashSet< cds::gc::DHP, key_val<::hashing::city64>, traits_FeldmanHashSet_city64_stat > FeldmanHashSet_dhp_city64_stat;
- typedef FeldmanHashSet< rcu_gpi, key_val<::hashing::city64>, traits_FeldmanHashSet_city64_stat > FeldmanHashSet_rcu_gpi_city64_stat;
- typedef FeldmanHashSet< rcu_gpb, key_val<::hashing::city64>, traits_FeldmanHashSet_city64_stat > FeldmanHashSet_rcu_gpb_city64_stat;
- typedef FeldmanHashSet< rcu_gpt, key_val<::hashing::city64>, traits_FeldmanHashSet_city64_stat > FeldmanHashSet_rcu_gpt_city64_stat;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef FeldmanHashSet< rcu_shb, key_val<::hashing::city64>, traits_FeldmanHashSet_city64_stat > FeldmanHashSet_rcu_shb_city64_stat;
- typedef FeldmanHashSet< rcu_sht, key_val<::hashing::city64>, traits_FeldmanHashSet_city64_stat > FeldmanHashSet_rcu_sht_city64_stat;
-#endif
-
- struct traits_FeldmanHashSet_city128 : public default_traits
- {
- typedef ::hashing::city128::less less;
- };
- typedef FeldmanHashSet< cds::gc::HP, key_val<::hashing::city128>, traits_FeldmanHashSet_city128 > FeldmanHashSet_hp_city128;
- typedef FeldmanHashSet< cds::gc::DHP, key_val<::hashing::city128>, traits_FeldmanHashSet_city128 > FeldmanHashSet_dhp_city128;
- typedef FeldmanHashSet< rcu_gpi, key_val<::hashing::city128>, traits_FeldmanHashSet_city128 > FeldmanHashSet_rcu_gpi_city128;
- typedef FeldmanHashSet< rcu_gpb, key_val<::hashing::city128>, traits_FeldmanHashSet_city128 > FeldmanHashSet_rcu_gpb_city128;
- typedef FeldmanHashSet< rcu_gpt, key_val<::hashing::city128>, traits_FeldmanHashSet_city128 > FeldmanHashSet_rcu_gpt_city128;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef FeldmanHashSet< rcu_shb, key_val<::hashing::city128>, traits_FeldmanHashSet_city128 > FeldmanHashSet_rcu_shb_city128;
- typedef FeldmanHashSet< rcu_sht, key_val<::hashing::city128>, traits_FeldmanHashSet_city128 > FeldmanHashSet_rcu_sht_city128;
-#endif
-
- struct traits_FeldmanHashSet_city128_stat : public traits_FeldmanHashSet_city128
- {
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef FeldmanHashSet< cds::gc::HP, key_val<::hashing::city128>, traits_FeldmanHashSet_city128_stat > FeldmanHashSet_hp_city128_stat;
- typedef FeldmanHashSet< cds::gc::DHP, key_val<::hashing::city128>, traits_FeldmanHashSet_city128_stat > FeldmanHashSet_dhp_city128_stat;
- typedef FeldmanHashSet< rcu_gpi, key_val<::hashing::city128>, traits_FeldmanHashSet_city128_stat > FeldmanHashSet_rcu_gpi_city128_stat;
- typedef FeldmanHashSet< rcu_gpb, key_val<::hashing::city128>, traits_FeldmanHashSet_city128_stat > FeldmanHashSet_rcu_gpb_city128_stat;
- typedef FeldmanHashSet< rcu_gpt, key_val<::hashing::city128>, traits_FeldmanHashSet_city128_stat > FeldmanHashSet_rcu_gpt_city128_stat;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef FeldmanHashSet< rcu_shb, key_val<::hashing::city128>, traits_FeldmanHashSet_city128_stat > FeldmanHashSet_rcu_shb_city128_stat;
- typedef FeldmanHashSet< rcu_sht, key_val<::hashing::city128>, traits_FeldmanHashSet_city128_stat > FeldmanHashSet_rcu_sht_city128_stat;
-#endif
-
-#endif // #if CDS_BUILD_BITS == 64
-
-
- // for fixed-sized key
- // No hash function is necessary
-
- struct fixed_sized_key
- {
- typedef typename set_type_base< Key, Val >::key_type key_type;
- struct key_val : public set_type_base< Key, Val >::key_val
- {
- typedef typename set_type_base< Key, Val >::key_val base_class;
-
- /*explicit*/ key_val(key_type const& k) : base_class(k) {}
- key_val(key_type const& k, value_type const& v) : base_class(k, v) {}
-
- template <typename K>
- /*explicit*/ key_val(K const& k) : base_class(k) {}
-
- template <typename K, typename T>
- key_val(K const& k, T const& v) : base_class(k, v) {}
-
- // mock hasher
- struct hasher {
- template <typename Q>
- key_type operator()( Q const& k ) const
- {
- return key_type( k );
- }
- };
- };
-
- struct traits : public cc::feldman_hashset::traits
- {
- struct hash_accessor {
- key_type operator()(key_val const& kv)
- {
- return kv.key;
- }
- };
- };
-
- struct traits_stat : public traits
- {
- typedef cc::feldman_hashset::stat<> stat;
- };
- };
-
- typedef FeldmanHashSet< cds::gc::HP, typename fixed_sized_key::key_val, typename fixed_sized_key::traits > FeldmanHashSet_hp_fixed;
- typedef FeldmanHashSet< cds::gc::DHP, typename fixed_sized_key::key_val, typename fixed_sized_key::traits > FeldmanHashSet_dhp_fixed;
- typedef FeldmanHashSet< rcu_gpi, typename fixed_sized_key::key_val, typename fixed_sized_key::traits > FeldmanHashSet_rcu_gpi_fixed;
- typedef FeldmanHashSet< rcu_gpb, typename fixed_sized_key::key_val, typename fixed_sized_key::traits > FeldmanHashSet_rcu_gpb_fixed;
- typedef FeldmanHashSet< rcu_gpt, typename fixed_sized_key::key_val, typename fixed_sized_key::traits > FeldmanHashSet_rcu_gpt_fixed;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef FeldmanHashSet< rcu_shb, typename fixed_sized_key::key_val, typename fixed_sized_key::traits > FeldmanHashSet_rcu_shb_fixed;
- typedef FeldmanHashSet< rcu_sht, typename fixed_sized_key::key_val, typename fixed_sized_key::traits > FeldmanHashSet_rcu_sht_fixed;
-#endif
-
- typedef FeldmanHashSet< cds::gc::HP, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat > FeldmanHashSet_hp_fixed_stat;
- typedef FeldmanHashSet< cds::gc::DHP, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat > FeldmanHashSet_dhp_fixed_stat;
- typedef FeldmanHashSet< rcu_gpi, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat > FeldmanHashSet_rcu_gpi_fixed_stat;
- typedef FeldmanHashSet< rcu_gpb, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat > FeldmanHashSet_rcu_gpb_fixed_stat;
- typedef FeldmanHashSet< rcu_gpt, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat > FeldmanHashSet_rcu_gpt_fixed_stat;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef FeldmanHashSet< rcu_shb, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat > FeldmanHashSet_rcu_shb_fixed_stat;
- typedef FeldmanHashSet< rcu_sht, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat > FeldmanHashSet_rcu_sht_fixed_stat;
-#endif
-
- };
-
- template <typename GC, typename T, typename Traits >
- static inline void print_stat( FeldmanHashSet< GC, T, Traits > const& s )
- {
- CPPUNIT_MSG( s.statistics() );
-
- std::vector< cds::intrusive::feldman_hashset::level_statistics > level_stat;
- s.get_level_statistics( level_stat );
- CPPUNIT_MSG( level_stat );
- }
-
-} // namespace set2
-
-#endif // #ifndef CDSUNIT_SET_TYPE_MICHAEL_H
+++ /dev/null
-/*
- 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 CDSUNIT_SET_TYPE_LAZY_LIST_H
-#define CDSUNIT_SET_TYPE_LAZY_LIST_H
-
-#include "set2/set_type.h"
-
-#include <cds/container/lazy_list_hp.h>
-#include <cds/container/lazy_list_dhp.h>
-#include <cds/container/lazy_list_rcu.h>
-
-namespace set2 {
-
- template <typename Key, typename Val>
- struct lazy_list_type
- {
- typedef typename set_type_base< Key, Val >::key_val key_val;
- typedef typename set_type_base< Key, Val >::compare compare;
- typedef typename set_type_base< Key, Val >::less less;
-
- struct traits_LazyList_cmp_stdAlloc :
- public cc::lazy_list::make_traits<
- co::compare< compare >
- >::type
- {};
- typedef cc::LazyList< cds::gc::HP, key_val, traits_LazyList_cmp_stdAlloc > LazyList_HP_cmp_stdAlloc;
- typedef cc::LazyList< cds::gc::DHP, key_val, traits_LazyList_cmp_stdAlloc > LazyList_DHP_cmp_stdAlloc;
- typedef cc::LazyList< rcu_gpi, key_val, traits_LazyList_cmp_stdAlloc > LazyList_RCU_GPI_cmp_stdAlloc;
- typedef cc::LazyList< rcu_gpb, key_val, traits_LazyList_cmp_stdAlloc > LazyList_RCU_GPB_cmp_stdAlloc;
- typedef cc::LazyList< rcu_gpt, key_val, traits_LazyList_cmp_stdAlloc > LazyList_RCU_GPT_cmp_stdAlloc;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::LazyList< rcu_shb, key_val, traits_LazyList_cmp_stdAlloc > LazyList_RCU_SHB_cmp_stdAlloc;
- typedef cc::LazyList< rcu_sht, key_val, traits_LazyList_cmp_stdAlloc > LazyList_RCU_SHT_cmp_stdAlloc;
-#endif
- struct traits_LazyList_cmp_stdAlloc_seqcst :
- public cc::lazy_list::make_traits<
- co::compare< compare >
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- {};
- typedef cc::LazyList< cds::gc::HP, key_val, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_HP_cmp_stdAlloc_seqcst;
- typedef cc::LazyList< cds::gc::DHP, key_val, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_DHP_cmp_stdAlloc_seqcst;
- typedef cc::LazyList< rcu_gpi, key_val, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_GPI_cmp_stdAlloc_seqcst;
- typedef cc::LazyList< rcu_gpb, key_val, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_GPB_cmp_stdAlloc_seqcst;
- typedef cc::LazyList< rcu_gpt, key_val, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_GPT_cmp_stdAlloc_seqcst;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::LazyList< rcu_shb, key_val, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_SHB_cmp_stdAlloc_seqcst;
- typedef cc::LazyList< rcu_sht, key_val, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_SHT_cmp_stdAlloc_seqcst;
-#endif
- struct traits_LazyList_cmp_michaelAlloc :
- public cc::lazy_list::make_traits<
- co::compare< compare >,
- co::allocator< memory::MichaelAllocator<int> >
- >::type
- {};
- typedef cc::LazyList< cds::gc::HP, key_val, traits_LazyList_cmp_michaelAlloc > LazyList_HP_cmp_michaelAlloc;
- typedef cc::LazyList< cds::gc::DHP, key_val, traits_LazyList_cmp_michaelAlloc > LazyList_DHP_cmp_michaelAlloc;
- typedef cc::LazyList< rcu_gpi, key_val, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_GPI_cmp_michaelAlloc;
- typedef cc::LazyList< rcu_gpb, key_val, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_GPB_cmp_michaelAlloc;
- typedef cc::LazyList< rcu_gpt, key_val, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_GPT_cmp_michaelAlloc;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::LazyList< rcu_shb, key_val, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_SHB_cmp_michaelAlloc;
- typedef cc::LazyList< rcu_sht, key_val, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_SHT_cmp_michaelAlloc;
-#endif
-
- struct traits_LazyList_less_stdAlloc:
- public cc::lazy_list::make_traits<
- co::less< less >
- >::type
- {};
- typedef cc::LazyList< cds::gc::HP, key_val, traits_LazyList_less_stdAlloc > LazyList_HP_less_stdAlloc;
- typedef cc::LazyList< cds::gc::DHP, key_val, traits_LazyList_less_stdAlloc > LazyList_DHP_less_stdAlloc;
- typedef cc::LazyList< rcu_gpi, key_val, traits_LazyList_less_stdAlloc > LazyList_RCU_GPI_less_stdAlloc;
- typedef cc::LazyList< rcu_gpb, key_val, traits_LazyList_less_stdAlloc > LazyList_RCU_GPB_less_stdAlloc;
- typedef cc::LazyList< rcu_gpt, key_val, traits_LazyList_less_stdAlloc > LazyList_RCU_GPT_less_stdAlloc;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::LazyList< rcu_shb, key_val, traits_LazyList_less_stdAlloc > LazyList_RCU_SHB_less_stdAlloc;
- typedef cc::LazyList< rcu_sht, key_val, traits_LazyList_less_stdAlloc > LazyList_RCU_SHT_less_stdAlloc;
-#endif
-
- struct traits_LazyList_less_stdAlloc_seqcst :
- public cc::lazy_list::make_traits<
- co::less< less >
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- {};
- typedef cc::LazyList< cds::gc::HP, key_val, traits_LazyList_less_stdAlloc_seqcst > LazyList_HP_less_stdAlloc_seqcst;
- typedef cc::LazyList< cds::gc::DHP, key_val, traits_LazyList_less_stdAlloc_seqcst > LazyList_DHP_less_stdAlloc_seqcst;
- typedef cc::LazyList< rcu_gpi, key_val, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_GPI_less_stdAlloc_seqcst;
- typedef cc::LazyList< rcu_gpb, key_val, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_GPB_less_stdAlloc_seqcst;
- typedef cc::LazyList< rcu_gpt, key_val, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_GPT_less_stdAlloc_seqcst;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::LazyList< rcu_shb, key_val, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_SHB_less_stdAlloc_seqcst;
- typedef cc::LazyList< rcu_sht, key_val, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_SHT_less_stdAlloc_seqcst;
-#endif
-
- struct traits_LazyList_less_michaelAlloc :
- public cc::lazy_list::make_traits<
- co::less< less >,
- co::allocator< memory::MichaelAllocator<int> >
- >::type
- {};
- typedef cc::LazyList< cds::gc::HP, key_val, traits_LazyList_less_michaelAlloc > LazyList_HP_less_michaelAlloc;
- typedef cc::LazyList< cds::gc::DHP, key_val, traits_LazyList_less_michaelAlloc > LazyList_DHP_less_michaelAlloc;
- typedef cc::LazyList< rcu_gpi, key_val, traits_LazyList_less_michaelAlloc > LazyList_RCU_GPI_less_michaelAlloc;
- typedef cc::LazyList< rcu_gpb, key_val, traits_LazyList_less_michaelAlloc > LazyList_RCU_GPB_less_michaelAlloc;
- typedef cc::LazyList< rcu_gpt, key_val, traits_LazyList_less_michaelAlloc > LazyList_RCU_GPT_less_michaelAlloc;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::LazyList< rcu_shb, key_val, traits_LazyList_less_michaelAlloc > LazyList_RCU_SHB_less_michaelAlloc;
- typedef cc::LazyList< rcu_sht, key_val, traits_LazyList_less_michaelAlloc > LazyList_RCU_SHT_less_michaelAlloc;
-#endif
- };
-
-} // namespace set2
-
-#endif // #ifndef CDSUNIT_SET_TYPE_LAZY_LIST_H
+++ /dev/null
-/*
- 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 CDSUNIT_SET_TYPE_MICHAEL_H
-#define CDSUNIT_SET_TYPE_MICHAEL_H
-
-#include "set2/set_type_michael_list.h"
-#include "set2/set_type_lazy_list.h"
-
-#include <cds/container/michael_set.h>
-#include <cds/container/michael_set_rcu.h>
-
-#include "michael_alloc.h"
-
-namespace set2 {
-
- template <class GC, typename List, typename Traits = cc::michael_set::traits>
- class MichaelHashSet : public cc::MichaelHashSet< GC, List, Traits >
- {
- typedef cc::MichaelHashSet< GC, List, Traits > base_class;
- public:
- template <class Config>
- MichaelHashSet( Config const& cfg )
- : base_class( cfg.c_nSetSize, cfg.c_nLoadFactor )
- {}
-
- // for testing
- static CDS_CONSTEXPR bool const c_bExtractSupported = true;
- static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true;
- static CDS_CONSTEXPR bool const c_bEraseExactKey = false;
- };
-
- struct tag_MichaelHashSet;
-
- template <typename Key, typename Val>
- struct set_type< tag_MichaelHashSet, Key, Val >: public set_type_base< Key, Val >
- {
- typedef set_type_base< Key, Val > base_class;
- typedef typename base_class::key_val key_val;
- typedef typename base_class::compare compare;
- typedef typename base_class::less less;
- typedef typename base_class::hash hash;
-
- // ***************************************************************************
- // MichaelHashSet based on MichaelList
-
- typedef michael_list_type< Key, Val > ml;
-
- struct traits_MichaelSet_stdAlloc :
- public cc::michael_set::make_traits<
- co::hash< hash >
- >::type
- {};
- typedef MichaelHashSet< cds::gc::HP, typename ml::MichaelList_HP_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_HP_cmp_stdAlloc;
- typedef MichaelHashSet< cds::gc::DHP, typename ml::MichaelList_DHP_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_DHP_cmp_stdAlloc;
- typedef MichaelHashSet< rcu_gpi, typename ml::MichaelList_RCU_GPI_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_RCU_GPI_cmp_stdAlloc;
- typedef MichaelHashSet< rcu_gpb, typename ml::MichaelList_RCU_GPB_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_RCU_GPB_cmp_stdAlloc;
- typedef MichaelHashSet< rcu_gpt, typename ml::MichaelList_RCU_GPT_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_RCU_GPT_cmp_stdAlloc;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef MichaelHashSet< rcu_shb, typename ml::MichaelList_RCU_SHB_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_RCU_SHB_cmp_stdAlloc;
- typedef MichaelHashSet< rcu_sht, typename ml::MichaelList_RCU_SHT_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_RCU_SHT_cmp_stdAlloc;
-#endif
-
- typedef MichaelHashSet< cds::gc::HP, typename ml::MichaelList_HP_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_HP_less_stdAlloc;
- typedef MichaelHashSet< cds::gc::DHP, typename ml::MichaelList_DHP_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_DHP_less_stdAlloc;
- typedef MichaelHashSet< rcu_gpi, typename ml::MichaelList_RCU_GPI_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_RCU_GPI_less_stdAlloc;
- typedef MichaelHashSet< rcu_gpb, typename ml::MichaelList_RCU_GPB_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_RCU_GPB_less_stdAlloc;
- typedef MichaelHashSet< rcu_gpt, typename ml::MichaelList_RCU_GPT_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_RCU_GPT_less_stdAlloc;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef MichaelHashSet< rcu_shb, typename ml::MichaelList_RCU_SHB_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_RCU_SHB_less_stdAlloc;
- typedef MichaelHashSet< rcu_sht, typename ml::MichaelList_RCU_SHT_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_RCU_SHT_less_stdAlloc;
-#endif
-
- typedef MichaelHashSet< cds::gc::HP, typename ml::MichaelList_HP_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_HP_less_stdAlloc_seqcst;
- typedef MichaelHashSet< cds::gc::DHP, typename ml::MichaelList_DHP_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_DHP_less_stdAlloc_seqcst;
- typedef MichaelHashSet< rcu_gpi, typename ml::MichaelList_RCU_GPI_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_RCU_GPI_less_stdAlloc_seqcst;
- typedef MichaelHashSet< rcu_gpb, typename ml::MichaelList_RCU_GPB_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_RCU_GPB_less_stdAlloc_seqcst;
- typedef MichaelHashSet< rcu_gpt, typename ml::MichaelList_RCU_GPT_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_RCU_GPT_less_stdAlloc_seqcst;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef MichaelHashSet< rcu_shb, typename ml::MichaelList_RCU_SHB_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_RCU_SHB_less_stdAlloc_seqcst;
- typedef MichaelHashSet< rcu_sht, typename ml::MichaelList_RCU_SHT_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_RCU_SHT_less_stdAlloc_seqcst;
-#endif
-
- struct traits_MichaelSet_michaelAlloc :
- public cc::michael_set::make_traits<
- co::hash< hash >,
- co::allocator< memory::MichaelAllocator<int> >
- >::type
- {};
- typedef MichaelHashSet< cds::gc::HP, typename ml::MichaelList_HP_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_HP_cmp_michaelAlloc;
- typedef MichaelHashSet< cds::gc::DHP, typename ml::MichaelList_DHP_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_DHP_cmp_michaelAlloc;
- typedef MichaelHashSet< rcu_gpi, typename ml::MichaelList_RCU_GPI_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_RCU_GPI_cmp_michaelAlloc;
- typedef MichaelHashSet< rcu_gpb, typename ml::MichaelList_RCU_GPB_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_RCU_GPB_cmp_michaelAlloc;
- typedef MichaelHashSet< rcu_gpt, typename ml::MichaelList_RCU_GPT_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_RCU_GPT_cmp_michaelAlloc;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef MichaelHashSet< rcu_shb, typename ml::MichaelList_RCU_SHB_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_RCU_SHB_cmp_michaelAlloc;
- typedef MichaelHashSet< rcu_sht, typename ml::MichaelList_RCU_SHT_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_RCU_SHT_cmp_michaelAlloc;
-#endif
-
- typedef MichaelHashSet< cds::gc::HP, typename ml::MichaelList_HP_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_HP_less_michaelAlloc;
- typedef MichaelHashSet< cds::gc::DHP, typename ml::MichaelList_DHP_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_DHP_less_michaelAlloc;
- typedef MichaelHashSet< rcu_gpi, typename ml::MichaelList_RCU_GPI_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_RCU_GPI_less_michaelAlloc;
- typedef MichaelHashSet< rcu_gpb, typename ml::MichaelList_RCU_GPB_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_RCU_GPB_less_michaelAlloc;
- typedef MichaelHashSet< rcu_gpt, typename ml::MichaelList_RCU_GPT_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_RCU_GPT_less_michaelAlloc;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef MichaelHashSet< rcu_shb, typename ml::MichaelList_RCU_SHB_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_RCU_SHB_less_michaelAlloc;
- typedef MichaelHashSet< rcu_sht, typename ml::MichaelList_RCU_SHT_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_RCU_SHT_less_michaelAlloc;
-#endif
-
-
- // ***************************************************************************
- // MichaelHashSet based on LazyList
-
- typedef lazy_list_type< Key, Val > ll;
-
- typedef MichaelHashSet< cds::gc::HP, typename ll::LazyList_HP_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_HP_cmp_stdAlloc;
- typedef MichaelHashSet< cds::gc::DHP, typename ll::LazyList_DHP_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_DHP_cmp_stdAlloc;
- typedef MichaelHashSet< rcu_gpi, typename ll::LazyList_RCU_GPI_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_GPI_cmp_stdAlloc;
- typedef MichaelHashSet< rcu_gpb, typename ll::LazyList_RCU_GPB_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_GPB_cmp_stdAlloc;
- typedef MichaelHashSet< rcu_gpt, typename ll::LazyList_RCU_GPT_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_GPT_cmp_stdAlloc;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef MichaelHashSet< rcu_shb, typename ll::LazyList_RCU_SHB_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_SHB_cmp_stdAlloc;
- typedef MichaelHashSet< rcu_sht, typename ll::LazyList_RCU_SHT_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_SHT_cmp_stdAlloc;
-#endif
-
- typedef MichaelHashSet< cds::gc::HP, typename ll::LazyList_HP_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_HP_less_stdAlloc;
- typedef MichaelHashSet< cds::gc::DHP, typename ll::LazyList_DHP_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_DHP_less_stdAlloc;
- typedef MichaelHashSet< rcu_gpi, typename ll::LazyList_RCU_GPI_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_GPI_less_stdAlloc;
- typedef MichaelHashSet< rcu_gpb, typename ll::LazyList_RCU_GPB_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_GPB_less_stdAlloc;
- typedef MichaelHashSet< rcu_gpt, typename ll::LazyList_RCU_GPT_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_GPT_less_stdAlloc;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef MichaelHashSet< rcu_shb, typename ll::LazyList_RCU_SHB_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_SHB_less_stdAlloc;
- typedef MichaelHashSet< rcu_sht, typename ll::LazyList_RCU_SHT_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_SHT_less_stdAlloc;
-#endif
-
- typedef MichaelHashSet< cds::gc::HP, typename ll::LazyList_HP_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_HP_less_stdAlloc_seqcst;
- typedef MichaelHashSet< cds::gc::DHP, typename ll::LazyList_DHP_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_DHP_less_stdAlloc_seqcst;
- typedef MichaelHashSet< rcu_gpi, typename ll::LazyList_RCU_GPI_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_GPI_less_stdAlloc_seqcst;
- typedef MichaelHashSet< rcu_gpb, typename ll::LazyList_RCU_GPB_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_GPB_less_stdAlloc_seqcst;
- typedef MichaelHashSet< rcu_gpt, typename ll::LazyList_RCU_GPT_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_GPT_less_stdAlloc_seqcst;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef MichaelHashSet< rcu_shb, typename ll::LazyList_RCU_SHB_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_SHB_less_stdAlloc_seqcst;
- typedef MichaelHashSet< rcu_sht, typename ll::LazyList_RCU_SHT_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_SHT_less_stdAlloc_seqcst;
-#endif
-
- typedef MichaelHashSet< cds::gc::HP, typename ll::LazyList_HP_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_HP_cmp_michaelAlloc;
- typedef MichaelHashSet< cds::gc::DHP, typename ll::LazyList_DHP_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_DHP_cmp_michaelAlloc;
- typedef MichaelHashSet< rcu_gpi, typename ll::LazyList_RCU_GPI_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_RCU_GPI_cmp_michaelAlloc;
- typedef MichaelHashSet< rcu_gpb, typename ll::LazyList_RCU_GPB_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_RCU_GPB_cmp_michaelAlloc;
- typedef MichaelHashSet< rcu_gpt, typename ll::LazyList_RCU_GPT_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_RCU_GPT_cmp_michaelAlloc;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef MichaelHashSet< rcu_shb, typename ll::LazyList_RCU_SHB_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_RCU_SHB_cmp_michaelAlloc;
- typedef MichaelHashSet< rcu_sht, typename ll::LazyList_RCU_SHT_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_RCU_SHT_cmp_michaelAlloc;
-#endif
-
- typedef MichaelHashSet< cds::gc::HP, typename ll::LazyList_HP_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_HP_less_michaelAlloc;
- typedef MichaelHashSet< cds::gc::DHP, typename ll::LazyList_DHP_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_DHP_less_michaelAlloc;
- typedef MichaelHashSet< rcu_gpi, typename ll::LazyList_RCU_GPI_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_RCU_GPI_less_michaelAlloc;
- typedef MichaelHashSet< rcu_gpb, typename ll::LazyList_RCU_GPB_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_RCU_GPB_less_michaelAlloc;
- typedef MichaelHashSet< rcu_gpt, typename ll::LazyList_RCU_GPT_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_RCU_GPT_less_michaelAlloc;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef MichaelHashSet< rcu_shb, typename ll::LazyList_RCU_SHB_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_RCU_SHB_less_michaelAlloc;
- typedef MichaelHashSet< rcu_sht, typename ll::LazyList_RCU_SHT_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_RCU_SHT_less_michaelAlloc;
-#endif
- };
-
-} // namespace set2
-
-#endif // #ifndef CDSUNIT_SET_TYPE_MICHAEL_H
+++ /dev/null
-/*
- 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 CDSUNIT_SET_TYPE_MICHAEL_LIST_H
-#define CDSUNIT_SET_TYPE_MICHAEL_LIST_H
-
-#include "set2/set_type.h"
-
-#include <cds/container/michael_list_hp.h>
-#include <cds/container/michael_list_dhp.h>
-#include <cds/container/michael_list_rcu.h>
-
-namespace set2 {
-
- template <typename Key, typename Val>
- struct michael_list_type
- {
- typedef typename set_type_base< Key, Val >::key_val key_val;
- typedef typename set_type_base< Key, Val >::compare compare;
- typedef typename set_type_base< Key, Val >::less less;
-
- struct traits_MichaelList_cmp_stdAlloc:
- public cc::michael_list::make_traits<
- co::compare< compare >
- >::type
- {};
- typedef cc::MichaelList< cds::gc::HP, key_val, traits_MichaelList_cmp_stdAlloc > MichaelList_HP_cmp_stdAlloc;
- typedef cc::MichaelList< cds::gc::DHP, key_val, traits_MichaelList_cmp_stdAlloc > MichaelList_DHP_cmp_stdAlloc;
- typedef cc::MichaelList< rcu_gpi, key_val, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_GPI_cmp_stdAlloc;
- typedef cc::MichaelList< rcu_gpb, key_val, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_GPB_cmp_stdAlloc;
- typedef cc::MichaelList< rcu_gpt, key_val, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_GPT_cmp_stdAlloc;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::MichaelList< rcu_shb, key_val, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_SHB_cmp_stdAlloc;
- typedef cc::MichaelList< rcu_sht, key_val, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_SHT_cmp_stdAlloc;
-#endif
-
- struct traits_MichaelList_cmp_stdAlloc_seqcst : public traits_MichaelList_cmp_stdAlloc
- {
- typedef co::v::sequential_consistent memory_model;
- };
- typedef cc::MichaelList< cds::gc::HP, key_val, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_HP_cmp_stdAlloc_seqcst;
- typedef cc::MichaelList< cds::gc::DHP, key_val, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_DHP_cmp_stdAlloc_seqcst;
- typedef cc::MichaelList< rcu_gpi, key_val, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_GPI_cmp_stdAlloc_seqcst;
- typedef cc::MichaelList< rcu_gpb, key_val, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_GPB_cmp_stdAlloc_seqcst;
- typedef cc::MichaelList< rcu_gpt, key_val, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_GPT_cmp_stdAlloc_seqcst;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::MichaelList< rcu_shb, key_val, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_SHB_cmp_stdAlloc_seqcst;
- typedef cc::MichaelList< rcu_sht, key_val, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_SHT_cmp_stdAlloc_seqcst;
-#endif
-
- struct traits_MichaelList_less_stdAlloc :
- public cc::michael_list::make_traits<
- co::less< less >
- >::type
- {};
- typedef cc::MichaelList< cds::gc::HP, key_val, traits_MichaelList_less_stdAlloc > MichaelList_HP_less_stdAlloc;
- typedef cc::MichaelList< cds::gc::DHP, key_val, traits_MichaelList_less_stdAlloc > MichaelList_DHP_less_stdAlloc;
- typedef cc::MichaelList< rcu_gpi, key_val, traits_MichaelList_less_stdAlloc > MichaelList_RCU_GPI_less_stdAlloc;
- typedef cc::MichaelList< rcu_gpb, key_val, traits_MichaelList_less_stdAlloc > MichaelList_RCU_GPB_less_stdAlloc;
- typedef cc::MichaelList< rcu_gpt, key_val, traits_MichaelList_less_stdAlloc > MichaelList_RCU_GPT_less_stdAlloc;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::MichaelList< rcu_shb, key_val, traits_MichaelList_less_stdAlloc > MichaelList_RCU_SHB_less_stdAlloc;
- typedef cc::MichaelList< rcu_sht, key_val, traits_MichaelList_less_stdAlloc > MichaelList_RCU_SHT_less_stdAlloc;
-#endif
-
- struct traits_MichaelList_less_stdAlloc_seqcst :
- public cc::michael_list::make_traits<
- co::less< less >
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- {};
- typedef cc::MichaelList< cds::gc::HP, key_val, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_HP_less_stdAlloc_seqcst;
- typedef cc::MichaelList< cds::gc::DHP, key_val, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_DHP_less_stdAlloc_seqcst;
- typedef cc::MichaelList< rcu_gpi, key_val, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_GPI_less_stdAlloc_seqcst;
- typedef cc::MichaelList< rcu_gpb, key_val, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_GPB_less_stdAlloc_seqcst;
- typedef cc::MichaelList< rcu_gpt, key_val, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_GPT_less_stdAlloc_seqcst;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::MichaelList< rcu_shb, key_val, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_SHB_less_stdAlloc_seqcst;
- typedef cc::MichaelList< rcu_sht, key_val, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_SHT_less_stdAlloc_seqcst;
-#endif
-
- struct traits_MichaelList_cmp_michaelAlloc :
- public cc::michael_list::make_traits<
- co::compare< compare >,
- co::allocator< memory::MichaelAllocator<int> >
- >::type
- {};
- typedef cc::MichaelList< cds::gc::HP, key_val, traits_MichaelList_cmp_michaelAlloc > MichaelList_HP_cmp_michaelAlloc;
- typedef cc::MichaelList< cds::gc::DHP, key_val, traits_MichaelList_cmp_michaelAlloc > MichaelList_DHP_cmp_michaelAlloc;
- typedef cc::MichaelList< rcu_gpi, key_val, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_GPI_cmp_michaelAlloc;
- typedef cc::MichaelList< rcu_gpb, key_val, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_GPB_cmp_michaelAlloc;
- typedef cc::MichaelList< rcu_gpt, key_val, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_GPT_cmp_michaelAlloc;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::MichaelList< rcu_shb, key_val, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_SHB_cmp_michaelAlloc;
- typedef cc::MichaelList< rcu_sht, key_val, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_SHT_cmp_michaelAlloc;
-#endif
-
- struct traits_MichaelList_less_michaelAlloc :
- public cc::michael_list::make_traits<
- co::less< less >,
- co::allocator< memory::MichaelAllocator<int> >
- >::type
- {};
- typedef cc::MichaelList< cds::gc::HP, key_val, traits_MichaelList_less_michaelAlloc > MichaelList_HP_less_michaelAlloc;
- typedef cc::MichaelList< cds::gc::DHP, key_val, traits_MichaelList_less_michaelAlloc > MichaelList_DHP_less_michaelAlloc;
- typedef cc::MichaelList< rcu_gpi, key_val, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_GPI_less_michaelAlloc;
- typedef cc::MichaelList< rcu_gpb, key_val, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_GPB_less_michaelAlloc;
- typedef cc::MichaelList< rcu_gpt, key_val, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_GPT_less_michaelAlloc;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::MichaelList< rcu_shb, key_val, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_SHB_less_michaelAlloc;
- typedef cc::MichaelList< rcu_sht, key_val, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_SHT_less_michaelAlloc;
-#endif
- };
-
-} // namespace set2
-
-#endif // #ifndef CDSUNIT_SET_TYPE_MICHAEL_LIST_H
+++ /dev/null
-/*
- 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 CDSUNIT_SET_TYPE_SKIP_LIST_H
-#define CDSUNIT_SET_TYPE_SKIP_LIST_H
-
-#include "set2/set_type.h"
-
-#include <cds/container/skip_list_set_hp.h>
-#include <cds/container/skip_list_set_dhp.h>
-#include <cds/container/skip_list_set_rcu.h>
-
-#include "print_skip_list_stat.h"
-
-namespace set2 {
-
- template <typename GC, typename T, typename Traits = cc::skip_list::traits >
- class SkipListSet : public cc::SkipListSet<GC, T, Traits>
- {
- typedef cc::SkipListSet<GC, T, Traits> base_class;
- public:
- template <typename Config>
- SkipListSet( Config const& /*cfg*/ )
- {}
-
- // for testing
- static CDS_CONSTEXPR bool const c_bExtractSupported = true;
- static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
- static CDS_CONSTEXPR bool const c_bEraseExactKey = false;
- };
-
- struct tag_SkipListSet;
-
- template <typename Key, typename Val>
- struct set_type< tag_SkipListSet, Key, Val >: public set_type_base< Key, Val >
- {
- typedef set_type_base< Key, Val > base_class;
- typedef typename base_class::key_val key_val;
- typedef typename base_class::compare compare;
- typedef typename base_class::less less;
- typedef typename base_class::hash hash;
-
- class traits_SkipListSet_less_pascal: public cc::skip_list::make_traits <
- co::less< less >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- {};
- typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_pascal > SkipListSet_hp_less_pascal;
- typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_pascal > SkipListSet_dhp_less_pascal;
- typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_pascal > SkipListSet_rcu_gpi_less_pascal;
- typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_pascal > SkipListSet_rcu_gpb_less_pascal;
- typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_pascal > SkipListSet_rcu_gpt_less_pascal;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_pascal > SkipListSet_rcu_shb_less_pascal;
- typedef SkipListSet< rcu_sht, key_val, traits_SkipListSet_less_pascal > SkipListSet_rcu_sht_less_pascal;
-#endif
-
- class traits_SkipListSet_less_pascal_seqcst: public cc::skip_list::make_traits <
- co::less< less >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- ,co::memory_model< co::v::sequential_consistent >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- {};
- typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_pascal_seqcst > SkipListSet_hp_less_pascal_seqcst;
- typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_pascal_seqcst > SkipListSet_dhp_less_pascal_seqcst;
- typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_pascal_seqcst > SkipListSet_rcu_gpi_less_pascal_seqcst;
- typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_pascal_seqcst > SkipListSet_rcu_gpb_less_pascal_seqcst;
- typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_pascal_seqcst > SkipListSet_rcu_gpt_less_pascal_seqcst;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_pascal_seqcst > SkipListSet_rcu_shb_less_pascal_seqcst;
- typedef SkipListSet< rcu_sht, key_val, traits_SkipListSet_less_pascal_seqcst > SkipListSet_rcu_sht_less_pascal_seqcst;
-#endif
-
- class traits_SkipListSet_less_pascal_stat: public cc::skip_list::make_traits <
- co::less< less >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- ,co::stat< cc::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- {};
- typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_pascal_stat > SkipListSet_hp_less_pascal_stat;
- typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_pascal_stat > SkipListSet_dhp_less_pascal_stat;
- typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_pascal_stat > SkipListSet_rcu_gpi_less_pascal_stat;
- typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_pascal_stat > SkipListSet_rcu_gpb_less_pascal_stat;
- typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_pascal_stat > SkipListSet_rcu_gpt_less_pascal_stat;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_pascal_stat > SkipListSet_rcu_shb_less_pascal_stat;
- typedef SkipListSet< rcu_sht, key_val, traits_SkipListSet_less_pascal_stat > SkipListSet_rcu_sht_less_pascal_stat;
-#endif
-
- class traits_SkipListSet_cmp_pascal: public cc::skip_list::make_traits <
- co::compare< compare >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- {};
- typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_cmp_pascal > SkipListSet_hp_cmp_pascal;
- typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_cmp_pascal > SkipListSet_dhp_cmp_pascal;
- typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_cmp_pascal > SkipListSet_rcu_gpi_cmp_pascal;
- typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_cmp_pascal > SkipListSet_rcu_gpb_cmp_pascal;
- typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_cmp_pascal > SkipListSet_rcu_gpt_cmp_pascal;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_cmp_pascal > SkipListSet_rcu_shb_cmp_pascal;
- typedef SkipListSet< rcu_sht, key_val, traits_SkipListSet_cmp_pascal > SkipListSet_rcu_sht_cmp_pascal;
-#endif
-
- class traits_SkipListSet_cmp_pascal_stat: public cc::skip_list::make_traits <
- co::compare< compare >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- ,co::stat< cc::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- {};
- typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_cmp_pascal_stat > SkipListSet_hp_cmp_pascal_stat;
- typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_cmp_pascal_stat > SkipListSet_dhp_cmp_pascal_stat;
- typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_cmp_pascal_stat > SkipListSet_rcu_gpi_cmp_pascal_stat;
- typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_cmp_pascal_stat > SkipListSet_rcu_gpb_cmp_pascal_stat;
- typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_cmp_pascal_stat > SkipListSet_rcu_gpt_cmp_pascal_stat;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_cmp_pascal_stat > SkipListSet_rcu_shb_cmp_pascal_stat;
- typedef SkipListSet< rcu_sht, key_val, traits_SkipListSet_cmp_pascal_stat > SkipListSet_rcu_sht_cmp_pascal_stat;
-#endif
-
- class traits_SkipListSet_less_xorshift: public cc::skip_list::make_traits <
- co::less< less >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- {};
- typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_xorshift > SkipListSet_hp_less_xorshift;
- typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_xorshift > SkipListSet_dhp_less_xorshift;
- typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_xorshift > SkipListSet_rcu_gpi_less_xorshift;
- typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_xorshift > SkipListSet_rcu_gpb_less_xorshift;
- typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_xorshift > SkipListSet_rcu_gpt_less_xorshift;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_xorshift > SkipListSet_rcu_shb_less_xorshift;
- typedef SkipListSet< rcu_sht, key_val, traits_SkipListSet_less_xorshift > SkipListSet_rcu_sht_less_xorshift;
-#endif
-
- class traits_SkipListSet_less_xorshift_stat: public cc::skip_list::make_traits <
- co::less< less >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- ,co::stat< cc::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- {};
- typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_xorshift_stat > SkipListSet_hp_less_xorshift_stat;
- typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_xorshift_stat > SkipListSet_dhp_less_xorshift_stat;
- typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_xorshift_stat > SkipListSet_rcu_gpi_less_xorshift_stat;
- typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_xorshift_stat > SkipListSet_rcu_gpb_less_xorshift_stat;
- typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_xorshift_stat > SkipListSet_rcu_gpt_less_xorshift_stat;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_xorshift_stat > SkipListSet_rcu_shb_less_xorshift_stat;
- typedef SkipListSet< rcu_sht, key_val, traits_SkipListSet_less_xorshift_stat > SkipListSet_rcu_sht_less_xorshift_stat;
-#endif
-
- class traits_SkipListSet_cmp_xorshift: public cc::skip_list::make_traits <
- co::compare< compare >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- {};
- typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_cmp_xorshift > SkipListSet_hp_cmp_xorshift;
- typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_cmp_xorshift > SkipListSet_dhp_cmp_xorshift;
- typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_cmp_xorshift > SkipListSet_rcu_gpi_cmp_xorshift;
- typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_cmp_xorshift > SkipListSet_rcu_gpb_cmp_xorshift;
- typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_cmp_xorshift > SkipListSet_rcu_gpt_cmp_xorshift;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_cmp_xorshift > SkipListSet_rcu_shb_cmp_xorshift;
- typedef SkipListSet< rcu_sht, key_val, traits_SkipListSet_cmp_xorshift > SkipListSet_rcu_sht_cmp_xorshift;
-#endif
-
- class traits_SkipListSet_cmp_xorshift_stat: public cc::skip_list::make_traits <
- co::compare< compare >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- ,co::stat< cc::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- {};
- typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_cmp_xorshift_stat > SkipListSet_hp_cmp_xorshift_stat;
- typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_cmp_xorshift_stat > SkipListSet_dhp_cmp_xorshift_stat;
- typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_cmp_xorshift_stat > SkipListSet_rcu_gpi_cmp_xorshift_stat;
- typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_cmp_xorshift_stat > SkipListSet_rcu_gpb_cmp_xorshift_stat;
- typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_cmp_xorshift_stat > SkipListSet_rcu_gpt_cmp_xorshift_stat;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_cmp_xorshift_stat > SkipListSet_rcu_shb_cmp_xorshift_stat;
- typedef SkipListSet< rcu_sht, key_val, traits_SkipListSet_cmp_xorshift_stat > SkipListSet_rcu_sht_cmp_xorshift_stat;
-#endif
- };
-
- template <typename GC, typename T, typename Traits>
- static inline void print_stat( SkipListSet<GC, T, Traits> const& s )
- {
- CPPUNIT_MSG( s.statistics() );
- }
-
-} // namespace set2
-
-#endif // #ifndef CDSUNIT_SET_TYPE_SKIP_LIST_H
+++ /dev/null
-/*
- 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 CDSUNIT_SET_TYPE_SPLIT_LIST_H
-#define CDSUNIT_SET_TYPE_SPLIT_LIST_H
-
-#include "set2/set_type.h"
-
-#include <cds/container/michael_list_hp.h>
-#include <cds/container/michael_list_dhp.h>
-#include <cds/container/michael_list_rcu.h>
-#include <cds/container/lazy_list_hp.h>
-#include <cds/container/lazy_list_dhp.h>
-#include <cds/container/lazy_list_rcu.h>
-
-#include <cds/container/split_list_set.h>
-#include <cds/container/split_list_set_rcu.h>
-
-#include "print_split_list_stat.h"
-
-namespace set2 {
-
- template <typename GC, typename T, typename Traits = cc::split_list::traits>
- class SplitListSet : public cc::SplitListSet< GC, T, Traits >
- {
- typedef cc::SplitListSet< GC, T, Traits > base_class;
- public:
- template <typename Config>
- SplitListSet( Config const& cfg )
- : base_class( cfg.c_nSetSize, cfg.c_nLoadFactor )
- {}
-
- // for testing
- static CDS_CONSTEXPR bool const c_bExtractSupported = true;
- static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true;
- static CDS_CONSTEXPR bool const c_bEraseExactKey = false;
- };
-
- struct tag_SplitListSet;
-
- template <typename Key, typename Val>
- struct set_type< tag_SplitListSet, Key, Val >: public set_type_base< Key, Val >
- {
- typedef set_type_base< Key, Val > base_class;
- typedef typename base_class::key_val key_val;
- typedef typename base_class::compare compare;
- typedef typename base_class::less less;
- typedef typename base_class::hash hash;
-
- // ***************************************************************************
- // SplitListSet based on MichaelList
-
- struct traits_SplitList_Michael_dyn_cmp :
- public cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,co::hash< hash >
- ,cc::split_list::ordered_list_traits<
- typename cc::michael_list::make_traits<
- co::compare< compare >
- >::type
- >
- >::type
- {};
- typedef SplitListSet< cds::gc::HP, key_val, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_HP_dyn_cmp;
- typedef SplitListSet< cds::gc::DHP, key_val, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_DHP_dyn_cmp;
- typedef SplitListSet< rcu_gpi, key_val, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_GPI_dyn_cmp;
- typedef SplitListSet< rcu_gpb, key_val, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_GPB_dyn_cmp;
- typedef SplitListSet< rcu_gpt, key_val, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_GPT_dyn_cmp;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SplitListSet< rcu_shb, key_val, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_SHB_dyn_cmp;
- typedef SplitListSet< rcu_sht, key_val, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_SHT_dyn_cmp;
-#endif
-
- struct traits_SplitList_Michael_dyn_cmp_stat :
- public cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,co::hash< hash >
- ,co::stat< cc::split_list::stat<> >
- ,cc::split_list::ordered_list_traits<
- typename cc::michael_list::make_traits<
- co::compare< compare >
- >::type
- >
- >::type
- {};
- typedef SplitListSet< cds::gc::HP, key_val, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_HP_dyn_cmp_stat;
- typedef SplitListSet< cds::gc::DHP, key_val, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_DHP_dyn_cmp_stat;
- typedef SplitListSet< rcu_gpi, key_val, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_GPI_dyn_cmp_stat;
- typedef SplitListSet< rcu_gpb, key_val, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_GPB_dyn_cmp_stat;
- typedef SplitListSet< rcu_gpt, key_val, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_GPT_dyn_cmp_stat;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SplitListSet< rcu_shb, key_val, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_SHB_dyn_cmp_stat;
- typedef SplitListSet< rcu_sht, key_val, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_SHT_dyn_cmp_stat;
-#endif
-
- struct traits_SplitList_Michael_dyn_cmp_seqcst :
- public cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,co::hash< hash >
- ,co::memory_model< co::v::sequential_consistent >
- ,cc::split_list::ordered_list_traits<
- typename cc::michael_list::make_traits<
- co::compare< compare >
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- >
- >::type
- {};
- typedef SplitListSet< cds::gc::HP, key_val, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_HP_dyn_cmp_seqcst;
- typedef SplitListSet< cds::gc::DHP, key_val, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_DHP_dyn_cmp_seqcst;
- typedef SplitListSet< rcu_gpi, key_val, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_GPI_dyn_cmp_seqcst;
- typedef SplitListSet< rcu_gpb, key_val, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_GPB_dyn_cmp_seqcst;
- typedef SplitListSet< rcu_gpt, key_val, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_GPT_dyn_cmp_seqcst;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SplitListSet< rcu_shb, key_val, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_SHB_dyn_cmp_seqcst;
- typedef SplitListSet< rcu_sht, key_val, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_SHT_dyn_cmp_seqcst;
-#endif
-
- struct traits_SplitList_Michael_st_cmp :
- public cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::split_list::dynamic_bucket_table< false >
- ,co::hash< hash >
- ,cc::split_list::ordered_list_traits<
- typename cc::michael_list::make_traits<
- co::compare< compare >
- >::type
- >
- >::type
- {};
- typedef SplitListSet< cds::gc::HP, key_val, traits_SplitList_Michael_st_cmp > SplitList_Michael_HP_st_cmp;
- typedef SplitListSet< cds::gc::DHP, key_val, traits_SplitList_Michael_st_cmp > SplitList_Michael_DHP_st_cmp;
- typedef SplitListSet< rcu_gpi, key_val, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_GPI_st_cmp;
- typedef SplitListSet< rcu_gpb, key_val, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_GPB_st_cmp;
- typedef SplitListSet< rcu_gpt, key_val, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_GPT_st_cmp;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SplitListSet< rcu_shb, key_val, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_SHB_st_cmp;
- typedef SplitListSet< rcu_sht, key_val, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_SHT_st_cmp;
-#endif
-
- struct traits_SplitList_Michael_st_cmp_seqcst :
- public cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,co::hash< hash >
- ,cc::split_list::dynamic_bucket_table< false >
- ,co::memory_model< co::v::sequential_consistent >
- ,cc::split_list::ordered_list_traits<
- typename cc::michael_list::make_traits<
- co::compare< compare >
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- >
- >::type
- {};
- typedef SplitListSet< cds::gc::HP, key_val, traits_SplitList_Michael_st_cmp_seqcst> SplitList_Michael_HP_st_cmp_seqcst;
- typedef SplitListSet< cds::gc::DHP, key_val, traits_SplitList_Michael_st_cmp_seqcst> SplitList_Michael_DHP_st_cmp_seqcst;
- typedef SplitListSet< rcu_gpi, key_val, traits_SplitList_Michael_st_cmp_seqcst> SplitList_Michael_RCU_GPI_st_cmp_seqcst;
- typedef SplitListSet< rcu_gpb, key_val, traits_SplitList_Michael_st_cmp_seqcst> SplitList_Michael_RCU_GPB_st_cmp_seqcst;
- typedef SplitListSet< rcu_gpt, key_val, traits_SplitList_Michael_st_cmp_seqcst> SplitList_Michael_RCU_GPT_st_cmp_seqcst;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SplitListSet< rcu_shb, key_val, traits_SplitList_Michael_st_cmp_seqcst> SplitList_Michael_RCU_SHB_st_cmp_seqcst;
- typedef SplitListSet< rcu_sht, key_val, traits_SplitList_Michael_st_cmp_seqcst> SplitList_Michael_RCU_SHT_st_cmp_seqcst;
-#endif
-
- //HP + less
- struct traits_SplitList_Michael_dyn_less :
- public cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,co::hash< hash >
- ,cc::split_list::ordered_list_traits<
- typename cc::michael_list::make_traits<
- co::less< less >
- >::type
- >
- >::type
- {};
- typedef SplitListSet< cds::gc::HP, key_val, traits_SplitList_Michael_dyn_less > SplitList_Michael_HP_dyn_less;
- typedef SplitListSet< cds::gc::DHP, key_val, traits_SplitList_Michael_dyn_less > SplitList_Michael_DHP_dyn_less;
- typedef SplitListSet< rcu_gpi, key_val, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_GPI_dyn_less;
- typedef SplitListSet< rcu_gpb, key_val, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_GPB_dyn_less;
- typedef SplitListSet< rcu_gpt, key_val, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_GPT_dyn_less;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SplitListSet< rcu_shb, key_val, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_SHB_dyn_less;
- typedef SplitListSet< rcu_sht, key_val, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_SHT_dyn_less;
-#endif
-
- struct traits_SplitList_Michael_dyn_less_seqcst :
- public cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,co::hash< hash >
- ,co::memory_model< co::v::sequential_consistent >
- ,cc::split_list::ordered_list_traits<
- typename cc::michael_list::make_traits<
- co::less< less >
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- >
- >::type
- {};
- typedef SplitListSet< cds::gc::HP, key_val, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_HP_dyn_less_seqcst;
- typedef SplitListSet< cds::gc::DHP, key_val, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_DHP_dyn_less_seqcst;
- typedef SplitListSet< rcu_gpi, key_val, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_GPI_dyn_less_seqcst;
- typedef SplitListSet< rcu_gpb, key_val, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_GPB_dyn_less_seqcst;
- typedef SplitListSet< rcu_gpt, key_val, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_GPT_dyn_less_seqcst;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SplitListSet< rcu_shb, key_val, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_SHB_dyn_less_seqcst;
- typedef SplitListSet< rcu_sht, key_val, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_SHT_dyn_less_seqcst;
-#endif
-
- struct traits_SplitList_Michael_st_less :
- public cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::split_list::dynamic_bucket_table< false >
- ,co::hash< hash >
- ,cc::split_list::ordered_list_traits<
- typename cc::michael_list::make_traits<
- co::less< less >
- >::type
- >
- >::type
- {};
- typedef SplitListSet< cds::gc::HP, key_val, traits_SplitList_Michael_st_less > SplitList_Michael_HP_st_less;
- typedef SplitListSet< cds::gc::DHP, key_val, traits_SplitList_Michael_st_less > SplitList_Michael_DHP_st_less;
- typedef SplitListSet< rcu_gpi, key_val, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_GPI_st_less;
- typedef SplitListSet< rcu_gpb, key_val, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_GPB_st_less;
- typedef SplitListSet< rcu_gpt, key_val, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_GPT_st_less;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SplitListSet< rcu_shb, key_val, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_SHB_st_less;
- typedef SplitListSet< rcu_sht, key_val, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_SHT_st_less;
-#endif
-
- struct traits_SplitList_Michael_st_less_stat :
- public cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::split_list::dynamic_bucket_table< false >
- ,co::hash< hash >
- ,co::stat< cc::split_list::stat<>>
- ,cc::split_list::ordered_list_traits<
- typename cc::michael_list::make_traits<
- co::less< less >
- >::type
- >
- >::type
- {};
- typedef SplitListSet< cds::gc::HP, key_val, traits_SplitList_Michael_st_less_stat > SplitList_Michael_HP_st_less_stat;
- typedef SplitListSet< cds::gc::DHP, key_val, traits_SplitList_Michael_st_less_stat > SplitList_Michael_DHP_st_less_stat;
- typedef SplitListSet< rcu_gpi, key_val, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_GPI_st_less_stat;
- typedef SplitListSet< rcu_gpb, key_val, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_GPB_st_less_stat;
- typedef SplitListSet< rcu_gpt, key_val, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_GPT_st_less_stat;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SplitListSet< rcu_shb, key_val, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_SHB_st_less_stat;
- typedef SplitListSet< rcu_sht, key_val, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_SHT_st_less_stat;
-#endif
-
- struct traits_SplitList_Michael_st_less_seqcst :
- public cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,co::hash< hash >
- ,cc::split_list::dynamic_bucket_table< false >
- ,co::memory_model< co::v::sequential_consistent >
- ,cc::split_list::ordered_list_traits<
- typename cc::michael_list::make_traits<
- co::less< less >
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- >
- >::type
- {};
- typedef SplitListSet< cds::gc::HP, key_val, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_HP_st_less_seqcst;
- typedef SplitListSet< cds::gc::DHP, key_val, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_DHP_st_less_seqcst;
- typedef SplitListSet< rcu_gpi, key_val, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_GPI_st_less_seqcst;
- typedef SplitListSet< rcu_gpb, key_val, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_GPB_st_less_seqcst;
- typedef SplitListSet< rcu_gpt, key_val, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_GPT_st_less_seqcst;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SplitListSet< rcu_shb, key_val, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_SHB_st_less_seqcst;
- typedef SplitListSet< rcu_sht, key_val, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_SHT_st_less_seqcst;
-#endif
-
- // ***************************************************************************
- // SplitListSet based on LazyList
-
- struct traits_SplitList_Lazy_dyn_cmp :
- public cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,co::hash< hash >
- ,cc::split_list::ordered_list_traits<
- typename cc::lazy_list::make_traits<
- co::compare< compare >
- >::type
- >
- >::type
- {};
- typedef SplitListSet< cds::gc::HP, key_val, traits_SplitList_Lazy_dyn_cmp > SplitList_Lazy_HP_dyn_cmp;
- typedef SplitListSet< cds::gc::DHP, key_val, traits_SplitList_Lazy_dyn_cmp > SplitList_Lazy_DHP_dyn_cmp;
- typedef SplitListSet< rcu_gpi, key_val, traits_SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_GPI_dyn_cmp;
- typedef SplitListSet< rcu_gpb, key_val, traits_SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_GPB_dyn_cmp;
- typedef SplitListSet< rcu_gpt, key_val, traits_SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_GPT_dyn_cmp;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SplitListSet< rcu_shb, key_val, traits_SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_SHB_dyn_cmp;
- typedef SplitListSet< rcu_sht, key_val, traits_SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_SHT_dyn_cmp;
-#endif
-
- struct traits_SplitList_Lazy_dyn_cmp_stat : public traits_SplitList_Lazy_dyn_cmp
- {
- typedef cc::split_list::stat<> stat;
- };
- typedef SplitListSet< cds::gc::HP, key_val, traits_SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_HP_dyn_cmp_stat;
- typedef SplitListSet< cds::gc::DHP, key_val, traits_SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_DHP_dyn_cmp_stat;
- typedef SplitListSet< rcu_gpi, key_val, traits_SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_GPI_dyn_cmp_stat;
- typedef SplitListSet< rcu_gpb, key_val, traits_SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_GPB_dyn_cmp_stat;
- typedef SplitListSet< rcu_gpt, key_val, traits_SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_GPT_dyn_cmp_stat;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SplitListSet< rcu_shb, key_val, traits_SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_SHB_dyn_cmp_stat;
- typedef SplitListSet< rcu_sht, key_val, traits_SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_SHT_dyn_cmp_stat;
-#endif
-
- struct traits_SplitList_Lazy_dyn_cmp_seqcst :
- public cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,co::hash< hash >
- ,co::memory_model< co::v::sequential_consistent >
- ,cc::split_list::ordered_list_traits<
- typename cc::lazy_list::make_traits<
- co::compare< compare >
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- >
- >::type
- {};
- typedef SplitListSet< cds::gc::HP, key_val, traits_SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_HP_dyn_cmp_seqcst;
- typedef SplitListSet< cds::gc::DHP, key_val, traits_SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_DHP_dyn_cmp_seqcst;
- typedef SplitListSet< rcu_gpi, key_val, traits_SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_GPI_dyn_cmp_seqcst;
- typedef SplitListSet< rcu_gpb, key_val, traits_SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_GPB_dyn_cmp_seqcst;
- typedef SplitListSet< rcu_gpt, key_val, traits_SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_GPT_dyn_cmp_seqcst;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SplitListSet< rcu_shb, key_val, traits_SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_SHB_dyn_cmp_seqcst;
- typedef SplitListSet< rcu_sht, key_val, traits_SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_SHT_dyn_cmp_seqcst;
-#endif
-
- struct traits_SplitList_Lazy_st_cmp :
- public cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::split_list::dynamic_bucket_table< false >
- ,co::hash< hash >
- ,cc::split_list::ordered_list_traits<
- typename cc::lazy_list::make_traits<
- co::compare< compare >
- >::type
- >
- >::type
- {};
- typedef SplitListSet< cds::gc::HP, key_val, traits_SplitList_Lazy_st_cmp > SplitList_Lazy_HP_st_cmp;
- typedef SplitListSet< cds::gc::DHP, key_val, traits_SplitList_Lazy_st_cmp > SplitList_Lazy_DHP_st_cmp;
- typedef SplitListSet< rcu_gpi, key_val, traits_SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_GPI_st_cmp;
- typedef SplitListSet< rcu_gpb, key_val, traits_SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_GPB_st_cmp;
- typedef SplitListSet< rcu_gpt, key_val, traits_SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_GPT_st_cmp;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SplitListSet< rcu_shb, key_val, traits_SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_SHB_st_cmp;
- typedef SplitListSet< rcu_sht, key_val, traits_SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_SHT_st_cmp;
-#endif
-
- struct traits_SplitList_Lazy_st_cmp_seqcst :
- public cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,co::hash< hash >
- ,cc::split_list::dynamic_bucket_table< false >
- ,co::memory_model< co::v::sequential_consistent >
- ,cc::split_list::ordered_list_traits<
- typename cc::lazy_list::make_traits<
- co::compare< compare >
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- >
- >::type
- {};
- typedef SplitListSet< cds::gc::HP, key_val, traits_SplitList_Lazy_st_cmp_seqcst > SplitList_Lazy_HP_st_cmp_seqcst;
- typedef SplitListSet< cds::gc::DHP, key_val, traits_SplitList_Lazy_st_cmp_seqcst > SplitList_Lazy_DHP_st_cmp_seqcst;
- typedef SplitListSet< rcu_gpi, key_val, traits_SplitList_Lazy_st_cmp_seqcst > SplitList_Lazy_RCU_GPI_st_cmp_seqcst;
- typedef SplitListSet< rcu_gpb, key_val, traits_SplitList_Lazy_st_cmp_seqcst > SplitList_Lazy_RCU_GPB_st_cmp_seqcst;
- typedef SplitListSet< rcu_gpt, key_val, traits_SplitList_Lazy_st_cmp_seqcst > SplitList_Lazy_RCU_GPT_st_cmp_seqcst;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SplitListSet< rcu_shb, key_val, traits_SplitList_Lazy_st_cmp_seqcst > SplitList_Lazy_RCU_SHB_st_cmp_seqcst;
- typedef SplitListSet< rcu_sht, key_val, traits_SplitList_Lazy_st_cmp_seqcst > SplitList_Lazy_RCU_SHT_st_cmp_seqcst;
-#endif
-
- struct traits_SplitList_Lazy_dyn_less :
- public cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,co::hash< hash >
- ,cc::split_list::ordered_list_traits<
- typename cc::lazy_list::make_traits<
- co::less< less >
- >::type
- >
- >::type
- {};
- typedef SplitListSet< cds::gc::HP, key_val, traits_SplitList_Lazy_dyn_less > SplitList_Lazy_HP_dyn_less;
- typedef SplitListSet< cds::gc::DHP, key_val, traits_SplitList_Lazy_dyn_less > SplitList_Lazy_DHP_dyn_less;
- typedef SplitListSet< rcu_gpi, key_val, traits_SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_GPI_dyn_less;
- typedef SplitListSet< rcu_gpb, key_val, traits_SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_GPB_dyn_less;
- typedef SplitListSet< rcu_gpt, key_val, traits_SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_GPT_dyn_less;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SplitListSet< rcu_shb, key_val, traits_SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_SHB_dyn_less;
- typedef SplitListSet< rcu_sht, key_val, traits_SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_SHT_dyn_less;
-#endif
-
- struct traits_SplitList_Lazy_dyn_less_seqcst :
- public cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,co::hash< hash >
- ,co::memory_model< co::v::sequential_consistent >
- ,cc::split_list::ordered_list_traits<
- typename cc::lazy_list::make_traits<
- co::less< less >
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- >
- >::type
- {};
- typedef SplitListSet< cds::gc::HP, key_val, traits_SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_HP_dyn_less_seqcst;
- typedef SplitListSet< cds::gc::DHP, key_val, traits_SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_DHP_dyn_less_seqcst;
- typedef SplitListSet< rcu_gpi, key_val, traits_SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_GPI_dyn_less_seqcst;
- typedef SplitListSet< rcu_gpb, key_val, traits_SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_GPB_dyn_less_seqcst;
- typedef SplitListSet< rcu_gpt, key_val, traits_SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_GPT_dyn_less_seqcst;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SplitListSet< rcu_shb, key_val, traits_SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_SHB_dyn_less_seqcst;
- typedef SplitListSet< rcu_sht, key_val, traits_SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_SHT_dyn_less_seqcst;
-#endif
-
- struct traits_SplitList_Lazy_st_less :
- public cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::split_list::dynamic_bucket_table< false >
- ,co::hash< hash >
- ,cc::split_list::ordered_list_traits<
- typename cc::lazy_list::make_traits<
- co::less< less >
- >::type
- >
- >::type
- {};
- typedef SplitListSet< cds::gc::HP, key_val, traits_SplitList_Lazy_st_less > SplitList_Lazy_HP_st_less;
- typedef SplitListSet< cds::gc::DHP, key_val, traits_SplitList_Lazy_st_less > SplitList_Lazy_DHP_st_less;
- typedef SplitListSet< rcu_gpi, key_val, traits_SplitList_Lazy_st_less > SplitList_Lazy_RCU_GPI_st_less;
- typedef SplitListSet< rcu_gpb, key_val, traits_SplitList_Lazy_st_less > SplitList_Lazy_RCU_GPB_st_less;
- typedef SplitListSet< rcu_gpt, key_val, traits_SplitList_Lazy_st_less > SplitList_Lazy_RCU_GPT_st_less;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SplitListSet< rcu_shb, key_val, traits_SplitList_Lazy_st_less > SplitList_Lazy_RCU_SHB_st_less;
- typedef SplitListSet< rcu_sht, key_val, traits_SplitList_Lazy_st_less > SplitList_Lazy_RCU_SHT_st_less;
-#endif
-
- struct traits_SplitList_Lazy_st_less_seqcst :
- public cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,co::hash< hash >
- ,cc::split_list::dynamic_bucket_table< false >
- ,co::memory_model< co::v::sequential_consistent >
- ,cc::split_list::ordered_list_traits<
- typename cc::lazy_list::make_traits<
- co::less< less >
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- >
- >::type
- {};
- typedef SplitListSet< cds::gc::HP, key_val, traits_SplitList_Lazy_st_less_seqcst > SplitList_Lazy_HP_st_less_seqcst;
- typedef SplitListSet< cds::gc::DHP, key_val, traits_SplitList_Lazy_st_less_seqcst > SplitList_Lazy_DHP_st_less_seqcst;
- typedef SplitListSet< rcu_gpi, key_val, traits_SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_GPI_st_less_seqcst;
- typedef SplitListSet< rcu_gpb, key_val, traits_SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_GPB_st_less_seqcst;
- typedef SplitListSet< rcu_gpt, key_val, traits_SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_GPT_st_less_seqcst;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SplitListSet< rcu_shb, key_val, traits_SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_SHB_st_less_seqcst;
- typedef SplitListSet< rcu_sht, key_val, traits_SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_SHT_st_less_seqcst;
-#endif
-
- struct traits_SplitList_Lazy_st_less_stat : public traits_SplitList_Lazy_st_less
- {
- typedef cc::split_list::stat<> stat;
- };
- typedef SplitListSet< cds::gc::HP, key_val, traits_SplitList_Lazy_st_less_stat > SplitList_Lazy_HP_st_less_stat;
- typedef SplitListSet< cds::gc::DHP, key_val, traits_SplitList_Lazy_st_less_stat > SplitList_Lazy_DHP_st_less_stat;
- typedef SplitListSet< rcu_gpi, key_val, traits_SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_GPI_st_less_stat;
- typedef SplitListSet< rcu_gpb, key_val, traits_SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_GPB_st_less_stat;
- typedef SplitListSet< rcu_gpt, key_val, traits_SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_GPT_st_less_stat;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SplitListSet< rcu_shb, key_val, traits_SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_SHB_st_less_stat;
- typedef SplitListSet< rcu_sht, key_val, traits_SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_SHT_st_less_stat;
-#endif
- };
-
- template <typename GC, typename T, typename Traits>
- static inline void print_stat( SplitListSet<GC, T, Traits> const& s )
- {
- CPPUNIT_MSG( s.statistics() );
- }
-
-} // namespace set2
-
-#endif // #ifndef CDSUNIT_SET_TYPE_SPLIT_LIST_H
+++ /dev/null
-/*
- 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 CDSUNIT_SET_TYPE_STD_H
-#define CDSUNIT_SET_TYPE_STD_H
-
-#include <unordered_set>
-#include <set>
-#include <mutex> //unique_lock
-
-#include "set2/set_type.h"
-
-namespace set2 {
-
- struct tag_StdSet;
-
- template <typename Value, typename Hash, typename Less, typename EqualTo, typename Lock,
- class Alloc = typename CDS_DEFAULT_ALLOCATOR::template rebind<Value>::other
- >
- class StdHashSet
- : public std::unordered_set<
- Value
- , Hash
- , EqualTo
- , Alloc
- >
- {
- public:
- Lock m_lock;
- typedef std::unique_lock<Lock> scoped_lock;
- typedef std::unordered_set<
- Value
- , Hash
- , EqualTo
- , Alloc
- > base_class;
-
- public:
- typedef typename base_class::value_type value_type;
-
- template <class Config>
- StdHashSet( Config const& )
- {}
-
- template <typename Key>
- bool contains( const Key& key )
- {
- scoped_lock al( m_lock );
- return base_class::find( value_type(key) ) != base_class::end();
- }
-
- template <typename Key>
- bool insert( Key const& key )
- {
- scoped_lock al( m_lock );
- std::pair<typename base_class::iterator, bool> pRet = base_class::insert( value_type( key ));
- return pRet.second;
- }
-
- template <typename Key, typename Func>
- bool insert( Key const& key, Func func )
- {
- scoped_lock al( m_lock );
- std::pair<typename base_class::iterator, bool> pRet = base_class::insert( value_type( key ));
- if ( pRet.second ) {
- func( *pRet.first );
- return true;
- }
- return false;
- }
-
- template <typename T, typename Func>
- std::pair<bool, bool> ensure( const T& key, Func func )
- {
- scoped_lock al( m_lock );
- std::pair<typename base_class::iterator, bool> pRet = base_class::insert( value_type( key ));
- if ( pRet.second ) {
- func( true, *pRet.first, key );
- return std::make_pair( true, true );
- }
- else {
- func( false, *pRet.first, key );
- return std::make_pair( true, false );
- }
- }
-
- template <typename Key>
- bool erase( const Key& key )
- {
- scoped_lock al( m_lock );
- return base_class::erase( value_type(key) ) != 0;
- }
-
- template <typename T, typename Func>
- bool erase( const T& key, Func func )
- {
- scoped_lock al( m_lock );
- typename base_class::iterator it = base_class::find( value_type(key) );
- if ( it != base_class::end() ) {
- func( *it );
- return base_class::erase( it ) != base_class::end();
- }
- return false;
- }
-
- std::ostream& dump( std::ostream& stm ) { return stm; }
-
- // for testing
- static CDS_CONSTEXPR bool const c_bExtractSupported = false;
- static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
- static CDS_CONSTEXPR bool const c_bEraseExactKey = true;
- };
-
- template <typename Value, typename Less, typename Lock,
- class Alloc = typename CDS_DEFAULT_ALLOCATOR::template rebind<Value>::other
- >
- class StdSet: public std::set<Value, Less, Alloc>
- {
- Lock m_lock;
- typedef std::unique_lock<Lock> scoped_lock;
- typedef std::set<Value, Less, Alloc> base_class;
- public:
- typedef typename base_class::key_type value_type;
-
- template <class Config>
- StdSet( Config const& )
- {}
-
- template <typename Key>
- bool contains( const Key& key )
- {
- value_type v( key );
- scoped_lock al( m_lock );
- return base_class::find( v ) != base_class::end();
- }
-
- bool insert( value_type const& v )
- {
- scoped_lock al( m_lock );
- return base_class::insert( v ).second;
- }
-
- template <typename Key, typename Func>
- bool insert( Key const& key, Func func )
- {
- scoped_lock al( m_lock );
- std::pair<typename base_class::iterator, bool> pRet = base_class::insert( value_type( key ));
- if ( pRet.second ) {
- func( *pRet.first );
- return true;
- }
- return false;
- }
-
- template <typename T, typename Func>
- std::pair<bool, bool> ensure( const T& key, Func func )
- {
- scoped_lock al( m_lock );
- std::pair<typename base_class::iterator, bool> pRet = base_class::insert( value_type( key ));
- if ( pRet.second ) {
- func( true, *pRet.first, key );
- return std::make_pair( true, true );
- }
- else {
- func( false, *pRet.first, key );
- return std::make_pair( true, false );
- }
- }
-
- template <typename Key>
- bool erase( const Key& key )
- {
- scoped_lock al( m_lock );
- return base_class::erase( value_type(key) ) != 0;
- }
-
- template <typename T, typename Func>
- bool erase( const T& key, Func func )
- {
- scoped_lock al( m_lock );
- typename base_class::iterator it = base_class::find( value_type(key) );
- if ( it != base_class::end() ) {
- func( *it );
-
- base_class::erase( it );
- return true;
- }
- return false;
- }
-
- std::ostream& dump( std::ostream& stm ) { return stm; }
-
- // for testing
- static CDS_CONSTEXPR bool const c_bExtractSupported = false;
- static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
- };
-
- template <typename Key, typename Val>
- struct set_type< tag_StdSet, Key, Val >: public set_type_base< Key, Val >
- {
- typedef set_type_base< Key, Val > base_class;
- typedef typename base_class::key_val key_val;
- typedef typename base_class::less less;
- typedef typename base_class::hash hash;
- typedef typename base_class::equal_to equal_to;
-
- typedef StdSet< key_val, less, cds::sync::spin > StdSet_Spin;
- typedef StdSet< key_val, less, std::mutex > StdSet_Mutex;
- typedef StdSet< key_val, less, lock::NoLock> StdSet_NoLock;
-
- typedef StdHashSet< key_val, hash, less, equal_to, cds::sync::spin > StdHashSet_Spin;
- typedef StdHashSet< key_val, hash, less, equal_to, std::mutex > StdHashSet_Mutex;
- typedef StdHashSet< key_val, hash, less, equal_to, lock::NoLock > StdHashSet_NoLock;
- };
-
-} // namespace set2
-
-#endif // #ifndef CDSUNIT_SET_TYPE_STD_H
+++ /dev/null
-/*
- 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 CDSUNIT_SET_TYPE_STRIPED_H
-#define CDSUNIT_SET_TYPE_STRIPED_H
-
-#include "set2/set_type.h"
-
-#include <cds/container/striped_set/std_list.h>
-#include <cds/container/striped_set/std_vector.h>
-#include <cds/container/striped_set/std_set.h>
-#include <cds/container/striped_set/std_hash_set.h>
-#include <cds/container/striped_set/boost_unordered_set.h>
-
-#include <boost/version.hpp>
-#if BOOST_VERSION >= 104800
-# include <cds/container/striped_set/boost_slist.h>
-# include <cds/container/striped_set/boost_list.h>
-# include <cds/container/striped_set/boost_vector.h>
-# include <cds/container/striped_set/boost_stable_vector.h>
-# include <cds/container/striped_set/boost_set.h>
-# include <cds/container/striped_set/boost_flat_set.h>
-#endif
-#include <cds/container/striped_set.h>
-
-namespace set2 {
-
- struct tag_StripedSet;
-
- template <typename Key, typename Val>
- struct set_type< tag_StripedSet, Key, Val >: public set_type_base< Key, Val >
- {
- typedef set_type_base< Key, Val > base_class;
- typedef typename base_class::key_val key_val;
- typedef typename base_class::compare compare;
- typedef typename base_class::less less;
- typedef typename base_class::equal_to equal_to;
- typedef typename base_class::hash hash;
- typedef typename base_class::hash2 hash2;
-
-
- // ***************************************************************************
- // StripedSet
-
- // for sequential containers
- template <class BucketEntry, typename... Options>
- class StripedHashSet_seq:
- public cc::StripedSet< BucketEntry,
- co::mutex_policy< cc::striped_set::striping<> >
- ,co::resizing_policy<cc::striped_set::load_factor_resizing<0> >
- , Options...
- >
- {
- typedef cc::StripedSet< BucketEntry,
- co::mutex_policy< cc::striped_set::striping<> >
- ,co::resizing_policy<cc::striped_set::load_factor_resizing<0> >
- , Options...
- > base_class;
- typedef typename base_class::resizing_policy resizing_policy_t;
-
- resizing_policy_t m_placeHolder;
- public:
- template <class Config>
- StripedHashSet_seq( Config const& cfg )
- : base_class( cfg.c_nSetSize / cfg.c_nLoadFactor / 16, *(new(&m_placeHolder) resizing_policy_t( cfg.c_nLoadFactor )) )
- {}
-
- /*
- template <typename Q, typename Less>
- bool erase_with( Q const& v, Less pred )
- {
- return base_class::erase( v );
- }
- */
-
- // for testing
- static CDS_CONSTEXPR bool const c_bExtractSupported = false;
- static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true;
- static CDS_CONSTEXPR bool const c_bEraseExactKey = false;
- };
-
- template <class BucketEntry, typename... Options>
- class StripedHashSet_seq_rational:
- public cc::StripedSet< BucketEntry,
- co::mutex_policy< cc::striped_set::striping<> >
- ,co::resizing_policy<cc::striped_set::rational_load_factor_resizing<0> >
- , Options...
- >
- {
- typedef cc::StripedSet< BucketEntry,
- co::mutex_policy< cc::striped_set::striping<> >
- ,co::resizing_policy<cc::striped_set::rational_load_factor_resizing<0> >
- , Options...
- > base_class;
- typedef typename base_class::resizing_policy resizing_policy_t;
-
- resizing_policy_t m_placeHolder;
- public:
- template <class Config>
- StripedHashSet_seq_rational( Config const& cfg ) // LoadFactor = 1 / nDenominator
- : base_class( cfg.c_nSetSize / cfg.c_nLoadFactor / 16, *(new(&m_placeHolder) resizing_policy_t( 1, cfg.c_nLoadFactor )) )
- {}
-
- /*
- template <typename Q, typename Less>
- bool erase_with( Q const& v, Less pred )
- {
- return base_class::erase( v );
- }
- */
-
- // for testing
- static CDS_CONSTEXPR bool const c_bExtractSupported = false;
- static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true;
- static CDS_CONSTEXPR bool const c_bEraseExactKey = false;
- };
-
- // for non-sequential ordered containers
- template <class BucketEntry, typename... Options>
- class StripedHashSet_ord:
- public cc::StripedSet< BucketEntry,
- co::resizing_policy<cc::striped_set::load_factor_resizing<0> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- , Options...
- >
- {
- typedef cc::StripedSet< BucketEntry,
- co::resizing_policy<cc::striped_set::load_factor_resizing<0> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- , Options...
- > base_class;
- typedef typename base_class::resizing_policy resizing_policy_t;
-
- resizing_policy_t m_placeHolder;
- public:
- template <class Config>
- StripedHashSet_ord( Config const& cfg )
- : base_class( 0, *(new(&m_placeHolder) resizing_policy_t( cfg.c_nMaxLoadFactor * 1024 )) )
- {}
-
- /*
- template <typename Q, typename Less>
- bool erase_with( Q const& v, Less pred )
- {
- return base_class::erase( v );
- }
- */
-
- // for testing
- static CDS_CONSTEXPR bool const c_bExtractSupported = false;
- static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
- static CDS_CONSTEXPR bool const c_bEraseExactKey = false;
- };
-
- template <class BucketEntry, typename... Options>
- class StripedHashSet_ord_rational:
- public cc::StripedSet< BucketEntry,
- co::resizing_policy<cc::striped_set::rational_load_factor_resizing<0> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- , Options...
- >
- {
- typedef cc::StripedSet< BucketEntry,
- co::resizing_policy<cc::striped_set::rational_load_factor_resizing<0> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- , Options...
- > base_class;
- typedef typename base_class::resizing_policy resizing_policy_t;
-
- resizing_policy_t m_placeHolder;
- public:
- template <class Config>
- StripedHashSet_ord_rational( Config const& cfg ) // LoadFactor = 1 / nDenominator
- : base_class( 0, *(new(&m_placeHolder) resizing_policy_t( 1024, cfg.c_nLoadFactor )))
- {}
-
- /*
- template <typename Q, typename Less>
- bool erase_with( Q const& v, Less pred )
- {
- return base_class::erase( v );
- }
- */
-
- // for testing
- static CDS_CONSTEXPR bool const c_bExtractSupported = false;
- static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true;
- static CDS_CONSTEXPR bool const c_bEraseExactKey = false;
- };
-
- typedef StripedHashSet_seq<
- std::list< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > StripedSet_list;
-
- typedef StripedHashSet_seq_rational<
- std::list< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > StripedSet_rational_list;
-
- typedef StripedHashSet_seq<
- std::vector< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > StripedSet_vector;
-
- typedef StripedHashSet_seq_rational<
- std::vector< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > StripedSet_rational_vector;
-
-#if BOOST_VERSION >= 104800
- typedef StripedHashSet_seq<
- boost::container::slist< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > StripedSet_boost_slist;
-
- typedef StripedHashSet_seq_rational<
- boost::container::slist< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > StripedSet_rational_boost_slist;
-
- typedef StripedHashSet_seq<
- boost::container::list< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > StripedSet_boost_list;
-
- typedef StripedHashSet_seq_rational<
- boost::container::list< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > StripedSet_rational_boost_list;
-
- typedef StripedHashSet_seq<
- boost::container::vector< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > StripedSet_boost_vector;
-
- typedef StripedHashSet_seq_rational<
- boost::container::vector< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > StripedSet_rational_boost_vector;
-
- typedef StripedHashSet_seq<
- boost::container::stable_vector< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > StripedSet_boost_stable_vector;
-
- typedef StripedHashSet_seq_rational<
- boost::container::stable_vector< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > StripedSet_rational_boost_stable_vector;
-#endif
-
- typedef StripedHashSet_ord<
- std::set< key_val, less >
- , co::hash< hash2 >
- > StripedSet_set;
-
- typedef StripedHashSet_ord_rational<
- std::set< key_val, less >
- , co::hash< hash2 >
- > StripedSet_rational_set;
-
- typedef StripedHashSet_ord<
- std::unordered_set< key_val, hash, equal_to >
- , co::hash< hash2 >
- > StripedSet_hashset;
-
- typedef StripedHashSet_ord_rational<
- std::unordered_set< key_val, hash, equal_to >
- , co::hash< hash2 >
- > StripedSet_rational_hashset;
-
-#if BOOST_VERSION >= 104800
- typedef StripedHashSet_ord<
- boost::container::set< key_val, less >
- , co::hash< hash2 >
- > StripedSet_boost_set;
-
- typedef StripedHashSet_ord_rational<
- boost::container::set< key_val, less >
- , co::hash< hash2 >
- > StripedSet_rational_boost_set;
-
- typedef StripedHashSet_ord<
- boost::container::flat_set< key_val, less >
- , co::hash< hash2 >
- > StripedSet_boost_flat_set;
-
- typedef StripedHashSet_ord_rational<
- boost::container::flat_set< key_val, less >
- , co::hash< hash2 >
- > StripedSet_rational_boost_flat_set;
-#endif
-
- typedef StripedHashSet_ord<
- boost::unordered_set< key_val, hash, equal_to >
- , co::hash< hash2 >
- > StripedSet_boost_unordered_set;
-
- typedef StripedHashSet_ord_rational<
- boost::unordered_set< key_val, hash, equal_to >
- , co::hash< hash2 >
- > StripedSet_rational_boost_unordered_set;
-
-
- // ***************************************************************************
- // RefinableSet
-
- // for sequential containers
- template <class BucketEntry, typename... Options>
- class RefinableHashSet_seq:
- public cc::StripedSet< BucketEntry,
- co::mutex_policy< cc::striped_set::refinable<> >
- ,co::resizing_policy<cc::striped_set::load_factor_resizing<0> >
- , Options...
- >
- {
- typedef cc::StripedSet< BucketEntry,
- co::mutex_policy< cc::striped_set::refinable<> >
- ,co::resizing_policy<cc::striped_set::load_factor_resizing<0> >
- , Options...
- > base_class;
- typedef typename base_class::resizing_policy resizing_policy_t;
-
- resizing_policy_t m_placeHolder;
- public:
- template <class Config>
- RefinableHashSet_seq( Config const& cfg )
- : base_class( cfg.c_nSetSize / cfg.c_nLoadFactor / 16, *(new(&m_placeHolder) resizing_policy_t( cfg.c_nLoadFactor )) )
- {}
-
- /*
- template <typename Q, typename Less>
- bool erase_with( Q const& v, Less pred )
- {
- return base_class::erase( v );
- }
- */
-
- // for testing
- static CDS_CONSTEXPR bool const c_bExtractSupported = false;
- static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true;
- };
-
- template <class BucketEntry, typename... Options>
- class RefinableHashSet_seq_rational:
- public cc::StripedSet< BucketEntry,
- co::mutex_policy< cc::striped_set::refinable<> >
- ,co::resizing_policy<cc::striped_set::rational_load_factor_resizing<0> >
- , Options...
- >
- {
- typedef cc::StripedSet< BucketEntry,
- co::mutex_policy< cc::striped_set::refinable<> >
- ,co::resizing_policy<cc::striped_set::rational_load_factor_resizing<0> >
- , Options...
- > base_class;
- typedef typename base_class::resizing_policy resizing_policy_t;
-
- resizing_policy_t m_placeHolder;
- public:
- template <class Config>
- RefinableHashSet_seq_rational( Config const& cfg ) // LoadFactor = 1 / nDenominator
- : base_class( cfg.c_nSetSize / cfg.c_nLoadFactor / 16, *(new(&m_placeHolder) resizing_policy_t( 1, cfg.c_nLoadFactor )))
- {}
-
- /*
- template <typename Q, typename Less>
- bool erase_with( Q const& v, Less pred )
- {
- return base_class::erase( v );
- }
- */
-
- // for testing
- static CDS_CONSTEXPR bool const c_bExtractSupported = false;
- static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true;
- };
-
- // for non-sequential ordered containers
- template <class BucketEntry, typename... Options>
- class RefinableHashSet_ord:
- public cc::StripedSet< BucketEntry,
- co::resizing_policy<cc::striped_set::load_factor_resizing<0> >
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , Options...
- >
- {
- typedef cc::StripedSet< BucketEntry,
- co::resizing_policy<cc::striped_set::load_factor_resizing<0> >
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , Options...
- > base_class;
- typedef typename base_class::resizing_policy resizing_policy_t;
-
- resizing_policy_t m_placeHolder;
- public:
- template <class Config>
- RefinableHashSet_ord( Config const& cfg )
- : base_class( 0, *(new(&m_placeHolder) resizing_policy_t( cfg.c_nMaxLoadFactor * 1024 )) )
- {}
-
- /*
- template <typename Q, typename Less>
- bool erase_with( Q const& v, Less pred )
- {
- return base_class::erase( v );
- }
- */
-
- // for testing
- static CDS_CONSTEXPR bool const c_bExtractSupported = false;
- static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
- };
-
- template <class BucketEntry, typename... Options>
- class RefinableHashSet_ord_rational:
- public cc::StripedSet< BucketEntry,
- co::resizing_policy<cc::striped_set::rational_load_factor_resizing<0> >
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , Options...
- >
- {
- typedef cc::StripedSet< BucketEntry,
- co::resizing_policy<cc::striped_set::rational_load_factor_resizing<0> >
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , Options...
- > base_class;
- typedef typename base_class::resizing_policy resizing_policy_t;
-
- resizing_policy_t m_placeHolder;
- public:
- template <class Config>
- RefinableHashSet_ord_rational( Config const& cfg ) // LoadFactor = 1 / nDenominator
- : base_class( 0, *(new(&m_placeHolder) resizing_policy_t( 1024, cfg.c_nLoadFactor )))
- {}
-
- /*
- template <typename Q, typename Less>
- bool erase_with( Q const& v, Less pred )
- {
- return base_class::erase( v );
- }
- */
-
- // for testing
- static CDS_CONSTEXPR bool const c_bExtractSupported = false;
- static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true;
- };
-
- typedef RefinableHashSet_seq<
- std::list< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > RefinableSet_list;
-
- typedef RefinableHashSet_seq_rational<
- std::list< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > RefinableSet_rational_list;
-
- typedef RefinableHashSet_seq<
- std::vector< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > RefinableSet_vector;
-
- typedef RefinableHashSet_seq_rational<
- std::vector< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > RefinableSet_rational_vector;
-
-#if BOOST_VERSION >= 104800
- typedef RefinableHashSet_seq<
- boost::container::slist< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > RefinableSet_boost_slist;
-
- typedef RefinableHashSet_seq_rational<
- boost::container::slist< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > RefinableSet_rational_boost_slist;
-
- typedef RefinableHashSet_seq<
- boost::container::list< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > RefinableSet_boost_list;
-
- typedef RefinableHashSet_seq_rational<
- boost::container::list< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > RefinableSet_rational_boost_list;
-
- typedef RefinableHashSet_seq<
- boost::container::vector< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > RefinableSet_boost_vector;
-
- typedef RefinableHashSet_seq_rational<
- boost::container::vector< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > RefinableSet_rational_boost_vector;
-
- typedef RefinableHashSet_seq<
- boost::container::stable_vector< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > RefinableSet_boost_stable_vector;
-
- typedef RefinableHashSet_seq_rational<
- boost::container::stable_vector< key_val >
- , co::hash< hash2 >
- , co::less< less >
- > RefinableSet_rational_boost_stable_vector;
-#endif
-
- typedef RefinableHashSet_ord<
- std::set< key_val, less >
- , co::hash< hash2 >
- > RefinableSet_set;
-
- typedef RefinableHashSet_ord_rational<
- std::set< key_val, less >
- , co::hash< hash2 >
- > RefinableSet_rational_set;
-
- typedef RefinableHashSet_ord<
- std::unordered_set< key_val, hash, equal_to >
- , co::hash< hash2 >
- > RefinableSet_hashset;
-
- typedef RefinableHashSet_ord_rational<
- std::unordered_set< key_val, hash, equal_to >
- , co::hash< hash2 >
- > RefinableSet_rational_hashset;
-
-#if BOOST_VERSION >= 104800
- typedef RefinableHashSet_ord<
- boost::container::set< key_val, less >
- , co::hash< hash2 >
- > RefinableSet_boost_set;
-
- typedef RefinableHashSet_ord_rational<
- boost::container::set< key_val, less >
- , co::hash< hash2 >
- > RefinableSet_rational_boost_set;
-
- typedef RefinableHashSet_ord<
- boost::container::flat_set< key_val, less >
- , co::hash< hash2 >
- > RefinableSet_boost_flat_set;
-
- typedef RefinableHashSet_ord_rational<
- boost::container::flat_set< key_val, less >
- , co::hash< hash2 >
- > RefinableSet_rational_boost_flat_set;
-#endif
-
- typedef RefinableHashSet_ord<
- boost::unordered_set< key_val, hash, equal_to >
- , co::hash< hash2 >
- > RefinableSet_boost_unordered_set;
-
- typedef RefinableHashSet_ord_rational<
- boost::unordered_set< key_val, hash, equal_to >
- , co::hash< hash2 >
- > RefinableSet_rational_boost_unordered_set;
- };
-
-} // namespace set2
-
-#endif // #ifndef CDSUNIT_SET_TYPE_STRIPED_H