{408FE9BC-44F0-4E6A-89FA-D6F952584239} = {408FE9BC-44F0-4E6A-89FA-D6F952584239}\r
EndProjectSection\r
EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hdr-test-set", "hdr-test-set.vcxproj", "{E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}"\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}") = "hdr-test-striped-set", "hdr-test-striped-set.vcxproj", "{A38E5597-6916-4480-A343-C9846EF544E4}"\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}") = "hdr-test-tree", "hdr-test-tree.vcxproj", "{6F834EAD-7B94-4979-A0F1-A662E3D30145}"\r
ProjectSection(ProjectDependencies) = postProject\r
{61179F2F-07E1-490D-B64D-D85A90B6EF81} = {61179F2F-07E1-490D-B64D-D85A90B6EF81}\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
- {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.Debug|Win32.Build.0 = Debug|Win32\r
- {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.Debug|x64.ActiveCfg = Debug|x64\r
- {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.Debug|x64.Build.0 = Debug|x64\r
- {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.DebugVLD|Win32.ActiveCfg = DebugVLD|Win32\r
- {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.DebugVLD|Win32.Build.0 = DebugVLD|Win32\r
- {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.DebugVLD|x64.ActiveCfg = DebugVLD|x64\r
- {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.DebugVLD|x64.Build.0 = DebugVLD|x64\r
- {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.Release|Win32.ActiveCfg = Release|Win32\r
- {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.Release|Win32.Build.0 = Release|Win32\r
- {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.Release|x64.ActiveCfg = Release|x64\r
- {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}.Release|x64.Build.0 = Release|x64\r
- {A38E5597-6916-4480-A343-C9846EF544E4}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {A38E5597-6916-4480-A343-C9846EF544E4}.Debug|Win32.Build.0 = Debug|Win32\r
- {A38E5597-6916-4480-A343-C9846EF544E4}.Debug|x64.ActiveCfg = Debug|x64\r
- {A38E5597-6916-4480-A343-C9846EF544E4}.Debug|x64.Build.0 = Debug|x64\r
- {A38E5597-6916-4480-A343-C9846EF544E4}.DebugVLD|Win32.ActiveCfg = DebugVLD|Win32\r
- {A38E5597-6916-4480-A343-C9846EF544E4}.DebugVLD|Win32.Build.0 = DebugVLD|Win32\r
- {A38E5597-6916-4480-A343-C9846EF544E4}.DebugVLD|x64.ActiveCfg = DebugVLD|x64\r
- {A38E5597-6916-4480-A343-C9846EF544E4}.DebugVLD|x64.Build.0 = DebugVLD|x64\r
- {A38E5597-6916-4480-A343-C9846EF544E4}.Release|Win32.ActiveCfg = Release|Win32\r
- {A38E5597-6916-4480-A343-C9846EF544E4}.Release|Win32.Build.0 = Release|Win32\r
- {A38E5597-6916-4480-A343-C9846EF544E4}.Release|x64.ActiveCfg = Release|x64\r
- {A38E5597-6916-4480-A343-C9846EF544E4}.Release|x64.Build.0 = Release|x64\r
{6F834EAD-7B94-4979-A0F1-A662E3D30145}.Debug|Win32.ActiveCfg = Debug|Win32\r
{6F834EAD-7B94-4979-A0F1-A662E3D30145}.Debug|Win32.Build.0 = Debug|Win32\r
{6F834EAD-7B94-4979-A0F1-A662E3D30145}.Debug|x64.ActiveCfg = Debug|x64\r
{CA25BDBF-B354-4597-B6D2-220ABBB0D2F4} = {6BB7A27F-FC59-4267-B6FA-D034176D1459}\r
{AF7B2253-2E6D-4992-94D9-4B3699C54929} = {A64449B7-90FB-4E2B-A686-9EFC0E298644}\r
{BA23811C-D4CB-4836-B2F3-6791BD6FFCD1} = {A64449B7-90FB-4E2B-A686-9EFC0E298644}\r
- {E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7} = {B8C24D26-A3BF-4DA6-B64C-142CBA4BFE75}\r
- {A38E5597-6916-4480-A343-C9846EF544E4} = {B8C24D26-A3BF-4DA6-B64C-142CBA4BFE75}\r
{6F834EAD-7B94-4979-A0F1-A662E3D30145} = {B8C24D26-A3BF-4DA6-B64C-142CBA4BFE75}\r
{7521DD92-56FF-4ECA-93E5-CCE50862354B} = {6BB7A27F-FC59-4267-B6FA-D034176D1459}\r
{CA6F0834-0628-4CD7-8800-AEABCD636360} = {6BB7A27F-FC59-4267-B6FA-D034176D1459}\r
+++ /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
- <PropertyGroup Label="Globals">\r
- <ProjectGuid>{E5E9DB4A-7816-45D4-A116-6BBBA0EE8EE7}</ProjectGuid>\r
- <RootNamespace>hdrtestset</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)'=='DebugVLD|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>MultiByte</CharacterSet>\r
- <PlatformToolset>v140</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>MultiByte</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>MultiByte</CharacterSet>\r
- <PlatformToolset>v140</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>MultiByte</CharacterSet>\r
- <PlatformToolset>v140</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>MultiByte</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>MultiByte</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)'=='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|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|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)'=='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
- <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
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|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
- <OutDir Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">false</LinkIncremental>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">false</LinkIncremental>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'" />\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'" />\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|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)'=='Debug|x64'">$(ProjectName)_d</TargetName>\r
- <TargetName Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">$(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\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_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
- <CallingConvention>Cdecl</CallingConvention>\r
- <DisableSpecificWarnings>4520</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
- <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
- <DataExecutionPrevention>\r
- </DataExecutionPrevention>\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\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_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
- <CallingConvention>Cdecl</CallingConvention>\r
- <DisableSpecificWarnings>4520</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
- <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
- <DataExecutionPrevention>\r
- </DataExecutionPrevention>\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>Full</Optimization>\r
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>\r
- <OmitFramePointers>false</OmitFramePointers>\r
- <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <StringPooling>true</StringPooling>\r
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
- <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <CallingConvention>Cdecl</CallingConvention>\r
- <EnablePREfast>false</EnablePREfast>\r
- <DisableSpecificWarnings>4520</DisableSpecificWarnings>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>unit-prerequisites.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
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
- <DataExecutionPrevention>\r
- </DataExecutionPrevention>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- <Profile>true</Profile>\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>Full</Optimization>\r
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>\r
- <OmitFramePointers>false</OmitFramePointers>\r
- <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <StringPooling>true</StringPooling>\r
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <CallingConvention>Cdecl</CallingConvention>\r
- <EnablePREfast>false</EnablePREfast>\r
- <DisableSpecificWarnings>4520</DisableSpecificWarnings>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>unit-prerequisites.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
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>\r
- <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
- <DataExecutionPrevention>\r
- </DataExecutionPrevention>\r
- <TargetMachine>MachineX64</TargetMachine>\r
- <Profile>true</Profile>\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\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_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
- <CallingConvention>Cdecl</CallingConvention>\r
- <DisableSpecificWarnings>4520</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
- <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
- <DataExecutionPrevention>\r
- </DataExecutionPrevention>\r
- <TargetMachine>MachineX86</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\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_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
- <CallingConvention>Cdecl</CallingConvention>\r
- <DisableSpecificWarnings>4520</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
- <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
- <DataExecutionPrevention>\r
- </DataExecutionPrevention>\r
- <TargetMachine>MachineX64</TargetMachine>\r
- <ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>\r
- </Link>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_intrusive_feldman_hashset.h" />\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_intrusive_set.h" />\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_set.h" />\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_set_rcu.h" />\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_feldman_hashset.h" />\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_set.h" />\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set.h" />\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_rcu.h" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_dhp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_dhp_lazy.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_hp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_hp_lazy.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_nogc.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_nogc_lazy.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_rcu_gpb.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_rcu_gpb_lazy.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_rcu_gpi.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_rcu_gpi_lazy.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_rcu_gpt.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_rcu_gpt_lazy.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_rcu_shb.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_rcu_shb_lazy.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_rcu_sht.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_rcu_sht_lazy.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_feldman_hashset_dhp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_feldman_hashset_hp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_feldman_hashset_rcu_gpb.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_feldman_hashset_rcu_gpi.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_feldman_hashset_rcu_gpt.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_feldman_hashset_rcu_shb.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_feldman_hashset_rcu_sht.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_dhp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_dhp_member.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_hp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_hp_member.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_nogc.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_nogc_member.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_rcu_gpb.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_rcu_gpb_member.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_rcu_gpi.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_rcu_gpi_member.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_rcu_gpt.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_rcu_gpt_member.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_rcu_shb.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_rcu_shb_member.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_rcu_sht.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_rcu_sht_member.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_dhp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_dhp_lazy.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_hp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_hp_lazy.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_nogc.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_nogc_lazy.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_gpb.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_gpb_lazy.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_gpi.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_gpi_lazy.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_gpt.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_gpt_lazy.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_shb.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_shb_lazy.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_sht.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_sht_lazy.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_dhp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_hp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_dhp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_hp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_nogc.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_rcu_gpb.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_rcu_gpi.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_rcu_gpt.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_rcu_shb.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_rcu_sht.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_nogc.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_rcu_gpb.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_rcu_gpi.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_rcu_gpt.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_rcu_shb.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_rcu_sht.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_feldman_hashset_dhp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_feldman_hashset_hp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_feldman_hashset_rcu_gpb.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_feldman_hashset_rcu_gpi.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_feldman_hashset_rcu_gpt.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_feldman_hashset_rcu_shb.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_feldman_hashset_rcu_sht.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_dhp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_hp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_nogc.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_rcu_gpb.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_rcu_gpi.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_rcu_gpt.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_rcu_shb.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_rcu_sht.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_dhp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_hp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_lazy_dhp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_lazy_hp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_lazy_nogc.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_lazy_rcu_gpb.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_lazy_rcu_gpi.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_lazy_rcu_gpt.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_lazy_rcu_shb.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_lazy_rcu_sht.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_nogc.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_rcu_gpb.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_rcu_gpi.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_rcu_gpt.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_rcu_shb.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_rcu_sht.cpp" />\r
- </ItemGroup>\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
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_intrusive_set.h">\r
- <Filter>intrusive</Filter>\r
- </ClInclude>\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_set.h">\r
- <Filter>container</Filter>\r
- </ClInclude>\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_set.h">\r
- <Filter>intrusive\skip_list</Filter>\r
- </ClInclude>\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_set_rcu.h">\r
- <Filter>intrusive\skip_list</Filter>\r
- </ClInclude>\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set.h">\r
- <Filter>container\skip_list</Filter>\r
- </ClInclude>\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_rcu.h">\r
- <Filter>container\skip_list</Filter>\r
- </ClInclude>\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_intrusive_feldman_hashset.h">\r
- <Filter>intrusive\feldman_hashset</Filter>\r
- </ClInclude>\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_feldman_hashset.h">\r
- <Filter>container\feldman_hashset</Filter>\r
- </ClInclude>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <Filter Include="intrusive">\r
- <UniqueIdentifier>{83622d26-addb-4c52-98b3-eaa62a1047b6}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="container">\r
- <UniqueIdentifier>{c0375a89-d67a-480a-83d2-d1cdd8d467e9}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="intrusive\michael_set">\r
- <UniqueIdentifier>{4719fe70-337c-4740-931e-548d21a39466}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="intrusive\split_list">\r
- <UniqueIdentifier>{7786d807-8092-4310-9109-945854d26048}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="intrusive\skip_list">\r
- <UniqueIdentifier>{5b8a3b8a-27ad-49e7-9714-1859a842fd7f}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="container\michael_set">\r
- <UniqueIdentifier>{dc053424-ec8d-46a7-9236-6a75f4dc0ad5}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="container\skip_list">\r
- <UniqueIdentifier>{c1d0709e-ede1-4125-b4b8-eb3177ce05d2}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="container\split_list">\r
- <UniqueIdentifier>{61f94a40-c964-4233-af67-66a1be1e0aab}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="intrusive\feldman_hashset">\r
- <UniqueIdentifier>{a878aed0-83c9-4ca7-95bb-74f10aad8bde}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="container\feldman_hashset">\r
- <UniqueIdentifier>{5268f225-1474-413e-a1cb-5f00b8df5e1e}</UniqueIdentifier>\r
- </Filter>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_hp.cpp">\r
- <Filter>intrusive\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_hp_lazy.cpp">\r
- <Filter>intrusive\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_nogc.cpp">\r
- <Filter>intrusive\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_nogc_lazy.cpp">\r
- <Filter>intrusive\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_rcu_gpb.cpp">\r
- <Filter>intrusive\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_rcu_gpb_lazy.cpp">\r
- <Filter>intrusive\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_rcu_gpi.cpp">\r
- <Filter>intrusive\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_rcu_gpi_lazy.cpp">\r
- <Filter>intrusive\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_rcu_gpt.cpp">\r
- <Filter>intrusive\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_rcu_gpt_lazy.cpp">\r
- <Filter>intrusive\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_hp.cpp">\r
- <Filter>intrusive\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_hp_member.cpp">\r
- <Filter>intrusive\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_hp.cpp">\r
- <Filter>intrusive\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_hp_lazy.cpp">\r
- <Filter>intrusive\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_nogc.cpp">\r
- <Filter>intrusive\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_nogc_lazy.cpp">\r
- <Filter>intrusive\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_gpb.cpp">\r
- <Filter>intrusive\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_gpb_lazy.cpp">\r
- <Filter>intrusive\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_gpi.cpp">\r
- <Filter>intrusive\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_gpi_lazy.cpp">\r
- <Filter>intrusive\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_gpt.cpp">\r
- <Filter>intrusive\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_gpt_lazy.cpp">\r
- <Filter>intrusive\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_hp.cpp">\r
- <Filter>container\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_hp.cpp">\r
- <Filter>container\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_nogc.cpp">\r
- <Filter>container\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_rcu_gpi.cpp">\r
- <Filter>container\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_rcu_gpt.cpp">\r
- <Filter>container\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_nogc.cpp">\r
- <Filter>container\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_rcu_gpb.cpp">\r
- <Filter>container\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_rcu_gpi.cpp">\r
- <Filter>container\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_rcu_gpt.cpp">\r
- <Filter>container\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_hp.cpp">\r
- <Filter>container\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_hp.cpp">\r
- <Filter>container\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_lazy_hp.cpp">\r
- <Filter>container\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_lazy_nogc.cpp">\r
- <Filter>container\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_nogc.cpp">\r
- <Filter>container\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_rcu_gpb.cpp">\r
- <Filter>intrusive\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_rcu_gpb_member.cpp">\r
- <Filter>intrusive\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_rcu_gpi.cpp">\r
- <Filter>intrusive\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_rcu_gpi_member.cpp">\r
- <Filter>intrusive\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_rcu_gpt.cpp">\r
- <Filter>intrusive\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_rcu_gpt_member.cpp">\r
- <Filter>intrusive\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_rcu_gpb.cpp">\r
- <Filter>container\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_rcu_gpi.cpp">\r
- <Filter>container\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_rcu_gpt.cpp">\r
- <Filter>container\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_nogc.cpp">\r
- <Filter>intrusive\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_nogc_member.cpp">\r
- <Filter>intrusive\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_nogc.cpp">\r
- <Filter>container\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_rcu_shb.cpp">\r
- <Filter>intrusive\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_rcu_shb_lazy.cpp">\r
- <Filter>intrusive\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_rcu_sht.cpp">\r
- <Filter>intrusive\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_rcu_sht_lazy.cpp">\r
- <Filter>intrusive\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_rcu_shb.cpp">\r
- <Filter>intrusive\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_rcu_shb_member.cpp">\r
- <Filter>intrusive\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_rcu_sht.cpp">\r
- <Filter>intrusive\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_rcu_sht_member.cpp">\r
- <Filter>intrusive\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_shb.cpp">\r
- <Filter>intrusive\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_shb_lazy.cpp">\r
- <Filter>intrusive\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_sht.cpp">\r
- <Filter>intrusive\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_sht_lazy.cpp">\r
- <Filter>intrusive\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_rcu_shb.cpp">\r
- <Filter>container\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_rcu_sht.cpp">\r
- <Filter>container\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_rcu_shb.cpp">\r
- <Filter>container\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_rcu_sht.cpp">\r
- <Filter>container\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_rcu_shb.cpp">\r
- <Filter>container\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_rcu_sht.cpp">\r
- <Filter>container\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_lazy_rcu_shb.cpp">\r
- <Filter>container\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_lazy_rcu_sht.cpp">\r
- <Filter>container\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_rcu_shb.cpp">\r
- <Filter>container\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_rcu_sht.cpp">\r
- <Filter>container\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_dhp.cpp">\r
- <Filter>intrusive\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_dhp_lazy.cpp">\r
- <Filter>intrusive\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_dhp.cpp">\r
- <Filter>container\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_dhp.cpp">\r
- <Filter>container\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_rcu_gpb.cpp">\r
- <Filter>container\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_dhp.cpp">\r
- <Filter>container\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_lazy_dhp.cpp">\r
- <Filter>container\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_dhp.cpp">\r
- <Filter>intrusive\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_dhp_lazy.cpp">\r
- <Filter>intrusive\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_lazy_rcu_gpb.cpp">\r
- <Filter>container\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_lazy_rcu_gpi.cpp">\r
- <Filter>container\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_lazy_rcu_gpt.cpp">\r
- <Filter>container\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_rcu_gpb.cpp">\r
- <Filter>container\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_rcu_gpi.cpp">\r
- <Filter>container\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_splitlist_set_rcu_gpt.cpp">\r
- <Filter>container\split_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_dhp.cpp">\r
- <Filter>intrusive\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_dhp_member.cpp">\r
- <Filter>intrusive\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_dhp.cpp">\r
- <Filter>container\skip_list</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_feldman_hashset_hp.cpp">\r
- <Filter>intrusive\feldman_hashset</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_feldman_hashset_dhp.cpp">\r
- <Filter>intrusive\feldman_hashset</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_feldman_hashset_hp.cpp">\r
- <Filter>container\feldman_hashset</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_feldman_hashset_dhp.cpp">\r
- <Filter>container\feldman_hashset</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_feldman_hashset_rcu_gpi.cpp">\r
- <Filter>intrusive\feldman_hashset</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_feldman_hashset_rcu_gpb.cpp">\r
- <Filter>intrusive\feldman_hashset</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_feldman_hashset_rcu_gpt.cpp">\r
- <Filter>intrusive\feldman_hashset</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_feldman_hashset_rcu_shb.cpp">\r
- <Filter>intrusive\feldman_hashset</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_feldman_hashset_rcu_sht.cpp">\r
- <Filter>intrusive\feldman_hashset</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_feldman_hashset_rcu_gpi.cpp">\r
- <Filter>container\feldman_hashset</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_feldman_hashset_rcu_gpb.cpp">\r
- <Filter>container\feldman_hashset</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_feldman_hashset_rcu_gpt.cpp">\r
- <Filter>container\feldman_hashset</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_feldman_hashset_rcu_shb.cpp">\r
- <Filter>container\feldman_hashset</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_feldman_hashset_rcu_sht.cpp">\r
- <Filter>container\feldman_hashset</Filter>\r
- </ClCompile>\r
- </ItemGroup>\r
-</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\test-hdr\set\hdr_cuckoo_set.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_cuckoo_refinable_set.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_cuckoo_set.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_refinable_hashset_avlset.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_refinable_hashset_list.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_refinable_hashset_set.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_refinable_hashset_sgset.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_refinable_hashset_slist.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_refinable_hashset_splayset.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_refinable_hashset_treapset.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_refinable_hashset_uset.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_striped_hashset_avlset.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_striped_hashset_list.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_striped_hashset_set.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_striped_hashset_sgset.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_striped_hashset_slist.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_striped_hashset_splayset.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_striped_hashset_treapset.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_striped_hashset_uset.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_striped_set.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_refinable_hashset_boost_flat_set.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_refinable_hashset_boost_list.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_refinable_hashset_boost_set.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_refinable_hashset_boost_stable_vector.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_refinable_hashset_boost_unordered_set.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_refinable_hashset_boost_vector.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_refinable_hashset_hashset_std.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_refinable_hashset_list.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_refinable_hashset_set.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_refinable_hashset_slist.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_refinable_hashset_vector.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_striped_hashset_boost_flat_set.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_striped_hashset_boost_list.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_striped_hashset_boost_set.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_striped_hashset_boost_stable_vector.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_striped_hashset_boost_unordered_set.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_striped_hashset_boost_vector.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_striped_hashset_hashset_std.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_striped_hashset_list.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_striped_hashset_set.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_striped_hashset_slist.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_striped_hashset_vector.cpp" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_cuckoo_set.h" />\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_intrusive_cuckoo_set.h" />\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_intrusive_striped_set.h" />\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_striped_set.h" />\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\intrusive_cuckoo_set_common.h" />\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectGuid>{A38E5597-6916-4480-A343-C9846EF544E4}</ProjectGuid>\r
- <RootNamespace>hdrteststripedset</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)'=='DebugVLD|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>MultiByte</CharacterSet>\r
- <PlatformToolset>v140</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>MultiByte</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>MultiByte</CharacterSet>\r
- <PlatformToolset>v140</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>MultiByte</CharacterSet>\r
- <PlatformToolset>v140</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>Application</ConfigurationType>\r
- <CharacterSet>MultiByte</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>MultiByte</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)'=='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|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|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)'=='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
- <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
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|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
- <OutDir Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">false</LinkIncremental>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">false</LinkIncremental>\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'" />\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'" />\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|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)'=='Debug|x64'">$(ProjectName)_d</TargetName>\r
- <TargetName Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">$(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\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;%(PreprocessorDefinitions);_SCL_SECURE_NO_WARNINGS</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
- <CallingConvention>Cdecl</CallingConvention>\r
- <DisableSpecificWarnings>4520</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
- <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
- <DataExecutionPrevention>\r
- </DataExecutionPrevention>\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\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;%(PreprocessorDefinitions);_SCL_SECURE_NO_WARNINGS</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
- <CallingConvention>Cdecl</CallingConvention>\r
- <DisableSpecificWarnings>4520</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
- <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
- <DataExecutionPrevention>\r
- </DataExecutionPrevention>\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>Full</Optimization>\r
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>\r
- <OmitFramePointers>false</OmitFramePointers>\r
- <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <StringPooling>true</StringPooling>\r
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
- <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <CallingConvention>Cdecl</CallingConvention>\r
- <EnablePREfast>false</EnablePREfast>\r
- <DisableSpecificWarnings>4520</DisableSpecificWarnings>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>unit-prerequisites.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
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
- <DataExecutionPrevention>\r
- </DataExecutionPrevention>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- <Profile>true</Profile>\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>Full</Optimization>\r
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>\r
- <IntrinsicFunctions>true</IntrinsicFunctions>\r
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>\r
- <OmitFramePointers>false</OmitFramePointers>\r
- <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(SolutionDir)..\..\..\tests\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0501;_SCL_SECURE=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <StringPooling>true</StringPooling>\r
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- <CallingConvention>Cdecl</CallingConvention>\r
- <EnablePREfast>false</EnablePREfast>\r
- <DisableSpecificWarnings>4520</DisableSpecificWarnings>\r
- </ClCompile>\r
- <Link>\r
- <AdditionalDependencies>unit-prerequisites.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
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>\r
- <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
- <DataExecutionPrevention>\r
- </DataExecutionPrevention>\r
- <TargetMachine>MachineX64</TargetMachine>\r
- <Profile>true</Profile>\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\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;%(PreprocessorDefinitions);_SCL_SECURE_NO_WARNINGS</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
- <CallingConvention>Cdecl</CallingConvention>\r
- <DisableSpecificWarnings>4520</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
- <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
- <DataExecutionPrevention>\r
- </DataExecutionPrevention>\r
- <TargetMachine>MachineX86</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\test-hdr;$(SolutionDir)..\..\..\tests;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>CDS_USE_VLD;WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT=0x0500;_SCL_SECURE=0;%(PreprocessorDefinitions);_SCL_SECURE_NO_WARNINGS</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
- <CallingConvention>Cdecl</CallingConvention>\r
- <DisableSpecificWarnings>4520</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
- <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
- <DataExecutionPrevention>\r
- </DataExecutionPrevention>\r
- <TargetMachine>MachineX64</TargetMachine>\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
- <Filter Include="container">\r
- <UniqueIdentifier>{4061d7f1-7ab8-4624-adb0-b4533e05a932}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="intrusive">\r
- <UniqueIdentifier>{718f3de0-3b1c-4245-944c-0a56f288c6f7}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="intrusive\cuckoo">\r
- <UniqueIdentifier>{db3df5e9-9ef5-407f-821d-e25b9cc70082}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="intrusive\striped">\r
- <UniqueIdentifier>{0147ba57-0ecc-4674-8d7b-7492054d3a48}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="container\cuckoo">\r
- <UniqueIdentifier>{ee3a372b-70df-47e6-bade-e7c4d1de7ec3}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="container\striped">\r
- <UniqueIdentifier>{4c811e47-74dd-436d-93f7-686f35980069}</UniqueIdentifier>\r
- </Filter>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_cuckoo_refinable_set.cpp">\r
- <Filter>intrusive\cuckoo</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_cuckoo_set.cpp">\r
- <Filter>intrusive\cuckoo</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_refinable_hashset_avlset.cpp">\r
- <Filter>intrusive\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_refinable_hashset_list.cpp">\r
- <Filter>intrusive\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_refinable_hashset_set.cpp">\r
- <Filter>intrusive\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_refinable_hashset_sgset.cpp">\r
- <Filter>intrusive\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_refinable_hashset_slist.cpp">\r
- <Filter>intrusive\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_refinable_hashset_splayset.cpp">\r
- <Filter>intrusive\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_refinable_hashset_treapset.cpp">\r
- <Filter>intrusive\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_refinable_hashset_uset.cpp">\r
- <Filter>intrusive\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_striped_hashset_avlset.cpp">\r
- <Filter>intrusive\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_striped_hashset_list.cpp">\r
- <Filter>intrusive\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_striped_hashset_set.cpp">\r
- <Filter>intrusive\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_striped_hashset_sgset.cpp">\r
- <Filter>intrusive\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_striped_hashset_slist.cpp">\r
- <Filter>intrusive\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_striped_hashset_splayset.cpp">\r
- <Filter>intrusive\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_striped_hashset_treapset.cpp">\r
- <Filter>intrusive\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_striped_hashset_uset.cpp">\r
- <Filter>intrusive\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_striped_set.cpp">\r
- <Filter>intrusive\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_cuckoo_set.cpp">\r
- <Filter>container\cuckoo</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_refinable_hashset_boost_flat_set.cpp">\r
- <Filter>container\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_refinable_hashset_boost_list.cpp">\r
- <Filter>container\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_refinable_hashset_boost_set.cpp">\r
- <Filter>container\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_refinable_hashset_boost_stable_vector.cpp">\r
- <Filter>container\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_refinable_hashset_boost_unordered_set.cpp">\r
- <Filter>container\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_refinable_hashset_boost_vector.cpp">\r
- <Filter>container\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_refinable_hashset_hashset_std.cpp">\r
- <Filter>container\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_refinable_hashset_list.cpp">\r
- <Filter>container\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_refinable_hashset_set.cpp">\r
- <Filter>container\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_refinable_hashset_slist.cpp">\r
- <Filter>container\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_refinable_hashset_vector.cpp">\r
- <Filter>container\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_striped_hashset_boost_flat_set.cpp">\r
- <Filter>container\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_striped_hashset_boost_list.cpp">\r
- <Filter>container\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_striped_hashset_boost_set.cpp">\r
- <Filter>container\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_striped_hashset_boost_stable_vector.cpp">\r
- <Filter>container\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_striped_hashset_boost_unordered_set.cpp">\r
- <Filter>container\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_striped_hashset_boost_vector.cpp">\r
- <Filter>container\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_striped_hashset_hashset_std.cpp">\r
- <Filter>container\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_striped_hashset_list.cpp">\r
- <Filter>container\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_striped_hashset_set.cpp">\r
- <Filter>container\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_striped_hashset_slist.cpp">\r
- <Filter>container\striped</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_striped_hashset_vector.cpp">\r
- <Filter>container\striped</Filter>\r
- </ClCompile>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_intrusive_cuckoo_set.h">\r
- <Filter>intrusive\cuckoo</Filter>\r
- </ClInclude>\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\intrusive_cuckoo_set_common.h">\r
- <Filter>intrusive\cuckoo</Filter>\r
- </ClInclude>\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_intrusive_striped_set.h">\r
- <Filter>intrusive\striped</Filter>\r
- </ClInclude>\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_cuckoo_set.h">\r
- <Filter>container\cuckoo</Filter>\r
- </ClInclude>\r
- <ClInclude Include="..\..\..\tests\test-hdr\set\hdr_striped_set.h">\r
- <Filter>container\striped</Filter>\r
- </ClInclude>\r
- </ItemGroup>\r
-</Project>
\ No newline at end of file
tests/test-hdr/map/hdr_striped_hashmap_slist.cpp \
tests/test-hdr/map/hdr_striped_map_reg.cpp
-CDS_TESTHDR_SET := \
- tests/test-hdr/set/hdr_intrusive_feldman_hashset_hp.cpp \
- tests/test-hdr/set/hdr_intrusive_feldman_hashset_dhp.cpp \
- tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_gpi.cpp \
- tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_gpb.cpp \
- tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_gpt.cpp \
- tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_shb.cpp \
- tests/test-hdr/set/hdr_intrusive_feldman_hashset_rcu_sht.cpp \
- tests/test-hdr/set/hdr_intrusive_refinable_hashset_avlset.cpp \
- tests/test-hdr/set/hdr_intrusive_refinable_hashset_list.cpp \
- tests/test-hdr/set/hdr_intrusive_refinable_hashset_set.cpp \
- tests/test-hdr/set/hdr_intrusive_refinable_hashset_sgset.cpp \
- tests/test-hdr/set/hdr_intrusive_refinable_hashset_slist.cpp \
- tests/test-hdr/set/hdr_intrusive_refinable_hashset_splayset.cpp \
- tests/test-hdr/set/hdr_intrusive_refinable_hashset_treapset.cpp \
- tests/test-hdr/set/hdr_intrusive_refinable_hashset_uset.cpp \
- tests/test-hdr/set/hdr_intrusive_skiplist_hp.cpp \
- tests/test-hdr/set/hdr_intrusive_skiplist_dhp.cpp \
- tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpb.cpp \
- tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpi.cpp \
- tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpt.cpp \
- tests/test-hdr/set/hdr_intrusive_skiplist_rcu_shb.cpp \
- tests/test-hdr/set/hdr_intrusive_skiplist_rcu_sht.cpp \
- tests/test-hdr/set/hdr_intrusive_skiplist_nogc.cpp \
- tests/test-hdr/set/hdr_intrusive_striped_hashset_avlset.cpp \
- tests/test-hdr/set/hdr_intrusive_striped_hashset_list.cpp \
- tests/test-hdr/set/hdr_intrusive_striped_hashset_set.cpp \
- tests/test-hdr/set/hdr_intrusive_striped_hashset_sgset.cpp \
- tests/test-hdr/set/hdr_intrusive_striped_hashset_slist.cpp \
- tests/test-hdr/set/hdr_intrusive_striped_hashset_splayset.cpp \
- tests/test-hdr/set/hdr_intrusive_striped_hashset_treapset.cpp \
- tests/test-hdr/set/hdr_intrusive_striped_hashset_uset.cpp \
- tests/test-hdr/set/hdr_intrusive_striped_set.cpp \
- tests/test-hdr/set/hdr_michael_set_hp.cpp \
- tests/test-hdr/set/hdr_michael_set_dhp.cpp \
- tests/test-hdr/set/hdr_michael_set_rcu_gpi.cpp \
- tests/test-hdr/set/hdr_michael_set_rcu_gpb.cpp \
- tests/test-hdr/set/hdr_michael_set_rcu_gpt.cpp \
- tests/test-hdr/set/hdr_michael_set_rcu_shb.cpp \
- tests/test-hdr/set/hdr_michael_set_rcu_sht.cpp \
- tests/test-hdr/set/hdr_michael_set_nogc.cpp \
- tests/test-hdr/set/hdr_michael_set_lazy_hp.cpp \
- tests/test-hdr/set/hdr_michael_set_lazy_dhp.cpp \
- tests/test-hdr/set/hdr_michael_set_lazy_rcu_gpi.cpp \
- tests/test-hdr/set/hdr_michael_set_lazy_rcu_gpb.cpp \
- tests/test-hdr/set/hdr_michael_set_lazy_rcu_gpt.cpp \
- tests/test-hdr/set/hdr_michael_set_lazy_rcu_shb.cpp \
- tests/test-hdr/set/hdr_michael_set_lazy_rcu_sht.cpp \
- tests/test-hdr/set/hdr_michael_set_lazy_nogc.cpp \
- tests/test-hdr/set/hdr_feldman_hashset_hp.cpp \
- tests/test-hdr/set/hdr_feldman_hashset_dhp.cpp \
- tests/test-hdr/set/hdr_feldman_hashset_rcu_gpb.cpp \
- tests/test-hdr/set/hdr_feldman_hashset_rcu_gpi.cpp \
- tests/test-hdr/set/hdr_feldman_hashset_rcu_gpt.cpp \
- tests/test-hdr/set/hdr_feldman_hashset_rcu_shb.cpp \
- tests/test-hdr/set/hdr_feldman_hashset_rcu_sht.cpp \
- tests/test-hdr/set/hdr_refinable_hashset_hashset_std.cpp \
- tests/test-hdr/set/hdr_refinable_hashset_boost_flat_set.cpp \
- tests/test-hdr/set/hdr_refinable_hashset_boost_list.cpp \
- tests/test-hdr/set/hdr_refinable_hashset_boost_set.cpp \
- tests/test-hdr/set/hdr_refinable_hashset_boost_stable_vector.cpp \
- tests/test-hdr/set/hdr_refinable_hashset_boost_unordered_set.cpp \
- tests/test-hdr/set/hdr_refinable_hashset_boost_vector.cpp \
- tests/test-hdr/set/hdr_refinable_hashset_list.cpp \
- tests/test-hdr/set/hdr_refinable_hashset_set.cpp \
- tests/test-hdr/set/hdr_refinable_hashset_slist.cpp \
- tests/test-hdr/set/hdr_refinable_hashset_vector.cpp \
- tests/test-hdr/set/hdr_skiplist_set_hp.cpp \
- tests/test-hdr/set/hdr_skiplist_set_dhp.cpp \
- tests/test-hdr/set/hdr_skiplist_set_rcu_gpi.cpp \
- tests/test-hdr/set/hdr_skiplist_set_rcu_gpb.cpp \
- tests/test-hdr/set/hdr_skiplist_set_rcu_gpt.cpp \
- tests/test-hdr/set/hdr_skiplist_set_rcu_shb.cpp \
- tests/test-hdr/set/hdr_skiplist_set_rcu_sht.cpp \
- tests/test-hdr/set/hdr_skiplist_set_nogc.cpp \
- tests/test-hdr/set/hdr_splitlist_set_hp.cpp \
- tests/test-hdr/set/hdr_splitlist_set_nogc.cpp \
- tests/test-hdr/set/hdr_splitlist_set_dhp.cpp \
- tests/test-hdr/set/hdr_splitlist_set_rcu_gpi.cpp \
- tests/test-hdr/set/hdr_splitlist_set_rcu_gpb.cpp \
- tests/test-hdr/set/hdr_splitlist_set_rcu_gpt.cpp \
- tests/test-hdr/set/hdr_splitlist_set_rcu_shb.cpp \
- tests/test-hdr/set/hdr_splitlist_set_rcu_sht.cpp \
- tests/test-hdr/set/hdr_splitlist_set_lazy_hp.cpp \
- tests/test-hdr/set/hdr_splitlist_set_lazy_nogc.cpp \
- tests/test-hdr/set/hdr_splitlist_set_lazy_dhp.cpp \
- tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpi.cpp \
- tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpb.cpp \
- tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpt.cpp \
- tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_shb.cpp \
- tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_sht.cpp \
- tests/test-hdr/set/hdr_striped_hashset_hashset_std.cpp \
- tests/test-hdr/set/hdr_striped_hashset_boost_flat_set.cpp \
- tests/test-hdr/set/hdr_striped_hashset_boost_list.cpp \
- tests/test-hdr/set/hdr_striped_hashset_boost_set.cpp \
- tests/test-hdr/set/hdr_striped_hashset_boost_stable_vector.cpp \
- tests/test-hdr/set/hdr_striped_hashset_boost_unordered_set.cpp \
- tests/test-hdr/set/hdr_striped_hashset_boost_vector.cpp \
- tests/test-hdr/set/hdr_striped_hashset_list.cpp \
- tests/test-hdr/set/hdr_striped_hashset_set.cpp \
- tests/test-hdr/set/hdr_striped_hashset_slist.cpp \
- tests/test-hdr/set/hdr_striped_hashset_vector.cpp
-
CDS_TESTHDR_TREE := \
tests/test-hdr/tree/hdr_tree_reg.cpp \
tests/test-hdr/tree/hdr_intrusive_ellen_bintree_hp.cpp \
CDS_TESTHDR_SOURCES := \
$(CDS_TESTHDR_MAP) \
- $(CDS_TESTHDR_SET) \
$(CDS_TESTHDR_TREE) \
$(CDS_TESTHDR_MISC)
CDS_TESTHDR_OFFSETOF_MAP := \
tests/test-hdr/map/hdr_cuckoo_map.cpp
-CDS_TESTHDR_OFFSETOF_SET := \
- tests/test-hdr/set/hdr_cuckoo_set.cpp \
- tests/test-hdr/set/hdr_intrusive_cuckoo_set.cpp \
- tests/test-hdr/set/hdr_intrusive_cuckoo_refinable_set.cpp \
- tests/test-hdr/set/hdr_intrusive_michael_set_hp.cpp \
- tests/test-hdr/set/hdr_intrusive_michael_set_dhp.cpp \
- tests/test-hdr/set/hdr_intrusive_michael_set_nogc.cpp \
- tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpi.cpp \
- tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpb.cpp \
- tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpt.cpp \
- tests/test-hdr/set/hdr_intrusive_michael_set_rcu_shb.cpp \
- tests/test-hdr/set/hdr_intrusive_michael_set_rcu_sht.cpp \
- tests/test-hdr/set/hdr_intrusive_michael_set_hp_lazy.cpp \
- tests/test-hdr/set/hdr_intrusive_michael_set_dhp_lazy.cpp \
- tests/test-hdr/set/hdr_intrusive_michael_set_nogc_lazy.cpp \
- tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpi_lazy.cpp \
- tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpb_lazy.cpp \
- tests/test-hdr/set/hdr_intrusive_michael_set_rcu_gpt_lazy.cpp \
- tests/test-hdr/set/hdr_intrusive_michael_set_rcu_shb_lazy.cpp \
- tests/test-hdr/set/hdr_intrusive_michael_set_rcu_sht_lazy.cpp \
- tests/test-hdr/set/hdr_intrusive_skiplist_hp_member.cpp \
- tests/test-hdr/set/hdr_intrusive_skiplist_dhp_member.cpp \
- tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpi_member.cpp \
- tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpb_member.cpp \
- tests/test-hdr/set/hdr_intrusive_skiplist_rcu_gpt_member.cpp \
- tests/test-hdr/set/hdr_intrusive_skiplist_rcu_shb_member.cpp \
- tests/test-hdr/set/hdr_intrusive_skiplist_rcu_sht_member.cpp \
- tests/test-hdr/set/hdr_intrusive_skiplist_nogc_member.cpp \
- tests/test-hdr/set/hdr_intrusive_splitlist_set_hp.cpp \
- tests/test-hdr/set/hdr_intrusive_splitlist_set_nogc.cpp \
- tests/test-hdr/set/hdr_intrusive_splitlist_set_dhp.cpp \
- tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpb.cpp \
- tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpi.cpp \
- tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpt.cpp \
- tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_shb.cpp \
- tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_sht.cpp \
- tests/test-hdr/set/hdr_intrusive_splitlist_set_hp_lazy.cpp \
- tests/test-hdr/set/hdr_intrusive_splitlist_set_nogc_lazy.cpp \
- tests/test-hdr/set/hdr_intrusive_splitlist_set_dhp_lazy.cpp \
- tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpb_lazy.cpp \
- tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpi_lazy.cpp \
- tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpt_lazy.cpp \
- tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_shb_lazy.cpp \
- tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_sht_lazy.cpp
-
CDS_TESTHDR_OFFSETOF_TREE := \
tests/test-hdr/tree/hdr_intrusive_ellen_bintree_hp_member.cpp \
tests/test-hdr/tree/hdr_intrusive_ellen_bintree_dhp_member.cpp \
CDS_TESTHDR_OFFSETOF_SOURCES := \
$(CDS_TESTHDR_OFFSETOF_MAP) \
- $(CDS_TESTHDR_OFFSETOF_SET) \
$(CDS_TESTHDR_OFFSETOF_TREE)
map/hdr_striped_hashmap_slist.cpp\r
map/hdr_striped_map_reg.cpp)\r
\r
-set(CDS_TESTHDR_SET\r
- set/hdr_intrusive_feldman_hashset_hp.cpp\r
- set/hdr_intrusive_feldman_hashset_dhp.cpp\r
- set/hdr_intrusive_feldman_hashset_rcu_gpi.cpp\r
- set/hdr_intrusive_feldman_hashset_rcu_gpb.cpp\r
- set/hdr_intrusive_feldman_hashset_rcu_gpt.cpp\r
- set/hdr_intrusive_feldman_hashset_rcu_shb.cpp\r
- set/hdr_intrusive_feldman_hashset_rcu_sht.cpp\r
- set/hdr_intrusive_refinable_hashset_avlset.cpp\r
- set/hdr_intrusive_refinable_hashset_list.cpp\r
- set/hdr_intrusive_refinable_hashset_set.cpp\r
- set/hdr_intrusive_refinable_hashset_sgset.cpp\r
- set/hdr_intrusive_refinable_hashset_slist.cpp\r
- set/hdr_intrusive_refinable_hashset_splayset.cpp\r
- set/hdr_intrusive_refinable_hashset_treapset.cpp\r
- set/hdr_intrusive_refinable_hashset_uset.cpp\r
- set/hdr_intrusive_skiplist_hp.cpp\r
- set/hdr_intrusive_skiplist_dhp.cpp\r
- set/hdr_intrusive_skiplist_rcu_gpb.cpp\r
- set/hdr_intrusive_skiplist_rcu_gpi.cpp\r
- set/hdr_intrusive_skiplist_rcu_gpt.cpp\r
- set/hdr_intrusive_skiplist_rcu_shb.cpp\r
- set/hdr_intrusive_skiplist_rcu_sht.cpp\r
- set/hdr_intrusive_skiplist_nogc.cpp\r
- set/hdr_intrusive_striped_hashset_avlset.cpp\r
- set/hdr_intrusive_striped_hashset_list.cpp\r
- set/hdr_intrusive_striped_hashset_set.cpp\r
- set/hdr_intrusive_striped_hashset_sgset.cpp\r
- set/hdr_intrusive_striped_hashset_slist.cpp\r
- set/hdr_intrusive_striped_hashset_splayset.cpp\r
- set/hdr_intrusive_striped_hashset_treapset.cpp\r
- set/hdr_intrusive_striped_hashset_uset.cpp\r
- set/hdr_intrusive_striped_set.cpp\r
- set/hdr_michael_set_hp.cpp\r
- set/hdr_michael_set_dhp.cpp\r
- set/hdr_michael_set_rcu_gpi.cpp\r
- set/hdr_michael_set_rcu_gpb.cpp\r
- set/hdr_michael_set_rcu_gpt.cpp\r
- set/hdr_michael_set_rcu_shb.cpp\r
- set/hdr_michael_set_rcu_sht.cpp\r
- set/hdr_michael_set_nogc.cpp\r
- set/hdr_michael_set_lazy_hp.cpp\r
- set/hdr_michael_set_lazy_dhp.cpp\r
- set/hdr_michael_set_lazy_rcu_gpi.cpp\r
- set/hdr_michael_set_lazy_rcu_gpb.cpp\r
- set/hdr_michael_set_lazy_rcu_gpt.cpp\r
- set/hdr_michael_set_lazy_rcu_shb.cpp\r
- set/hdr_michael_set_lazy_rcu_sht.cpp\r
- set/hdr_michael_set_lazy_nogc.cpp\r
- set/hdr_feldman_hashset_hp.cpp\r
- set/hdr_feldman_hashset_dhp.cpp\r
- set/hdr_feldman_hashset_rcu_gpb.cpp\r
- set/hdr_feldman_hashset_rcu_gpi.cpp\r
- set/hdr_feldman_hashset_rcu_gpt.cpp\r
- set/hdr_feldman_hashset_rcu_shb.cpp\r
- set/hdr_feldman_hashset_rcu_sht.cpp\r
- set/hdr_refinable_hashset_hashset_std.cpp\r
- set/hdr_refinable_hashset_boost_flat_set.cpp\r
- set/hdr_refinable_hashset_boost_list.cpp\r
- set/hdr_refinable_hashset_boost_set.cpp\r
- set/hdr_refinable_hashset_boost_stable_vector.cpp\r
- set/hdr_refinable_hashset_boost_unordered_set.cpp\r
- set/hdr_refinable_hashset_boost_vector.cpp\r
- set/hdr_refinable_hashset_list.cpp\r
- set/hdr_refinable_hashset_set.cpp\r
- set/hdr_refinable_hashset_slist.cpp\r
- set/hdr_refinable_hashset_vector.cpp\r
- set/hdr_skiplist_set_hp.cpp\r
- set/hdr_skiplist_set_dhp.cpp\r
- set/hdr_skiplist_set_rcu_gpi.cpp\r
- set/hdr_skiplist_set_rcu_gpb.cpp\r
- set/hdr_skiplist_set_rcu_gpt.cpp\r
- set/hdr_skiplist_set_rcu_shb.cpp\r
- set/hdr_skiplist_set_rcu_sht.cpp\r
- set/hdr_skiplist_set_nogc.cpp\r
- set/hdr_splitlist_set_hp.cpp\r
- set/hdr_splitlist_set_nogc.cpp\r
- set/hdr_splitlist_set_dhp.cpp\r
- set/hdr_splitlist_set_rcu_gpi.cpp\r
- set/hdr_splitlist_set_rcu_gpb.cpp\r
- set/hdr_splitlist_set_rcu_gpt.cpp\r
- set/hdr_splitlist_set_rcu_shb.cpp\r
- set/hdr_splitlist_set_rcu_sht.cpp\r
- set/hdr_splitlist_set_lazy_hp.cpp\r
- set/hdr_splitlist_set_lazy_nogc.cpp\r
- set/hdr_splitlist_set_lazy_dhp.cpp\r
- set/hdr_splitlist_set_lazy_rcu_gpi.cpp\r
- set/hdr_splitlist_set_lazy_rcu_gpb.cpp\r
- set/hdr_splitlist_set_lazy_rcu_gpt.cpp\r
- set/hdr_splitlist_set_lazy_rcu_shb.cpp\r
- set/hdr_splitlist_set_lazy_rcu_sht.cpp\r
- set/hdr_striped_hashset_hashset_std.cpp\r
- set/hdr_striped_hashset_boost_flat_set.cpp\r
- set/hdr_striped_hashset_boost_list.cpp\r
- set/hdr_striped_hashset_boost_set.cpp\r
- set/hdr_striped_hashset_boost_stable_vector.cpp\r
- set/hdr_striped_hashset_boost_unordered_set.cpp\r
- set/hdr_striped_hashset_boost_vector.cpp\r
- set/hdr_striped_hashset_list.cpp\r
- set/hdr_striped_hashset_set.cpp\r
- set/hdr_striped_hashset_slist.cpp\r
- set/hdr_striped_hashset_vector.cpp)\r
-\r
set(CDS_TESTHDR_TREE\r
tree/hdr_tree_reg.cpp
tree/hdr_intrusive_ellen_bintree_hp.cpp
set(CDS_TESTHDR_OFFSETOF_MAP\r
map/hdr_cuckoo_map.cpp)\r
\r
-set(CDS_TESTHDR_OFFSETOF_SET\r
- set/hdr_cuckoo_set.cpp\r
- set/hdr_intrusive_cuckoo_set.cpp\r
- set/hdr_intrusive_cuckoo_refinable_set.cpp\r
- set/hdr_intrusive_michael_set_hp.cpp\r
- set/hdr_intrusive_michael_set_dhp.cpp\r
- set/hdr_intrusive_michael_set_nogc.cpp\r
- set/hdr_intrusive_michael_set_rcu_gpi.cpp\r
- set/hdr_intrusive_michael_set_rcu_gpb.cpp\r
- set/hdr_intrusive_michael_set_rcu_gpt.cpp\r
- set/hdr_intrusive_michael_set_rcu_shb.cpp\r
- set/hdr_intrusive_michael_set_rcu_sht.cpp\r
- set/hdr_intrusive_michael_set_hp_lazy.cpp\r
- set/hdr_intrusive_michael_set_dhp_lazy.cpp\r
- set/hdr_intrusive_michael_set_nogc_lazy.cpp\r
- set/hdr_intrusive_michael_set_rcu_gpi_lazy.cpp\r
- set/hdr_intrusive_michael_set_rcu_gpb_lazy.cpp\r
- set/hdr_intrusive_michael_set_rcu_gpt_lazy.cpp\r
- set/hdr_intrusive_michael_set_rcu_shb_lazy.cpp\r
- set/hdr_intrusive_michael_set_rcu_sht_lazy.cpp\r
- set/hdr_intrusive_skiplist_hp_member.cpp\r
- set/hdr_intrusive_skiplist_dhp_member.cpp\r
- set/hdr_intrusive_skiplist_rcu_gpi_member.cpp\r
- set/hdr_intrusive_skiplist_rcu_gpb_member.cpp\r
- set/hdr_intrusive_skiplist_rcu_gpt_member.cpp\r
- set/hdr_intrusive_skiplist_rcu_shb_member.cpp\r
- set/hdr_intrusive_skiplist_rcu_sht_member.cpp\r
- set/hdr_intrusive_skiplist_nogc_member.cpp\r
- set/hdr_intrusive_splitlist_set_hp.cpp\r
- set/hdr_intrusive_splitlist_set_nogc.cpp\r
- set/hdr_intrusive_splitlist_set_dhp.cpp\r
- set/hdr_intrusive_splitlist_set_rcu_gpb.cpp\r
- set/hdr_intrusive_splitlist_set_rcu_gpi.cpp\r
- set/hdr_intrusive_splitlist_set_rcu_gpt.cpp\r
- set/hdr_intrusive_splitlist_set_rcu_shb.cpp\r
- set/hdr_intrusive_splitlist_set_rcu_sht.cpp\r
- set/hdr_intrusive_splitlist_set_hp_lazy.cpp\r
- set/hdr_intrusive_splitlist_set_nogc_lazy.cpp\r
- set/hdr_intrusive_splitlist_set_dhp_lazy.cpp\r
- set/hdr_intrusive_splitlist_set_rcu_gpb_lazy.cpp\r
- set/hdr_intrusive_splitlist_set_rcu_gpi_lazy.cpp\r
- set/hdr_intrusive_splitlist_set_rcu_gpt_lazy.cpp\r
- set/hdr_intrusive_splitlist_set_rcu_shb_lazy.cpp\r
- set/hdr_intrusive_splitlist_set_rcu_sht_lazy.cpp)\r
-\r
set(CDS_TESTHDR_OFFSETOF_TREE\r
tree/hdr_intrusive_ellen_bintree_hp_member.cpp\r
tree/hdr_intrusive_ellen_bintree_dhp_member.cpp\r
\r
set(CDS_TESTHDR_OFFSETOF_SOURCES\r
${CDS_TESTHDR_OFFSETOF_MAP}\r
- ${CDS_TESTHDR_OFFSETOF_SET}\r
${CDS_TESTHDR_OFFSETOF_TREE})\r
\r
add_library(test-hdr-offsetof OBJECT ${CDS_TESTHDR_OFFSETOF_SOURCES})\r
\r
set(CDS_TESTHDR_SOURCES\r
${CDS_TESTHDR_MAP}\r
- ${CDS_TESTHDR_SET}\r
${CDS_TESTHDR_TREE}\r
${CDS_TESTHDR_MISC})\r
\r
+++ /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/hdr_cuckoo_set.h"
-#include <cds/container/cuckoo_set.h>
-
-namespace set {
-
- void CuckooSetHdrTest::Cuckoo_Striped_list_unord()
- {
- struct set_traits : public cc::cuckoo::traits {
- typedef equal<item> equal_to;
- typedef co::hash_tuple< hash1, hash2 > hash;
- };
-
- typedef cc::CuckooSet< item, set_traits > set_t;
-
- test_int<set_t, equal< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Striped_list_unord_storehash()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::striping<> >
- ,co::equal_to< equal< item > >
- ,cc::cuckoo::store_hash< true >
- ,cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::hash< std::tuple< hash1, hash2 > >
- >::type
- > set_t;
-
- test_int<set_t, equal< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Striped_list_cmp()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::compare< cmp< item > >
- ,cc::cuckoo::store_hash< false >
- ,cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::hash< std::tuple< hash1, hash2 > >
- >::type
- > set_t;
-
- test_int<set_t, less< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Striped_list_cmp_storehash()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::striping<> >
- ,co::compare< cmp< item > >
- ,cc::cuckoo::store_hash< true >
- ,cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::hash< std::tuple< hash1, hash2 > >
- >::type
- > set_t;
-
- test_int<set_t, less< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Striped_list_less()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::less< less< item > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::mutex_policy< cc::cuckoo::striping<> >
- ,cc::cuckoo::store_hash< false >
- ,cc::cuckoo::probeset_type< cc::cuckoo::list >
- >::type
- > set_t;
-
- test_int<set_t, less< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Striped_list_less_storehash()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::striping<> >
- ,co::less< less< item > >
- ,cc::cuckoo::store_hash< true >
- ,cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::hash< std::tuple< hash1, hash2 > >
- >::type
- > set_t;
-
- test_int<set_t, less< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Striped_list_less_cmp()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::less< less< item > >
- ,co::compare< cmp< item > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::mutex_policy< cc::cuckoo::striping<> >
- ,cc::cuckoo::store_hash< false >
- ,cc::cuckoo::probeset_type< cc::cuckoo::list >
- >::type
- > set_t;
-
- test_int<set_t, less< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Striped_list_less_cmp_storehash()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::striping<> >
- ,co::less< less< item > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::compare< cmp< item > >
- ,cc::cuckoo::store_hash< true >
- ,cc::cuckoo::probeset_type< cc::cuckoo::list >
- >::type
- > set_t;
-
- test_int<set_t, less<item> >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Striped_list_less_cmp_eq()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::less< less< item > >
- ,co::compare< cmp< item > >
- ,co::equal_to< equal< item > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::mutex_policy< cc::cuckoo::striping<> >
- ,cc::cuckoo::store_hash< false >
- ,cc::cuckoo::probeset_type< cc::cuckoo::list >
- >::type
- > set_t;
-
- test_int<set_t, less<item> >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Striped_list_less_cmp_eq_storehash()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::striping<> >
- ,co::less< less< item > >
- ,co::compare< cmp< item > >
- ,co::equal_to< equal< item > >
- ,cc::cuckoo::store_hash< true >
- ,cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::hash< std::tuple< hash1, hash2 > >
- >::type
- > set_t;
-
- test_int<set_t, less<item> >();
- }
-
-
- // Vector
- void CuckooSetHdrTest::Cuckoo_Striped_vector_unord()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::equal_to< equal< item > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- >::type
- > set_t;
-
- test_int<set_t, equal< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Striped_vector_unord_storehash()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::striping<> >
- ,co::equal_to< equal< item > >
- ,cc::cuckoo::store_hash< true >
- ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::hash< std::tuple< hash1, hash2 > >
- >::type
- > set_t;
-
- test_int<set_t, equal< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Striped_vector_cmp()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::compare< cmp< item > >
- ,cc::cuckoo::store_hash< false >
- ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::hash< std::tuple< hash1, hash2 > >
- >::type
- > set_t;
-
- test_int<set_t, less< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Striped_vector_cmp_storehash()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::striping<> >
- ,co::compare< cmp< item > >
- ,cc::cuckoo::store_hash< true >
- ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::hash< std::tuple< hash1, hash2 > >
- >::type
- > set_t;
-
- test_int<set_t, less< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Striped_vector_less()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::less< less< item > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::mutex_policy< cc::cuckoo::striping<> >
- ,cc::cuckoo::store_hash< false >
- ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- >::type
- > set_t;
-
- test_int<set_t, less< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Striped_vector_less_storehash()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::striping<> >
- ,co::less< less< item > >
- ,cc::cuckoo::store_hash< true >
- ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::hash< std::tuple< hash1, hash2 > >
- >::type
- > set_t;
-
- test_int<set_t, less< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Striped_vector_less_cmp()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::less< less< item > >
- ,co::compare< cmp< item > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::mutex_policy< cc::cuckoo::striping<> >
- ,cc::cuckoo::store_hash< false >
- ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- >::type
- > set_t;
-
- test_int<set_t, less< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Striped_vector_less_cmp_storehash()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::striping<> >
- ,co::less< less< item > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::compare< cmp< item > >
- ,cc::cuckoo::store_hash< true >
- ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- >::type
- > set_t;
-
- test_int<set_t, less<item> >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Striped_vector_less_cmp_eq()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::less< less< item > >
- ,co::compare< cmp< item > >
- ,co::equal_to< equal< item > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::mutex_policy< cc::cuckoo::striping<> >
- ,cc::cuckoo::store_hash< false >
- ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- >::type
- > set_t;
-
- test_int<set_t, less<item> >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Striped_vector_less_cmp_eq_storehash()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::striping<> >
- ,co::less< less< item > >
- ,co::compare< cmp< item > >
- ,co::equal_to< equal< item > >
- ,cc::cuckoo::store_hash< true >
- ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::hash< std::tuple< hash1, hash2 > >
- >::type
- > set_t;
-
- test_int<set_t, less<item> >();
- }
-
- // Refinable set
- void CuckooSetHdrTest::Cuckoo_Refinable_list_unord()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::equal_to< equal< item > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::mutex_policy< cc::cuckoo::refinable<> >
- >::type
- > set_t;
-
- test_int<set_t, equal< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Refinable_list_unord_storehash()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::refinable<> >
- ,co::equal_to< equal< item > >
- ,cc::cuckoo::store_hash< true >
- ,cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::hash< std::tuple< hash1, hash2 > >
- >::type
- > set_t;
-
- test_int<set_t, equal< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Refinable_list_cmp()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::compare< cmp< item > >
- ,cc::cuckoo::store_hash< false >
- ,cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::mutex_policy< cc::cuckoo::refinable<> >
- >::type
- > set_t;
-
- test_int<set_t, less< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Refinable_list_cmp_storehash()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::refinable<> >
- ,co::compare< cmp< item > >
- ,cc::cuckoo::store_hash< true >
- ,cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::hash< std::tuple< hash1, hash2 > >
- >::type
- > set_t;
-
- test_int<set_t, less< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Refinable_list_less()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::less< less< item > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::mutex_policy< cc::cuckoo::refinable<> >
- ,cc::cuckoo::store_hash< false >
- ,cc::cuckoo::probeset_type< cc::cuckoo::list >
- >::type
- > set_t;
-
- test_int<set_t, less< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Refinable_list_less_storehash()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::refinable<> >
- ,co::less< less< item > >
- ,cc::cuckoo::store_hash< true >
- ,cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::hash< std::tuple< hash1, hash2 > >
- >::type
- > set_t;
-
- test_int<set_t, less< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Refinable_list_less_cmp()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::less< less< item > >
- ,co::compare< cmp< item > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::mutex_policy< cc::cuckoo::refinable<> >
- ,cc::cuckoo::store_hash< false >
- ,cc::cuckoo::probeset_type< cc::cuckoo::list >
- >::type
- > set_t;
-
- test_int<set_t, less< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Refinable_list_less_cmp_storehash()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::refinable<> >
- ,co::less< less< item > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::compare< cmp< item > >
- ,cc::cuckoo::store_hash< true >
- ,cc::cuckoo::probeset_type< cc::cuckoo::list >
- >::type
- > set_t;
-
- test_int<set_t, less<item> >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Refinable_list_less_cmp_eq()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::less< less< item > >
- ,co::compare< cmp< item > >
- ,co::equal_to< equal< item > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::mutex_policy< cc::cuckoo::refinable<> >
- ,cc::cuckoo::store_hash< false >
- ,cc::cuckoo::probeset_type< cc::cuckoo::list >
- >::type
- > set_t;
-
- test_int<set_t, less<item> >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Refinable_list_less_cmp_eq_storehash()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::refinable<> >
- ,co::less< less< item > >
- ,co::compare< cmp< item > >
- ,co::equal_to< equal< item > >
- ,cc::cuckoo::store_hash< true >
- ,cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::hash< std::tuple< hash1, hash2 > >
- >::type
- > set_t;
-
- test_int<set_t, less<item> >();
- }
-
-
-
- // Refinable Vector
- void CuckooSetHdrTest::Cuckoo_Refinable_vector_unord()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::equal_to< equal< item > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::mutex_policy< cc::cuckoo::refinable<> >
- >::type
- > set_t;
-
- test_int<set_t, equal< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Refinable_vector_unord_storehash()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::refinable<> >
- ,co::equal_to< equal< item > >
- ,cc::cuckoo::store_hash< true >
- ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::hash< std::tuple< hash1, hash2 > >
- >::type
- > set_t;
-
- test_int<set_t, equal< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Refinable_vector_cmp()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::compare< cmp< item > >
- ,cc::cuckoo::store_hash< false >
- ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::mutex_policy< cc::cuckoo::refinable<> >
- >::type
- > set_t;
-
- test_int<set_t, less< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Refinable_vector_cmp_storehash()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::refinable<> >
- ,co::compare< cmp< item > >
- ,cc::cuckoo::store_hash< true >
- ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::hash< std::tuple< hash1, hash2 > >
- >::type
- > set_t;
-
- test_int<set_t, less< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Refinable_vector_less()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::less< less< item > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::mutex_policy< cc::cuckoo::refinable<> >
- ,cc::cuckoo::store_hash< false >
- ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- >::type
- > set_t;
-
- test_int<set_t, less< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Refinable_vector_less_storehash()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::refinable<> >
- ,co::less< less< item > >
- ,cc::cuckoo::store_hash< true >
- ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::hash< std::tuple< hash1, hash2 > >
- >::type
- > set_t;
-
- test_int<set_t, less< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Refinable_vector_less_cmp()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::less< less< item > >
- ,co::compare< cmp< item > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::mutex_policy< cc::cuckoo::refinable<> >
- ,cc::cuckoo::store_hash< false >
- ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- >::type
- > set_t;
-
- test_int<set_t, less< item > >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Refinable_vector_less_cmp_storehash()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::refinable<> >
- ,co::less< less< item > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::compare< cmp< item > >
- ,cc::cuckoo::store_hash< true >
- ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- >::type
- > set_t;
-
- test_int<set_t, less<item> >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Refinable_vector_less_cmp_eq()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::less< less< item > >
- ,co::compare< cmp< item > >
- ,co::equal_to< equal< item > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::mutex_policy< cc::cuckoo::refinable<> >
- ,cc::cuckoo::store_hash< false >
- ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- >::type
- > set_t;
-
- test_int<set_t, less<item> >();
- }
-
- void CuckooSetHdrTest::Cuckoo_Refinable_vector_less_cmp_eq_storehash()
- {
- typedef cc::CuckooSet< item,
- cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::refinable<> >
- ,co::less< less< item > >
- ,co::compare< cmp< item > >
- ,co::equal_to< equal< item > >
- ,cc::cuckoo::store_hash< true >
- ,cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::hash< std::tuple< hash1, hash2 > >
- >::type
- > set_t;
-
- test_int<set_t, less<item> >();
- }
-
-} // namespace set
-
-CPPUNIT_TEST_SUITE_REGISTRATION(set::CuckooSetHdrTest);
+++ /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 CDSTEST_HDR_CUCKOO_SET_H
-#define CDSTEST_HDR_CUCKOO_SET_H
-
-#include "cppunit/cppunit_proxy.h"
-#include "size_check.h"
-
-#include <cds/opt/hash.h>
-#include <cds/os/timer.h>
-#include <functional> // ref
-
-// forward namespace declaration
-namespace cds {
- namespace container {}
- namespace opt {}
-}
-
-namespace set {
- using misc::check_size;
-
- namespace cc = cds::container;
- namespace co = cds::opt;
-
-
- class CuckooSetHdrTest: public CppUnitMini::TestCase
- {
- public:
- struct stat
- {
- unsigned int nFindCount ; // count of find-functor calling
- unsigned int nUpdateNewCount;
- unsigned int nUpdateCount;
-
- stat()
- {
- memset( this, 0, sizeof(*this));
- }
-
- void copy( stat const& s )
- {
- nFindCount = s.nFindCount;
- nUpdateCount = s.nUpdateCount;
- nUpdateNewCount = s.nUpdateNewCount;
- }
- };
-
- struct item: public stat
- {
- int nKey;
- int nVal;
-
- item()
- {}
-
- item( int key )
- : nKey( key )
- , nVal( key )
- {}
-
- item (int key, int val )
- : nKey(key)
- , nVal( val )
- {}
-
- item( std::pair<int,int> const& p )
- : nKey( p.first )
- , nVal( p.second )
- {}
-
- item( item const& i )
- : nKey( i.nKey )
- , nVal( i.nVal )
- {}
-
- item& operator=(item const& i)
- {
- nKey = i.nKey;
- nVal = i.nVal;
- stat::copy(i);
-
- return *this;
- }
-
- item( item&& i )
- : nKey( i.nKey )
- , nVal( i.nVal )
- {}
-
- int key() const
- {
- return nKey;
- }
-
- int val() const
- {
- return nVal;
- }
- };
-
- struct hash1 {
- size_t operator()( int i ) const
- {
- return co::v::hash<int>()( i );
- }
-
- size_t operator()( std::pair<int,int> const& i ) const
- {
- return co::v::hash<int>()( i.first );
- }
-
- template <typename Item>
- size_t operator()( Item const& i ) const
- {
- return (*this)( i.key() );
- }
- };
-
- struct hash2: private hash1
- {
- typedef hash1 base_class;
-
- size_t operator()( int i ) const
- {
- return ~( base_class::operator()(i));
- }
- template <typename Item>
- size_t operator()( const Item& i ) const
- {
- return ~( base_class::operator()(i));
- }
- size_t operator()( std::pair<int,int> const& i ) const
- {
- return ~( base_class::operator()(i));
- }
- };
-
- struct simple_item_counter {
- size_t m_nCount;
-
- simple_item_counter()
- : m_nCount(0)
- {}
-
- size_t operator ++()
- {
- return ++m_nCount;
- }
-
- size_t operator --()
- {
- return --m_nCount;
- }
-
- void reset()
- {
- m_nCount = 0;
- }
-
- operator size_t() const
- {
- return m_nCount;
- }
- };
-
- template <typename T>
- struct less
- {
- bool operator ()(const T& v1, const T& v2 ) const
- {
- return v1.key() < v2.key();
- }
-
- template <typename Q>
- bool operator ()(const T& v1, const Q& v2 ) const
- {
- return v1.key() < v2;
- }
-
- template <typename Q>
- bool operator ()(const Q& v1, const T& v2 ) const
- {
- return v1 < v2.key();
- }
-
- bool operator ()( std::pair<int, int> const& v1, const T& v2 ) const
- {
- return v1.first < v2.key();
- }
-
- bool operator ()(const T& v1, std::pair<int, int> const& v2 ) const
- {
- return v1.key() < v2.first;
- }
- };
-
- template <typename T>
- struct cmp {
- int operator ()(const T& v1, const T& v2 ) const
- {
- if ( v1.key() < v2.key() )
- return -1;
- return v1.key() > v2.key() ? 1 : 0;
- }
-
- template <typename Q>
- int operator ()(const T& v1, const Q& v2 ) const
- {
- if ( v1.key() < v2 )
- return -1;
- return v1.key() > v2 ? 1 : 0;
- }
-
- template <typename Q>
- int operator ()(const Q& v1, const T& v2 ) const
- {
- if ( v1 < v2.key() )
- return -1;
- return v1 > v2.key() ? 1 : 0;
- }
-
- int operator()( std::pair<int,int> const& v1, T const& v2 ) const
- {
- if ( v1.first < v2.key() )
- return -1;
- return v1.first > v2.key() ? 1 : 0;
- }
-
- int operator()( T const& v1, std::pair<int,int> const& v2 ) const
- {
- if ( v1.key() < v2.first )
- return -1;
- return v1.key() > v2.first ? 1 : 0;
- }
- };
-
- template <typename T>
- struct equal
- {
- bool operator ()(const T& v1, const T& v2 ) const
- {
- return v1.key() == v2.key();
- }
-
- template <typename Q>
- bool operator ()(const T& v1, const Q& v2 ) const
- {
- return v1.key() == v2;
- }
-
- template <typename Q>
- bool operator ()(const Q& v1, const T& v2 ) const
- {
- return v1 == v2.key();
- }
-
- bool operator ()( std::pair<int, int> const& v1, const T& v2 ) const
- {
- return v1.first == v2.key();
- }
-
- bool operator ()(const T& v1, std::pair<int, int> const& v2 ) const
- {
- return v1.key() == v2.first;
- }
- };
-
- struct find_functor
- {
- template <typename Item, typename T>
- void operator()( Item& i, T& /*val*/ )
- {
- ++i.nFindCount;
- }
- template <typename Item, typename T>
- void operator()( Item& i, T const& /*val*/ )
- {
- ++i.nFindCount;
- }
- };
-
- template <typename Item>
- struct copy_found
- {
- Item m_found;
-
- template <typename T>
- void operator()( Item& i, T& /*val*/ )
- {
- m_found = i;
- }
-
- void operator()( Item const& i )
- {
- m_found = i;
- }
- };
-
- struct insert_functor
- {
- template <typename Item>
- void operator()(Item& i )
- {
- i.nVal = i.nKey * 100;
- }
- };
-
- template <typename Item, typename Q>
- static void update_func( bool bNew, Item& i, Q& /*val*/ )
- {
- if ( bNew )
- ++i.nUpdateNewCount;
- else
- ++i.nUpdateCount;
- }
-
- struct update_functor
- {
- template <typename Item, typename Q>
- void operator()( bool bNew, Item& i, Q& val )
- {
- update_func( bNew, i, val );
- }
- };
-
- template <class Set, typename Predicate>
- void test_int_with( Set& s, Predicate pred )
- {
- typedef typename Set::value_type value_type;
-
- item itm;
- int key;
-
- // insert/find test
- CPPUNIT_ASSERT( !s.contains( 10 ) );
- CPPUNIT_ASSERT( s.insert( 10 ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 1 ));
- CPPUNIT_ASSERT( s.contains( 10 ) );
-
- CPPUNIT_ASSERT( !s.insert( 10 ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 1 ));
-
- CPPUNIT_ASSERT( !s.contains( 20, pred ) );
- CPPUNIT_ASSERT( s.insert( std::make_pair(20, 25) ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 2 ));
- CPPUNIT_ASSERT( s.contains( 10, pred ) );
- CPPUNIT_ASSERT( s.contains( key = 20 ) );
- CPPUNIT_ASSERT( s.find_with( key, pred, find_functor() ) );
- {
- copy_found<item> f;
- key = 20;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 20 );
- CPPUNIT_ASSERT( f.m_found.nVal == 25 );
- CPPUNIT_ASSERT( f.m_found.nFindCount == 1 );
- }
- {
- copy_found<item> f;
- key = 20;
- CPPUNIT_ASSERT( s.find_with( key, pred, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 20 );
- CPPUNIT_ASSERT( f.m_found.nVal == 25 );
- CPPUNIT_ASSERT( f.m_found.nFindCount == 1 );
- }
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 2 ));
-
- CPPUNIT_ASSERT( !s.contains( 25 ) );
- CPPUNIT_ASSERT( s.insert( std::make_pair(25, -1), insert_functor() ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
- {
- copy_found<item> f;
- key = 25;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 25 );
- CPPUNIT_ASSERT( f.m_found.nVal == 2500 );
- }
-
- // update() test
- key = 10;
- {
- copy_found<item> f;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 10 );
- CPPUNIT_ASSERT( f.m_found.nVal == 10 );
- CPPUNIT_ASSERT( f.m_found.nUpdateCount == 0 );
- CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 0 );
- }
- std::pair<bool, bool> updateResult = s.update( key, update_functor() );
- CPPUNIT_ASSERT( updateResult.first && !updateResult.second );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
- {
- copy_found<item> f;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 10 );
- CPPUNIT_ASSERT( f.m_found.nVal == 10 );
- CPPUNIT_ASSERT( f.m_found.nUpdateCount == 1 );
- CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 0 );
- }
-
- updateResult = s.update(std::make_pair(13, 1300), update_functor(), false);
- CPPUNIT_ASSERT(!updateResult.first && !updateResult.second);
-
- updateResult = s.update( std::make_pair(13, 1300), update_functor() );
- CPPUNIT_ASSERT( updateResult.first && updateResult.second );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 4 ));
- {
- copy_found<item> f;
- key = 13;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 13 );
- CPPUNIT_ASSERT( f.m_found.nVal == 1300 );
- CPPUNIT_ASSERT( f.m_found.nUpdateCount == 0 );
- CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 1 );
- }
-
- // erase test
- CPPUNIT_ASSERT( s.erase(13) );
- CPPUNIT_ASSERT( !s.contains( 13 ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
- CPPUNIT_ASSERT( !s.erase(13) );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- CPPUNIT_ASSERT( s.contains( 10 ));
- CPPUNIT_ASSERT( s.erase_with( 10, pred ));
- CPPUNIT_ASSERT( !s.contains( 10 ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 2 ));
- CPPUNIT_ASSERT( !s.erase_with(10, pred) );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 2 ));
-
- CPPUNIT_ASSERT( s.contains(20) );
- {
- copy_found<item> f;
- CPPUNIT_ASSERT( s.erase( 20, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 20 );
- CPPUNIT_ASSERT( f.m_found.nVal == 25 );
-
- CPPUNIT_ASSERT( s.insert(235))
- CPPUNIT_ASSERT( s.erase_with( 235, pred, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 235 );
- CPPUNIT_ASSERT( f.m_found.nVal == 235 );
- }
- CPPUNIT_ASSERT( !s.contains( 20 ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 1 ));
-
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
-
- // emplace test
- CPPUNIT_ASSERT( s.emplace( 151 )) ; // key = 151, val = 151
- CPPUNIT_ASSERT( s.emplace( 174, 471 )) ; // key = 174, val = 471
- CPPUNIT_ASSERT( s.emplace( std::make_pair( 190, 91 ) )) ; // key == 190, val = 91
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- CPPUNIT_ASSERT( s.contains(151));
- CPPUNIT_ASSERT( s.contains(174, pred ));
- CPPUNIT_ASSERT( s.contains(190));
-
- {
- copy_found<item> f;
- key = 151;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 151 );
- CPPUNIT_ASSERT( f.m_found.nVal == 151 );
-
- key = 174;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 174 );
- CPPUNIT_ASSERT( f.m_found.nVal == 471 );
-
- key = 190;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 190 );
- CPPUNIT_ASSERT( f.m_found.nVal == 91 );
- }
-
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
- }
-
- template <class Set, class Predicate>
- void test_int()
- {
- Set s( 32, 4, 3 );
- CPPUNIT_ASSERT( s.bucket_count() == 32 );
- CPPUNIT_ASSERT( s.lock_count() == 32 );
-
- cds::OS::Timer timer;
-
- test_int_with( s, Predicate() );
-
- // Resizing test
- for ( int i = 0; i < 10000; i++ ) {
- s.insert( i );
- }
-
- CPPUNIT_MSG( " Duration=" << timer.duration() );
- }
-
- public:
- void Cuckoo_Striped_list_unord();
- void Cuckoo_Striped_list_unord_storehash();
- void Cuckoo_Striped_list_cmp();
- void Cuckoo_Striped_list_cmp_storehash();
- void Cuckoo_Striped_list_less();
- void Cuckoo_Striped_list_less_storehash();
- void Cuckoo_Striped_list_less_cmp();
- void Cuckoo_Striped_list_less_cmp_storehash();
- void Cuckoo_Striped_list_less_cmp_eq();
- void Cuckoo_Striped_list_less_cmp_eq_storehash();
-
- void Cuckoo_Striped_vector_unord();
- void Cuckoo_Striped_vector_unord_storehash();
- void Cuckoo_Striped_vector_cmp();
- void Cuckoo_Striped_vector_cmp_storehash();
- void Cuckoo_Striped_vector_less();
- void Cuckoo_Striped_vector_less_storehash();
- void Cuckoo_Striped_vector_less_cmp();
- void Cuckoo_Striped_vector_less_cmp_storehash();
- void Cuckoo_Striped_vector_less_cmp_eq();
- void Cuckoo_Striped_vector_less_cmp_eq_storehash();
-
- void Cuckoo_Refinable_list_unord();
- void Cuckoo_Refinable_list_unord_storehash();
- void Cuckoo_Refinable_list_cmp();
- void Cuckoo_Refinable_list_cmp_storehash();
- void Cuckoo_Refinable_list_less();
- void Cuckoo_Refinable_list_less_storehash();
- void Cuckoo_Refinable_list_less_cmp();
- void Cuckoo_Refinable_list_less_cmp_storehash();
- void Cuckoo_Refinable_list_less_cmp_eq();
- void Cuckoo_Refinable_list_less_cmp_eq_storehash();
-
- void Cuckoo_Refinable_vector_unord();
- void Cuckoo_Refinable_vector_unord_storehash();
- void Cuckoo_Refinable_vector_cmp();
- void Cuckoo_Refinable_vector_cmp_storehash();
- void Cuckoo_Refinable_vector_less();
- void Cuckoo_Refinable_vector_less_storehash();
- void Cuckoo_Refinable_vector_less_cmp();
- void Cuckoo_Refinable_vector_less_cmp_storehash();
- void Cuckoo_Refinable_vector_less_cmp_eq();
- void Cuckoo_Refinable_vector_less_cmp_eq_storehash();
-
- CPPUNIT_TEST_SUITE(CuckooSetHdrTest)
- CPPUNIT_TEST( Cuckoo_Striped_list_unord)
- CPPUNIT_TEST( Cuckoo_Striped_list_unord_storehash)
- CPPUNIT_TEST( Cuckoo_Striped_list_cmp)
- CPPUNIT_TEST( Cuckoo_Striped_list_cmp_storehash)
- CPPUNIT_TEST( Cuckoo_Striped_list_less)
- CPPUNIT_TEST( Cuckoo_Striped_list_less_storehash)
- CPPUNIT_TEST( Cuckoo_Striped_list_less_cmp)
- CPPUNIT_TEST( Cuckoo_Striped_list_less_cmp_storehash)
- CPPUNIT_TEST( Cuckoo_Striped_list_less_cmp_eq)
- CPPUNIT_TEST( Cuckoo_Striped_list_less_cmp_eq_storehash)
-
- CPPUNIT_TEST( Cuckoo_Striped_vector_unord)
- CPPUNIT_TEST( Cuckoo_Striped_vector_unord_storehash)
- CPPUNIT_TEST( Cuckoo_Striped_vector_cmp)
- CPPUNIT_TEST( Cuckoo_Striped_vector_cmp_storehash)
- CPPUNIT_TEST( Cuckoo_Striped_vector_less)
- CPPUNIT_TEST( Cuckoo_Striped_vector_less_storehash)
- CPPUNIT_TEST( Cuckoo_Striped_vector_less_cmp)
- CPPUNIT_TEST( Cuckoo_Striped_vector_less_cmp_storehash)
- CPPUNIT_TEST( Cuckoo_Striped_vector_less_cmp_eq)
- CPPUNIT_TEST( Cuckoo_Striped_vector_less_cmp_eq_storehash)
-
- CPPUNIT_TEST( Cuckoo_Refinable_list_unord)
- CPPUNIT_TEST( Cuckoo_Refinable_list_unord_storehash)
- CPPUNIT_TEST( Cuckoo_Refinable_list_cmp)
- CPPUNIT_TEST( Cuckoo_Refinable_list_cmp_storehash)
- CPPUNIT_TEST( Cuckoo_Refinable_list_less)
- CPPUNIT_TEST( Cuckoo_Refinable_list_less_storehash)
- CPPUNIT_TEST( Cuckoo_Refinable_list_less_cmp)
- CPPUNIT_TEST( Cuckoo_Refinable_list_less_cmp_storehash)
- CPPUNIT_TEST( Cuckoo_Refinable_list_less_cmp_eq)
- CPPUNIT_TEST( Cuckoo_Refinable_list_less_cmp_eq_storehash)
-
- CPPUNIT_TEST( Cuckoo_Refinable_vector_unord)
- CPPUNIT_TEST( Cuckoo_Refinable_vector_unord_storehash)
- CPPUNIT_TEST( Cuckoo_Refinable_vector_cmp)
- CPPUNIT_TEST( Cuckoo_Refinable_vector_cmp_storehash)
- CPPUNIT_TEST( Cuckoo_Refinable_vector_less)
- CPPUNIT_TEST( Cuckoo_Refinable_vector_less_storehash)
- CPPUNIT_TEST( Cuckoo_Refinable_vector_less_cmp)
- CPPUNIT_TEST( Cuckoo_Refinable_vector_less_cmp_storehash)
- CPPUNIT_TEST( Cuckoo_Refinable_vector_less_cmp_eq)
- CPPUNIT_TEST( Cuckoo_Refinable_vector_less_cmp_eq_storehash)
- CPPUNIT_TEST_SUITE_END()
- };
-
-} // namespace set
-
-#endif // #ifndef CDSTEST_HDR_CUCKOO_SET_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 CDSTEST_HDR_FELDMAN_HASHSET_H
-#define CDSTEST_HDR_FELDMAN_HASHSET_H
-
-#include "cppunit/cppunit_proxy.h"
-
-// forward declaration
-namespace cds {
- namespace container {}
- namespace opt {}
-}
-
-namespace set {
- namespace cc = cds::container;
- namespace co = cds::opt;
-
- class FeldmanHashSetHdrTest : public CppUnitMini::TestCase
- {
- template <typename Hash>
- struct Arg
- {
- size_t key;
- Hash hash;
-
- Arg( size_t k, Hash const& h )
- : key( k )
- , hash( h )
- {}
- };
-
- template <typename Hash>
- struct Item
- {
- unsigned int nInsertCall;
- unsigned int nFindCall;
- unsigned int nEraseCall;
- mutable unsigned int nIteratorCall;
- Hash hash;
- size_t key;
-
- Item( size_t k, Hash const& h )
- : nInsertCall(0)
- , nFindCall(0)
- , nEraseCall(0)
- , nIteratorCall(0)
- , hash( h )
- , key( k )
- {}
-
- explicit Item( Arg<Hash> const& arg )
- : nInsertCall(0)
- , nFindCall(0)
- , nEraseCall(0)
- , nIteratorCall(0)
- , hash( arg.hash )
- , key( arg.key )
- {}
-
- Item( Item const& i )
- : nInsertCall(0)
- , nFindCall(0)
- , nEraseCall(0)
- , nIteratorCall(0)
- , hash( i.hash )
- , key( i.key )
- {}
- };
-
- template <typename Hash>
- struct get_hash
- {
- Hash const& operator()( Item<Hash> const& i ) const
- {
- return i.hash;
- }
- };
-
- template <typename Key>
- struct get_key
- {
- Key operator()(Item<Key> const& i)const
- {
- return i.hash;
- }
- };
-
- template <typename Key>
- struct nohash {
- Key operator()(Key k) const
- {
- return k;
- }
- };
-
- struct hash128
- {
- size_t lo;
- size_t hi;
-
- hash128() {}
- hash128(size_t l, size_t h) : lo(l), hi(h) {}
- hash128( hash128 const& h) : lo(h.lo), hi(h.hi) {}
-
- struct make {
- hash128 operator()( size_t n ) const
- {
- return hash128( std::hash<size_t>()( n ), std::hash<size_t>()( ~n ));
- }
- hash128 operator()( hash128 const& n ) const
- {
- return hash128( std::hash<size_t>()( n.lo ), std::hash<size_t>()( ~n.hi ));
- }
- };
-
- struct less {
- bool operator()( hash128 const& lhs, hash128 const& rhs ) const
- {
- if ( lhs.hi != rhs.hi )
- return lhs.hi < rhs.hi;
- return lhs.lo < rhs.lo;
- }
- };
-
- struct cmp {
- int operator()( hash128 const& lhs, hash128 const& rhs ) const
- {
- if ( lhs.hi != rhs.hi )
- return lhs.hi < rhs.hi ? -1 : 1;
- return lhs.lo < rhs.lo ? -1 : lhs.lo == rhs.lo ? 0 : 1;
- }
- };
-
- friend bool operator==( hash128 const& lhs, hash128 const& rhs )
- {
- return cmp()( lhs, rhs ) == 0;
- }
- friend bool operator!=(hash128 const& lhs, hash128 const& rhs)
- {
- return !( lhs == rhs );
- }
- };
-
- template <typename Set, typename Hasher>
- void test_hp( size_t nHeadBits, size_t nArrayBits )
- {
- typedef typename Set::hash_type hash_type;
- typedef typename Set::value_type value_type;
- typedef Arg<hash_type> arg_type;
- typedef typename Set::guarded_ptr guarded_ptr;
-
- Hasher hasher;
-
- size_t const capacity = 1000;
-
- Set s( nHeadBits, nArrayBits );
- CPPUNIT_MSG("Array size: head=" << s.head_size() << ", array_node=" << s.array_node_size());
- CPPUNIT_ASSERT(s.head_size() >= (size_t(1) << nHeadBits));
- CPPUNIT_ASSERT(s.array_node_size() == (size_t(1) << nArrayBits));
-
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT(s.size() == 0);
-
- // insert test
- for ( size_t i = 0; i < capacity; ++i ) {
- hash_type h = hasher(i);
- CPPUNIT_ASSERT( !s.contains( h ));
- CPPUNIT_ASSERT( s.insert( value_type( i, h )));
- CPPUNIT_ASSERT(s.contains( h ));
-
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( s.size() == i + 1);
-
- CPPUNIT_ASSERT( !s.insert( arg_type(i, h) ));
- CPPUNIT_ASSERT( s.size() == i + 1);
- }
-
- // update existing test
- for ( size_t i = 0; i < capacity; ++i ) {
- hash_type h = hasher(i);
- CPPUNIT_ASSERT( s.contains( h ));
- std::pair<bool, bool> ret = s.update( arg_type( i, h ),
- [](value_type& i, value_type * prev ) {
- CPPUNIT_ASSERT_CURRENT( prev != nullptr );
- CPPUNIT_ASSERT_CURRENT( i.key == prev->key );
- CPPUNIT_ASSERT_CURRENT( i.hash == prev->hash );
- i.nInsertCall += 1;
- }, false );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( !ret.second );
- CPPUNIT_ASSERT( s.contains( h ));
- CPPUNIT_ASSERT( s.size() == capacity );
-
- guarded_ptr gp(s.get( h ));
- CPPUNIT_ASSERT( gp );
- CPPUNIT_ASSERT( gp->nInsertCall == 1 );
- CPPUNIT_ASSERT( gp->key == i );
- CPPUNIT_ASSERT( gp->hash == h );
- }
-
- // erase test
- for ( size_t i = 0; i < capacity; ++i ) {
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( s.size() == capacity - i );
- CPPUNIT_ASSERT(s.find(hasher(i), []( value_type &) {}));
- CPPUNIT_ASSERT( s.erase(hasher(i)) );
- CPPUNIT_ASSERT( !s.find(hasher(i), []( value_type &) {}));
- CPPUNIT_ASSERT( s.size() == capacity - i - 1);
- }
- CPPUNIT_ASSERT( s.empty() );
-
- // Iterators on empty set
- CPPUNIT_ASSERT(s.begin() == s.end());
- CPPUNIT_ASSERT(s.cbegin() == s.cend());
- CPPUNIT_ASSERT(s.rbegin() == s.rend());
- CPPUNIT_ASSERT(s.crbegin() == s.crend());
-
- // insert with functor
- for ( size_t i = capacity; i > 0; --i ) {
- CPPUNIT_ASSERT( s.size() == capacity - i );
- CPPUNIT_ASSERT(s.insert( arg_type( i, hasher(i)), []( value_type& val ) { val.nInsertCall += 1; } ));
- CPPUNIT_ASSERT( s.size() == capacity - i + 1 );
- CPPUNIT_ASSERT( !s.empty() );
-
- CPPUNIT_ASSERT(s.find( hasher(i), []( value_type& val ) {
- CPPUNIT_ASSERT_CURRENT( val.nInsertCall == 1 );
- val.nFindCall += 1;
- } ));
- }
- CPPUNIT_ASSERT( s.size() == capacity );
-
- // for-each iterator test
- for ( auto& el : s ) {
- CPPUNIT_ASSERT( el.nInsertCall == 1 );
- CPPUNIT_ASSERT( el.nFindCall == 1 );
- el.nFindCall += 1;
- }
-
- // iterator test
- for ( auto it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( it->nInsertCall == 1 );
- CPPUNIT_ASSERT( it->nFindCall == 2 );
- it->nFindCall += 1;
- }
-
- // reverse iterator test
- for ( auto it = s.rbegin(), itEnd = s.rend(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( it->nInsertCall == 1 );
- CPPUNIT_ASSERT( it->nFindCall == 3 );
- it->nFindCall += 1;
- }
-
- // const iterator test
- for ( auto it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( it->nInsertCall == 1 );
- CPPUNIT_ASSERT( it->nFindCall == 4 );
- it->nIteratorCall += 1;
- }
-
- // const reverse iterator test
- for ( auto it = s.rbegin(), itEnd = s.rend(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( it->nInsertCall == 1 );
- CPPUNIT_ASSERT( it->nFindCall == 4 );
- CPPUNIT_ASSERT( it->nIteratorCall == 1 );
- it->nIteratorCall += 1;
- }
-
- // check completeness
- for ( size_t i = 1; i <= capacity; ++i ) {
- CPPUNIT_ASSERT( s.find( hasher( i ), []( value_type const& el ) {
- CPPUNIT_ASSERT_CURRENT( el.nInsertCall == 1 );
- CPPUNIT_ASSERT_CURRENT( el.nFindCall == 4 );
- CPPUNIT_ASSERT_CURRENT( el.nIteratorCall == 2 );
- } ));
- }
-
- // erase with functor test
- {
- size_t nSum = 0;
- for ( size_t i = 1; i <= capacity; ++i ) {
- CPPUNIT_ASSERT( s.size() == capacity - i + 1 );
- CPPUNIT_ASSERT(s.erase(hasher(i), [&nSum]( value_type const& val ) {
- CPPUNIT_ASSERT_CURRENT( val.nInsertCall == 1 );
- CPPUNIT_ASSERT_CURRENT( val.nFindCall == 4 );
- CPPUNIT_ASSERT_CURRENT( val.nIteratorCall == 2 );
- nSum += val.key;
- } ))
- CPPUNIT_ASSERT( s.size() == capacity - i );
- CPPUNIT_ASSERT( !s.erase(hasher(i), [&nSum]( value_type const& val ) { nSum += val.key; } ))
- }
- CPPUNIT_ASSERT(s.empty() );
- CPPUNIT_ASSERT(nSum == (1 + capacity) * capacity / 2 );
- }
-
- // update test with insert allowing
- for ( size_t i = 0; i < capacity; ++i ) {
- hash_type h = hasher(i);
- CPPUNIT_ASSERT( !s.contains( h ));
- guarded_ptr gp(s.get( h ));
- CPPUNIT_ASSERT( !gp );
- std::pair<bool, bool> ret = s.update( arg_type( i, h ),
- [](value_type& i, value_type * prev ) {
- CPPUNIT_ASSERT_CURRENT( prev == nullptr );
- i.nInsertCall += 1;
- });
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( ret.second );
- CPPUNIT_ASSERT( s.contains( h ));
- CPPUNIT_ASSERT( s.size() == i + 1 );
-
- gp = s.get( h );
- CPPUNIT_ASSERT( gp );
- CPPUNIT_ASSERT( gp->nInsertCall == 1 );
- CPPUNIT_ASSERT( gp->key == i );
- CPPUNIT_ASSERT( gp->hash == h );
- }
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT(s.size() == capacity );
-
- // erase_at( iterator ) test
- for ( auto it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( s.erase_at( it ));
- }
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( s.size() == 0 );
-
- // emplace test
- for ( size_t i = 0; i < capacity; ++i ) {
- hash_type h = hasher(i);
- CPPUNIT_ASSERT( !s.contains( h ));
- CPPUNIT_ASSERT( s.emplace( i, hasher(i) ));
- CPPUNIT_ASSERT(s.contains( h ));
-
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( s.size() == i + 1);
-
- CPPUNIT_ASSERT( !s.emplace( arg_type(i, h) ));
- CPPUNIT_ASSERT( s.size() == i + 1);
- }
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT(s.size() == capacity );
-
- // erase_at( reverse_iterator ) test
- for ( auto it = s.rbegin(), itEnd = s.rend(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( s.erase_at( it ));
- }
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( s.size() == 0 );
-
- // extract test
- for ( size_t i = 0; i < capacity; ++i ) {
- hash_type h = hasher(i);
- CPPUNIT_ASSERT( !s.contains( h ));
- CPPUNIT_ASSERT( s.emplace( arg_type( i, hasher(i) )));
- CPPUNIT_ASSERT(s.contains( h ));
-
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( s.size() == i + 1);
-
- CPPUNIT_ASSERT( !s.emplace( i, h ));
- CPPUNIT_ASSERT( s.size() == i + 1);
- }
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT(s.size() == capacity );
-
- for ( size_t i = capacity; i != 0; --i ) {
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( s.size() == i );
-
- guarded_ptr gp{ s.extract( hasher(i-1)) };
- CPPUNIT_ASSERT( gp );
- CPPUNIT_ASSERT( gp->key == i - 1);
- CPPUNIT_ASSERT(gp->hash == hasher(i-1));
- CPPUNIT_ASSERT( !s.contains(hasher(i-1)));
-
- gp = s.get(hasher(i-1));
- CPPUNIT_ASSERT( !gp );
-
- CPPUNIT_ASSERT( s.size() == i - 1 );
- }
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT(s.size() == 0 );
-
- // clear test
- for ( size_t i = 0; i < capacity; ++i ) {
- hash_type h = hasher(i);
- CPPUNIT_ASSERT( !s.contains( h ));
- CPPUNIT_ASSERT( s.emplace( arg_type( i, hasher(i) )));
- CPPUNIT_ASSERT(s.contains( h ));
-
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( s.size() == i + 1);
-
- CPPUNIT_ASSERT( !s.emplace( i, h ));
- CPPUNIT_ASSERT( s.size() == i + 1);
- }
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT(s.size() == capacity );
-
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT(s.size() == 0 );
-
- CPPUNIT_MSG( s.statistics() );
- }
-
- template <typename Set, typename Hasher>
- void test_rcu(size_t nHeadBits, size_t nArrayBits)
- {
- typedef typename Set::hash_type hash_type;
- typedef typename Set::value_type value_type;
- typedef Arg<hash_type> arg_type;
- typedef typename Set::exempt_ptr exempt_ptr;
- typedef typename Set::rcu_lock rcu_lock;
-
- Hasher hasher;
-
- size_t const capacity = 1000;
-
- Set s(nHeadBits, nArrayBits);
- CPPUNIT_MSG("Array size: head=" << s.head_size() << ", array_node=" << s.array_node_size());
- CPPUNIT_ASSERT(s.head_size() >= (size_t(1) << nHeadBits));
- CPPUNIT_ASSERT(s.array_node_size() == (size_t(1) << nArrayBits));
-
- CPPUNIT_ASSERT(s.empty());
- CPPUNIT_ASSERT(s.size() == 0);
-
- // insert test
- for (size_t i = 0; i < capacity; ++i) {
- hash_type h = hasher(i);
- CPPUNIT_ASSERT(!s.contains(h));
- CPPUNIT_ASSERT(s.insert(value_type(i, h)));
- CPPUNIT_ASSERT(s.contains(h));
-
- CPPUNIT_ASSERT(!s.empty());
- CPPUNIT_ASSERT(s.size() == i + 1);
-
- CPPUNIT_ASSERT(!s.insert(arg_type(i, h)));
- CPPUNIT_ASSERT(s.size() == i + 1);
- }
-
- // update existing test
- for (size_t i = 0; i < capacity; ++i) {
- hash_type h = hasher(i);
- CPPUNIT_ASSERT(s.contains(h));
- std::pair<bool, bool> ret = s.update(arg_type(i, h),
- [](value_type& i, value_type * prev) {
- CPPUNIT_ASSERT_CURRENT(prev != nullptr);
- CPPUNIT_ASSERT_CURRENT(i.key == prev->key);
- CPPUNIT_ASSERT_CURRENT(i.hash == prev->hash);
- i.nInsertCall += 1;
- }, false);
- CPPUNIT_ASSERT(ret.first);
- CPPUNIT_ASSERT(!ret.second);
- CPPUNIT_ASSERT(s.contains(h));
- CPPUNIT_ASSERT(s.size() == capacity);
-
- {
- rcu_lock l;
- value_type * p = s.get(h);
- CPPUNIT_ASSERT(p);
- CPPUNIT_ASSERT(p->nInsertCall == 1);
- CPPUNIT_ASSERT(p->key == i);
- CPPUNIT_ASSERT(p->hash == h);
- }
- }
-
- // erase test
- for (size_t i = 0; i < capacity; ++i) {
- CPPUNIT_ASSERT(!s.empty());
- CPPUNIT_ASSERT(s.size() == capacity - i);
- CPPUNIT_ASSERT(s.find(hasher(i), [](value_type &) {}));
- CPPUNIT_ASSERT(s.erase(hasher(i)));
- CPPUNIT_ASSERT(!s.find(hasher(i), [](value_type &) {}));
- CPPUNIT_ASSERT(s.size() == capacity - i - 1);
- }
- CPPUNIT_ASSERT(s.empty());
-
- // Iterators on empty set
- {
- rcu_lock l;
- CPPUNIT_ASSERT(s.begin() == s.end());
- CPPUNIT_ASSERT(s.cbegin() == s.cend());
- CPPUNIT_ASSERT(s.rbegin() == s.rend());
- CPPUNIT_ASSERT(s.crbegin() == s.crend());
- }
-
- // insert with functor
- for (size_t i = capacity; i > 0; --i) {
- CPPUNIT_ASSERT(s.size() == capacity - i);
- CPPUNIT_ASSERT(s.insert(arg_type(i, hasher(i)), [](value_type& val) { val.nInsertCall += 1; }));
- CPPUNIT_ASSERT(s.size() == capacity - i + 1);
- CPPUNIT_ASSERT(!s.empty());
-
- CPPUNIT_ASSERT(s.find(hasher(i), [](value_type& val) {
- CPPUNIT_ASSERT_CURRENT(val.nInsertCall == 1);
- val.nFindCall += 1;
- }));
- }
- CPPUNIT_ASSERT(s.size() == capacity);
-
- // for-each iterator test
- {
- rcu_lock l;
- for (auto& el : s) {
- CPPUNIT_ASSERT(el.nInsertCall == 1);
- CPPUNIT_ASSERT(el.nFindCall == 1);
- el.nFindCall += 1;
- }
- }
-
- // iterator test
- {
- rcu_lock l;
- for (auto it = s.begin(), itEnd = s.end(); it != itEnd; ++it) {
- CPPUNIT_ASSERT(it->nInsertCall == 1);
- CPPUNIT_ASSERT(it->nFindCall == 2);
- it->nFindCall += 1;
- }
- }
-
- // reverse iterator test
- {
- rcu_lock l;
- for (auto it = s.rbegin(), itEnd = s.rend(); it != itEnd; ++it) {
- CPPUNIT_ASSERT(it->nInsertCall == 1);
- CPPUNIT_ASSERT(it->nFindCall == 3);
- it->nFindCall += 1;
- }
- }
-
- // const iterator test
- {
- rcu_lock l;
- for (auto it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it) {
- CPPUNIT_ASSERT(it->nInsertCall == 1);
- CPPUNIT_ASSERT(it->nFindCall == 4);
- it->nIteratorCall += 1;
- }
- }
-
- // const reverse iterator test
- {
- rcu_lock l;
- for (auto it = s.rbegin(), itEnd = s.rend(); it != itEnd; ++it) {
- CPPUNIT_ASSERT(it->nInsertCall == 1);
- CPPUNIT_ASSERT(it->nFindCall == 4);
- CPPUNIT_ASSERT(it->nIteratorCall == 1);
- it->nIteratorCall += 1;
- }
- }
-
- // check completeness
- for (size_t i = 1; i <= capacity; ++i) {
- CPPUNIT_ASSERT(s.find(hasher(i), [](value_type const& el) {
- CPPUNIT_ASSERT_CURRENT(el.nInsertCall == 1);
- CPPUNIT_ASSERT_CURRENT(el.nFindCall == 4);
- CPPUNIT_ASSERT_CURRENT(el.nIteratorCall == 2);
- }));
- }
-
- // erase with functor test
- {
- size_t nSum = 0;
- for (size_t i = 1; i <= capacity; ++i) {
- CPPUNIT_ASSERT(s.size() == capacity - i + 1);
- CPPUNIT_ASSERT(s.erase(hasher(i), [&nSum](value_type const& val) {
- CPPUNIT_ASSERT_CURRENT(val.nInsertCall == 1);
- CPPUNIT_ASSERT_CURRENT(val.nFindCall == 4);
- CPPUNIT_ASSERT_CURRENT(val.nIteratorCall == 2);
- nSum += val.key;
- }));
- CPPUNIT_ASSERT(s.size() == capacity - i);
- CPPUNIT_ASSERT(!s.erase(hasher(i), [&nSum](value_type const& val) { nSum += val.key; }))
- }
- CPPUNIT_ASSERT(s.empty());
- CPPUNIT_ASSERT(nSum == (1 + capacity) * capacity / 2);
- }
-
- // update test with insert allowing
- for (size_t i = 0; i < capacity; ++i) {
- hash_type h = hasher(i);
- CPPUNIT_ASSERT(!s.contains(h));
-
- {
- rcu_lock l;
- value_type * p = s.get(h);
- CPPUNIT_ASSERT(!p);
- }
- std::pair<bool, bool> ret = s.update(arg_type(i, h),
- [](value_type& i, value_type * prev) {
- CPPUNIT_ASSERT_CURRENT(prev == nullptr);
- i.nInsertCall += 1;
- });
- CPPUNIT_ASSERT(ret.first);
- CPPUNIT_ASSERT(ret.second);
- CPPUNIT_ASSERT(s.contains(h));
- CPPUNIT_ASSERT(s.size() == i + 1);
-
- {
- rcu_lock l;
- value_type * p = s.get(h);
- CPPUNIT_ASSERT(p);
- CPPUNIT_ASSERT(p->nInsertCall == 1);
- CPPUNIT_ASSERT(p->key == i);
- CPPUNIT_ASSERT(p->hash == h);
- }
- }
- CPPUNIT_ASSERT(!s.empty());
- CPPUNIT_ASSERT(s.size() == capacity);
-
- s.clear();
- CPPUNIT_ASSERT(s.empty());
- CPPUNIT_ASSERT(s.size() == 0);
-
- // emplace test
- for (size_t i = 0; i < capacity; ++i) {
- hash_type h = hasher(i);
- CPPUNIT_ASSERT(!s.contains(h));
- CPPUNIT_ASSERT(s.emplace(i, hasher(i)));
- CPPUNIT_ASSERT(s.contains(h));
-
- CPPUNIT_ASSERT(!s.empty());
- CPPUNIT_ASSERT(s.size() == i + 1);
-
- CPPUNIT_ASSERT(!s.emplace(arg_type(i, h)));
- CPPUNIT_ASSERT(s.size() == i + 1);
- }
- CPPUNIT_ASSERT(!s.empty());
- CPPUNIT_ASSERT(s.size() == capacity);
-
- // extract test
- for (size_t i = capacity; i != 0; --i) {
- CPPUNIT_ASSERT(!s.empty());
- CPPUNIT_ASSERT(s.size() == i);
-
- exempt_ptr gp{ s.extract(hasher(i - 1)) };
- CPPUNIT_ASSERT(gp);
- CPPUNIT_ASSERT(gp->key == i - 1);
- CPPUNIT_ASSERT(gp->hash == hasher(i - 1));
- CPPUNIT_ASSERT(!s.contains(hasher(i - 1)));
-
- {
- rcu_lock l;
- value_type * p = s.get(hasher(i - 1));
- CPPUNIT_ASSERT( p == nullptr );
- }
- CPPUNIT_ASSERT(s.size() == i - 1);
- }
- CPPUNIT_ASSERT(s.empty());
- CPPUNIT_ASSERT(s.size() == 0);
-
- CPPUNIT_MSG(s.statistics());
- }
-
- void hp_nohash();
- void hp_nohash_stat();
- void hp_nohash_5_3();
- void hp_nohash_5_3_stat();
- void hp_stdhash();
- void hp_stdhash_stat();
- void hp_stdhash_5_3();
- void hp_stdhash_5_3_stat();
- void hp_hash128();
- void hp_hash128_stat();
- void hp_hash128_4_3();
- void hp_hash128_4_3_stat();
-
- void dhp_nohash();
- void dhp_nohash_stat();
- void dhp_nohash_5_3();
- void dhp_nohash_5_3_stat();
- void dhp_stdhash();
- void dhp_stdhash_stat();
- void dhp_stdhash_5_3();
- void dhp_stdhash_5_3_stat();
- void dhp_hash128();
- void dhp_hash128_stat();
- void dhp_hash128_4_3();
- void dhp_hash128_4_3_stat();
-
- void rcu_gpi_nohash();
- void rcu_gpi_nohash_stat();
- void rcu_gpi_nohash_5_3();
- void rcu_gpi_nohash_5_3_stat();
- void rcu_gpi_stdhash();
- void rcu_gpi_stdhash_stat();
- void rcu_gpi_stdhash_5_3();
- void rcu_gpi_stdhash_5_3_stat();
- void rcu_gpi_hash128();
- void rcu_gpi_hash128_stat();
- void rcu_gpi_hash128_4_3();
- void rcu_gpi_hash128_4_3_stat();
-
- void rcu_gpb_nohash();
- void rcu_gpb_nohash_stat();
- void rcu_gpb_nohash_5_3();
- void rcu_gpb_nohash_5_3_stat();
- void rcu_gpb_stdhash();
- void rcu_gpb_stdhash_stat();
- void rcu_gpb_stdhash_5_3();
- void rcu_gpb_stdhash_5_3_stat();
- void rcu_gpb_hash128();
- void rcu_gpb_hash128_stat();
- void rcu_gpb_hash128_4_3();
- void rcu_gpb_hash128_4_3_stat();
-
- void rcu_gpt_nohash();
- void rcu_gpt_nohash_stat();
- void rcu_gpt_nohash_5_3();
- void rcu_gpt_nohash_5_3_stat();
- void rcu_gpt_stdhash();
- void rcu_gpt_stdhash_stat();
- void rcu_gpt_stdhash_5_3();
- void rcu_gpt_stdhash_5_3_stat();
- void rcu_gpt_hash128();
- void rcu_gpt_hash128_stat();
- void rcu_gpt_hash128_4_3();
- void rcu_gpt_hash128_4_3_stat();
-
- void rcu_shb_nohash();
- void rcu_shb_nohash_stat();
- void rcu_shb_nohash_5_3();
- void rcu_shb_nohash_5_3_stat();
- void rcu_shb_stdhash();
- void rcu_shb_stdhash_stat();
- void rcu_shb_stdhash_5_3();
- void rcu_shb_stdhash_5_3_stat();
- void rcu_shb_hash128();
- void rcu_shb_hash128_stat();
- void rcu_shb_hash128_4_3();
- void rcu_shb_hash128_4_3_stat();
-
- void rcu_sht_nohash();
- void rcu_sht_nohash_stat();
- void rcu_sht_nohash_5_3();
- void rcu_sht_nohash_5_3_stat();
- void rcu_sht_stdhash();
- void rcu_sht_stdhash_stat();
- void rcu_sht_stdhash_5_3();
- void rcu_sht_stdhash_5_3_stat();
- void rcu_sht_hash128();
- void rcu_sht_hash128_stat();
- void rcu_sht_hash128_4_3();
- void rcu_sht_hash128_4_3_stat();
-
- CPPUNIT_TEST_SUITE(FeldmanHashSetHdrTest)
- CPPUNIT_TEST(hp_nohash)
- CPPUNIT_TEST(hp_nohash_stat)
- CPPUNIT_TEST(hp_nohash_5_3)
- CPPUNIT_TEST(hp_nohash_5_3_stat)
- CPPUNIT_TEST(hp_stdhash)
- CPPUNIT_TEST(hp_stdhash_stat)
- CPPUNIT_TEST(hp_stdhash_5_3)
- CPPUNIT_TEST(hp_stdhash_5_3_stat)
- CPPUNIT_TEST(hp_hash128)
- CPPUNIT_TEST(hp_hash128_stat)
- CPPUNIT_TEST(hp_hash128_4_3)
- CPPUNIT_TEST(hp_hash128_4_3_stat)
-
- CPPUNIT_TEST(dhp_nohash)
- CPPUNIT_TEST(dhp_nohash_stat)
- CPPUNIT_TEST(dhp_nohash_5_3)
- CPPUNIT_TEST(dhp_nohash_5_3_stat)
- CPPUNIT_TEST(dhp_stdhash)
- CPPUNIT_TEST(dhp_stdhash_stat)
- CPPUNIT_TEST(dhp_stdhash_5_3)
- CPPUNIT_TEST(dhp_stdhash_5_3_stat)
- CPPUNIT_TEST(dhp_hash128)
- CPPUNIT_TEST(dhp_hash128_stat)
- CPPUNIT_TEST(dhp_hash128_4_3)
- CPPUNIT_TEST(dhp_hash128_4_3_stat)
-
- CPPUNIT_TEST(rcu_gpi_nohash)
- CPPUNIT_TEST(rcu_gpi_nohash_stat)
- CPPUNIT_TEST(rcu_gpi_nohash_5_3)
- CPPUNIT_TEST(rcu_gpi_nohash_5_3_stat)
- CPPUNIT_TEST(rcu_gpi_stdhash)
- CPPUNIT_TEST(rcu_gpi_stdhash_stat)
- CPPUNIT_TEST(rcu_gpi_stdhash_5_3)
- CPPUNIT_TEST(rcu_gpi_stdhash_5_3_stat)
- CPPUNIT_TEST(rcu_gpi_hash128)
- CPPUNIT_TEST(rcu_gpi_hash128_stat)
- CPPUNIT_TEST(rcu_gpi_hash128_4_3)
- CPPUNIT_TEST(rcu_gpi_hash128_4_3_stat)
-
- CPPUNIT_TEST(rcu_gpb_nohash)
- CPPUNIT_TEST(rcu_gpb_nohash_stat)
- CPPUNIT_TEST(rcu_gpb_nohash_5_3)
- CPPUNIT_TEST(rcu_gpb_nohash_5_3_stat)
- CPPUNIT_TEST(rcu_gpb_stdhash)
- CPPUNIT_TEST(rcu_gpb_stdhash_stat)
- CPPUNIT_TEST(rcu_gpb_stdhash_5_3)
- CPPUNIT_TEST(rcu_gpb_stdhash_5_3_stat)
- CPPUNIT_TEST(rcu_gpb_hash128)
- CPPUNIT_TEST(rcu_gpb_hash128_stat)
- CPPUNIT_TEST(rcu_gpb_hash128_4_3)
- CPPUNIT_TEST(rcu_gpb_hash128_4_3_stat)
-
- CPPUNIT_TEST(rcu_gpt_nohash)
- CPPUNIT_TEST(rcu_gpt_nohash_stat)
- CPPUNIT_TEST(rcu_gpt_nohash_5_3)
- CPPUNIT_TEST(rcu_gpt_nohash_5_3_stat)
- CPPUNIT_TEST(rcu_gpt_stdhash)
- CPPUNIT_TEST(rcu_gpt_stdhash_stat)
- CPPUNIT_TEST(rcu_gpt_stdhash_5_3)
- CPPUNIT_TEST(rcu_gpt_stdhash_5_3_stat)
- CPPUNIT_TEST(rcu_gpt_hash128)
- CPPUNIT_TEST(rcu_gpt_hash128_stat)
- CPPUNIT_TEST(rcu_gpt_hash128_4_3)
- CPPUNIT_TEST(rcu_gpt_hash128_4_3_stat)
-
- CPPUNIT_TEST(rcu_shb_nohash)
- CPPUNIT_TEST(rcu_shb_nohash_stat)
- CPPUNIT_TEST(rcu_shb_nohash_5_3)
- CPPUNIT_TEST(rcu_shb_nohash_5_3_stat)
- CPPUNIT_TEST(rcu_shb_stdhash)
- CPPUNIT_TEST(rcu_shb_stdhash_stat)
- CPPUNIT_TEST(rcu_shb_stdhash_5_3)
- CPPUNIT_TEST(rcu_shb_stdhash_5_3_stat)
- CPPUNIT_TEST(rcu_shb_hash128)
- CPPUNIT_TEST(rcu_shb_hash128_stat)
- CPPUNIT_TEST(rcu_shb_hash128_4_3)
- CPPUNIT_TEST(rcu_shb_hash128_4_3_stat)
-
- CPPUNIT_TEST(rcu_sht_nohash)
- CPPUNIT_TEST(rcu_sht_nohash_stat)
- CPPUNIT_TEST(rcu_sht_nohash_5_3)
- CPPUNIT_TEST(rcu_sht_nohash_5_3_stat)
- CPPUNIT_TEST(rcu_sht_stdhash)
- CPPUNIT_TEST(rcu_sht_stdhash_stat)
- CPPUNIT_TEST(rcu_sht_stdhash_5_3)
- CPPUNIT_TEST(rcu_sht_stdhash_5_3_stat)
- CPPUNIT_TEST(rcu_sht_hash128)
- CPPUNIT_TEST(rcu_sht_hash128_stat)
- CPPUNIT_TEST(rcu_sht_hash128_4_3)
- CPPUNIT_TEST(rcu_sht_hash128_4_3_stat)
- CPPUNIT_TEST_SUITE_END()
- };
-
-} // namespace set
-
-#endif // #ifndef CDSTEST_HDR_FELDMAN_HASHSET_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.
-*/
-
-#include "set/hdr_feldman_hashset.h"
-#include <cds/container/feldman_hashset_dhp.h>
-#include "unit/print_feldman_hashset_stat.h"
-
-namespace set {
- namespace {
- typedef cds::gc::DHP gc_type;
- } // namespace
-
- void FeldmanHashSetHdrTest::dhp_nohash()
- {
- typedef size_t key_type;
-
- struct traits : public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_hp<set_type, nohash<key_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- >::type
- > set_type2;
- test_hp<set_type2, nohash<key_type>>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::dhp_stdhash()
- {
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_hp<set_type, std::hash<hash_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- >::type
- > set_type2;
- test_hp<set_type2, std::hash<hash_type>>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::dhp_hash128()
- {
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef hash128::less less;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" );
- test_hp<set_type, hash128::make>(4, 2);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , co::less< hash_type::less >
- >::type
- > set_type2;
- test_hp<set_type2, hash128::make>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::dhp_nohash_stat()
- {
- typedef size_t key_type;
-
- struct traits : public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_hp<set_type, nohash<key_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- , co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_hp<set_type2, nohash<key_type>>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::dhp_stdhash_stat()
- {
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_hp<set_type, std::hash<hash_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_hp<set_type2, std::hash<hash_type>>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::dhp_hash128_stat()
- {
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef hash128::cmp compare;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_hp<set_type, hash_type::make>(4, 2);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- ,co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_hp<set_type2, hash_type::make>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::dhp_nohash_5_3()
- {
- typedef size_t key_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_hp<set_type, nohash<key_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- >::type
- > set_type2;
- test_hp<set_type2, nohash<key_type>>(5, 3);
- }
-
- void FeldmanHashSetHdrTest::dhp_stdhash_5_3()
- {
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_hp<set_type, std::hash<hash_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- >::type
- > set_type2;
- test_hp<set_type2, std::hash<hash_type>>(5, 3);
- }
-
- void FeldmanHashSetHdrTest::dhp_hash128_4_3()
- {
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef co::v::sequential_consistent memory_model;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_hp<set_type, hash128::make >(4, 3);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- > set_type2;
- test_hp<set_type2, hash128::make >(4, 3);
- }
-
- void FeldmanHashSetHdrTest::dhp_nohash_5_3_stat()
- {
- typedef size_t key_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_hp<set_type, nohash<key_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_hp<set_type2, nohash<key_type>>(5, 3);
- }
-
- void FeldmanHashSetHdrTest::dhp_stdhash_5_3_stat()
- {
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_hp<set_type, std::hash<hash_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_hp<set_type2, std::hash<hash_type>>(5, 3);
- }
-
- void FeldmanHashSetHdrTest::dhp_hash128_4_3_stat()
- {
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- typedef hash128::less less;
- typedef hash128::cmp compare;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_hp<set_type, hash_type::make>(4, 3);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , co::stat< cc::feldman_hashset::stat<>>
- , co::less< hash_type::less >
- , co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_hp<set_type2, hash_type::make>(4, 3);
- }
-
-
-} // 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/hdr_feldman_hashset.h"
-#include <cds/container/feldman_hashset_hp.h>
-#include "unit/print_feldman_hashset_stat.h"
-
-namespace set {
- namespace {
- typedef cds::gc::HP gc_type;
- } // namespace
-
- void FeldmanHashSetHdrTest::hp_nohash()
- {
- typedef size_t key_type;
-
- struct traits : public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_hp<set_type, nohash<key_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- >::type
- > set_type2;
- test_hp<set_type2, nohash<key_type>>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::hp_stdhash()
- {
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_hp<set_type, std::hash<hash_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- >::type
- > set_type2;
- test_hp<set_type2, std::hash<hash_type>>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::hp_hash128()
- {
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef hash128::less less;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" );
- test_hp<set_type, hash128::make>(4, 2);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , co::less< hash_type::less >
- >::type
- > set_type2;
- test_hp<set_type2, hash128::make>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::hp_nohash_stat()
- {
- typedef size_t key_type;
-
- struct traits : public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_hp<set_type, nohash<key_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- , co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_hp<set_type2, nohash<key_type>>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::hp_stdhash_stat()
- {
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_hp<set_type, std::hash<hash_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_hp<set_type2, std::hash<hash_type>>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::hp_hash128_stat()
- {
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef hash128::cmp compare;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_hp<set_type, hash_type::make>(4, 2);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- ,co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_hp<set_type2, hash_type::make>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::hp_nohash_5_3()
- {
- typedef size_t key_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_hp<set_type, nohash<key_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- >::type
- > set_type2;
- test_hp<set_type2, nohash<key_type>>(5, 3);
- }
-
- void FeldmanHashSetHdrTest::hp_stdhash_5_3()
- {
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_hp<set_type, std::hash<hash_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- >::type
- > set_type2;
- test_hp<set_type2, std::hash<hash_type>>(5, 3);
- }
-
- void FeldmanHashSetHdrTest::hp_hash128_4_3()
- {
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef co::v::sequential_consistent memory_model;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_hp<set_type, hash128::make >(4, 3);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- > set_type2;
- test_hp<set_type2, hash128::make >(4, 3);
- }
-
- void FeldmanHashSetHdrTest::hp_nohash_5_3_stat()
- {
- typedef size_t key_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_hp<set_type, nohash<key_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_hp<set_type2, nohash<key_type>>(5, 3);
- }
-
- void FeldmanHashSetHdrTest::hp_stdhash_5_3_stat()
- {
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_hp<set_type, std::hash<hash_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_hp<set_type2, std::hash<hash_type>>(5, 3);
- }
-
- void FeldmanHashSetHdrTest::hp_hash128_4_3_stat()
- {
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- typedef hash128::less less;
- typedef hash128::cmp compare;
- };
- typedef cc::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_hp<set_type, hash_type::make>(4, 3);
-
- typedef cc::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , co::stat< cc::feldman_hashset::stat<>>
- , co::less< hash_type::less >
- , co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_hp<set_type2, hash_type::make>(4, 3);
- }
-
-
-} // namespace set
-
-CPPUNIT_TEST_SUITE_REGISTRATION(set::FeldmanHashSetHdrTest);
+++ /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/hdr_feldman_hashset.h"
-#include <cds/urcu/general_buffered.h>
-#include <cds/container/feldman_hashset_rcu.h>
-#include "unit/print_feldman_hashset_stat.h"
-
-namespace set {
- namespace {
- typedef cds::urcu::gc<cds::urcu::general_buffered<>> rcu_type;
- } // namespace
-
- void FeldmanHashSetHdrTest::rcu_gpb_nohash()
- {
- typedef size_t key_type;
-
- struct traits : public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpb_stdhash()
- {
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpb_hash128()
- {
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef hash128::less less;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" );
- test_rcu<set_type, hash128::make>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , co::less< hash_type::less >
- >::type
- > set_type2;
- test_rcu<set_type2, hash128::make>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpb_nohash_stat()
- {
- typedef size_t key_type;
-
- struct traits : public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- , co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpb_stdhash_stat()
- {
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpb_hash128_stat()
- {
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef hash128::cmp compare;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash_type::make>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- ,co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_rcu<set_type2, hash_type::make>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpb_nohash_5_3()
- {
- typedef size_t key_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, nohash<key_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(5, 3);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpb_stdhash_5_3()
- {
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(5, 3);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpb_hash128_4_3()
- {
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef co::v::sequential_consistent memory_model;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash128::make >(4, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- > set_type2;
- test_rcu<set_type2, hash128::make >(4, 3);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpb_nohash_5_3_stat()
- {
- typedef size_t key_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, nohash<key_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(5, 3);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpb_stdhash_5_3_stat()
- {
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(5, 3);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpb_hash128_4_3_stat()
- {
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- typedef hash128::less less;
- typedef hash128::cmp compare;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash_type::make>(4, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , co::stat< cc::feldman_hashset::stat<>>
- , co::less< hash_type::less >
- , co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_rcu<set_type2, hash_type::make>(4, 3);
- }
-
-
-} // 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/hdr_feldman_hashset.h"
-#include <cds/urcu/general_instant.h>
-#include <cds/container/feldman_hashset_rcu.h>
-#include "unit/print_feldman_hashset_stat.h"
-
-namespace set {
- namespace {
- typedef cds::urcu::gc<cds::urcu::general_instant<>> rcu_type;
- } // namespace
-
- void FeldmanHashSetHdrTest::rcu_gpi_nohash()
- {
- typedef size_t key_type;
-
- struct traits : public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpi_stdhash()
- {
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpi_hash128()
- {
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef hash128::less less;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" );
- test_rcu<set_type, hash128::make>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , co::less< hash_type::less >
- >::type
- > set_type2;
- test_rcu<set_type2, hash128::make>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpi_nohash_stat()
- {
- typedef size_t key_type;
-
- struct traits : public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- , co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpi_stdhash_stat()
- {
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpi_hash128_stat()
- {
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef hash128::cmp compare;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash_type::make>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- ,co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_rcu<set_type2, hash_type::make>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpi_nohash_5_3()
- {
- typedef size_t key_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, nohash<key_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(5, 3);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpi_stdhash_5_3()
- {
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(5, 3);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpi_hash128_4_3()
- {
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef co::v::sequential_consistent memory_model;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash128::make >(4, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- > set_type2;
- test_rcu<set_type2, hash128::make >(4, 3);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpi_nohash_5_3_stat()
- {
- typedef size_t key_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, nohash<key_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(5, 3);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpi_stdhash_5_3_stat()
- {
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(5, 3);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpi_hash128_4_3_stat()
- {
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- typedef hash128::less less;
- typedef hash128::cmp compare;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash_type::make>(4, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , co::stat< cc::feldman_hashset::stat<>>
- , co::less< hash_type::less >
- , co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_rcu<set_type2, hash_type::make>(4, 3);
- }
-
-
-} // 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/hdr_feldman_hashset.h"
-#include <cds/urcu/general_threaded.h>
-#include <cds/container/feldman_hashset_rcu.h>
-#include "unit/print_feldman_hashset_stat.h"
-
-namespace set {
- namespace {
- typedef cds::urcu::gc<cds::urcu::general_threaded<>> rcu_type;
- } // namespace
-
- void FeldmanHashSetHdrTest::rcu_gpt_nohash()
- {
- typedef size_t key_type;
-
- struct traits : public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpt_stdhash()
- {
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpt_hash128()
- {
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef hash128::less less;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" );
- test_rcu<set_type, hash128::make>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , co::less< hash_type::less >
- >::type
- > set_type2;
- test_rcu<set_type2, hash128::make>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpt_nohash_stat()
- {
- typedef size_t key_type;
-
- struct traits : public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- , co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpt_stdhash_stat()
- {
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpt_hash128_stat()
- {
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef hash128::cmp compare;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash_type::make>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- ,co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_rcu<set_type2, hash_type::make>(4, 2);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpt_nohash_5_3()
- {
- typedef size_t key_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, nohash<key_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(5, 3);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpt_stdhash_5_3()
- {
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(5, 3);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpt_hash128_4_3()
- {
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef co::v::sequential_consistent memory_model;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash128::make >(4, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- > set_type2;
- test_rcu<set_type2, hash128::make >(4, 3);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpt_nohash_5_3_stat()
- {
- typedef size_t key_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, nohash<key_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(5, 3);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpt_stdhash_5_3_stat()
- {
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(5, 3);
- }
-
- void FeldmanHashSetHdrTest::rcu_gpt_hash128_4_3_stat()
- {
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- typedef hash128::less less;
- typedef hash128::cmp compare;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash_type::make>(4, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , co::stat< cc::feldman_hashset::stat<>>
- , co::less< hash_type::less >
- , co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_rcu<set_type2, hash_type::make>(4, 3);
- }
-
-
-} // 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/hdr_feldman_hashset.h"
-#include <cds/urcu/signal_buffered.h>
-#include <cds/container/feldman_hashset_rcu.h>
-#include "unit/print_feldman_hashset_stat.h"
-
-namespace set {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc<cds::urcu::signal_buffered<>> rcu_type;
- } // namespace
-#endif
-
- void FeldmanHashSetHdrTest::rcu_shb_nohash()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t key_type;
-
- struct traits : public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(4, 2);
-#endif
- }
-
- void FeldmanHashSetHdrTest::rcu_shb_stdhash()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(4, 2);
-#endif
- }
-
- void FeldmanHashSetHdrTest::rcu_shb_hash128()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef hash128::less less;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" );
- test_rcu<set_type, hash128::make>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , co::less< hash_type::less >
- >::type
- > set_type2;
- test_rcu<set_type2, hash128::make>(4, 2);
-#endif
- }
-
- void FeldmanHashSetHdrTest::rcu_shb_nohash_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t key_type;
-
- struct traits : public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- , co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(4, 2);
-#endif
- }
-
- void FeldmanHashSetHdrTest::rcu_shb_stdhash_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(4, 2);
-#endif
- }
-
- void FeldmanHashSetHdrTest::rcu_shb_hash128_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef hash128::cmp compare;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash_type::make>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- ,co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_rcu<set_type2, hash_type::make>(4, 2);
-#endif
- }
-
- void FeldmanHashSetHdrTest::rcu_shb_nohash_5_3()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t key_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, nohash<key_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(5, 3);
-#endif
- }
-
- void FeldmanHashSetHdrTest::rcu_shb_stdhash_5_3()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(5, 3);
-#endif
- }
-
- void FeldmanHashSetHdrTest::rcu_shb_hash128_4_3()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef co::v::sequential_consistent memory_model;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash128::make >(4, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- > set_type2;
- test_rcu<set_type2, hash128::make >(4, 3);
-#endif
- }
-
- void FeldmanHashSetHdrTest::rcu_shb_nohash_5_3_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t key_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, nohash<key_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(5, 3);
-#endif
- }
-
- void FeldmanHashSetHdrTest::rcu_shb_stdhash_5_3_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(5, 3);
-#endif
- }
-
- void FeldmanHashSetHdrTest::rcu_shb_hash128_4_3_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- typedef hash128::less less;
- typedef hash128::cmp compare;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash_type::make>(4, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , co::stat< cc::feldman_hashset::stat<>>
- , co::less< hash_type::less >
- , co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_rcu<set_type2, hash_type::make>(4, 3);
-#endif
- }
-} // 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/hdr_feldman_hashset.h"
-#include <cds/urcu/signal_threaded.h>
-#include <cds/container/feldman_hashset_rcu.h>
-#include "unit/print_feldman_hashset_stat.h"
-
-namespace set {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc<cds::urcu::signal_threaded<>> rcu_type;
- } // namespace
-#endif
-
- void FeldmanHashSetHdrTest::rcu_sht_nohash()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t key_type;
-
- struct traits : public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(4, 2);
-#endif
- }
-
- void FeldmanHashSetHdrTest::rcu_sht_stdhash()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(4, 2);
-#endif
- }
-
- void FeldmanHashSetHdrTest::rcu_sht_hash128()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef hash128::less less;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" );
- test_rcu<set_type, hash128::make>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , co::less< hash_type::less >
- >::type
- > set_type2;
- test_rcu<set_type2, hash128::make>(4, 2);
-#endif
- }
-
- void FeldmanHashSetHdrTest::rcu_sht_nohash_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t key_type;
-
- struct traits : public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- , co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(4, 2);
-#endif
- }
-
- void FeldmanHashSetHdrTest::rcu_sht_stdhash_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(4, 2);
-#endif
- }
-
- void FeldmanHashSetHdrTest::rcu_sht_hash128_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef hash128::cmp compare;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash_type::make>(4, 2);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- ,co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_rcu<set_type2, hash_type::make>(4, 2);
-#endif
- }
-
- void FeldmanHashSetHdrTest::rcu_sht_nohash_5_3()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t key_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, nohash<key_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(5, 3);
-#endif
- }
-
- void FeldmanHashSetHdrTest::rcu_sht_stdhash_5_3()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(5, 3);
-#endif
- }
-
- void FeldmanHashSetHdrTest::rcu_sht_hash128_4_3()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef co::v::sequential_consistent memory_model;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash128::make >(4, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- > set_type2;
- test_rcu<set_type2, hash128::make >(4, 3);
-#endif
- }
-
- void FeldmanHashSetHdrTest::rcu_sht_nohash_5_3_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t key_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, nohash<key_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_key<key_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(5, 3);
-#endif
- }
-
- void FeldmanHashSetHdrTest::rcu_sht_stdhash_5_3_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(5, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- ,co::stat< cc::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(5, 3);
-#endif
- }
-
- void FeldmanHashSetHdrTest::rcu_sht_hash128_4_3_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef hash128 hash_type;
-
- struct traits: public cc::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef cc::feldman_hashset::stat<> stat;
- typedef hash128::less less;
- typedef hash128::cmp compare;
- };
- typedef cc::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash_type::make>(4, 3);
-
- typedef cc::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename cc::feldman_hashset::make_traits<
- cc::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , co::stat< cc::feldman_hashset::stat<>>
- , co::less< hash_type::less >
- , co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_rcu<set_type2, hash_type::make>(4, 3);
-#endif
- }
-} // 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/hdr_intrusive_cuckoo_set.h"
-#include <cds/intrusive/cuckoo_set.h>
-
-#include "set/intrusive_cuckoo_set_common.h"
-#include "../unit/print_cuckoo_stat.h"
-
-namespace set {
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_basehook_equal()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 0 > > item_type;
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- co::hash< std::tuple< hash1, hash2 > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::equal_to< equal_to<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_basehook_equal()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::equal_to< equal_to<item_type> >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_basehook_sort_cmp()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 0 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_basehook_sort_cmp()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_basehook_sort_less()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 0 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_basehook_sort_less()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_basehook_sort_cmpmix()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 0 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_basehook_sort_cmpmix()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 0 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_basehook_sort_cmpmix_stat()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 0 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- ,co::stat< ci::cuckoo::stat >
- >::type
- > set_type;
-
- unsigned int nProbesetSize = set_type::node_type::probeset_size ? set_type::node_type::probeset_size : 4;
- set_type s( 256, nProbesetSize, nProbesetSize / 2 );
- test_with( s );
- CPPUNIT_MSG( s.statistics() << s.mutex_policy_statistics() );
- }
-
-
- // base hook, store hash
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_basehook_equal_storehash()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 2 > > item_type;
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- ,ci::cuckoo::store_hash< item_type::hash_array_size >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::equal_to< equal_to<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_basehook_equal_storehash()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- ,ci::cuckoo::store_hash< item_type::hash_array_size >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::equal_to< equal_to<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_basehook_sort_cmp_storehash()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 2 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- ,ci::cuckoo::store_hash< item_type::hash_array_size >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_basehook_sort_cmp_storehash()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- ,ci::cuckoo::store_hash< item_type::hash_array_size >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_basehook_sort_less_storehash()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 2 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- ,ci::cuckoo::store_hash< item_type::hash_array_size >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_basehook_sort_less_storehash()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- ,ci::cuckoo::store_hash< item_type::hash_array_size >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_basehook_sort_cmpmix_storehash()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 2 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- ,ci::cuckoo::store_hash< item_type::hash_array_size >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_basehook_sort_cmpmix_storehash()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 2 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- ,ci::cuckoo::store_hash< item_type::hash_array_size >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
-
- // Member hook
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_memberhook_equal()
- {
- typedef IntrusiveCuckooSetHdrTest::member_item< ci::cuckoo::node< ci::cuckoo::list, 0 > > item_type;
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember)> >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::equal_to< equal_to<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_memberhook_equal()
- {
- typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::equal_to< equal_to<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_memberhook_sort_cmp()
- {
- typedef ci::cuckoo::node< ci::cuckoo::list, 0 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_memberhook_sort_cmp()
- {
- typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_memberhook_sort_less()
- {
- typedef ci::cuckoo::node< ci::cuckoo::list, 0 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_memberhook_sort_less()
- {
- typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_memberhook_sort_cmpmix()
- {
- typedef ci::cuckoo::node< ci::cuckoo::list, 0 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_memberhook_sort_cmpmix()
- {
- typedef ci::cuckoo::node< ci::cuckoo::vector<8>, 0 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
-
- // member hook, store hash
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_memberhook_equal_storehash()
- {
- typedef ci::cuckoo::node< ci::cuckoo::list, 2 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- ,ci::cuckoo::store_hash< node_type::hash_array_size >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::equal_to< equal_to<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_memberhook_equal_storehash()
- {
- typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- ,ci::cuckoo::store_hash< node_type::hash_array_size >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::equal_to< equal_to<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_memberhook_sort_cmp_storehash()
- {
- typedef ci::cuckoo::node< ci::cuckoo::list, 2 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- ,ci::cuckoo::store_hash< node_type::hash_array_size >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_memberhook_sort_cmp_storehash()
- {
- typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- ,ci::cuckoo::store_hash< node_type::hash_array_size >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_memberhook_sort_less_storehash()
- {
- typedef ci::cuckoo::node< ci::cuckoo::list, 2 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- ,ci::cuckoo::store_hash< node_type::hash_array_size >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_memberhook_sort_less_storehash()
- {
- typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- ,ci::cuckoo::store_hash< node_type::hash_array_size >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_list_memberhook_sort_cmpmix_storehash()
- {
- typedef ci::cuckoo::node< ci::cuckoo::list, 2 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- ,ci::cuckoo::store_hash< node_type::hash_array_size >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_refinable_vector_memberhook_sort_cmpmix_storehash()
- {
- typedef ci::cuckoo::node< ci::cuckoo::vector<8>, 2 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- ,ci::cuckoo::store_hash< node_type::hash_array_size >
- > >
- ,co::mutex_policy< ci::cuckoo::refinable<> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
-} // 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/hdr_intrusive_cuckoo_set.h"
-#include <cds/intrusive/cuckoo_set.h>
-
-#include "set/intrusive_cuckoo_set_common.h"
-#include "../unit/print_cuckoo_stat.h"
-
-namespace set {
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_equal()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 0 > > item_type;
- struct set_traits : public ci::cuckoo::traits {
- typedef co::hash_tuple< hash1, hash2 > hash;
- typedef set::equal_to<item_type> equal_to;
- };
- typedef ci::CuckooSet< item_type, set_traits > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_equal()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > > item_type;
-
- struct set_traits : public ci::cuckoo::traits {
- typedef ci::cuckoo::base_hook< ci::cuckoo::probeset_type< item_type::probeset_type >> hook;
- typedef co::hash_tuple< hash1, hash2 > hash;
- typedef set::equal_to<item_type> equal_to;
- };
- typedef ci::CuckooSet< item_type, set_traits > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_sort_cmp()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 0 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_sort_cmp()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_sort_less()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 0 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_sort_less()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_sort_cmpmix()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 0 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_sort_cmpmix()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 0 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_sort_cmpmix_stat()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 0 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- ,co::stat< ci::cuckoo::stat >
- >::type
- > set_type;
-
- unsigned int nProbesetSize = set_type::node_type::probeset_size ? set_type::node_type::probeset_size : 4;
- set_type s( 256, nProbesetSize, nProbesetSize / 2 );
- test_with( s );
- CPPUNIT_MSG( s.statistics() << s.mutex_policy_statistics() );
- }
-
-
- // base hook, store hash
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_equal_storehash()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 2 > > item_type;
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- ,ci::cuckoo::store_hash< item_type::hash_array_size >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::equal_to< equal_to<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_equal_storehash()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- ,ci::cuckoo::store_hash< item_type::hash_array_size >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::equal_to< equal_to<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_sort_cmp_storehash()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 2 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- ,ci::cuckoo::store_hash< item_type::hash_array_size >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_sort_cmp_storehash()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- ,ci::cuckoo::store_hash< item_type::hash_array_size >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_sort_less_storehash()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 2 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- ,ci::cuckoo::store_hash< item_type::hash_array_size >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_sort_less_storehash()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- ,ci::cuckoo::store_hash< item_type::hash_array_size >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_basehook_sort_cmpmix_storehash()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::list, 2 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- ,ci::cuckoo::store_hash< item_type::hash_array_size >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_basehook_sort_cmpmix_storehash()
- {
- typedef IntrusiveCuckooSetHdrTest::base_item< ci::cuckoo::node< ci::cuckoo::vector<8>, 2 > > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::base_hook<
- ci::cuckoo::probeset_type< item_type::probeset_type >
- ,ci::cuckoo::store_hash< item_type::hash_array_size >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
-
- // Member hook
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_equal()
- {
- typedef IntrusiveCuckooSetHdrTest::member_item< ci::cuckoo::node< ci::cuckoo::list, 0 > > item_type;
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember)> >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::equal_to< equal_to<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_equal()
- {
- typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::equal_to< equal_to<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_sort_cmp()
- {
- typedef ci::cuckoo::node< ci::cuckoo::list, 0 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_sort_cmp()
- {
- typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_sort_less()
- {
- typedef ci::cuckoo::node< ci::cuckoo::list, 0 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_sort_less()
- {
- typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 0 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_sort_cmpmix()
- {
- typedef ci::cuckoo::node< ci::cuckoo::list, 0 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_sort_cmpmix()
- {
- typedef ci::cuckoo::node< ci::cuckoo::vector<8>, 0 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
-
- // member hook, store hash
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_equal_storehash()
- {
- typedef ci::cuckoo::node< ci::cuckoo::list, 2 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- ,ci::cuckoo::store_hash< node_type::hash_array_size >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::equal_to< equal_to<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_equal_storehash()
- {
- typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- ,ci::cuckoo::store_hash< node_type::hash_array_size >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::equal_to< equal_to<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_sort_cmp_storehash()
- {
- typedef ci::cuckoo::node< ci::cuckoo::list, 2 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- ,ci::cuckoo::store_hash< node_type::hash_array_size >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_sort_cmp_storehash()
- {
- typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- ,ci::cuckoo::store_hash< node_type::hash_array_size >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_sort_less_storehash()
- {
- typedef ci::cuckoo::node< ci::cuckoo::list, 2 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- ,ci::cuckoo::store_hash< node_type::hash_array_size >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_sort_less_storehash()
- {
- typedef ci::cuckoo::node< ci::cuckoo::vector<4>, 2 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- ,ci::cuckoo::store_hash< node_type::hash_array_size >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_list_memberhook_sort_cmpmix_storehash()
- {
- typedef ci::cuckoo::node< ci::cuckoo::list, 2 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- ,ci::cuckoo::store_hash< node_type::hash_array_size >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
- void IntrusiveCuckooSetHdrTest::Cuckoo_striped_vector_memberhook_sort_cmpmix_storehash()
- {
- typedef ci::cuckoo::node< ci::cuckoo::vector<8>, 2 > node_type;
- typedef IntrusiveCuckooSetHdrTest::member_item< node_type > item_type;
-
- typedef ci::CuckooSet< item_type
- ,ci::cuckoo::make_traits<
- ci::opt::hook< ci::cuckoo::member_hook< offsetof(item_type, hMember),
- ci::cuckoo::probeset_type< node_type::probeset_type >
- ,ci::cuckoo::store_hash< node_type::hash_array_size >
- > >
- ,co::hash< std::tuple< hash1, hash2 > >
- ,co::less< IntrusiveCuckooSetHdrTest::less<item_type> >
- ,co::compare< IntrusiveCuckooSetHdrTest::cmp<item_type> >
- >::type
- > set_type;
-
- test_cuckoo<set_type>();
- }
-
-} // namespace set
-
-CPPUNIT_TEST_SUITE_REGISTRATION(set::IntrusiveCuckooSetHdrTest);
+++ /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 CDSTEST_HDR_INTRUSIVE_CUCKOO_SET_H
-#define CDSTEST_HDR_INTRUSIVE_CUCKOO_SET_H
-
-#include "cppunit/cppunit_proxy.h"
-#include <cds/opt/hash.h>
-
-// cds::intrusive namespace forward declaration
-namespace cds { namespace intrusive {}}
-
-namespace set {
- namespace ci = cds::intrusive;
- namespace co = cds::opt;
-
- // MichaelHashSet
- class IntrusiveCuckooSetHdrTest: public CppUnitMini::TestCase
- {
- public:
- struct stat
- {
- unsigned int nDisposeCount ; // count of disposer calling
- unsigned int nFindCount ; // count of find-functor calling
- unsigned int nFindArgCount;
- unsigned int nInsertCount;
- unsigned int nEnsureNewCount;
- unsigned int nEnsureCount;
- unsigned int nEraseCount;
-
- stat()
- {
- memset( this, 0, sizeof(*this));
- }
-
- stat& operator=( stat const& s)
- {
- memcpy( this, &s, sizeof(*this));
- return *this;
- }
- };
-
- struct item
- {
- int nKey;
- int nVal;
-
- item()
- {}
-
- item(int key, int val)
- : nKey( key )
- , nVal(val)
- {}
-
- item(const item& v )
- : nKey( v.nKey )
- , nVal( v.nVal )
- {}
-
- int key() const
- {
- return nKey;
- }
-
- int val() const
- {
- return nVal;
- }
- };
-
- template <typename Hook>
- struct base_item
- : public item
- , public Hook
- , public stat
-
- {
- base_item()
- {}
-
- base_item(int key, int val)
- : item( key, val )
- {}
-
- base_item(const base_item& v )
- : item( static_cast<item const&>(v) )
- , stat()
- {}
- };
-
- template <typename Hook>
- struct member_item
- : public item
- , public stat
- {
- Hook hMember;
-
- member_item()
- {}
-
- member_item(int key, int val)
- : item( key, val )
- {}
-
- member_item(const member_item& v )
- : item( static_cast<item const&>(v))
- , stat()
- {}
- };
-
- struct find_key {
- int nKey;
-
- find_key( int key )
- : nKey(key)
- {}
- };
-
- struct hash_int {
- size_t operator()( int i ) const
- {
- return co::v::hash<int>()( i );
- }
- template <typename Item>
- size_t operator()( const Item& i ) const
- {
- return (*this)( i.key() );
- }
- size_t operator()( find_key const& i) const
- {
- return co::v::hash<int>()( i.nKey );
- }
- };
-
- template <typename T>
- struct less
- {
- bool operator ()(const T& v1, const T& v2 ) const
- {
- return v1.key() < v2.key();
- }
-
- template <typename Q>
- bool operator ()(const T& v1, const Q& v2 ) const
- {
- return v1.key() < v2;
- }
-
- template <typename Q>
- bool operator ()(const Q& v1, const T& v2 ) const
- {
- return v1 < v2.key();
- }
- };
-
- template <typename T>
- struct cmp {
- int operator ()(const T& v1, const T& v2 ) const
- {
- if ( v1.key() < v2.key() )
- return -1;
- return v1.key() > v2.key() ? 1 : 0;
- }
-
- template <typename Q>
- int operator ()(const T& v1, const Q& v2 ) const
- {
- if ( v1.key() < v2 )
- return -1;
- return v1.key() > v2 ? 1 : 0;
- }
-
- template <typename Q>
- int operator ()(const Q& v1, const T& v2 ) const
- {
- if ( v1 < v2.key() )
- return -1;
- return v1 > v2.key() ? 1 : 0;
- }
- };
-
- struct faked_disposer
- {
- template <typename T>
- void operator ()( T * p )
- {
- ++p->nDisposeCount;
- }
- };
-
- struct insert_functor {
- template <typename Item>
- void operator()( Item& e)
- {
- ++e.nInsertCount;
- }
- };
-
- struct update_functor {
- template <typename Item>
- void operator()( bool bNew, Item& e, Item& arg )
- {
- if ( bNew ) {
- ++e.nEnsureNewCount;
- CPPUNIT_ASSERT_CURRENT( &e == &arg );
- }
- else
- ++e.nEnsureCount;
- }
- };
-
- struct erase_functor {
- template< typename Item >
- void operator()( Item& e )
- {
- ++e.nEraseCount;
- }
- };
-
- struct find_functor {
- template <typename Item, typename What>
- void operator()( Item& e, What& )
- {
- ++e.nFindCount;
- }
-
- template <typename Item>
- void operator()( Item& e, Item& w )
- {
- ++e.nFindCount;
- ++w.nFindArgCount;
- }
- };
-
- struct less2 {
- template <typename Item>
- bool operator()( Item const& e, find_key const& k ) const
- {
- return e.key() < k.nKey;
- }
- template <typename Item>
- bool operator()( find_key const& k, Item const& e ) const
- {
- return k.nKey < e.key();
- }
- template <typename Item>
- bool operator()( Item const& e, int k ) const
- {
- return e.key() < k;
- }
- template <typename Item>
- bool operator()( int k, Item const& e ) const
- {
- return k < e.key();
- }
- };
-
- struct equal_to2 {
- template <typename Item>
- bool operator()( Item const& e, find_key const& k ) const
- {
- return e.key() == k.nKey;
- }
- template <typename Item>
- bool operator()( find_key const& k, Item const& e ) const
- {
- return k.nKey == e.key();
- }
- template <typename Item>
- bool operator()( Item const& e, int k ) const
- {
- return e.key() == k;
- }
- template <typename Item>
- bool operator()( int k, Item const& e ) const
- {
- return k == e.key();
- }
- };
-
- template <typename T>
- struct auto_dispose {
- T * m_pArr;
- auto_dispose( T * pArr ): m_pArr( pArr ) {}
- ~auto_dispose() { delete[] m_pArr; }
- };
-
- template <class Set>
- void test_with(Set& s)
- {
- typedef typename Set::value_type value_type;
-
- int const k1 = 10;
- int const k2 = 25;
- int const k3 = 51;
-
- int const v1 = 25;
- int const v2 = 56;
- int const v3 = 23;
-
- value_type e1( k1, v1 );
- value_type e2( k2, v2 );
- value_type e3( k3, v3);
-
- stat s1 = e1;
- stat s2 = e2;
- stat s3 = e3;
-
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( s.size() == 0 );
-
- CPPUNIT_ASSERT( !s.contains(k1));
- CPPUNIT_ASSERT( !s.contains(k2, typename std::conditional<Set::c_isSorted, less2, equal_to2>::type() ));
- CPPUNIT_ASSERT( !s.contains(k3));
-
- CPPUNIT_ASSERT( s.insert(e1));
- CPPUNIT_ASSERT( s.contains(e1));
- CPPUNIT_ASSERT( s.contains(k1));
- CPPUNIT_ASSERT( s.contains(k1, typename std::conditional<Set::c_isSorted, less2, equal_to2>::type()));
- CPPUNIT_ASSERT( !s.contains(e2));
- CPPUNIT_ASSERT( !s.contains(e3));
-
- CPPUNIT_ASSERT( e2.nInsertCount == 0 );
- CPPUNIT_ASSERT( s.insert(e2, insert_functor() ));
- CPPUNIT_ASSERT( e2.nInsertCount == 1 );
- CPPUNIT_ASSERT( s.find(e1, find_functor() ));
- CPPUNIT_ASSERT( e1.nFindCount == 1 );
- CPPUNIT_ASSERT( e1.nFindArgCount == 1 );
- CPPUNIT_ASSERT( s.find(k1, find_functor() ));
- CPPUNIT_ASSERT( e1.nFindCount == 2 );
- CPPUNIT_ASSERT( e1.nFindArgCount == 1 );
- CPPUNIT_ASSERT( s.find_with(k2, typename std::conditional<Set::c_isSorted, less2, equal_to2>::type(), find_functor() ));
- CPPUNIT_ASSERT( e2.nFindCount == 1 );
- CPPUNIT_ASSERT( e2.nFindArgCount == 0 );
- CPPUNIT_ASSERT( s.find(e2, find_functor() ));
- CPPUNIT_ASSERT( e2.nFindCount == 2 );
- CPPUNIT_ASSERT( e2.nFindArgCount == 1 );
- CPPUNIT_ASSERT( !s.find(k3, find_functor()));
- CPPUNIT_ASSERT( e3.nFindCount == 0 );
- CPPUNIT_ASSERT( e3.nFindArgCount == 0 );
- CPPUNIT_ASSERT( !s.find(e3, find_functor()));
- CPPUNIT_ASSERT( e3.nFindCount == 0 );
- CPPUNIT_ASSERT( e3.nFindArgCount == 0 );
-
- s1 = e1 ; s2 = e2 ; s3 = e3;
-
- CPPUNIT_ASSERT( e3.nEnsureNewCount == 0 );
- CPPUNIT_ASSERT( e3.nEnsureCount == 0 );
- CPPUNIT_ASSERT(s.update(e3, update_functor(), false) == std::make_pair(false, false));
- CPPUNIT_ASSERT(e3.nEnsureNewCount == 0);
- CPPUNIT_ASSERT(e3.nEnsureCount == 0);
- CPPUNIT_ASSERT( s.update( e3, update_functor() ) == std::make_pair(true, true));
- CPPUNIT_ASSERT( e3.nEnsureNewCount == 1 );
- CPPUNIT_ASSERT( e3.nEnsureCount == 0 );
- CPPUNIT_ASSERT( s.find_with(find_key(k1), typename std::conditional<Set::c_isSorted, less2, equal_to2>::type(), find_functor() ));
- CPPUNIT_ASSERT( e1.nFindCount == s1.nFindCount + 1 );
- CPPUNIT_ASSERT( e1.nFindArgCount == s1.nFindArgCount );
- CPPUNIT_ASSERT( s.find_with(k1, typename std::conditional<Set::c_isSorted, less2, equal_to2>::type(), find_functor() ));
- CPPUNIT_ASSERT( e1.nFindCount == s1.nFindCount + 2 );
- CPPUNIT_ASSERT( e1.nFindArgCount == s1.nFindArgCount );
- CPPUNIT_ASSERT( s.find_with(k2, typename std::conditional<Set::c_isSorted, less2, equal_to2>::type(), find_functor() ));
- CPPUNIT_ASSERT( e2.nFindCount == s2.nFindCount + 1 );
- CPPUNIT_ASSERT( e2.nFindArgCount == s2.nFindArgCount );
- CPPUNIT_ASSERT( s.contains(find_key(k2), typename std::conditional<Set::c_isSorted, less2, equal_to2>::type() ));
- CPPUNIT_ASSERT( e2.nFindCount == s2.nFindCount + 1 ) ; // unchanged, no find_functor
- CPPUNIT_ASSERT( e2.nFindArgCount == s2.nFindArgCount );
- CPPUNIT_ASSERT( s.contains(k3, typename std::conditional<Set::c_isSorted, less2, equal_to2>::type() ));
- CPPUNIT_ASSERT( e3.nFindCount == s3.nFindCount ) ; // unchanged, no find_functor
- CPPUNIT_ASSERT( e3.nFindArgCount == s3.nFindArgCount );
- CPPUNIT_ASSERT( s.find_with(find_key(k3), typename std::conditional<Set::c_isSorted, less2, equal_to2>::type(), find_functor() ));
- CPPUNIT_ASSERT( e3.nFindCount == s3.nFindCount + 1 );
- CPPUNIT_ASSERT( e3.nFindArgCount == s3.nFindArgCount );
-
- s1 = e1 ; s2 = e2 ; s3 = e3;
-
- // insert existing elements
- {
- value_type eu( k2, 1000 );
- CPPUNIT_ASSERT( !s.insert( eu ));
- CPPUNIT_ASSERT( !s.insert( eu, insert_functor() ));
- CPPUNIT_ASSERT( e2.nInsertCount == s2.nInsertCount );
-
- CPPUNIT_ASSERT( s.update( eu, update_functor()) == std::make_pair(true, false));
- CPPUNIT_ASSERT( e2.nInsertCount == s2.nInsertCount );
- CPPUNIT_ASSERT( e2.nEnsureCount == s2.nEnsureCount + 1 );
- CPPUNIT_ASSERT( e2.nEnsureNewCount == s2.nEnsureNewCount );
- }
-
- s1 = e1 ; s2 = e2 ; s3 = e3;
-
- // unlink & erase test
- {
- value_type eu( k2, 10 );
- CPPUNIT_ASSERT( !s.unlink(eu));
- }
-
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( s.size() == 3 );
-
- CPPUNIT_ASSERT( s.unlink( e1 ) );
- CPPUNIT_ASSERT( s.erase_with( k2, typename std::conditional<Set::c_isSorted, less2, equal_to2>::type() ) == &e2 );
- CPPUNIT_ASSERT( s.erase( e2 ) == nullptr );
- CPPUNIT_ASSERT( e3.nEraseCount == 0 );
- CPPUNIT_ASSERT( s.erase_with( k3, typename std::conditional<Set::c_isSorted, less2, equal_to2>::type(), erase_functor()) == &e3 );
- CPPUNIT_ASSERT( e3.nEraseCount == 1 );
- CPPUNIT_ASSERT( s.erase( k3, erase_functor() ) == nullptr );
- CPPUNIT_ASSERT( e3.nEraseCount == 1 );
-
- CPPUNIT_ASSERT( s.insert( e3 ) );
- CPPUNIT_ASSERT( s.erase( e3 ) == &e3 );
- CPPUNIT_ASSERT( e3.nEraseCount == 1 );
-
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( s.size() == 0 );
-
- s1 = e1 ; s2 = e2 ; s3 = e3;
-
- // clear & clear_and_dispose test
- CPPUNIT_ASSERT( s.insert(e1));
- CPPUNIT_ASSERT( s.insert(e2));
- CPPUNIT_ASSERT( s.insert(e3));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( s.size() == 3 );
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( s.size() == 0 );
-
- CPPUNIT_ASSERT( s.insert(e1));
- CPPUNIT_ASSERT( s.insert(e2));
- CPPUNIT_ASSERT( s.insert(e3));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( s.size() == 3 );
-
- CPPUNIT_ASSERT( e1.nDisposeCount == 0 );
- CPPUNIT_ASSERT( e2.nDisposeCount == 0 );
- CPPUNIT_ASSERT( e3.nDisposeCount == 0 );
- s.clear_and_dispose( faked_disposer() );
- CPPUNIT_ASSERT( e1.nDisposeCount == 1 );
- CPPUNIT_ASSERT( e2.nDisposeCount == 1 );
- CPPUNIT_ASSERT( e3.nDisposeCount == 1 );
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( s.size() == 0 );
-
- // resize test (up to 64K elements)
- size_t const nSize = 64 * 1024;
- value_type * arr = new value_type[nSize];
- auto_dispose<value_type> ad(arr);
- for ( size_t i = 0; i < nSize; ++i ) {
- value_type * p = new (arr + i) value_type( (int) i, (int) i * 2 );
- CPPUNIT_ASSERT_EX( s.insert( *p, insert_functor() ), "i=" << i );
- CPPUNIT_ASSERT_EX( p->nInsertCount == 1, "i=" << i );
- //for ( size_t j = 0; j <= i; ++j ) {
- // if ( !s.contains((int) j) ) {
- // CPPUNIT_MSG( "Key " << j << " is not found after inserting key " << i );
- // }
- //}
- }
-
- for ( size_t i = 0; i < nSize; ++i )
- CPPUNIT_ASSERT_EX( s.contains((int) i), "Key " << i << " is not found" );
-
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( s.size() == nSize );
- s.clear_and_dispose( faked_disposer() );
- for ( size_t i = 0; i < nSize; ++i ) {
- CPPUNIT_ASSERT_EX( arr[i].nDisposeCount == 1, "i=" << i );
- }
- }
-
- template <class Set>
- void test()
- {
- // default ctor
- {
- Set s;
- test_with(s);
- }
-
- // ctor with explicit initial capacity
- {
- Set s(256);
- test_with(s);
- }
- }
-
- template <class Set>
- void test_cuckoo()
- {
- unsigned int nProbesetSize = Set::node_type::probeset_size ? Set::node_type::probeset_size : 4;
- Set s( 256, nProbesetSize, nProbesetSize / 2 );
- test_with( s );
- }
-
- // ***********************************************************
- // Cuckoo hashing (striped)
-
- void Cuckoo_striped_list_basehook_equal();
- void Cuckoo_striped_vector_basehook_equal();
- void Cuckoo_striped_list_basehook_sort_cmp();
- void Cuckoo_striped_vector_basehook_sort_cmp();
- void Cuckoo_striped_list_basehook_sort_less();
- void Cuckoo_striped_vector_basehook_sort_less();
- void Cuckoo_striped_list_basehook_sort_cmpmix();
- void Cuckoo_striped_vector_basehook_sort_cmpmix();
- void Cuckoo_striped_vector_basehook_sort_cmpmix_stat();
-
- void Cuckoo_striped_list_basehook_equal_storehash();
- void Cuckoo_striped_vector_basehook_equal_storehash();
- void Cuckoo_striped_list_basehook_sort_cmp_storehash();
- void Cuckoo_striped_vector_basehook_sort_cmp_storehash();
- void Cuckoo_striped_list_basehook_sort_less_storehash();
- void Cuckoo_striped_vector_basehook_sort_less_storehash();
- void Cuckoo_striped_list_basehook_sort_cmpmix_storehash();
- void Cuckoo_striped_vector_basehook_sort_cmpmix_storehash();
-
- void Cuckoo_striped_list_memberhook_equal();
- void Cuckoo_striped_vector_memberhook_equal();
- void Cuckoo_striped_list_memberhook_sort_cmp();
- void Cuckoo_striped_vector_memberhook_sort_cmp();
- void Cuckoo_striped_list_memberhook_sort_less();
- void Cuckoo_striped_vector_memberhook_sort_less();
- void Cuckoo_striped_list_memberhook_sort_cmpmix();
- void Cuckoo_striped_vector_memberhook_sort_cmpmix();
-
- void Cuckoo_striped_list_memberhook_equal_storehash();
- void Cuckoo_striped_vector_memberhook_equal_storehash();
- void Cuckoo_striped_list_memberhook_sort_cmp_storehash();
- void Cuckoo_striped_vector_memberhook_sort_cmp_storehash();
- void Cuckoo_striped_list_memberhook_sort_less_storehash();
- void Cuckoo_striped_vector_memberhook_sort_less_storehash();
- void Cuckoo_striped_list_memberhook_sort_cmpmix_storehash();
- void Cuckoo_striped_vector_memberhook_sort_cmpmix_storehash();
-
- // ***********************************************************
- // Cuckoo hashing (refinable)
-
- void Cuckoo_refinable_list_basehook_equal();
- void Cuckoo_refinable_vector_basehook_equal();
- void Cuckoo_refinable_list_basehook_sort_cmp();
- void Cuckoo_refinable_vector_basehook_sort_cmp();
- void Cuckoo_refinable_list_basehook_sort_less();
- void Cuckoo_refinable_vector_basehook_sort_less();
- void Cuckoo_refinable_list_basehook_sort_cmpmix();
- void Cuckoo_refinable_vector_basehook_sort_cmpmix();
- void Cuckoo_refinable_vector_basehook_sort_cmpmix_stat();
-
- void Cuckoo_refinable_list_basehook_equal_storehash();
- void Cuckoo_refinable_vector_basehook_equal_storehash();
- void Cuckoo_refinable_list_basehook_sort_cmp_storehash();
- void Cuckoo_refinable_vector_basehook_sort_cmp_storehash();
- void Cuckoo_refinable_list_basehook_sort_less_storehash();
- void Cuckoo_refinable_vector_basehook_sort_less_storehash();
- void Cuckoo_refinable_list_basehook_sort_cmpmix_storehash();
- void Cuckoo_refinable_vector_basehook_sort_cmpmix_storehash();
-
- void Cuckoo_refinable_list_memberhook_equal();
- void Cuckoo_refinable_vector_memberhook_equal();
- void Cuckoo_refinable_list_memberhook_sort_cmp();
- void Cuckoo_refinable_vector_memberhook_sort_cmp();
- void Cuckoo_refinable_list_memberhook_sort_less();
- void Cuckoo_refinable_vector_memberhook_sort_less();
- void Cuckoo_refinable_list_memberhook_sort_cmpmix();
- void Cuckoo_refinable_vector_memberhook_sort_cmpmix();
-
- void Cuckoo_refinable_list_memberhook_equal_storehash();
- void Cuckoo_refinable_vector_memberhook_equal_storehash();
- void Cuckoo_refinable_list_memberhook_sort_cmp_storehash();
- void Cuckoo_refinable_vector_memberhook_sort_cmp_storehash();
- void Cuckoo_refinable_list_memberhook_sort_less_storehash();
- void Cuckoo_refinable_vector_memberhook_sort_less_storehash();
- void Cuckoo_refinable_list_memberhook_sort_cmpmix_storehash();
- void Cuckoo_refinable_vector_memberhook_sort_cmpmix_storehash();
-
- CPPUNIT_TEST_SUITE(IntrusiveCuckooSetHdrTest)
- // ***********************************************************
- // Cuckoo hashing (striped)
-
- CPPUNIT_TEST( Cuckoo_striped_list_basehook_equal)
- CPPUNIT_TEST( Cuckoo_striped_vector_basehook_equal)
- CPPUNIT_TEST( Cuckoo_striped_list_basehook_sort_cmp)
- CPPUNIT_TEST( Cuckoo_striped_vector_basehook_sort_cmp)
- CPPUNIT_TEST( Cuckoo_striped_list_basehook_sort_less)
- CPPUNIT_TEST( Cuckoo_striped_vector_basehook_sort_less)
- CPPUNIT_TEST( Cuckoo_striped_list_basehook_sort_cmpmix)
- CPPUNIT_TEST( Cuckoo_striped_vector_basehook_sort_cmpmix)
- CPPUNIT_TEST( Cuckoo_striped_vector_basehook_sort_cmpmix_stat)
-
- CPPUNIT_TEST( Cuckoo_striped_list_basehook_equal_storehash)
- CPPUNIT_TEST( Cuckoo_striped_vector_basehook_equal_storehash)
- CPPUNIT_TEST( Cuckoo_striped_list_basehook_sort_cmp_storehash)
- CPPUNIT_TEST( Cuckoo_striped_vector_basehook_sort_cmp_storehash)
- CPPUNIT_TEST( Cuckoo_striped_list_basehook_sort_less_storehash)
- CPPUNIT_TEST( Cuckoo_striped_vector_basehook_sort_less_storehash)
- CPPUNIT_TEST( Cuckoo_striped_list_basehook_sort_cmpmix_storehash)
- CPPUNIT_TEST( Cuckoo_striped_vector_basehook_sort_cmpmix_storehash)
-
- CPPUNIT_TEST( Cuckoo_striped_list_memberhook_equal)
- CPPUNIT_TEST( Cuckoo_striped_vector_memberhook_equal)
- CPPUNIT_TEST( Cuckoo_striped_list_memberhook_sort_cmp)
- CPPUNIT_TEST( Cuckoo_striped_vector_memberhook_sort_cmp)
- CPPUNIT_TEST( Cuckoo_striped_list_memberhook_sort_less)
- CPPUNIT_TEST( Cuckoo_striped_vector_memberhook_sort_less)
- CPPUNIT_TEST( Cuckoo_striped_list_memberhook_sort_cmpmix)
- CPPUNIT_TEST( Cuckoo_striped_vector_memberhook_sort_cmpmix)
-
- CPPUNIT_TEST( Cuckoo_striped_list_memberhook_equal_storehash)
- CPPUNIT_TEST( Cuckoo_striped_vector_memberhook_equal_storehash)
- CPPUNIT_TEST( Cuckoo_striped_list_memberhook_sort_cmp_storehash)
- CPPUNIT_TEST( Cuckoo_striped_vector_memberhook_sort_cmp_storehash)
- CPPUNIT_TEST( Cuckoo_striped_list_memberhook_sort_less_storehash)
- CPPUNIT_TEST( Cuckoo_striped_vector_memberhook_sort_less_storehash)
- CPPUNIT_TEST( Cuckoo_striped_list_memberhook_sort_cmpmix_storehash)
- CPPUNIT_TEST( Cuckoo_striped_vector_memberhook_sort_cmpmix_storehash)
-
- // ***********************************************************
- // Cuckoo hashing (refinable)
-
- CPPUNIT_TEST( Cuckoo_refinable_list_basehook_equal)
- CPPUNIT_TEST( Cuckoo_refinable_vector_basehook_equal)
- CPPUNIT_TEST( Cuckoo_refinable_list_basehook_sort_cmp)
- CPPUNIT_TEST( Cuckoo_refinable_vector_basehook_sort_cmp)
- CPPUNIT_TEST( Cuckoo_refinable_list_basehook_sort_less)
- CPPUNIT_TEST( Cuckoo_refinable_vector_basehook_sort_less)
- CPPUNIT_TEST( Cuckoo_refinable_list_basehook_sort_cmpmix)
- CPPUNIT_TEST( Cuckoo_refinable_vector_basehook_sort_cmpmix)
- CPPUNIT_TEST( Cuckoo_refinable_vector_basehook_sort_cmpmix_stat)
-
- CPPUNIT_TEST( Cuckoo_refinable_list_basehook_equal_storehash)
- CPPUNIT_TEST( Cuckoo_refinable_vector_basehook_equal_storehash)
- CPPUNIT_TEST( Cuckoo_refinable_list_basehook_sort_cmp_storehash)
- CPPUNIT_TEST( Cuckoo_refinable_vector_basehook_sort_cmp_storehash)
- CPPUNIT_TEST( Cuckoo_refinable_list_basehook_sort_less_storehash)
- CPPUNIT_TEST( Cuckoo_refinable_vector_basehook_sort_less_storehash)
- CPPUNIT_TEST( Cuckoo_refinable_list_basehook_sort_cmpmix_storehash)
- CPPUNIT_TEST( Cuckoo_refinable_vector_basehook_sort_cmpmix_storehash)
-
- CPPUNIT_TEST( Cuckoo_refinable_list_memberhook_equal)
- CPPUNIT_TEST( Cuckoo_refinable_vector_memberhook_equal)
- CPPUNIT_TEST( Cuckoo_refinable_list_memberhook_sort_cmp)
- CPPUNIT_TEST( Cuckoo_refinable_vector_memberhook_sort_cmp)
- CPPUNIT_TEST( Cuckoo_refinable_list_memberhook_sort_less)
- CPPUNIT_TEST( Cuckoo_refinable_vector_memberhook_sort_less)
- CPPUNIT_TEST( Cuckoo_refinable_list_memberhook_sort_cmpmix)
- CPPUNIT_TEST( Cuckoo_refinable_vector_memberhook_sort_cmpmix)
-
- CPPUNIT_TEST( Cuckoo_refinable_list_memberhook_equal_storehash)
- CPPUNIT_TEST( Cuckoo_refinable_vector_memberhook_equal_storehash)
- CPPUNIT_TEST( Cuckoo_refinable_list_memberhook_sort_cmp_storehash)
- CPPUNIT_TEST( Cuckoo_refinable_vector_memberhook_sort_cmp_storehash)
- CPPUNIT_TEST( Cuckoo_refinable_list_memberhook_sort_less_storehash)
- CPPUNIT_TEST( Cuckoo_refinable_vector_memberhook_sort_less_storehash)
- CPPUNIT_TEST( Cuckoo_refinable_list_memberhook_sort_cmpmix_storehash)
- CPPUNIT_TEST( Cuckoo_refinable_vector_memberhook_sort_cmpmix_storehash)
-
- CPPUNIT_TEST_SUITE_END()
- };
-} // namespace set
-
-#endif // #ifndef CDSTEST_HDR_INTRUSIVE_CUCKOO_SET_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 CDSTEST_HDR_INTRUSIVE_FELDMAN_HASHSET_H
-#define CDSTEST_HDR_INTRUSIVE_FELDMAN_HASHSET_H
-
-#include "cppunit/cppunit_proxy.h"
-
-// forward declaration
-namespace cds {
- namespace intrusive {}
- namespace opt {}
-}
-
-namespace set {
- namespace ci = cds::intrusive;
- namespace co = cds::opt;
-
- class IntrusiveFeldmanHashSetHdrTest: public CppUnitMini::TestCase
- {
- template <typename Hash>
- struct Item
- {
- unsigned int nDisposeCount ; // count of disposer calling
- Hash hash;
- unsigned int nInsertCall;
- unsigned int nFindCall;
- unsigned int nEraseCall;
- mutable unsigned int nIteratorCall;
-
- Item()
- : nDisposeCount(0)
- , nInsertCall(0)
- , nFindCall(0)
- , nEraseCall(0)
- , nIteratorCall(0)
- {}
- };
-
- template <typename Hash>
- struct get_hash
- {
- Hash const& operator()( Item<Hash> const& i ) const
- {
- return i.hash;
- }
- };
-
- template <typename Key>
- struct get_key
- {
- Key const& operator()(Item<Key> const& i) const
- {
- return i.hash;
- }
- };
-
- struct item_disposer {
- template <typename Hash>
- void operator()( Item<Hash> * p )
- {
- ++p->nDisposeCount;
- }
- };
-
- template <typename Key>
- struct nohash {
- Key operator()(Key k) const
- {
- return k;
- }
- };
-
- struct hash128
- {
- size_t lo;
- size_t hi;
-
- hash128() {}
- hash128(size_t l, size_t h) : lo(l), hi(h) {}
-
- struct make {
- hash128 operator()( size_t n ) const
- {
- return hash128( std::hash<size_t>()( n ), std::hash<size_t>()( ~n ));
- }
- hash128 operator()( hash128 const& n ) const
- {
- return hash128( std::hash<size_t>()( n.lo ), std::hash<size_t>()( ~n.hi ));
- }
- };
-
- struct less {
- bool operator()( hash128 const& lhs, hash128 const& rhs ) const
- {
- if ( lhs.hi != rhs.hi )
- return lhs.hi < rhs.hi;
- return lhs.lo < rhs.lo;
- }
- };
-
- struct cmp {
- int operator()( hash128 const& lhs, hash128 const& rhs ) const
- {
- if ( lhs.hi != rhs.hi )
- return lhs.hi < rhs.hi ? -1 : 1;
- return lhs.lo < rhs.lo ? -1 : lhs.lo == rhs.lo ? 0 : 1;
- }
- };
- };
-
-
- template <typename Set, typename Hash>
- void test_hp( size_t nHeadBits, size_t nArrayBits )
- {
- typedef typename Set::hash_type hash_type;
- typedef typename Set::value_type value_type;
-
- Hash hasher;
-
- size_t const arrCapacity = 1000;
- std::vector< value_type > arrValue;
- arrValue.reserve( arrCapacity );
- for ( size_t i = 0; i < arrCapacity; ++i ) {
- arrValue.emplace_back( value_type() );
- arrValue.back().hash = hasher( i );
- }
- CPPUNIT_ASSERT( arrValue.size() == arrCapacity );
-
- Set s( nHeadBits, nArrayBits );
- CPPUNIT_MSG("Array size: head=" << s.head_size() << ", array_node=" << s.array_node_size());
- CPPUNIT_ASSERT(s.head_size() >= (size_t(1) << nHeadBits));
- CPPUNIT_ASSERT(s.array_node_size() == (size_t(1) << nArrayBits));
-
- // insert() test
- CPPUNIT_ASSERT(s.size() == 0 );
- CPPUNIT_ASSERT(s.empty() );
- for ( auto& el : arrValue ) {
- CPPUNIT_ASSERT( s.insert( el ));
- CPPUNIT_ASSERT(s.contains( el.hash ));
- }
- CPPUNIT_ASSERT(s.size() == arrCapacity );
- for ( auto& el : arrValue ) {
- CPPUNIT_ASSERT(s.contains( el.hash ));
- CPPUNIT_ASSERT( !s.insert( el ) );
- }
- CPPUNIT_ASSERT(s.size() == arrCapacity );
- CPPUNIT_ASSERT( !s.empty() );
-
- // Iterator test
- {
- typedef typename Set::iterator iterator;
- for ( iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it )
- ++(it->nIteratorCall);
- for ( auto& el : arrValue ) {
- CPPUNIT_ASSERT( el.nIteratorCall == 1 );
- el.nIteratorCall = 0;
- }
- }
-
- {
- // Const iterator test
- for ( typename Set::const_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it )
- (*it).nIteratorCall += 1;
- for ( auto& el : arrValue ) {
- CPPUNIT_ASSERT( el.nIteratorCall == 1 );
- el.nIteratorCall = 0;
- }
- }
-
- {
- // Reverse iterator test
- for ( typename Set::reverse_iterator it = s.rbegin(), itEnd = s.rend(); it != itEnd; ++it )
- it->nIteratorCall += 1;
- for ( auto& el : arrValue ) {
- CPPUNIT_ASSERT( el.nIteratorCall == 1 );
- el.nIteratorCall = 0;
- }
- }
-
- {
- // Reverse const iterator test
- for ( typename Set::const_reverse_iterator it = s.crbegin(), itEnd = s.crend(); it != itEnd; ++it ) {
- (*it).nIteratorCall += 1;
- it.release();
- }
- for ( auto& el : arrValue ) {
- CPPUNIT_ASSERT( el.nIteratorCall == 1 );
- el.nIteratorCall = 0;
- }
- }
-
- // update() exists test
- for ( auto& el : arrValue ) {
- bool bOp, bInsert;
- std::tie(bOp, bInsert) = s.update( el, false );
- CPPUNIT_ASSERT( bOp );
- CPPUNIT_ASSERT( !bInsert );
- CPPUNIT_ASSERT( el.nFindCall == 0 );
- CPPUNIT_ASSERT(s.find(el.hash, [](value_type& v) { v.nFindCall++; } ));
- CPPUNIT_ASSERT( el.nFindCall == 1 );
- }
-
- // unlink test
- CPPUNIT_ASSERT(s.size() == arrCapacity );
- for ( auto const& el : arrValue ) {
- CPPUNIT_ASSERT(s.unlink( el ));
- CPPUNIT_ASSERT(!s.contains( el.hash ));
- }
- CPPUNIT_ASSERT(s.size() == 0 );
- Set::gc::force_dispose();
- for ( auto const& el : arrValue ) {
- CPPUNIT_ASSERT( el.nDisposeCount == 1 );
- }
-
- // new hash values
- for ( auto& el : arrValue )
- el.hash = hasher( el.hash );
-
- // insert( func )
- CPPUNIT_ASSERT(s.size() == 0 );
- for ( auto& el : arrValue ) {
- CPPUNIT_ASSERT( s.insert( el, []( value_type& v ) { ++v.nInsertCall; } ));
- CPPUNIT_ASSERT(s.contains( el.hash ));
- CPPUNIT_ASSERT( el.nInsertCall == 1 );
- }
- CPPUNIT_ASSERT(s.size() == arrCapacity );
- for ( auto& el : arrValue ) {
- CPPUNIT_ASSERT(s.contains( el.hash ));
- CPPUNIT_ASSERT( !s.insert( el ) );
- }
- CPPUNIT_ASSERT(s.size() == arrCapacity );
- CPPUNIT_ASSERT( !s.empty() );
-
- for ( auto& el : arrValue )
- el.nDisposeCount = 0;
-
- s.clear();
- CPPUNIT_ASSERT(s.size() == 0 );
- Set::gc::force_dispose();
- for ( auto const& el : arrValue ) {
- CPPUNIT_ASSERT( el.nDisposeCount == 1 );
- }
-
- // new hash values
- for ( auto& el : arrValue )
- el.hash = hasher( el.hash );
-
- // update test
- for ( auto& el : arrValue ) {
- bool bOp, bInsert;
- std::tie(bOp, bInsert) = s.update( el, false );
- CPPUNIT_ASSERT( !bOp );
- CPPUNIT_ASSERT( !bInsert );
- CPPUNIT_ASSERT( !s.contains( el.hash ));
-
- std::tie(bOp, bInsert) = s.update( el, true );
- CPPUNIT_ASSERT( bOp );
- CPPUNIT_ASSERT( bInsert );
- CPPUNIT_ASSERT( s.contains( el.hash ));
- }
- CPPUNIT_ASSERT(s.size() == arrCapacity );
-
- // erase test
- for ( auto& el : arrValue ) {
- el.nDisposeCount = 0;
- CPPUNIT_ASSERT( s.contains( el.hash ));
- CPPUNIT_ASSERT(s.erase( el.hash ));
- CPPUNIT_ASSERT( !s.contains( el.hash ));
- CPPUNIT_ASSERT( !s.erase( el.hash ));
- }
- CPPUNIT_ASSERT(s.size() == 0 );
- Set::gc::force_dispose();
- for ( auto& el : arrValue ) {
- CPPUNIT_ASSERT( el.nDisposeCount == 1 );
- CPPUNIT_ASSERT(s.insert( el ));
- }
-
- // erase with functor, get() test
- for ( auto& el : arrValue ) {
- el.nDisposeCount = 0;
- CPPUNIT_ASSERT( s.contains( el.hash ) );
- {
- typename Set::guarded_ptr gp{ s.get( el.hash ) };
- CPPUNIT_ASSERT( gp );
- CPPUNIT_ASSERT( gp->nEraseCall == 0);
- CPPUNIT_ASSERT(s.erase( gp->hash, []( value_type& i ) { ++i.nEraseCall; } ));
- CPPUNIT_ASSERT( gp->nEraseCall == 1);
- Set::gc::force_dispose();
- CPPUNIT_ASSERT( gp->nDisposeCount == 0 );
- }
- CPPUNIT_ASSERT( !s.contains( el.hash ));
- CPPUNIT_ASSERT( !s.erase( el.hash ));
- CPPUNIT_ASSERT( el.nEraseCall == 1 );
- Set::gc::force_dispose();
- CPPUNIT_ASSERT( el.nDisposeCount == 1 );
- }
- CPPUNIT_ASSERT(s.size() == 0 );
-
- // new hash values
- for ( auto& el : arrValue ) {
- el.hash = hasher( el.hash );
- el.nDisposeCount = 0;
- bool bOp, bInsert;
- std::tie(bOp, bInsert) = s.update( el );
- CPPUNIT_ASSERT( bOp );
- CPPUNIT_ASSERT( bInsert );
- }
- CPPUNIT_ASSERT(s.size() == arrCapacity );
-
- // extract test
- for ( auto& el : arrValue ) {
- CPPUNIT_ASSERT( s.contains( el.hash ) );
- typename Set::guarded_ptr gp = s.extract( el.hash );
- CPPUNIT_ASSERT( gp );
- Set::gc::force_dispose();
- CPPUNIT_ASSERT( el.nDisposeCount == 0 );
- CPPUNIT_ASSERT( gp->nDisposeCount == 0 );
- gp = s.get( el.hash );
- CPPUNIT_ASSERT( !gp );
- Set::gc::force_dispose();
- CPPUNIT_ASSERT( el.nDisposeCount == 1 );
- CPPUNIT_ASSERT( !s.contains( el.hash ) );
- }
- CPPUNIT_ASSERT(s.size() == 0 );
- CPPUNIT_ASSERT(s.empty() );
-
- // erase with iterator
- for ( auto& el : arrValue ) {
- el.nDisposeCount = 0;
- el.nIteratorCall = 0;
- CPPUNIT_ASSERT(s.insert( el ));
- }
- for ( auto it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- s.erase_at( it );
- it->nIteratorCall = 1;
- }
- CPPUNIT_ASSERT(s.size() == 0 );
- Set::gc::force_dispose();
- for ( auto& el : arrValue ) {
- CPPUNIT_ASSERT( el.nDisposeCount == 1 );
- CPPUNIT_ASSERT( el.nIteratorCall == 1 );
- }
- CPPUNIT_ASSERT(s.empty() );
-
- // erase with reverse_iterator
- for ( auto& el : arrValue ) {
- el.nDisposeCount = 0;
- el.nIteratorCall = 0;
- CPPUNIT_ASSERT(s.insert( el ));
- }
- for ( auto it = s.rbegin(), itEnd = s.rend(); it != itEnd; ++it ) {
- s.erase_at( it );
- it->nIteratorCall = 1;
- }
- CPPUNIT_ASSERT(s.size() == 0 );
- Set::gc::force_dispose();
- for ( auto& el : arrValue ) {
- CPPUNIT_ASSERT( el.nDisposeCount == 1 );
- CPPUNIT_ASSERT( el.nIteratorCall == 1 );
- }
- CPPUNIT_ASSERT(s.empty() );
-
- CPPUNIT_MSG( s.statistics() );
- }
-
- template <typename Set, typename Hash>
- void test_rcu(size_t nHeadBits, size_t nArrayBits)
- {
- typedef typename Set::hash_type hash_type;
- typedef typename Set::value_type value_type;
- typedef typename Set::rcu_lock rcu_lock;
-
- Hash hasher;
-
- size_t const arrCapacity = 1000;
- std::vector< value_type > arrValue;
- arrValue.reserve(arrCapacity);
- for (size_t i = 0; i < arrCapacity; ++i) {
- arrValue.emplace_back(value_type());
- arrValue.back().hash = hasher(i);
- }
- CPPUNIT_ASSERT(arrValue.size() == arrCapacity);
-
- Set s(nHeadBits, nArrayBits);
- CPPUNIT_MSG("Array size: head=" << s.head_size() << ", array_node=" << s.array_node_size());
- CPPUNIT_ASSERT(s.head_size() >= (size_t(1) << nHeadBits));
- CPPUNIT_ASSERT(s.array_node_size() == (size_t(1) << nArrayBits));
-
- // insert() test
- CPPUNIT_ASSERT(s.size() == 0);
- CPPUNIT_ASSERT(s.empty());
- for (auto& el : arrValue) {
- CPPUNIT_ASSERT(s.insert(el));
- CPPUNIT_ASSERT(s.contains(el.hash));
- }
- CPPUNIT_ASSERT(s.size() == arrCapacity);
- for (auto& el : arrValue) {
- CPPUNIT_ASSERT(s.contains(el.hash));
- CPPUNIT_ASSERT(!s.insert(el));
- }
- CPPUNIT_ASSERT(s.size() == arrCapacity);
- CPPUNIT_ASSERT(!s.empty());
-
- // Iterator test
- {
- rcu_lock l;
-
- typedef typename Set::iterator iterator;
- for (iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it)
- ++(it->nIteratorCall);
- for (auto& el : arrValue) {
- CPPUNIT_ASSERT(el.nIteratorCall == 1);
- el.nIteratorCall = 0;
- }
- }
-
- {
- // Const iterator test
- rcu_lock l;
-
- for (typename Set::const_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it)
- (*it).nIteratorCall += 1;
- for (auto& el : arrValue) {
- CPPUNIT_ASSERT(el.nIteratorCall == 1);
- el.nIteratorCall = 0;
- }
- }
-
- {
- // Reverse iterator test
- rcu_lock l;
-
- for (typename Set::reverse_iterator it = s.rbegin(), itEnd = s.rend(); it != itEnd; ++it)
- it->nIteratorCall += 1;
- for (auto& el : arrValue) {
- CPPUNIT_ASSERT(el.nIteratorCall == 1);
- el.nIteratorCall = 0;
- }
- }
-
- {
- // Reverse const iterator test
- rcu_lock l;
-
- for (typename Set::const_reverse_iterator it = s.crbegin(), itEnd = s.crend(); it != itEnd; ++it) {
- (*it).nIteratorCall += 1;
- }
- for (auto& el : arrValue) {
- CPPUNIT_ASSERT(el.nIteratorCall == 1);
- el.nIteratorCall = 0;
- }
- }
-
- // update() exists test
- for (auto& el : arrValue) {
- bool bOp, bInsert;
- std::tie(bOp, bInsert) = s.update(el, false);
- CPPUNIT_ASSERT(bOp);
- CPPUNIT_ASSERT(!bInsert);
- CPPUNIT_ASSERT(el.nFindCall == 0);
- CPPUNIT_ASSERT(s.find(el.hash, [](value_type& v) { v.nFindCall++; }));
- CPPUNIT_ASSERT(el.nFindCall == 1);
- }
-
- // unlink test
- CPPUNIT_ASSERT(s.size() == arrCapacity);
- for (auto const& el : arrValue) {
- CPPUNIT_ASSERT(s.unlink(el));
- CPPUNIT_ASSERT(!s.contains(el.hash));
- }
- CPPUNIT_ASSERT(s.size() == 0);
- Set::gc::force_dispose();
- for (auto const& el : arrValue) {
- CPPUNIT_ASSERT(el.nDisposeCount == 1);
- }
-
- // new hash values
- for (auto& el : arrValue)
- el.hash = hasher(el.hash);
-
- // insert( func )
- CPPUNIT_ASSERT(s.size() == 0);
- for (auto& el : arrValue) {
- CPPUNIT_ASSERT(s.insert(el, [](value_type& v) { ++v.nInsertCall; }));
- CPPUNIT_ASSERT(s.contains(el.hash));
- CPPUNIT_ASSERT(el.nInsertCall == 1);
- }
- CPPUNIT_ASSERT(s.size() == arrCapacity);
- for (auto& el : arrValue) {
- CPPUNIT_ASSERT(s.contains(el.hash));
- CPPUNIT_ASSERT(!s.insert(el));
- }
- CPPUNIT_ASSERT(s.size() == arrCapacity);
- CPPUNIT_ASSERT(!s.empty());
-
- for (auto& el : arrValue)
- el.nDisposeCount = 0;
-
- s.clear();
- CPPUNIT_ASSERT(s.size() == 0);
- Set::gc::force_dispose();
- for (auto const& el : arrValue) {
- CPPUNIT_ASSERT(el.nDisposeCount == 1);
- }
-
- // new hash values
- for (auto& el : arrValue)
- el.hash = hasher(el.hash);
-
- // update test
- for (auto& el : arrValue) {
- bool bOp, bInsert;
- std::tie(bOp, bInsert) = s.update(el, false);
- CPPUNIT_ASSERT(!bOp);
- CPPUNIT_ASSERT(!bInsert);
- CPPUNIT_ASSERT(!s.contains(el.hash));
-
- std::tie(bOp, bInsert) = s.update(el, true);
- CPPUNIT_ASSERT(bOp);
- CPPUNIT_ASSERT(bInsert);
- CPPUNIT_ASSERT(s.contains(el.hash));
- }
- CPPUNIT_ASSERT(s.size() == arrCapacity);
-
- // erase test
- for (auto& el : arrValue) {
- el.nDisposeCount = 0;
- CPPUNIT_ASSERT(s.contains(el.hash));
- CPPUNIT_ASSERT(s.erase(el.hash));
- CPPUNIT_ASSERT(!s.contains(el.hash));
- CPPUNIT_ASSERT(!s.erase(el.hash));
- }
- CPPUNIT_ASSERT(s.size() == 0);
- Set::gc::force_dispose();
- for (auto& el : arrValue) {
- CPPUNIT_ASSERT(el.nDisposeCount == 1);
- CPPUNIT_ASSERT(s.insert(el));
- }
-
- // erase with functor, get() test
- for (auto& el : arrValue) {
- el.nDisposeCount = 0;
- CPPUNIT_ASSERT(s.contains(el.hash));
- value_type * p;
- {
- rcu_lock l;
- p = s.get(el.hash);
- CPPUNIT_ASSERT(p);
- CPPUNIT_ASSERT(p->nEraseCall == 0);
- }
- // This is single-threaded test with faked disposer
- // so we can dereference p outside RCU lock section
- CPPUNIT_ASSERT(s.erase(p->hash, [](value_type& i) { ++i.nEraseCall; }));
- CPPUNIT_ASSERT(p->nEraseCall == 1);
- Set::gc::force_dispose();
- CPPUNIT_ASSERT(p->nDisposeCount == 1);
-
- CPPUNIT_ASSERT(!s.contains(el.hash));
- CPPUNIT_ASSERT(!s.erase(el.hash));
- CPPUNIT_ASSERT(el.nEraseCall == 1);
- Set::gc::force_dispose();
- CPPUNIT_ASSERT(el.nDisposeCount == 1);
- }
- CPPUNIT_ASSERT(s.size() == 0);
-
- // new hash values
- for (auto& el : arrValue) {
- el.hash = hasher(el.hash);
- el.nDisposeCount = 0;
- bool bOp, bInsert;
- std::tie(bOp, bInsert) = s.update(el);
- CPPUNIT_ASSERT(bOp);
- CPPUNIT_ASSERT(bInsert);
- }
- CPPUNIT_ASSERT(s.size() == arrCapacity);
-
- // extract test
- for (auto& el : arrValue) {
- CPPUNIT_ASSERT(s.contains(el.hash));
- typename Set::exempt_ptr xp = s.extract(el.hash);
- CPPUNIT_ASSERT(xp);
- Set::gc::force_dispose();
- CPPUNIT_ASSERT(el.nDisposeCount == 0);
- CPPUNIT_ASSERT(xp->nDisposeCount == 0);
- xp.release();
- {
- rcu_lock l;
- value_type * p = s.get(el.hash);
- CPPUNIT_ASSERT(!p);
- }
- Set::gc::force_dispose();
- CPPUNIT_ASSERT(el.nDisposeCount == 1);
- CPPUNIT_ASSERT(!s.contains(el.hash));
- }
- CPPUNIT_ASSERT(s.size() == 0);
- CPPUNIT_ASSERT(s.empty());
-
- CPPUNIT_MSG(s.statistics());
- }
-
- void hp_nohash();
- void hp_nohash_stat();
- void hp_nohash_5_3();
- void hp_nohash_5_3_stat();
- void hp_stdhash();
- void hp_stdhash_stat();
- void hp_stdhash_5_3();
- void hp_stdhash_5_3_stat();
- void hp_hash128();
- void hp_hash128_stat();
- void hp_hash128_4_3();
- void hp_hash128_4_3_stat();
-
- void dhp_nohash();
- void dhp_nohash_stat();
- void dhp_nohash_5_3();
- void dhp_nohash_5_3_stat();
- void dhp_stdhash();
- void dhp_stdhash_stat();
- void dhp_stdhash_5_3();
- void dhp_stdhash_5_3_stat();
- void dhp_hash128();
- void dhp_hash128_stat();
- void dhp_hash128_4_3();
- void dhp_hash128_4_3_stat();
-
- void rcu_gpi_nohash();
- void rcu_gpi_nohash_stat();
- void rcu_gpi_nohash_5_3();
- void rcu_gpi_nohash_5_3_stat();
- void rcu_gpi_stdhash();
- void rcu_gpi_stdhash_stat();
- void rcu_gpi_stdhash_5_3();
- void rcu_gpi_stdhash_5_3_stat();
- void rcu_gpi_hash128();
- void rcu_gpi_hash128_stat();
- void rcu_gpi_hash128_4_3();
- void rcu_gpi_hash128_4_3_stat();
-
- void rcu_gpb_nohash();
- void rcu_gpb_nohash_stat();
- void rcu_gpb_nohash_5_3();
- void rcu_gpb_nohash_5_3_stat();
- void rcu_gpb_stdhash();
- void rcu_gpb_stdhash_stat();
- void rcu_gpb_stdhash_5_3();
- void rcu_gpb_stdhash_5_3_stat();
- void rcu_gpb_hash128();
- void rcu_gpb_hash128_stat();
- void rcu_gpb_hash128_4_3();
- void rcu_gpb_hash128_4_3_stat();
-
- void rcu_gpt_nohash();
- void rcu_gpt_nohash_stat();
- void rcu_gpt_nohash_5_3();
- void rcu_gpt_nohash_5_3_stat();
- void rcu_gpt_stdhash();
- void rcu_gpt_stdhash_stat();
- void rcu_gpt_stdhash_5_3();
- void rcu_gpt_stdhash_5_3_stat();
- void rcu_gpt_hash128();
- void rcu_gpt_hash128_stat();
- void rcu_gpt_hash128_4_3();
- void rcu_gpt_hash128_4_3_stat();
-
- void rcu_shb_nohash();
- void rcu_shb_nohash_stat();
- void rcu_shb_nohash_5_3();
- void rcu_shb_nohash_5_3_stat();
- void rcu_shb_stdhash();
- void rcu_shb_stdhash_stat();
- void rcu_shb_stdhash_5_3();
- void rcu_shb_stdhash_5_3_stat();
- void rcu_shb_hash128();
- void rcu_shb_hash128_stat();
- void rcu_shb_hash128_4_3();
- void rcu_shb_hash128_4_3_stat();
-
- void rcu_sht_nohash();
- void rcu_sht_nohash_stat();
- void rcu_sht_nohash_5_3();
- void rcu_sht_nohash_5_3_stat();
- void rcu_sht_stdhash();
- void rcu_sht_stdhash_stat();
- void rcu_sht_stdhash_5_3();
- void rcu_sht_stdhash_5_3_stat();
- void rcu_sht_hash128();
- void rcu_sht_hash128_stat();
- void rcu_sht_hash128_4_3();
- void rcu_sht_hash128_4_3_stat();
-
- CPPUNIT_TEST_SUITE(IntrusiveFeldmanHashSetHdrTest)
- CPPUNIT_TEST(hp_nohash)
- CPPUNIT_TEST(hp_nohash_stat)
- CPPUNIT_TEST(hp_nohash_5_3)
- CPPUNIT_TEST(hp_nohash_5_3_stat)
- CPPUNIT_TEST(hp_stdhash)
- CPPUNIT_TEST(hp_stdhash_stat)
- CPPUNIT_TEST(hp_stdhash_5_3)
- CPPUNIT_TEST(hp_stdhash_5_3_stat)
- CPPUNIT_TEST(hp_hash128)
- CPPUNIT_TEST(hp_hash128_stat)
- CPPUNIT_TEST(hp_hash128_4_3)
- CPPUNIT_TEST(hp_hash128_4_3_stat)
-
- CPPUNIT_TEST(dhp_nohash)
- CPPUNIT_TEST(dhp_nohash_stat)
- CPPUNIT_TEST(dhp_nohash_5_3)
- CPPUNIT_TEST(dhp_nohash_5_3_stat)
- CPPUNIT_TEST(dhp_stdhash)
- CPPUNIT_TEST(dhp_stdhash_stat)
- CPPUNIT_TEST(dhp_stdhash_5_3)
- CPPUNIT_TEST(dhp_stdhash_5_3_stat)
- CPPUNIT_TEST(dhp_hash128)
- CPPUNIT_TEST(dhp_hash128_stat)
- CPPUNIT_TEST(dhp_hash128_4_3)
- CPPUNIT_TEST(dhp_hash128_4_3_stat)
-
- CPPUNIT_TEST(rcu_gpi_nohash)
- CPPUNIT_TEST(rcu_gpi_nohash_stat)
- CPPUNIT_TEST(rcu_gpi_nohash_5_3)
- CPPUNIT_TEST(rcu_gpi_nohash_5_3_stat)
- CPPUNIT_TEST(rcu_gpi_stdhash)
- CPPUNIT_TEST(rcu_gpi_stdhash_stat)
- CPPUNIT_TEST(rcu_gpi_stdhash_5_3)
- CPPUNIT_TEST(rcu_gpi_stdhash_5_3_stat)
- CPPUNIT_TEST(rcu_gpi_hash128)
- CPPUNIT_TEST(rcu_gpi_hash128_stat)
- CPPUNIT_TEST(rcu_gpi_hash128_4_3)
- CPPUNIT_TEST(rcu_gpi_hash128_4_3_stat)
-
- CPPUNIT_TEST(rcu_gpb_nohash)
- CPPUNIT_TEST(rcu_gpb_nohash_stat)
- CPPUNIT_TEST(rcu_gpb_nohash_5_3)
- CPPUNIT_TEST(rcu_gpb_nohash_5_3_stat)
- CPPUNIT_TEST(rcu_gpb_stdhash)
- CPPUNIT_TEST(rcu_gpb_stdhash_stat)
- CPPUNIT_TEST(rcu_gpb_stdhash_5_3)
- CPPUNIT_TEST(rcu_gpb_stdhash_5_3_stat)
- CPPUNIT_TEST(rcu_gpb_hash128)
- CPPUNIT_TEST(rcu_gpb_hash128_stat)
- CPPUNIT_TEST(rcu_gpb_hash128_4_3)
- CPPUNIT_TEST(rcu_gpb_hash128_4_3_stat)
-
- CPPUNIT_TEST(rcu_gpt_nohash)
- CPPUNIT_TEST(rcu_gpt_nohash_stat)
- CPPUNIT_TEST(rcu_gpt_nohash_5_3)
- CPPUNIT_TEST(rcu_gpt_nohash_5_3_stat)
- CPPUNIT_TEST(rcu_gpt_stdhash)
- CPPUNIT_TEST(rcu_gpt_stdhash_stat)
- CPPUNIT_TEST(rcu_gpt_stdhash_5_3)
- CPPUNIT_TEST(rcu_gpt_stdhash_5_3_stat)
- CPPUNIT_TEST(rcu_gpt_hash128)
- CPPUNIT_TEST(rcu_gpt_hash128_stat)
- CPPUNIT_TEST(rcu_gpt_hash128_4_3)
- CPPUNIT_TEST(rcu_gpt_hash128_4_3_stat)
-
- CPPUNIT_TEST(rcu_shb_nohash)
- CPPUNIT_TEST(rcu_shb_nohash_stat)
- CPPUNIT_TEST(rcu_shb_nohash_5_3)
- CPPUNIT_TEST(rcu_shb_nohash_5_3_stat)
- CPPUNIT_TEST(rcu_shb_stdhash)
- CPPUNIT_TEST(rcu_shb_stdhash_stat)
- CPPUNIT_TEST(rcu_shb_stdhash_5_3)
- CPPUNIT_TEST(rcu_shb_stdhash_5_3_stat)
- CPPUNIT_TEST(rcu_shb_hash128)
- CPPUNIT_TEST(rcu_shb_hash128_stat)
- CPPUNIT_TEST(rcu_shb_hash128_4_3)
- CPPUNIT_TEST(rcu_shb_hash128_4_3_stat)
-
- CPPUNIT_TEST(rcu_sht_nohash)
- CPPUNIT_TEST(rcu_sht_nohash_stat)
- CPPUNIT_TEST(rcu_sht_nohash_5_3)
- CPPUNIT_TEST(rcu_sht_nohash_5_3_stat)
- CPPUNIT_TEST(rcu_sht_stdhash)
- CPPUNIT_TEST(rcu_sht_stdhash_stat)
- CPPUNIT_TEST(rcu_sht_stdhash_5_3)
- CPPUNIT_TEST(rcu_sht_stdhash_5_3_stat)
- CPPUNIT_TEST(rcu_sht_hash128)
- CPPUNIT_TEST(rcu_sht_hash128_stat)
- CPPUNIT_TEST(rcu_sht_hash128_4_3)
- CPPUNIT_TEST(rcu_sht_hash128_4_3_stat)
-
- CPPUNIT_TEST_SUITE_END()
-
- };
-} // namespace set
-
-#endif // #ifndef CDSTEST_HDR_INTRUSIVE_FELDMAN_HASHSET_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.
-*/
-
-#include "set/hdr_intrusive_feldman_hashset.h"
-#include <cds/intrusive/feldman_hashset_dhp.h>
-#include "unit/print_feldman_hashset_stat.h"
-
-namespace set {
- namespace {
- typedef cds::gc::DHP gc_type;
- } // namespace
-
- void IntrusiveFeldmanHashSetHdrTest::dhp_nohash()
- {
- typedef size_t key_type;
-
- struct traits : public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_hp<set_type, nohash<key_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_hp<set_type2, nohash<key_type>>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::dhp_stdhash()
- {
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_hp<set_type, std::hash<hash_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_hp<set_type2, std::hash<hash_type>>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::dhp_hash128()
- {
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef hash128::less less;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" );
- test_hp<set_type, hash128::make>(4, 2);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- , ci::opt::less< hash_type::less >
- >::type
- > set_type2;
- test_hp<set_type2, hash128::make>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::dhp_nohash_stat()
- {
- typedef size_t key_type;
-
- struct traits : public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_hp<set_type, nohash<key_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- , co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_hp<set_type2, nohash<key_type>>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::dhp_stdhash_stat()
- {
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_hp<set_type, std::hash<hash_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_hp<set_type2, std::hash<hash_type>>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::dhp_hash128_stat()
- {
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef hash128::cmp compare;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_hp<set_type, hash_type::make>(4, 2);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- ,co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_hp<set_type2, hash_type::make>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::dhp_nohash_5_3()
- {
- typedef size_t key_type;
-
- struct traits : public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_hp<set_type, nohash<key_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_hp<set_type2, nohash<key_type>>(5, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::dhp_stdhash_5_3()
- {
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_hp<set_type, std::hash<hash_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_hp<set_type2, std::hash<hash_type>>(5, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::dhp_hash128_4_3()
- {
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef co::v::sequential_consistent memory_model;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_hp<set_type, hash128::make >(4, 3);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- > set_type2;
- test_hp<set_type2, hash128::make >(4, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::dhp_nohash_5_3_stat()
- {
- typedef size_t key_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_hp<set_type, nohash<key_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_hp<set_type2, nohash<key_type>>(5, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::dhp_stdhash_5_3_stat()
- {
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_hp<set_type, std::hash<hash_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_hp<set_type2, std::hash<hash_type>>(5, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::dhp_hash128_4_3_stat()
- {
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- typedef hash128::less less;
- typedef hash128::cmp compare;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_hp<set_type, hash_type::make>(4, 3);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- , co::stat< ci::feldman_hashset::stat<>>
- , co::less< hash_type::less >
- , co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_hp<set_type2, hash_type::make>(4, 3);
- }
-
-} // 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/hdr_intrusive_feldman_hashset.h"
-#include <cds/intrusive/feldman_hashset_hp.h>
-#include "unit/print_feldman_hashset_stat.h"
-
-namespace set {
- namespace {
- typedef cds::gc::HP gc_type;
- } // namespace
-
- void IntrusiveFeldmanHashSetHdrTest::hp_nohash()
- {
- typedef size_t key_type;
-
- struct traits : public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_hp<set_type, nohash<key_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_hp<set_type2, nohash<key_type>>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::hp_stdhash()
- {
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_hp<set_type, std::hash<hash_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_hp<set_type2, std::hash<hash_type>>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::hp_hash128()
- {
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef hash128::less less;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" );
- test_hp<set_type, hash128::make>(4, 2);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- , ci::opt::less< hash_type::less >
- >::type
- > set_type2;
- test_hp<set_type2, hash128::make>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::hp_nohash_stat()
- {
- typedef size_t key_type;
-
- struct traits : public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_hp<set_type, nohash<key_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- , co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_hp<set_type2, nohash<key_type>>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::hp_stdhash_stat()
- {
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_hp<set_type, std::hash<hash_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_hp<set_type2, std::hash<hash_type>>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::hp_hash128_stat()
- {
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef hash128::cmp compare;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_hp<set_type, hash_type::make>(4, 2);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- ,co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_hp<set_type2, hash_type::make>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::hp_nohash_5_3()
- {
- typedef size_t key_type;
-
- struct traits : public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_hp<set_type, nohash<key_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_hp<set_type2, nohash<key_type>>(5, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::hp_stdhash_5_3()
- {
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_hp<set_type, std::hash<hash_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_hp<set_type2, std::hash<hash_type>>(5, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::hp_hash128_4_3()
- {
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef co::v::sequential_consistent memory_model;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_hp<set_type, hash128::make >(4, 3);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- > set_type2;
- test_hp<set_type2, hash128::make >(4, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::hp_nohash_5_3_stat()
- {
- typedef size_t key_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_hp<set_type, nohash<key_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_hp<set_type2, nohash<key_type>>(5, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::hp_stdhash_5_3_stat()
- {
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_hp<set_type, std::hash<hash_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_hp<set_type2, std::hash<hash_type>>(5, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::hp_hash128_4_3_stat()
- {
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- typedef hash128::less less;
- typedef hash128::cmp compare;
- };
- typedef ci::FeldmanHashSet< gc_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_hp<set_type, hash_type::make>(4, 3);
-
- typedef ci::FeldmanHashSet<
- gc_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- , co::stat< ci::feldman_hashset::stat<>>
- , co::less< hash_type::less >
- , co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_hp<set_type2, hash_type::make>(4, 3);
- }
-
-} // namespace set
-
-CPPUNIT_TEST_SUITE_REGISTRATION(set::IntrusiveFeldmanHashSetHdrTest);
+++ /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/hdr_intrusive_feldman_hashset.h"
-#include <cds/urcu/general_buffered.h>
-#include <cds/intrusive/feldman_hashset_rcu.h>
-#include "unit/print_feldman_hashset_stat.h"
-
-namespace set {
- namespace {
- typedef cds::urcu::gc<cds::urcu::general_buffered<>> rcu_type;
- } // namespace
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_nohash()
- {
- typedef size_t key_type;
-
- struct traits : public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_stdhash()
- {
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_hash128()
- {
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef hash128::less less;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" );
- test_rcu<set_type, hash128::make>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- , ci::opt::less< hash_type::less >
- >::type
- > set_type2;
- test_rcu<set_type2, hash128::make>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_nohash_stat()
- {
- typedef size_t key_type;
-
- struct traits : public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- , co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_stdhash_stat()
- {
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_hash128_stat()
- {
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef hash128::cmp compare;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash_type::make>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- ,co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_rcu<set_type2, hash_type::make>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_nohash_5_3()
- {
- typedef size_t key_type;
-
- struct traits : public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(5, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_stdhash_5_3()
- {
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(5, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_hash128_4_3()
- {
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef co::v::sequential_consistent memory_model;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash128::make >(4, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- > set_type2;
- test_rcu<set_type2, hash128::make >(4, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_nohash_5_3_stat()
- {
- typedef size_t key_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, nohash<key_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(5, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_stdhash_5_3_stat()
- {
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(5, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpb_hash128_4_3_stat()
- {
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- typedef hash128::less less;
- typedef hash128::cmp compare;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash_type::make>(4, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- , co::stat< ci::feldman_hashset::stat<>>
- , co::less< hash_type::less >
- , co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_rcu<set_type2, hash_type::make>(4, 3);
- }
-
-} // 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/hdr_intrusive_feldman_hashset.h"
-#include <cds/urcu/general_instant.h>
-#include <cds/intrusive/feldman_hashset_rcu.h>
-#include "unit/print_feldman_hashset_stat.h"
-
-namespace set {
- namespace {
- typedef cds::urcu::gc<cds::urcu::general_instant<>> rcu_type;
- } // namespace
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_nohash()
- {
- typedef size_t key_type;
-
- struct traits : public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_stdhash()
- {
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_hash128()
- {
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef hash128::less less;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" );
- test_rcu<set_type, hash128::make>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- , ci::opt::less< hash_type::less >
- >::type
- > set_type2;
- test_rcu<set_type2, hash128::make>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_nohash_stat()
- {
- typedef size_t key_type;
-
- struct traits : public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- , co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_stdhash_stat()
- {
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_hash128_stat()
- {
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef hash128::cmp compare;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash_type::make>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- ,co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_rcu<set_type2, hash_type::make>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_nohash_5_3()
- {
- typedef size_t key_type;
-
- struct traits : public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(5, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_stdhash_5_3()
- {
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(5, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_hash128_4_3()
- {
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef co::v::sequential_consistent memory_model;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash128::make >(4, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- > set_type2;
- test_rcu<set_type2, hash128::make >(4, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_nohash_5_3_stat()
- {
- typedef size_t key_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, nohash<key_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(5, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_stdhash_5_3_stat()
- {
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(5, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpi_hash128_4_3_stat()
- {
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- typedef hash128::less less;
- typedef hash128::cmp compare;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash_type::make>(4, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- , co::stat< ci::feldman_hashset::stat<>>
- , co::less< hash_type::less >
- , co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_rcu<set_type2, hash_type::make>(4, 3);
- }
-
-} // 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/hdr_intrusive_feldman_hashset.h"
-#include <cds/urcu/general_threaded.h>
-#include <cds/intrusive/feldman_hashset_rcu.h>
-#include "unit/print_feldman_hashset_stat.h"
-
-namespace set {
- namespace {
- typedef cds::urcu::gc<cds::urcu::general_threaded<>> rcu_type;
- } // namespace
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_nohash()
- {
- typedef size_t key_type;
-
- struct traits : public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_stdhash()
- {
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_hash128()
- {
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef hash128::less less;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" );
- test_rcu<set_type, hash128::make>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- , ci::opt::less< hash_type::less >
- >::type
- > set_type2;
- test_rcu<set_type2, hash128::make>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_nohash_stat()
- {
- typedef size_t key_type;
-
- struct traits : public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- , co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_stdhash_stat()
- {
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_hash128_stat()
- {
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef hash128::cmp compare;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash_type::make>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- ,co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_rcu<set_type2, hash_type::make>(4, 2);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_nohash_5_3()
- {
- typedef size_t key_type;
-
- struct traits : public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(5, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_stdhash_5_3()
- {
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(5, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_hash128_4_3()
- {
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef co::v::sequential_consistent memory_model;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash128::make >(4, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- > set_type2;
- test_rcu<set_type2, hash128::make >(4, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_nohash_5_3_stat()
- {
- typedef size_t key_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, nohash<key_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(5, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_stdhash_5_3_stat()
- {
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(5, 3);
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_gpt_hash128_4_3_stat()
- {
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- typedef hash128::less less;
- typedef hash128::cmp compare;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash_type::make>(4, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- , co::stat< ci::feldman_hashset::stat<>>
- , co::less< hash_type::less >
- , co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_rcu<set_type2, hash_type::make>(4, 3);
- }
-
-} // 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/hdr_intrusive_feldman_hashset.h"
-#include <cds/urcu/signal_buffered.h>
-#include <cds/intrusive/feldman_hashset_rcu.h>
-#include "unit/print_feldman_hashset_stat.h"
-
-namespace set {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc<cds::urcu::signal_buffered<>> rcu_type;
- } // namespace
-#endif
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_shb_nohash()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t key_type;
-
- struct traits : public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(4, 2);
-#endif
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_shb_stdhash()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(4, 2);
-#endif
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_shb_hash128()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef hash128::less less;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" );
- test_rcu<set_type, hash128::make>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- , ci::opt::less< hash_type::less >
- >::type
- > set_type2;
- test_rcu<set_type2, hash128::make>(4, 2);
-#endif
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_shb_nohash_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t key_type;
-
- struct traits : public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- , co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(4, 2);
-#endif
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_shb_stdhash_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(4, 2);
-#endif
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_shb_hash128_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef hash128::cmp compare;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash_type::make>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- ,co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_rcu<set_type2, hash_type::make>(4, 2);
-#endif
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_shb_nohash_5_3()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t key_type;
-
- struct traits : public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(5, 3);
-#endif
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_shb_stdhash_5_3()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(5, 3);
-#endif
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_shb_hash128_4_3()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef co::v::sequential_consistent memory_model;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash128::make >(4, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- > set_type2;
- test_rcu<set_type2, hash128::make >(4, 3);
-#endif
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_shb_nohash_5_3_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t key_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, nohash<key_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(5, 3);
-#endif
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_shb_stdhash_5_3_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(5, 3);
-#endif
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_shb_hash128_4_3_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- typedef hash128::less less;
- typedef hash128::cmp compare;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash_type::make>(4, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- , co::stat< ci::feldman_hashset::stat<>>
- , co::less< hash_type::less >
- , co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_rcu<set_type2, hash_type::make>(4, 3);
-#endif
- }
-
-} // 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/hdr_intrusive_feldman_hashset.h"
-#include <cds/urcu/signal_threaded.h>
-#include <cds/intrusive/feldman_hashset_rcu.h>
-#include "unit/print_feldman_hashset_stat.h"
-
-namespace set {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc<cds::urcu::signal_threaded<>> rcu_type;
- } // namespace
-#endif
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_sht_nohash()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t key_type;
-
- struct traits : public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(4, 2);
-#endif
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_sht_stdhash()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(4, 2);
-#endif
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_sht_hash128()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef hash128::less less;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash128!!!" );
- test_rcu<set_type, hash128::make>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- , ci::opt::less< hash_type::less >
- >::type
- > set_type2;
- test_rcu<set_type2, hash128::make>(4, 2);
-#endif
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_sht_nohash_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t key_type;
-
- struct traits : public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- , co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(4, 2);
-#endif
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_sht_stdhash_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(4, 2);
-#endif
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_sht_hash128_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef hash128::cmp compare;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash_type::make>(4, 2);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- ,co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_rcu<set_type2, hash_type::make>(4, 2);
-#endif
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_sht_nohash_5_3()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t key_type;
-
- struct traits : public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
- test_rcu<set_type, nohash<key_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(5, 3);
-#endif
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_sht_stdhash_5_3()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(5, 3);
-#endif
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_sht_hash128_4_3()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef co::v::sequential_consistent memory_model;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash128::make >(4, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::memory_model< co::v::sequential_consistent >
- >::type
- > set_type2;
- test_rcu<set_type2, hash128::make >(4, 3);
-#endif
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_sht_nohash_5_3_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t key_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_key<key_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<key_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, nohash<key_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<key_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_key<key_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, nohash<key_type>>(5, 3);
-#endif
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_sht_stdhash_5_3_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef size_t hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
- test_rcu<set_type, std::hash<hash_type>>(5, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- ,co::stat< ci::feldman_hashset::stat<>>
- >::type
- > set_type2;
- test_rcu<set_type2, std::hash<hash_type>>(5, 3);
-#endif
- }
-
- void IntrusiveFeldmanHashSetHdrTest::rcu_sht_hash128_4_3_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef hash128 hash_type;
-
- struct traits: public ci::feldman_hashset::traits
- {
- typedef get_hash<hash_type> hash_accessor;
- typedef item_disposer disposer;
- typedef ci::feldman_hashset::stat<> stat;
- typedef hash128::less less;
- typedef hash128::cmp compare;
- };
- typedef ci::FeldmanHashSet< rcu_type, Item<hash_type>, traits > set_type;
- static_assert(std::is_same< typename set_type::hash_type, hash_type>::value, "set::hash_type != hash_type!!!" );
- test_rcu<set_type, hash_type::make>(4, 3);
-
- typedef ci::FeldmanHashSet<
- rcu_type,
- Item<hash_type>,
- typename ci::feldman_hashset::make_traits<
- ci::feldman_hashset::hash_accessor< get_hash<hash_type>>
- , ci::opt::disposer< item_disposer >
- , co::stat< ci::feldman_hashset::stat<>>
- , co::less< hash_type::less >
- , co::compare< hash128::cmp >
- >::type
- > set_type2;
- test_rcu<set_type2, hash_type::make>(4, 3);
-#endif
- }
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/intrusive/michael_list_dhp.h>
-#include <cds/intrusive/michael_set.h>
-
-namespace set {
-
- void IntrusiveHashSetHdrTest::DHP_base_cmp()
- {
- typedef base_int_item< ci::michael_list::node<cds::gc::DHP> > item;
- typedef ci::MichaelList< cds::gc::DHP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::DHP_base_less()
- {
- typedef base_int_item< ci::michael_list::node<cds::gc::DHP> > item;
- typedef ci::MichaelList< cds::gc::DHP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::DHP_base_cmpmix()
- {
- typedef base_int_item< ci::michael_list::node<cds::gc::DHP> > item;
- typedef ci::MichaelList< cds::gc::DHP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::DHP_member_cmp()
- {
- typedef member_int_item< ci::michael_list::node<cds::gc::DHP> > item;
- typedef ci::MichaelList< cds::gc::DHP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::DHP>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::DHP_member_less()
- {
- typedef member_int_item< ci::michael_list::node<cds::gc::DHP> > item;
- typedef ci::MichaelList< cds::gc::DHP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::DHP>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::DHP_member_cmpmix()
- {
- typedef member_int_item< ci::michael_list::node<cds::gc::DHP> > item;
- typedef ci::MichaelList< cds::gc::DHP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::DHP>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_int<set>();
- }
-
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/intrusive/lazy_list_dhp.h>
-#include <cds/intrusive/michael_set.h>
-
-namespace set {
-
- void IntrusiveHashSetHdrTest::DHP_base_cmp_lazy()
- {
- typedef base_int_item< ci::lazy_list::node<cds::gc::DHP> > item;
- typedef ci::LazyList< cds::gc::DHP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::DHP_base_less_lazy()
- {
- typedef base_int_item< ci::lazy_list::node<cds::gc::DHP> > item;
- typedef ci::LazyList< cds::gc::DHP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::DHP_base_cmpmix_lazy()
- {
- typedef base_int_item< ci::lazy_list::node<cds::gc::DHP> > item;
- typedef ci::LazyList< cds::gc::DHP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::DHP_member_cmp_lazy()
- {
- typedef member_int_item< ci::lazy_list::node<cds::gc::DHP> > item;
- typedef ci::LazyList< cds::gc::DHP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::DHP>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::DHP_member_less_lazy()
- {
- typedef member_int_item< ci::lazy_list::node<cds::gc::DHP> > item;
- typedef ci::LazyList< cds::gc::DHP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::DHP>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::DHP_member_cmpmix_lazy()
- {
- typedef member_int_item< ci::lazy_list::node<cds::gc::DHP> > item;
- typedef ci::LazyList< cds::gc::DHP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::DHP>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::DHP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_int<set>();
- }
-
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/intrusive/michael_list_hp.h>
-#include <cds/intrusive/michael_set.h>
-
-namespace set {
-
- void IntrusiveHashSetHdrTest::HP_base_cmp()
- {
- typedef base_int_item< ci::michael_list::node<cds::gc::HP> > item;
- typedef ci::MichaelList< cds::gc::HP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::HP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::HP_base_less()
- {
- typedef base_int_item< ci::michael_list::node<cds::gc::HP> > item;
- typedef ci::MichaelList< cds::gc::HP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::HP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::HP_base_cmpmix()
- {
- typedef base_int_item< ci::michael_list::node<cds::gc::HP> > item;
- typedef ci::MichaelList< cds::gc::HP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::HP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::HP_member_cmp()
- {
- typedef member_int_item< ci::michael_list::node<cds::gc::HP> > item;
- typedef ci::MichaelList< cds::gc::HP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::HP>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::HP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::HP_member_less()
- {
- typedef member_int_item< ci::michael_list::node<cds::gc::HP> > item;
- typedef ci::MichaelList< cds::gc::HP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::HP>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::HP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::HP_member_cmpmix()
- {
- typedef member_int_item< ci::michael_list::node<cds::gc::HP> > item;
- typedef ci::MichaelList< cds::gc::HP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::HP>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::HP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_int<set>();
- }
-} // namespace set
-
-CPPUNIT_TEST_SUITE_REGISTRATION(set::IntrusiveHashSetHdrTest);
+++ /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/hdr_intrusive_set.h"
-#include <cds/intrusive/lazy_list_hp.h>
-#include <cds/intrusive/michael_set.h>
-
-namespace set {
-
- void IntrusiveHashSetHdrTest::HP_base_cmp_lazy()
- {
- typedef base_int_item< ci::lazy_list::node<cds::gc::HP> > item;
- struct list_traits :
- public ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::opt::back_off< cds::backoff::pause >
- >::type
- {};
- typedef ci::LazyList< cds::gc::HP, item, list_traits > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::HP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::HP_base_less_lazy()
- {
- typedef base_int_item< ci::lazy_list::node<cds::gc::HP> > item;
- typedef ci::LazyList< cds::gc::HP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::HP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::HP_base_cmpmix_lazy()
- {
- typedef base_int_item< ci::lazy_list::node<cds::gc::HP> > item;
- typedef ci::LazyList< cds::gc::HP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::HP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::HP_member_cmp_lazy()
- {
- typedef member_int_item< ci::lazy_list::node<cds::gc::HP> > item;
- typedef ci::LazyList< cds::gc::HP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::HP>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::HP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::HP_member_less_lazy()
- {
- typedef member_int_item< ci::lazy_list::node<cds::gc::HP> > item;
- typedef ci::LazyList< cds::gc::HP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::HP>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::HP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::HP_member_cmpmix_lazy()
- {
- typedef member_int_item< ci::lazy_list::node<cds::gc::HP> > item;
- typedef ci::LazyList< cds::gc::HP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::HP>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::HP, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_int<set>();
- }
-
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/intrusive/michael_list_nogc.h>
-#include <cds/intrusive/michael_set_nogc.h>
-
-namespace set {
-
- void IntrusiveHashSetHdrTest::nogc_base_cmp()
- {
- typedef base_int_item< ci::michael_list::node<cds::gc::nogc> > item;
- typedef ci::MichaelList< cds::gc::nogc
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::nogc_base_less()
- {
- typedef base_int_item< ci::michael_list::node<cds::gc::nogc> > item;
- typedef ci::MichaelList< cds::gc::nogc
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::nogc_base_cmpmix()
- {
- typedef base_int_item< ci::michael_list::node<cds::gc::nogc> > item;
- typedef ci::MichaelList< cds::gc::nogc
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::nogc_member_cmp()
- {
- typedef member_int_item< ci::michael_list::node<cds::gc::nogc> > item;
- typedef ci::MichaelList< cds::gc::nogc
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::nogc>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::nogc_member_less()
- {
- typedef member_int_item< ci::michael_list::node<cds::gc::nogc> > item;
- typedef ci::MichaelList< cds::gc::nogc
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::nogc>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::nogc_member_cmpmix()
- {
- typedef member_int_item< ci::michael_list::node<cds::gc::nogc> > item;
- typedef ci::MichaelList< cds::gc::nogc
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::nogc>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-} // 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/hdr_intrusive_set.h"
-#include <cds/intrusive/lazy_list_nogc.h>
-#include <cds/intrusive/michael_set_nogc.h>
-
-namespace set {
-
- void IntrusiveHashSetHdrTest::nogc_base_cmp_lazy()
- {
- typedef base_int_item< ci::lazy_list::node<cds::gc::nogc> > item;
- typedef ci::LazyList< cds::gc::nogc
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::nogc_base_less_lazy()
- {
- typedef base_int_item< ci::lazy_list::node<cds::gc::nogc> > item;
- typedef ci::LazyList< cds::gc::nogc
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::nogc_base_cmpmix_lazy()
- {
- typedef base_int_item< ci::lazy_list::node<cds::gc::nogc> > item;
- typedef ci::LazyList< cds::gc::nogc
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::nogc_member_cmp_lazy()
- {
- typedef member_int_item< ci::lazy_list::node<cds::gc::nogc> > item;
- typedef ci::LazyList< cds::gc::nogc
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::nogc>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::nogc_member_less_lazy()
- {
- typedef member_int_item< ci::lazy_list::node<cds::gc::nogc> > item;
- typedef ci::LazyList< cds::gc::nogc
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::nogc>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::nogc_member_cmpmix_lazy()
- {
- typedef member_int_item< ci::lazy_list::node<cds::gc::nogc> > item;
- typedef ci::LazyList< cds::gc::nogc
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::nogc>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< cds::gc::nogc, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-} // 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/hdr_intrusive_set.h"
-#include <cds/urcu/general_buffered.h>
-#include <cds/intrusive/michael_list_rcu.h>
-#include <cds/intrusive/michael_set_rcu.h>
-
-namespace set {
-
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_buffered<> > RCU;
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPB_base_cmp()
- {
- typedef base_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPB_base_less()
- {
- typedef base_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPB_base_cmpmix()
- {
- typedef base_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPB_member_cmp()
- {
- typedef member_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPB_member_less()
- {
- typedef member_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPB_member_cmpmix()
- {
- typedef member_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
- }
-
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/urcu/general_buffered.h>
-#include <cds/intrusive/lazy_list_rcu.h>
-#include <cds/intrusive/michael_set_rcu.h>
-
-namespace set {
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_buffered<> > RCU;
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPB_base_cmp_lazy()
- {
- typedef base_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<RCU> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::opt::back_off< cds::backoff::pause >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPB_base_less_lazy()
- {
- typedef base_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<RCU> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPB_base_cmpmix_lazy()
- {
- typedef base_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<RCU> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPB_member_cmp_lazy()
- {
- typedef member_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPB_member_less_lazy()
- {
- typedef member_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPB_member_cmpmix_lazy()
- {
- typedef member_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_rcu_int<set>();
- }
-
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/urcu/general_instant.h>
-#include <cds/intrusive/michael_list_rcu.h>
-#include <cds/intrusive/michael_set_rcu.h>
-
-namespace set {
-
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_instant<> > RCU;
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPI_base_cmp()
- {
- typedef base_int_item< ci::michael_list::node<RCU> > item;
- struct list_traits :
- public ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- {};
- typedef ci::MichaelList< RCU, item, list_traits > bucket_type;
-
- struct set_traits : public ci::michael_set::traits
- {
- typedef hash_int hash;
- };
- typedef ci::MichaelHashSet< RCU, bucket_type, set_traits > set;
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPI_base_less()
- {
- typedef base_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPI_base_cmpmix()
- {
- typedef base_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPI_member_cmp()
- {
- typedef member_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPI_member_less()
- {
- typedef member_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPI_member_cmpmix()
- {
- typedef member_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
- }
-
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/urcu/general_instant.h>
-#include <cds/intrusive/lazy_list_rcu.h>
-#include <cds/intrusive/michael_set_rcu.h>
-
-namespace set {
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_instant<> > RCU;
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPI_base_cmp_lazy()
- {
- typedef base_int_item< ci::lazy_list::node<RCU> > item;
- struct list_traits :
- public ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<RCU> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::opt::back_off< cds::backoff::pause >
- >::type
- {};
-
- typedef ci::LazyList< RCU, item, list_traits > bucket_type;
-
- struct set_traits : public ci::michael_set::traits
- {
- typedef hash_int hash;
- };
- typedef ci::MichaelHashSet< RCU, bucket_type, set_traits > set;
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPI_base_less_lazy()
- {
- typedef base_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<RCU> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPI_base_cmpmix_lazy()
- {
- typedef base_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<RCU> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPI_member_cmp_lazy()
- {
- typedef member_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPI_member_less_lazy()
- {
- typedef member_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPI_member_cmpmix_lazy()
- {
- typedef member_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_rcu_int<set>();
- }
-
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/urcu/general_threaded.h>
-#include <cds/intrusive/michael_list_rcu.h>
-#include <cds/intrusive/michael_set_rcu.h>
-
-namespace set {
-
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_threaded<> > RCU;
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPT_base_cmp()
- {
- typedef base_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPT_base_less()
- {
- typedef base_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPT_base_cmpmix()
- {
- typedef base_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPT_member_cmp()
- {
- typedef member_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPT_member_less()
- {
- typedef member_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPT_member_cmpmix()
- {
- typedef member_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
- }
-
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/urcu/general_threaded.h>
-#include <cds/intrusive/lazy_list_rcu.h>
-#include <cds/intrusive/michael_set_rcu.h>
-
-namespace set {
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_threaded<> > RCU;
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPT_base_cmp_lazy()
- {
- typedef base_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<RCU> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::opt::back_off< cds::backoff::pause >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPT_base_less_lazy()
- {
- typedef base_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<RCU> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPT_base_cmpmix_lazy()
- {
- typedef base_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<RCU> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPT_member_cmp_lazy()
- {
- typedef member_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPT_member_less_lazy()
- {
- typedef member_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::RCU_GPT_member_cmpmix_lazy()
- {
- typedef member_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_rcu_int<set>();
- }
-
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/urcu/signal_buffered.h>
-#include <cds/intrusive/michael_list_rcu.h>
-#include <cds/intrusive/michael_set_rcu.h>
-
-namespace set {
-
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc< cds::urcu::signal_buffered<> > RCU;
- }
-#endif
-
- void IntrusiveHashSetHdrTest::RCU_SHB_base_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::RCU_SHB_base_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::RCU_SHB_base_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::RCU_SHB_member_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::RCU_SHB_member_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::RCU_SHB_member_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/urcu/signal_buffered.h>
-#include <cds/intrusive/lazy_list_rcu.h>
-#include <cds/intrusive/michael_set_rcu.h>
-
-namespace set {
-
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc< cds::urcu::signal_buffered<> > RCU;
- }
-#endif
-
- void IntrusiveHashSetHdrTest::RCU_SHB_base_cmp_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<RCU> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::opt::back_off< cds::backoff::pause >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::RCU_SHB_base_less_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<RCU> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::RCU_SHB_base_cmpmix_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<RCU> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::RCU_SHB_member_cmp_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::RCU_SHB_member_less_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::RCU_SHB_member_cmpmix_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_rcu_int<set>();
-#endif
- }
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/urcu/signal_threaded.h>
-#include <cds/intrusive/michael_list_rcu.h>
-#include <cds/intrusive/michael_set_rcu.h>
-
-namespace set {
-
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc< cds::urcu::signal_threaded<> > RCU;
- }
-#endif
-
- void IntrusiveHashSetHdrTest::RCU_SHT_base_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::RCU_SHT_base_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::RCU_SHT_base_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::RCU_SHT_member_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::RCU_SHT_member_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::RCU_SHT_member_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::michael_list::node<RCU> > item;
- typedef ci::MichaelList< RCU
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/urcu/signal_threaded.h>
-#include <cds/intrusive/lazy_list_rcu.h>
-#include <cds/intrusive/michael_set_rcu.h>
-
-namespace set {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc< cds::urcu::signal_threaded<> > RCU;
- }
-#endif
-
- void IntrusiveHashSetHdrTest::RCU_SHT_base_cmp_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<RCU> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::opt::back_off< cds::backoff::pause >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::RCU_SHT_base_less_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<RCU> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::RCU_SHT_base_cmpmix_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<RCU> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::RCU_SHT_member_cmp_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::RCU_SHT_member_less_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- >::type
- > set;
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::RCU_SHT_member_cmpmix_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::lazy_list::node<RCU> > item;
- typedef ci::LazyList< RCU
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<RCU>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::MichaelHashSet< RCU, bucket_type,
- ci::michael_set::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
-
- test_rcu_int<set>();
-#endif
- }
-
-} // 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/hdr_intrusive_striped_set.h"
-#include <cds/intrusive/striped_set/boost_avl_set.h>
-#include <cds/intrusive/striped_set.h>
-
-namespace set {
- namespace bi = boost::intrusive;
-
- namespace {
- typedef IntrusiveStripedSetHdrTest::base_item< bi::avl_set_base_hook<> > base_item_type;
- typedef IntrusiveStripedSetHdrTest::member_item< bi::avl_set_member_hook<> > member_item_type;
-
- template <typename T, typename Node>
- struct get_key
- {
- typedef T type;
-
- type const& operator()( Node const& v ) const
- {
- return v.nKey;
- }
- };
- }
-
-#if BOOST_VERSION >= 105900
-# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) ,bi::key_of_value< get_key< int, type>>
-#else
-# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type )
-#endif
-
- void IntrusiveStripedSetHdrTest::Refinable_avl_set_basehook()
- {
- typedef ci::StripedSet<
- bi::avl_set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::back_off< cds::backoff::empty >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_avl_set_basehook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::avl_set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<64> >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_avl_set_basehook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::avl_set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
- test_with( s );
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_avl_set_memberhook()
- {
- typedef ci::StripedSet<
- bi::avl_set<
- member_item_type
- , bi::member_hook< member_item_type, bi::avl_set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_avl_set_memberhook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::avl_set<
- member_item_type
- , bi::member_hook< member_item_type, bi::avl_set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_avl_set_memberhook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::avl_set<
- member_item_type
- , bi::member_hook< member_item_type, bi::avl_set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
- test_with( s );
- }
-} // 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/hdr_intrusive_striped_set.h"
-#include <cds/intrusive/striped_set/boost_list.h>
-#include <cds/intrusive/striped_set.h>
-
-#include <type_traits> // std::is_same
-
-namespace set {
- namespace bi = boost::intrusive;
-
- namespace {
- typedef IntrusiveStripedSetHdrTest::base_item< bi::list_base_hook<> > base_item_type;
- typedef IntrusiveStripedSetHdrTest::member_item< bi::list_member_hook<> > member_item_type;
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_list_basehook_cmp()
- {
- typedef ci::StripedSet<
- bi::list<base_item_type>
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<base_item_type> >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<base_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_list_basehook_less()
- {
- typedef ci::StripedSet<
- bi::list<base_item_type>
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<base_item_type> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_list_basehook_cmpmix()
- {
- typedef ci::StripedSet<
- bi::list<base_item_type>
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::less< IntrusiveStripedSetHdrTest::less<base_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<base_item_type> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<base_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_list_basehook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::list<base_item_type>
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<base_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<base_item_type> >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<8> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<base_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_list_basehook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::list<base_item_type>
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<base_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<base_item_type> >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<base_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- set_type s( 128, ci::striped_set::single_bucket_size_threshold<0>(4) );
- test_with( s );
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_list_memberhook_cmp()
- {
- typedef ci::StripedSet<
- bi::list<
- member_item_type
- , bi::member_hook< member_item_type, bi::list_member_hook<>, &member_item_type::hMember>
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<member_item_type> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_list_memberhook_less()
- {
- typedef ci::StripedSet<
- bi::list<
- member_item_type
- , bi::member_hook< member_item_type, bi::list_member_hook<>, &member_item_type::hMember>
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<member_item_type> >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_list_memberhook_cmpmix()
- {
- typedef ci::StripedSet<
- bi::list<
- member_item_type
- , bi::member_hook< member_item_type, bi::list_member_hook<>, &member_item_type::hMember>
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<member_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<member_item_type> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_list_memberhook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::list<
- member_item_type
- , bi::member_hook< member_item_type, bi::list_member_hook<>, &member_item_type::hMember>
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<member_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<member_item_type> >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<8> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<member_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_list_memberhook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::list<
- member_item_type
- , bi::member_hook< member_item_type, bi::list_member_hook<>, &member_item_type::hMember>
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<member_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<member_item_type> >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<member_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- set_type s( 128, ci::striped_set::single_bucket_size_threshold<0>(4) );
- test_with( s );
- }
-
-} // 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/hdr_intrusive_striped_set.h"
-#include <cds/intrusive/striped_set/boost_set.h>
-#include <cds/intrusive/striped_set.h>
-
-namespace set {
- namespace bi = boost::intrusive;
-
- namespace {
- typedef IntrusiveStripedSetHdrTest::base_item< bi::set_base_hook<> > base_item_type;
- typedef IntrusiveStripedSetHdrTest::member_item< bi::set_member_hook<> > member_item_type;
-
- template <typename T, typename Node>
- struct get_key
- {
- typedef T type;
-
- type const& operator()( Node const& v ) const
- {
- return v.nKey;
- }
- };
- }
-
-#if BOOST_VERSION >= 105900
-# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) ,bi::key_of_value< get_key< int, type>>
-#else
-# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type )
-#endif
-
- void IntrusiveStripedSetHdrTest::Refinable_set_basehook()
- {
- typedef ci::StripedSet<
- bi::set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_set_basehook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<64> >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_set_basehook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
- test_with( s );
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_set_memberhook()
- {
- typedef ci::StripedSet<
- bi::set<
- member_item_type
- , bi::member_hook< member_item_type, bi::set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_set_memberhook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::set<
- member_item_type
- , bi::member_hook< member_item_type, bi::set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_set_memberhook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::set<
- member_item_type
- , bi::member_hook< member_item_type, bi::set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
- test_with( s );
- }
-
-} // 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/hdr_intrusive_striped_set.h"
-#include <cds/intrusive/striped_set/boost_sg_set.h>
-#include <cds/intrusive/striped_set.h>
-
-namespace set {
- namespace bi = boost::intrusive;
-
- namespace {
- typedef IntrusiveStripedSetHdrTest::base_item< bi::bs_set_base_hook<> > base_item_type;
- typedef IntrusiveStripedSetHdrTest::member_item< bi::bs_set_member_hook<> > member_item_type;
-
- template <typename T, typename Node>
- struct get_key
- {
- typedef T type;
-
- type const& operator()( Node const& v ) const
- {
- return v.nKey;
- }
- };
- }
-
-#if BOOST_VERSION >= 105900
-# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) ,bi::key_of_value< get_key< int, type>>
-#else
-# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type )
-#endif
-
- void IntrusiveStripedSetHdrTest::Refinable_sg_set_basehook()
- {
- typedef ci::StripedSet<
- bi::sg_set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_sg_set_basehook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::sg_set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<64> >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_sg_set_basehook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::sg_set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
- test_with( s );
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_sg_set_memberhook()
- {
- typedef ci::StripedSet<
- bi::sg_set<
- member_item_type
- , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_sg_set_memberhook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::sg_set<
- member_item_type
- , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_sg_set_memberhook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::sg_set<
- member_item_type
- , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
- test_with( s );
- }
-
-} // 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/hdr_intrusive_striped_set.h"
-#include <cds/intrusive/striped_set/boost_slist.h>
-#include <cds/intrusive/striped_set.h>
-
-#include <type_traits> // std::is_same
-
-namespace set {
- namespace bi = boost::intrusive;
-
- namespace {
- typedef IntrusiveStripedSetHdrTest::base_item< bi::slist_base_hook<> > base_item_type;
- typedef IntrusiveStripedSetHdrTest::member_item< bi::slist_member_hook<> > member_item_type;
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_slist_basehook_cmp()
- {
- typedef ci::StripedSet<
- bi::slist<base_item_type>
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<base_item_type> >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<base_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_slist_basehook_less()
- {
- typedef ci::StripedSet<
- bi::slist<base_item_type>
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<base_item_type> >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_slist_basehook_cmpmix()
- {
- typedef ci::StripedSet<
- bi::slist<base_item_type>
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<base_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<base_item_type> >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<base_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_slist_basehook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::slist<base_item_type>
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<base_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<base_item_type> >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<8> >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<base_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_slist_basehook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::slist<base_item_type>
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<base_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<base_item_type> >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<base_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- set_type s( 128, ci::striped_set::single_bucket_size_threshold<0>(4) );
- test_with( s );
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_slist_memberhook_cmp()
- {
- typedef ci::StripedSet<
- bi::slist<
- member_item_type
- , bi::member_hook< member_item_type, bi::slist_member_hook<>, &member_item_type::hMember>
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<member_item_type> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_slist_memberhook_less()
- {
- typedef ci::StripedSet<
- bi::slist<
- member_item_type
- , bi::member_hook< member_item_type, bi::slist_member_hook<>, &member_item_type::hMember>
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<member_item_type> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_slist_memberhook_cmpmix()
- {
- typedef ci::StripedSet<
- bi::slist<
- member_item_type
- , bi::member_hook< member_item_type, bi::slist_member_hook<>, &member_item_type::hMember>
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<member_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<member_item_type> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_slist_memberhook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::slist<
- member_item_type
- , bi::member_hook< member_item_type, bi::slist_member_hook<>, &member_item_type::hMember>
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<member_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<member_item_type> >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<8> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<member_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_slist_memberhook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::slist<
- member_item_type
- , bi::member_hook< member_item_type, bi::slist_member_hook<>, &member_item_type::hMember>
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<member_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<member_item_type> >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<member_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- set_type s( 128, ci::striped_set::single_bucket_size_threshold<0>(4) );
- test_with( s );
- }
-
-} // 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/hdr_intrusive_striped_set.h"
-#include <cds/intrusive/striped_set/boost_splay_set.h>
-#include <cds/intrusive/striped_set.h>
-#include <boost/version.hpp>
-
-namespace set {
- namespace bi = boost::intrusive;
-
- namespace {
-# if BOOST_VERSION < 105600
- typedef bi::splay_set_member_hook<> splay_set_member_hook;
- typedef bi::splay_set_base_hook<> splay_set_base_hook;
-#else
- typedef bi::bs_set_base_hook<> splay_set_base_hook;
- typedef bi::bs_set_member_hook<> splay_set_member_hook;
-#endif
- typedef IntrusiveStripedSetHdrTest::base_item< splay_set_base_hook > base_item_type;
- typedef IntrusiveStripedSetHdrTest::member_item< splay_set_member_hook > member_item_type;
-
- template <typename T, typename Node>
- struct get_key
- {
- typedef T type;
-
- type const& operator()( Node const& v ) const
- {
- return v.nKey;
- }
- };
- }
-
-#if BOOST_VERSION >= 105900
-# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) ,bi::key_of_value< get_key< int, type>>
-#else
-# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type )
-#endif
-
- void IntrusiveStripedSetHdrTest::Refinable_splay_set_basehook()
- {
- typedef ci::StripedSet<
- bi::splay_set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::back_off< cds::backoff::empty >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_splay_set_basehook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::splay_set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<64> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_splay_set_basehook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::splay_set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
- test_with( s );
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_splay_set_memberhook()
- {
- typedef ci::StripedSet<
- bi::splay_set<
- member_item_type
- , bi::member_hook< member_item_type, splay_set_member_hook, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_splay_set_memberhook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::splay_set<
- member_item_type
- , bi::member_hook< member_item_type, splay_set_member_hook, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_splay_set_memberhook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::splay_set<
- member_item_type
- , bi::member_hook< member_item_type, splay_set_member_hook, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
- test_with( s );
- }
-} // 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/hdr_intrusive_striped_set.h"
-#include <cds/intrusive/striped_set/boost_treap_set.h>
-#include <cds/intrusive/striped_set.h>
-
-namespace set {
- namespace bi = boost::intrusive;
-
- namespace {
- typedef IntrusiveStripedSetHdrTest::base_item< bi::bs_set_base_hook<> > base_item_type;
- typedef IntrusiveStripedSetHdrTest::member_item< bi::bs_set_member_hook<> > member_item_type;
-
- template <typename T>
- struct priority_cmp: private IntrusiveStripedSetHdrTest::less<T>
- {
- typedef IntrusiveStripedSetHdrTest::less<T> base_class;
-
- template <typename A, typename B>
- bool operator()( A const& a, B const& b ) const
- {
- return base_class::operator()( b, a );
- }
- };
-
- template <typename T, typename Node>
- struct get_key
- {
- typedef T type;
-
- type const& operator()( Node const& v ) const
- {
- return v.nKey;
- }
- };
- }
-
-#if BOOST_VERSION >= 105900
-# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) ,bi::key_of_value< get_key< int, type>>
-#else
-# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type )
-#endif
-
- void IntrusiveStripedSetHdrTest::Refinable_treap_set_basehook()
- {
- typedef ci::StripedSet<
- bi::treap_set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- , bi::priority<priority_cmp<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_treap_set_basehook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::treap_set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type> >
- , bi::priority<priority_cmp<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<64> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_treap_set_basehook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::treap_set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- , bi::priority<priority_cmp<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
- test_with( s );
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_treap_set_memberhook()
- {
- typedef ci::StripedSet<
- bi::treap_set<
- member_item_type
- , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- , bi::priority<priority_cmp<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_treap_set_memberhook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::treap_set<
- member_item_type
- , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- , bi::priority<priority_cmp<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_treap_set_memberhook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::treap_set<
- member_item_type
- , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- , bi::priority<priority_cmp<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
- test_with( s );
- }
-
-} // 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/hdr_intrusive_striped_set.h"
-#include <cds/intrusive/striped_set/boost_unordered_set.h>
-#include <cds/intrusive/striped_set.h>
-
-namespace set {
- namespace bi = boost::intrusive;
-
- namespace {
- typedef IntrusiveStripedSetHdrTest::base_item< bi::unordered_set_base_hook<> > base_item_type;
- typedef IntrusiveStripedSetHdrTest::member_item< bi::unordered_set_member_hook<> > member_item_type;
-
- struct hasher: private IntrusiveStripedSetHdrTest::hash_int
- {
- typedef IntrusiveStripedSetHdrTest::hash_int base_class;
-
- size_t operator()( int i ) const
- {
- return ~( base_class::operator()(i));
- }
- template <typename Item>
- size_t operator()( const Item& i ) const
- {
- return ~( base_class::operator()(i));
- }
- size_t operator()( IntrusiveStripedSetHdrTest::find_key const& i) const
- {
- return ~( base_class::operator()(i));
- }
- };
-
- template <typename T>
- struct is_equal: private IntrusiveStripedSetHdrTest::cmp<T>
- {
- typedef IntrusiveStripedSetHdrTest::cmp<T> base_class;
-
- bool operator ()(const T& v1, const T& v2 ) const
- {
- return base_class::operator()( v1, v2 ) == 0;
- }
-
- template <typename Q>
- bool operator ()(const T& v1, const Q& v2 ) const
- {
- return base_class::operator()( v1, v2 ) == 0;
- }
-
- template <typename Q>
- bool operator ()(const Q& v1, const T& v2 ) const
- {
- return base_class::operator()( v1, v2 ) == 0;
- }
- };
-
- template <size_t Capacity, typename T, class Alloc = CDS_DEFAULT_ALLOCATOR>
- struct dyn_buffer: public co::v::dynamic_buffer< T, Alloc >
- {
- typedef co::v::dynamic_buffer< T, Alloc > base_class;
- public:
- template <typename Q>
- struct rebind {
- typedef dyn_buffer<Capacity, Q, Alloc> other ; ///< Rebinding result type
- };
-
- dyn_buffer()
- : base_class( Capacity )
- {}
- };
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_unordered_set_basehook()
- {
- typedef ci::StripedSet<
- bi::unordered_set<base_item_type
- , bi::hash< hasher >
- , bi::equal< is_equal<base_item_type> >
- , bi::power_2_buckets<true>
- , bi::incremental<true>
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_unordered_set_basehook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::unordered_set<base_item_type
- , bi::hash< hasher >
- , bi::equal< is_equal<base_item_type> >
- , bi::power_2_buckets<true>
- , bi::incremental<true>
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::buffer< co::v::static_buffer< cds::any_type, 64 > >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_unordered_set_basehook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::unordered_set<base_item_type
- , bi::hash< hasher >
- , bi::equal< is_equal<base_item_type> >
- , bi::power_2_buckets<true>
- , bi::incremental<true>
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::buffer< dyn_buffer< 256, cds::any_type, std::allocator<int> > >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(512) );
- test_with( s );
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_unordered_set_memberhook()
- {
- typedef ci::StripedSet<
- bi::unordered_set<member_item_type
- , bi::member_hook< member_item_type, bi::unordered_set_member_hook<>, &member_item_type::hMember>
- , bi::hash< hasher >
- , bi::equal< is_equal<member_item_type> >
- , bi::power_2_buckets<true>
- , bi::incremental<true>
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_unordered_set_memberhook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::unordered_set<member_item_type
- , bi::member_hook< member_item_type, bi::unordered_set_member_hook<>, &member_item_type::hMember>
- , bi::hash< hasher >
- , bi::equal< is_equal<member_item_type> >
- , bi::power_2_buckets<true>
- , bi::incremental<true>
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::buffer< dyn_buffer< 64, cds::any_type, std::allocator<int> > >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Refinable_unordered_set_memberhook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::unordered_set<member_item_type
- , bi::member_hook< member_item_type, bi::unordered_set_member_hook<>, &member_item_type::hMember>
- , bi::hash< hasher >
- , bi::equal< is_equal<member_item_type> >
- , bi::power_2_buckets<true>
- , bi::incremental<true>
- >
- ,co::mutex_policy< ci::striped_set::refinable<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::buffer< co::v::static_buffer< cds::any_type, 128 > >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
- test_with( s );
- }
-
-} // 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.
-*/
-
-#ifndef CDSTEST_HDR_INTRUSIVE_SET_H
-#define CDSTEST_HDR_INTRUSIVE_SET_H
-
-#include "cppunit/cppunit_proxy.h"
-#include "size_check.h"
-
-#include <cds/opt/hash.h>
-#include <functional> // ref
-
-// forward declaration
-namespace cds { namespace intrusive {} }
-
-namespace set {
- using misc::check_size;
-
- namespace ci = cds::intrusive;
- namespace co = cds::opt;
-
- class IntrusiveHashSetHdrTest: public CppUnitMini::TestCase
- {
- protected:
- struct stat
- {
- unsigned int nDisposeCount ; // count of disposer calling
- unsigned int nFindCount ; // count of find-functor calling
- unsigned int nUpdateNewCount;
- unsigned int nUpdateCount;
- mutable unsigned int nEraseCount;
-
- stat()
- {
- memset( this, 0, sizeof(*this));
- }
- };
-
- template <typename Node>
- struct base_int_item
- : public Node
- , public stat
-
- {
- int nKey;
- int nVal;
-
- base_int_item()
- {}
-
- base_int_item(int key, int val)
- : nKey( key )
- , nVal(val)
- {}
-
- base_int_item(const base_int_item& v )
- : Node()
- , stat()
- , nKey( v.nKey )
- , nVal( v.nVal )
- {}
-
- int key() const
- {
- return nKey;
- }
- };
-
- template <typename Node>
- struct member_int_item: public stat
- {
- int nKey;
- int nVal;
-
- Node hMember;
-
- stat s;
-
- member_int_item()
- {}
-
- member_int_item(int key, int val)
- : nKey( key )
- , nVal(val)
- {}
-
- member_int_item(const member_int_item& v )
- : stat()
- , nKey( v.nKey )
- , nVal( v.nVal )
- {}
-
- int key() const
- {
- return nKey;
- }
- };
-
- struct hash_int {
- size_t operator()( int i ) const
- {
- return co::v::hash<int>()( i );
- }
- template <typename Item>
- size_t operator()( const Item& i ) const
- {
- return (*this)( i.key() );
- }
- };
-
- struct simple_item_counter {
- size_t m_nCount;
-
- simple_item_counter()
- : m_nCount(0)
- {}
-
- size_t operator ++()
- {
- return ++m_nCount;
- }
-
- size_t operator --()
- {
- return --m_nCount;
- }
-
- void reset()
- {
- m_nCount = 0;
- }
-
- operator size_t() const
- {
- return m_nCount;
- }
-
- };
-
-
- template <typename T>
- struct less
- {
- bool operator ()(const T& v1, const T& v2 ) const
- {
- return v1.key() < v2.key();
- }
-
- template <typename Q>
- bool operator ()(const T& v1, const Q& v2 ) const
- {
- return v1.key() < v2;
- }
-
- template <typename Q>
- bool operator ()(const Q& v1, const T& v2 ) const
- {
- return v1 < v2.key();
- }
- };
-
- template <typename T>
- struct cmp {
- int operator ()(const T& v1, const T& v2 ) const
- {
- if ( v1.key() < v2.key() )
- return -1;
- return v1.key() > v2.key() ? 1 : 0;
- }
-
- template <typename Q>
- int operator ()(const T& v1, const Q& v2 ) const
- {
- if ( v1.key() < v2 )
- return -1;
- return v1.key() > v2 ? 1 : 0;
- }
-
- template <typename Q>
- int operator ()(const Q& v1, const T& v2 ) const
- {
- if ( v1 < v2.key() )
- return -1;
- return v1 > v2.key() ? 1 : 0;
- }
- };
-
- struct faked_disposer
- {
- template <typename T>
- void operator ()( T * p )
- {
- ++p->nDisposeCount;
- }
- };
-
- struct find_functor
- {
- template <typename Item, typename T>
- void operator()( Item& item, T& /*val*/ )
- {
- ++item.nFindCount;
- }
- };
-
- struct insert_functor
- {
- template <typename Item>
- void operator()(Item& item )
- {
- item.nVal = item.nKey * 100;
- }
- };
-
- struct update_functor
- {
- template <typename Item>
- void operator()( bool bNew, Item& item, Item& /*val*/ )
- {
- if ( bNew )
- ++item.nUpdateNewCount;
- else
- ++item.nUpdateCount;
- }
- };
-
- struct erase_functor
- {
- template <typename Item>
- void operator()( Item const& item )
- {
- item.nEraseCount++;
- }
- };
-
- template <class Set>
- void test_int_with( Set& s )
- {
- typedef typename Set::value_type value_type;
-
- value_type v1( 10, 50 );
- value_type v2( 5, 25 );
- value_type v3( 20, 100 );
- int key;
-
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
-
- // insert/find test
- CPPUNIT_ASSERT( !s.contains( v1.key() ));
- CPPUNIT_ASSERT( s.insert( v1 ));
- CPPUNIT_ASSERT( s.contains( v1.key() ));
- CPPUNIT_ASSERT( check_size( s, 1 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- CPPUNIT_ASSERT( !s.contains( v2.key(), less<value_type>() ));
- CPPUNIT_ASSERT( s.insert( v2 ));
- CPPUNIT_ASSERT( v2.nFindCount == 0 );
- CPPUNIT_ASSERT( s.find_with( key = v2.key(), less<value_type>(), find_functor() ));
- CPPUNIT_ASSERT( v2.nFindCount == 1 );
- v2.nFindCount = 0;
- CPPUNIT_ASSERT( check_size( s, 2 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- {
- insert_functor fi;
- find_functor ff;
- CPPUNIT_ASSERT( !s.contains( v3 ));
- CPPUNIT_ASSERT( v3.nVal != v3.nKey * 100 );
- CPPUNIT_ASSERT( s.insert( v3, std::ref(fi) ));
- CPPUNIT_ASSERT( v3.nVal == v3.nKey * 100 );
- CPPUNIT_ASSERT( v3.nFindCount == 0 );
- CPPUNIT_ASSERT( s.find( v3, std::ref(ff) ));
- CPPUNIT_ASSERT( v3.nFindCount == 1 );
- v3.nFindCount = 0;
- CPPUNIT_ASSERT( check_size( s, 3 ));
- CPPUNIT_ASSERT( !s.empty() );
- }
-
- // unlink test
- CPPUNIT_ASSERT( s.unlink( v1 ));
- CPPUNIT_ASSERT( !s.contains( v1 ));
- CPPUNIT_ASSERT( s.contains( v2 ));
- CPPUNIT_ASSERT( s.contains( v3 ));
- CPPUNIT_ASSERT( check_size( s, 2 ));
-
- CPPUNIT_ASSERT( !s.unlink( v1 ));
- CPPUNIT_ASSERT( !s.contains( v1 ));
- CPPUNIT_ASSERT( check_size( s, 2 ));
-
- CPPUNIT_ASSERT( s.contains( v3, less<value_type>() ));
- CPPUNIT_ASSERT( s.unlink( v3 ));
- CPPUNIT_ASSERT( !s.contains( v3, less<value_type>() ));
- CPPUNIT_ASSERT( check_size( s, 1 ));
-
- CPPUNIT_ASSERT( s.contains( v2 ));
- CPPUNIT_ASSERT( s.unlink( v2 ));
- CPPUNIT_ASSERT( !s.contains( v1 ));
- CPPUNIT_ASSERT( !s.contains( v2 ));
- CPPUNIT_ASSERT( !s.contains( v3 ));
- CPPUNIT_ASSERT( check_size( s, 0 ));
- CPPUNIT_ASSERT( s.empty() );
-
- Set::gc::force_dispose();
- // unlink function calls disposer
- CPPUNIT_ASSERT( v1.nDisposeCount == 1 );
- CPPUNIT_ASSERT( v2.nDisposeCount == 1 );
- CPPUNIT_ASSERT( v3.nDisposeCount == 1 );
-
- // update test
- {
- update_functor f;
- std::pair<bool, bool> ret = s.update(v1, f, false);
- CPPUNIT_ASSERT(!ret.first);
- CPPUNIT_ASSERT(!ret.second);
- CPPUNIT_ASSERT(v1.nUpdateNewCount == 0);
- CPPUNIT_ASSERT(v1.nUpdateCount == 0);
- CPPUNIT_ASSERT(check_size(s, 0));
-
- ret = s.update( v1, f );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( ret.second );
- CPPUNIT_ASSERT( v1.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v1.nUpdateCount == 0 );
- CPPUNIT_ASSERT( check_size( s, 1 ));
-
- ret = s.update(v1, f, false);
- CPPUNIT_ASSERT(ret.first);
- CPPUNIT_ASSERT(!ret.second);
- CPPUNIT_ASSERT(v1.nUpdateNewCount == 1);
- CPPUNIT_ASSERT(v1.nUpdateCount == 1);
- CPPUNIT_ASSERT(check_size(s, 1));
-
- ret = s.update( v2, f );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( ret.second );
- CPPUNIT_ASSERT( v2.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v2.nUpdateCount == 0 );
- CPPUNIT_ASSERT( check_size( s, 2 ));
-
- ret = s.update( v3, f );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( ret.second );
- CPPUNIT_ASSERT( v3.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v3.nUpdateCount == 0 );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- CPPUNIT_ASSERT( s.contains( v1 ));
- CPPUNIT_ASSERT( s.contains( v2 ));
- CPPUNIT_ASSERT( s.contains( v3 ));
-
- ret = s.update( v1, f );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( !ret.second );
- CPPUNIT_ASSERT( v1.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v1.nUpdateCount == 2 );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- ret = s.update( v2, f );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( !ret.second );
- CPPUNIT_ASSERT( v2.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v2.nUpdateCount == 1 );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- ret = s.update( v3, f );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( !ret.second );
- CPPUNIT_ASSERT( v3.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v3.nUpdateCount == 1 );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- CPPUNIT_ASSERT( s.contains( v1 ));
- CPPUNIT_ASSERT( s.contains( v2 ));
- CPPUNIT_ASSERT( s.contains( v3 ));
- }
-
- // erase test
- CPPUNIT_ASSERT( s.contains( v1 ));
- CPPUNIT_ASSERT( s.contains( v2, less<value_type>() ));
- CPPUNIT_ASSERT( s.contains( v3 ));
- CPPUNIT_ASSERT( check_size( s, 3 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- CPPUNIT_ASSERT( s.erase( v1 ));
- CPPUNIT_ASSERT( !s.contains( v1 ));
- CPPUNIT_ASSERT( s.contains( v2 ));
- CPPUNIT_ASSERT( s.contains( v3 ));
- CPPUNIT_ASSERT( check_size( s, 2 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- CPPUNIT_ASSERT( v1.nEraseCount == 0 );
- CPPUNIT_ASSERT( !s.erase( v1, erase_functor() ));
- CPPUNIT_ASSERT( v1.nEraseCount == 0 );
- CPPUNIT_ASSERT( !s.contains( v1 ));
- CPPUNIT_ASSERT( s.contains( v2 ));
- CPPUNIT_ASSERT( s.contains( v3 ));
- CPPUNIT_ASSERT( check_size( s, 2 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- CPPUNIT_ASSERT( v2.nEraseCount == 0 );
- CPPUNIT_ASSERT( s.erase_with( v2.key(), less<value_type>(), erase_functor() ));
- CPPUNIT_ASSERT( v2.nEraseCount == 1 );
- CPPUNIT_ASSERT( !s.contains( v1 ));
- CPPUNIT_ASSERT( !s.contains( v2 ));
- CPPUNIT_ASSERT( s.contains( v3 ));
- CPPUNIT_ASSERT( check_size( s, 1 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- CPPUNIT_ASSERT( !s.erase( v2.key() ));
- CPPUNIT_ASSERT( !s.contains( v1 ));
- CPPUNIT_ASSERT( !s.contains( v2 ));
- CPPUNIT_ASSERT( s.contains( v3 ));
- CPPUNIT_ASSERT( check_size( s, 1 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- CPPUNIT_ASSERT( s.erase( v3 ));
- CPPUNIT_ASSERT( !s.contains( v1 ));
- CPPUNIT_ASSERT( !s.contains( v2 ));
- CPPUNIT_ASSERT( !s.contains( v3 ));
- CPPUNIT_ASSERT( check_size( s, 0 ));
- CPPUNIT_ASSERT( s.empty() );
-
- // dispose test
- Set::gc::force_dispose();
- CPPUNIT_ASSERT( v1.nDisposeCount == 2 );
- CPPUNIT_ASSERT( v2.nDisposeCount == 2 );
- CPPUNIT_ASSERT( v3.nDisposeCount == 2 );
-
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( s.insert( v1 ));
- CPPUNIT_ASSERT( s.insert( v3 ));
- CPPUNIT_ASSERT( check_size( s, 2 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- {
- value_type v( v1 );
- CPPUNIT_ASSERT( !s.unlink( v ) );
- }
-
- CPPUNIT_ASSERT( s.unlink( v3 ) );
- CPPUNIT_ASSERT( s.contains( v1 ));
- CPPUNIT_ASSERT( !s.contains( v2 ));
- CPPUNIT_ASSERT( !s.contains( v3 ));
- CPPUNIT_ASSERT( check_size( s, 1 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- CPPUNIT_ASSERT( !s.unlink( v3 ));
- CPPUNIT_ASSERT( s.contains( v1 ));
- CPPUNIT_ASSERT( !s.contains( v2 ));
- CPPUNIT_ASSERT( !s.contains( v3 ));
- CPPUNIT_ASSERT( check_size( s, 1 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- CPPUNIT_ASSERT( s.unlink( v1 ));
- CPPUNIT_ASSERT( !s.contains( v1 ));
- CPPUNIT_ASSERT( !s.contains( v2 ));
- CPPUNIT_ASSERT( !s.contains( v3 ));
- CPPUNIT_ASSERT( check_size( s, 0 ));
- CPPUNIT_ASSERT( s.empty() );
-
- CPPUNIT_ASSERT( !s.unlink( v2 ));
- CPPUNIT_ASSERT( !s.contains( v1 ));
- CPPUNIT_ASSERT( !s.contains( v2 ));
- CPPUNIT_ASSERT( !s.contains( v3 ));
- CPPUNIT_ASSERT( check_size( s, 0 ));
- CPPUNIT_ASSERT( s.empty() );
-
- Set::gc::force_dispose();
- CPPUNIT_ASSERT( v1.nDisposeCount == 3 );
- CPPUNIT_ASSERT( v2.nDisposeCount == 2 );
- CPPUNIT_ASSERT( v3.nDisposeCount == 3 );
-
- // clear test
- CPPUNIT_ASSERT( s.insert( v1 ));
- CPPUNIT_ASSERT( s.insert( v3 ));
- CPPUNIT_ASSERT( s.insert( v2 ));
-
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
- Set::gc::force_dispose();
- CPPUNIT_CHECK( v1.nDisposeCount == 4 );
- CPPUNIT_CHECK( v2.nDisposeCount == 3 );
- CPPUNIT_CHECK( v3.nDisposeCount == 4 );
- }
-
-
- template <class Set>
- void test_int()
- {
- {
- Set s( 64, 4 );
- test_int_with( s );
- }
-
- // Iterator test
- test_iter<Set>();
-
- // extract/get test
- {
- typedef typename Set::value_type value_type;
- typedef typename Set::guarded_ptr guarded_ptr;
-
- static size_t const nLimit = 1024;
- value_type arrItems[nLimit];
- int arr[nLimit];
- for ( size_t i = 0; i < nLimit; ++i )
- arr[i] = (int) i;
- shuffle( arr, arr + nLimit );
-
- for ( size_t i = 0; i < nLimit; ++i ) {
- arrItems[i].nKey = arr[i];
- arrItems[i].nVal = arr[i] * 2;
- }
-
- Set s( nLimit, 2 );
- for ( size_t i = 0; i < nLimit; ++i )
- CPPUNIT_ASSERT( s.insert( arrItems[i] ));
-
- guarded_ptr gp;
- for ( size_t i = 0; i < nLimit; i += 2 ) {
- int nKey = arr[i];
- gp = s.get( nKey );
- CPPUNIT_ASSERT( gp );
- CPPUNIT_ASSERT( !gp.empty());
- CPPUNIT_CHECK( gp->nKey == nKey );
- CPPUNIT_CHECK( gp->nVal == nKey * 2 );
- gp.release();
-
- gp = s.extract( nKey );
- CPPUNIT_ASSERT( gp );
- CPPUNIT_ASSERT( !gp.empty() );
- CPPUNIT_CHECK( gp->nKey == nKey );
- CPPUNIT_CHECK( gp->nVal == nKey * 2 );
- gp.release();
-
- gp = s.get( nKey );
- CPPUNIT_CHECK( !gp );
- CPPUNIT_ASSERT( gp.empty() );
- CPPUNIT_CHECK( !s.extract( nKey ));
- CPPUNIT_CHECK( gp.empty() );
-
- nKey = arr[i+1];
- gp = s.get_with( nKey, less<value_type>() );
- CPPUNIT_ASSERT( gp );
- CPPUNIT_CHECK( gp->nKey == nKey );
- CPPUNIT_CHECK( gp->nVal == nKey * 2 );
- gp.release();
-
- gp = s.extract_with( nKey, less<value_type>() );
- CPPUNIT_ASSERT( gp );
- CPPUNIT_ASSERT( !gp.empty() );
- CPPUNIT_CHECK( gp->nKey == nKey );
- CPPUNIT_CHECK( gp->nVal == nKey * 2 );
- gp.release();
-
- gp = s.get_with( nKey, less<value_type>() );
- CPPUNIT_CHECK( !gp );
- CPPUNIT_CHECK( gp.empty());
- CPPUNIT_CHECK( !s.extract_with( nKey, less<value_type>() ));
- CPPUNIT_CHECK( gp.empty());
- }
- CPPUNIT_CHECK( s.empty() );
- CPPUNIT_CHECK( check_size( s, 0 ));
-
- CPPUNIT_CHECK( !s.get( 100 ));
- CPPUNIT_CHECK( !s.extract( 100 ));
- CPPUNIT_CHECK( gp.empty() );
-
- Set::gc::force_dispose();
- }
- }
-
- template <class Set>
- void test_iter()
- {
- typedef typename Set::value_type value_type;
- typedef typename Set::iterator set_iterator;
- typedef typename Set::iterator const_set_iterator;
-
- value_type v[500];
- {
- Set s( 100, 4 );
-
- for ( int i = 0; unsigned(i) < sizeof(v)/sizeof(v[0]); ++i ) {
- v[i].nKey = i;
- v[i].nVal = i * 2;
-
- CPPUNIT_ASSERT( s.insert( v[i] ));
- }
-
- {
- typename Set::iterator it( s.begin() );
- typename Set::const_iterator cit( s.cbegin() );
- CPPUNIT_CHECK( it == cit );
- CPPUNIT_CHECK( it != s.end() );
- CPPUNIT_CHECK( it != s.cend() );
- CPPUNIT_CHECK( cit != s.end() );
- CPPUNIT_CHECK( cit != s.cend() );
- ++it;
- CPPUNIT_CHECK( it != cit );
- CPPUNIT_CHECK( it != s.end() );
- CPPUNIT_CHECK( it != s.cend() );
- CPPUNIT_CHECK( cit != s.end() );
- CPPUNIT_CHECK( cit != s.cend() );
- ++cit;
- CPPUNIT_CHECK( it == cit );
- CPPUNIT_CHECK( it != s.end() );
- CPPUNIT_CHECK( it != s.cend() );
- CPPUNIT_CHECK( cit != s.end() );
- CPPUNIT_CHECK( cit != s.cend() );
- }
-
- int nCount = 0;
- for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- set_iterator it2 = it;
- CPPUNIT_CHECK( it == it2 );
- CPPUNIT_CHECK( it2 != itEnd );
- CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal );
- it->nVal = (*it).nKey;
- ++nCount;
- }
- CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0]));
-
- nCount = 0;
- for ( const_set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey == it->nVal );
- ++nCount;
- }
- CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0]));
-
- for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) {
- CPPUNIT_ASSERT( v[i].nKey == v[i].nVal );
- }
- }
-
- Set::gc::force_dispose();
-
- for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) {
- CPPUNIT_ASSERT( v[i].nDisposeCount == 1 );
- }
- }
-
- template <class Set>
- void test_int_nogc()
- {
- typedef typename Set::value_type value_type;
-
- value_type v1( 10, 50 );
- value_type v2( 5, 25 );
- value_type v3( 20, 100 );
- int key;
-
- {
- {
- Set s( 64, 4 );
-
- // insert test
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
-
- // insert/find test
- CPPUNIT_ASSERT( s.contains( v1.key() ) == nullptr );
- CPPUNIT_ASSERT( s.insert( v1 ));
- CPPUNIT_ASSERT( s.contains( v1.key(), less<value_type>() ) == &v1 );
- CPPUNIT_ASSERT( check_size( s, 1 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- CPPUNIT_ASSERT( s.contains( v2.key() ) == nullptr );
- CPPUNIT_ASSERT( s.insert( v2 ));
- CPPUNIT_ASSERT( v2.nFindCount == 0 );
- CPPUNIT_ASSERT( s.find( key = v2.key(), find_functor() ));
- CPPUNIT_ASSERT( v2.nFindCount == 1 );
- v2.nFindCount = 0;
- CPPUNIT_ASSERT( check_size( s, 2 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- {
- find_functor ff;
- CPPUNIT_ASSERT( s.contains( v3 ) == nullptr );
- CPPUNIT_ASSERT( s.insert( v3 ));
- CPPUNIT_ASSERT( v3.nFindCount == 0 );
- CPPUNIT_ASSERT( s.find_with( v3, less<value_type>(), std::ref(ff) ));
- CPPUNIT_ASSERT( v3.nFindCount == 1 );
- v3.nFindCount = 0;
- CPPUNIT_ASSERT( check_size( s, 3 ));
- CPPUNIT_ASSERT( !s.empty() );
- }
- }
-
- // s.clear() ; // not all set supports clear() method
- CPPUNIT_ASSERT( v1.nDisposeCount == 1 );
- CPPUNIT_ASSERT( v2.nDisposeCount == 1 );
- CPPUNIT_ASSERT( v3.nDisposeCount == 1 );
-
-
- // update test
- {
- Set s( 64, 4 );
-
- update_functor f;
-
- std::pair<bool, bool> ret = s.update(v1, f, false);
- CPPUNIT_ASSERT(!ret.first);
- CPPUNIT_ASSERT(!ret.second);
- CPPUNIT_ASSERT(v1.nUpdateNewCount == 0);
- CPPUNIT_ASSERT(v1.nUpdateCount == 0);
- CPPUNIT_ASSERT(check_size(s, 0));
-
- ret = s.update( v1, f );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( ret.second );
- CPPUNIT_ASSERT( v1.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v1.nUpdateCount == 0 );
- CPPUNIT_ASSERT( check_size( s, 1 ));
-
- ret = s.update(v1, f, false);
- CPPUNIT_ASSERT(ret.first);
- CPPUNIT_ASSERT(!ret.second);
- CPPUNIT_ASSERT(v1.nUpdateNewCount == 1);
- CPPUNIT_ASSERT(v1.nUpdateCount == 1);
- CPPUNIT_ASSERT(check_size(s, 1));
-
- ret = s.update( v2, f );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( ret.second );
- CPPUNIT_ASSERT( v2.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v2.nUpdateCount == 0 );
- CPPUNIT_ASSERT( check_size( s, 2 ));
-
- ret = s.update( v3, f );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( ret.second );
- CPPUNIT_ASSERT( v3.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v3.nUpdateCount == 0 );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- CPPUNIT_ASSERT( s.contains( v1 ) == &v1 );
- CPPUNIT_ASSERT( s.contains( v2 ) == &v2 );
- CPPUNIT_ASSERT( s.contains( v3 ) == &v3 );
-
- ret = s.update( v1, f );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( !ret.second );
- CPPUNIT_ASSERT( v1.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v1.nUpdateCount == 2 );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- ret = s.update( v2, f );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( !ret.second );
- CPPUNIT_ASSERT( v2.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v2.nUpdateCount == 1 );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- ret = s.update( v3, f );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( !ret.second );
- CPPUNIT_ASSERT( v3.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v3.nUpdateCount == 1 );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- CPPUNIT_ASSERT( s.contains( v1 ) == &v1 );
- CPPUNIT_ASSERT( s.contains( v2 ) == &v2 );
- CPPUNIT_ASSERT( s.contains( v3 ) == &v3 );
- }
- }
-
- // dispose on destruct test
- CPPUNIT_ASSERT( v1.nDisposeCount == 2 );
- CPPUNIT_ASSERT( v2.nDisposeCount == 2 );
- CPPUNIT_ASSERT( v3.nDisposeCount == 2 );
-
- // Iterator test
- test_iter<Set>();
- }
-
-
-#define ASSERT_RCU_FIND( _expr ) { rcu_lock rl; CPPUNIT_ASSERT( _expr ); }
- template <class Set>
- void test_rcu_int_with( Set& s )
- {
- typedef typename Set::value_type value_type;
- typedef typename Set::gc::scoped_lock rcu_lock;
-
- value_type v1( 10, 50 );
- value_type v2( 5, 25 );
- value_type v3( 20, 100 );
- value_type v4( 40, 400 );
- int key;
-
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
-
- // insert/find test
-
- ASSERT_RCU_FIND( !s.contains( v1.key(), less<value_type>() ));
- CPPUNIT_ASSERT( s.insert( v1 ));
- ASSERT_RCU_FIND( s.contains( v1.key(), less<value_type>()) );
- CPPUNIT_ASSERT( check_size( s, 1 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- ASSERT_RCU_FIND( !s.contains( v2.key() ));
- CPPUNIT_ASSERT( s.insert( v2 ));
- CPPUNIT_ASSERT( v2.nFindCount == 0 );
- CPPUNIT_ASSERT( s.find( key = v2.key(), find_functor() ));
- CPPUNIT_ASSERT( v2.nFindCount == 1 );
- v2.nFindCount = 0;
- CPPUNIT_ASSERT( check_size( s, 2 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- {
- insert_functor fi;
- find_functor ff;
- ASSERT_RCU_FIND( !s.contains( v3 ));
- CPPUNIT_ASSERT( v3.nVal != v3.nKey * 100 );
- CPPUNIT_ASSERT( s.insert( v3, std::ref(fi) ));
- CPPUNIT_ASSERT( v3.nVal == v3.nKey * 100 );
- CPPUNIT_ASSERT( v3.nFindCount == 0 );
- CPPUNIT_ASSERT( s.find_with( v3, less<value_type>(), std::ref(ff) ));
- CPPUNIT_ASSERT( v3.nFindCount == 1 );
- v3.nFindCount = 0;
- CPPUNIT_ASSERT( check_size( s, 3 ));
- CPPUNIT_ASSERT( !s.empty() );
- }
-
- // unlink test
- CPPUNIT_ASSERT( s.unlink( v1 ));
- ASSERT_RCU_FIND( !s.contains( v1 ));
- ASSERT_RCU_FIND( s.contains( v2 ));
- ASSERT_RCU_FIND( s.contains( v3 ));
- CPPUNIT_ASSERT( check_size( s, 2 ));
-
- CPPUNIT_ASSERT( !s.unlink( v1 ));
- ASSERT_RCU_FIND( !s.contains( v1 ));
- CPPUNIT_ASSERT( check_size( s, 2 ));
-
- ASSERT_RCU_FIND( s.contains( v3 ) );
- CPPUNIT_ASSERT( s.unlink( v3 ));
- ASSERT_RCU_FIND( !s.contains( v3 ));
- CPPUNIT_ASSERT( check_size( s, 1 ));
-
- ASSERT_RCU_FIND( s.contains( v2 ));
- CPPUNIT_ASSERT( s.unlink( v2 ));
- ASSERT_RCU_FIND( !s.contains( v1 ));
- ASSERT_RCU_FIND( !s.contains( v2 ));
- ASSERT_RCU_FIND( !s.contains( v3 ));
- CPPUNIT_ASSERT( check_size( s, 0 ));
- CPPUNIT_ASSERT( s.empty() );
-
- Set::gc::force_dispose();
- // unlink function calls disposer
- CPPUNIT_ASSERT( v1.nDisposeCount == 1 );
- CPPUNIT_ASSERT( v2.nDisposeCount == 1 );
- CPPUNIT_ASSERT( v3.nDisposeCount == 1 );
-
- // update test
- {
- update_functor f;
-
- std::pair<bool, bool> ret = s.update(v1, f, false);
- CPPUNIT_ASSERT(!ret.first);
- CPPUNIT_ASSERT(!ret.second);
- CPPUNIT_ASSERT(v1.nUpdateNewCount == 0);
- CPPUNIT_ASSERT(v1.nUpdateCount == 0);
- CPPUNIT_ASSERT(check_size(s, 0));
-
- ret = s.update( v1, f );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( ret.second );
- CPPUNIT_ASSERT( v1.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v1.nUpdateCount == 0 );
- CPPUNIT_ASSERT( check_size( s, 1 ));
-
- ret = s.update(v1, f, false);
- CPPUNIT_ASSERT(ret.first);
- CPPUNIT_ASSERT(!ret.second);
- CPPUNIT_ASSERT(v1.nUpdateNewCount == 1);
- CPPUNIT_ASSERT(v1.nUpdateCount == 1);
- CPPUNIT_ASSERT(check_size(s, 1));
-
- ret = s.update( v2, f );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( ret.second );
- CPPUNIT_ASSERT( v2.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v2.nUpdateCount == 0 );
- CPPUNIT_ASSERT( check_size( s, 2 ));
-
- ret = s.update( v3, f );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( ret.second );
- CPPUNIT_ASSERT( v3.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v3.nUpdateCount == 0 );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- ASSERT_RCU_FIND( s.contains( v1 ));
- ASSERT_RCU_FIND( s.contains( v2 ));
- ASSERT_RCU_FIND( s.contains( v3 ));
-
- ret = s.update( v1, f );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( !ret.second );
- CPPUNIT_ASSERT( v1.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v1.nUpdateCount == 2 );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- ret = s.update( v2, f );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( !ret.second );
- CPPUNIT_ASSERT( v2.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v2.nUpdateCount == 1 );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- ret = s.update( v3, f );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( !ret.second );
- CPPUNIT_ASSERT( v3.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v3.nUpdateCount == 1 );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- ASSERT_RCU_FIND( s.contains( v1 ) );
- ASSERT_RCU_FIND( s.contains( v2 ));
- ASSERT_RCU_FIND( s.contains( v3 ));
- }
-
- // erase test
- ASSERT_RCU_FIND( s.contains( v1 ));
- ASSERT_RCU_FIND( s.contains( v2, less<value_type>() ));
- ASSERT_RCU_FIND( s.contains( v3 ));
- CPPUNIT_ASSERT( check_size( s, 3 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- CPPUNIT_ASSERT( v1.nEraseCount == 0 );
- CPPUNIT_ASSERT( s.erase_with( v1, less<value_type>(), erase_functor() ));
- CPPUNIT_ASSERT( v1.nEraseCount == 1 );
- ASSERT_RCU_FIND( !s.contains( v1 ));
- ASSERT_RCU_FIND( s.contains( v2 ) );
- ASSERT_RCU_FIND( s.contains( v3 ) );
- CPPUNIT_ASSERT( check_size( s, 2 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- CPPUNIT_ASSERT( !s.erase( v1 ));
- ASSERT_RCU_FIND( !s.contains( v1 ));
- ASSERT_RCU_FIND( s.contains( v2 ));
- ASSERT_RCU_FIND( s.contains( v3 ) );
- CPPUNIT_ASSERT( check_size( s, 2 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- ASSERT_RCU_FIND( !s.contains( v4 ));
- CPPUNIT_ASSERT( s.insert(v4));
- ASSERT_RCU_FIND( s.contains( v4.key() ));
- CPPUNIT_ASSERT( s.erase_with( v4.key(), less<value_type>() ));
- ASSERT_RCU_FIND( !s.contains( v4.key() ));
-
- CPPUNIT_ASSERT( s.erase( v2.key() ));
- ASSERT_RCU_FIND( !s.contains( v1 ));
- ASSERT_RCU_FIND( !s.contains( v2 ));
- ASSERT_RCU_FIND( s.contains( v3 ) );
- CPPUNIT_ASSERT( check_size( s, 1 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- CPPUNIT_ASSERT( !s.erase( v2.key() ));
- ASSERT_RCU_FIND( !s.contains( v1 ));
- ASSERT_RCU_FIND( !s.contains( v2 ));
- ASSERT_RCU_FIND( s.contains( v3 ) );
- CPPUNIT_ASSERT( check_size( s, 1 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- CPPUNIT_ASSERT( v3.nEraseCount == 0 );
- CPPUNIT_ASSERT( s.erase( v3, erase_functor() ));
- CPPUNIT_ASSERT( v3.nEraseCount == 1 );
- ASSERT_RCU_FIND( !s.contains( v1 ));
- ASSERT_RCU_FIND( !s.contains( v2 ));
- ASSERT_RCU_FIND( !s.contains( v3 ));
- CPPUNIT_ASSERT( check_size( s, 0 ));
- CPPUNIT_ASSERT( s.empty() );
-
- // dispose test
- Set::gc::force_dispose();
- CPPUNIT_ASSERT( v1.nDisposeCount == 2 );
- CPPUNIT_ASSERT( v2.nDisposeCount == 2 );
- CPPUNIT_ASSERT( v3.nDisposeCount == 2 );
- CPPUNIT_ASSERT( v4.nDisposeCount == 1 );
-
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( s.insert( v1 ));
- CPPUNIT_ASSERT( s.insert( v3 ));
- CPPUNIT_ASSERT( check_size( s, 2 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- {
- value_type v( v1 );
- CPPUNIT_ASSERT( !s.unlink( v ) );
- }
-
- CPPUNIT_ASSERT( s.unlink( v3 ) );
- ASSERT_RCU_FIND( s.contains( v1 ));
- ASSERT_RCU_FIND( !s.contains( v2 ));
- ASSERT_RCU_FIND( !s.contains( v3 ));
- CPPUNIT_ASSERT( check_size( s, 1 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- CPPUNIT_ASSERT( !s.unlink( v3 ));
- ASSERT_RCU_FIND( s.contains( v1 ));
- ASSERT_RCU_FIND( !s.contains( v2 ));
- ASSERT_RCU_FIND( !s.contains( v3 ));
- CPPUNIT_ASSERT( check_size( s, 1 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- CPPUNIT_ASSERT( s.unlink( v1 ));
- ASSERT_RCU_FIND( !s.contains( v1 ));
- ASSERT_RCU_FIND( !s.contains( v2 ));
- ASSERT_RCU_FIND( !s.contains( v3 ));
- CPPUNIT_ASSERT( check_size( s, 0 ));
- CPPUNIT_ASSERT( s.empty() );
-
- CPPUNIT_ASSERT( !s.unlink( v2 ));
- ASSERT_RCU_FIND( !s.contains( v1 ));
- ASSERT_RCU_FIND( !s.contains( v2 ));
- ASSERT_RCU_FIND( !s.contains( v3 ));
- CPPUNIT_ASSERT( check_size( s, 0 ));
- CPPUNIT_ASSERT( s.empty() );
-
- Set::gc::force_dispose();
- CPPUNIT_ASSERT( v1.nDisposeCount == 3 );
- CPPUNIT_ASSERT( v2.nDisposeCount == 2 );
- CPPUNIT_ASSERT( v3.nDisposeCount == 3 );
- CPPUNIT_ASSERT( v4.nDisposeCount == 1 );
-
- // clear test
- CPPUNIT_ASSERT( s.insert( v1 ));
- CPPUNIT_ASSERT( s.insert( v3 ));
- CPPUNIT_ASSERT( s.insert( v2 ));
-
- s.clear();
- Set::gc::force_dispose();
- CPPUNIT_ASSERT( v1.nDisposeCount == 4 );
- CPPUNIT_ASSERT( v2.nDisposeCount == 3 );
- CPPUNIT_ASSERT( v3.nDisposeCount == 4 );
- CPPUNIT_ASSERT( v4.nDisposeCount == 1 );
- }
-#undef ASSERT_RCU_FIND
-
- template <class Set>
- void test_rcu_int()
- {
- {
- Set s( 64, 4 );
- test_rcu_int_with( s );
- }
-
- // Iterator test
- test_iter<Set>();
-
- // Extract tests
- typedef typename Set::gc rcu;
- typedef typename Set::value_type value_type;
- typedef typename Set::rcu_lock rcu_lock;
-
- typename Set::exempt_ptr ep;
-
- {
- static size_t const nLimit = 1024;
- value_type arrItems[nLimit];
- int arr[nLimit];
- for ( size_t i = 0; i < nLimit; ++i )
- arr[i] = (int) i;
- shuffle( arr, arr + nLimit );
-
- for ( size_t i = 0; i < nLimit; ++i ) {
- arrItems[i].nKey = arr[i];
- arrItems[i].nVal = arr[i] * 2;
- }
-
- Set s( nLimit, 2 );
- for ( size_t i = 0; i < nLimit; ++i )
- CPPUNIT_ASSERT( s.insert( arrItems[i] ));
-
- for ( size_t i = 0; i < nLimit; i += 2 ) {
- value_type * pVal;
- int nKey = arr[i];
- {
- rcu_lock l;
- pVal = s.get( nKey );
- CPPUNIT_ASSERT( pVal != nullptr );
- CPPUNIT_CHECK( pVal->nKey == nKey );
- CPPUNIT_CHECK( pVal->nVal == nKey * 2 );
-
- ep = s.extract( nKey );
- CPPUNIT_ASSERT( ep );
- CPPUNIT_ASSERT( !ep.empty() );
- CPPUNIT_CHECK( pVal->nKey == ep->nKey );
- CPPUNIT_CHECK( pVal->nVal == (*ep).nVal );
- }
- ep.release();
- {
- rcu_lock l;
- CPPUNIT_CHECK( s.get( nKey ) == nullptr );
- CPPUNIT_CHECK( !s.extract( nKey ));
- CPPUNIT_CHECK( ep.empty() );
-
- nKey = arr[i+1];
- pVal = s.get_with( nKey, less<value_type>() );
- CPPUNIT_ASSERT( pVal != nullptr );
- CPPUNIT_CHECK( pVal->nKey == nKey );
- CPPUNIT_CHECK( pVal->nVal == nKey * 2 );
-
- ep = s.extract_with( nKey, less<value_type>() );
- CPPUNIT_ASSERT( ep );
- CPPUNIT_ASSERT( !ep.empty() );
- CPPUNIT_CHECK( pVal->nKey == ep->nKey );
- CPPUNIT_CHECK( pVal->nVal == (*ep).nVal );
- }
- ep.release();
- {
- rcu_lock l;
- CPPUNIT_CHECK( s.get_with( nKey, less<value_type>() ) == nullptr );
- ep = s.extract_with( nKey, less<value_type>() );
- CPPUNIT_CHECK( !ep );
- CPPUNIT_CHECK( ep.empty() );
- }
- }
- CPPUNIT_CHECK( s.empty() );
- CPPUNIT_CHECK( check_size( s, 0 ));
- {
- rcu_lock l;
- CPPUNIT_CHECK( s.get( 100 ) == nullptr );
- ep = s.extract( 100 );
- CPPUNIT_CHECK( !ep );
- CPPUNIT_CHECK( ep.empty() );
- }
-
- Set::gc::force_dispose();
- }
- }
-
- template <class Set>
- void test_rcu_int_michael_list()
- {
- {
- Set s( 64, 4 );
- test_rcu_int_with( s );
- }
-
- // Iterator test
- test_iter<Set>();
-
- // Extract tests
- typedef typename Set::gc rcu;
- typedef typename Set::value_type value_type;
- typedef typename Set::rcu_lock rcu_lock;
-
- typename Set::exempt_ptr ep;
- typename Set::raw_ptr gp;
-
- {
- static size_t const nLimit = 1024;
- value_type arrItems[nLimit];
- int arr[nLimit];
- for ( size_t i = 0; i < nLimit; ++i )
- arr[i] = (int) i;
- shuffle( arr, arr + nLimit );
-
- for ( size_t i = 0; i < nLimit; ++i ) {
- arrItems[i].nKey = arr[i];
- arrItems[i].nVal = arr[i] * 2;
- }
-
- Set s( nLimit, 2 );
- for ( size_t i = 0; i < nLimit; ++i )
- CPPUNIT_ASSERT( s.insert( arrItems[i] ));
-
- for ( size_t i = 0; i < nLimit; i += 2 ) {
- int nKey = arr[i];
- {
- rcu_lock l;
- gp = s.get( nKey );
- CPPUNIT_ASSERT( gp );
- CPPUNIT_CHECK( gp->nKey == nKey );
- CPPUNIT_CHECK( (*gp).nVal == nKey * 2 );
- }
- gp.release();
-
- ep = s.extract( nKey );
- CPPUNIT_ASSERT( ep );
- CPPUNIT_ASSERT( !ep.empty() );
- CPPUNIT_CHECK( nKey == ep->nKey );
- CPPUNIT_CHECK( nKey * 2 == (*ep).nVal );
- ep.release();
- {
- rcu_lock l;
- CPPUNIT_CHECK( !s.get( nKey ));
- }
- CPPUNIT_CHECK( !s.extract( nKey ));
- CPPUNIT_CHECK( ep.empty() );
-
- nKey = arr[i+1];
- {
- rcu_lock l;
- gp = s.get_with( nKey, less<value_type>() );
- CPPUNIT_ASSERT( gp );
- CPPUNIT_CHECK( gp->nKey == nKey );
- CPPUNIT_CHECK( gp->nVal == nKey * 2 );
- }
- gp.release();
-
- ep = s.extract_with( nKey, less<value_type>() );
- CPPUNIT_ASSERT( ep );
- CPPUNIT_ASSERT( !ep.empty() );
- CPPUNIT_CHECK( nKey == ep->nKey );
- CPPUNIT_CHECK( nKey * 2 == (*ep).nVal );
- ep.release();
-
- {
- rcu_lock l;
- CPPUNIT_CHECK( !s.get_with( nKey, less<value_type>()));
- }
- ep = s.extract_with( nKey, less<value_type>() );
- CPPUNIT_CHECK( !ep );
- CPPUNIT_CHECK( ep.empty() );
- }
- CPPUNIT_CHECK( s.empty() );
- CPPUNIT_CHECK( check_size( s, 0 ));
- {
- rcu_lock l;
- CPPUNIT_CHECK( !s.get( 100 ));
- }
- ep = s.extract( 100 );
- CPPUNIT_CHECK( !ep );
- CPPUNIT_CHECK( ep.empty() );
-
- Set::gc::force_dispose();
- }
- }
-
- // MichaelHashSet + MichaelList
- void HP_base_cmp();
- void HP_base_less();
- void HP_base_cmpmix();
- void HP_member_cmp();
- void HP_member_less();
- void HP_member_cmpmix();
-
- void DHP_base_cmp();
- void DHP_base_less();
- void DHP_base_cmpmix();
- void DHP_member_cmp();
- void DHP_member_less();
- void DHP_member_cmpmix();
-
- void RCU_GPI_base_cmp();
- void RCU_GPI_base_less();
- void RCU_GPI_base_cmpmix();
- void RCU_GPI_member_cmp();
- void RCU_GPI_member_less();
- void RCU_GPI_member_cmpmix();
-
- void RCU_GPB_base_cmp();
- void RCU_GPB_base_less();
- void RCU_GPB_base_cmpmix();
- void RCU_GPB_member_cmp();
- void RCU_GPB_member_less();
- void RCU_GPB_member_cmpmix();
-
- void RCU_GPT_base_cmp();
- void RCU_GPT_base_less();
- void RCU_GPT_base_cmpmix();
- void RCU_GPT_member_cmp();
- void RCU_GPT_member_less();
- void RCU_GPT_member_cmpmix();
-
- void RCU_SHB_base_cmp();
- void RCU_SHB_base_less();
- void RCU_SHB_base_cmpmix();
- void RCU_SHB_member_cmp();
- void RCU_SHB_member_less();
- void RCU_SHB_member_cmpmix();
-
- void RCU_SHT_base_cmp();
- void RCU_SHT_base_less();
- void RCU_SHT_base_cmpmix();
- void RCU_SHT_member_cmp();
- void RCU_SHT_member_less();
- void RCU_SHT_member_cmpmix();
-
- void nogc_base_cmp();
- void nogc_base_less();
- void nogc_base_cmpmix();
- void nogc_member_cmp();
- void nogc_member_less();
- void nogc_member_cmpmix();
-
- // MichaelHashSet + LazyList
- void HP_base_cmp_lazy();
- void HP_base_less_lazy();
- void HP_base_cmpmix_lazy();
- void HP_member_cmp_lazy();
- void HP_member_less_lazy();
- void HP_member_cmpmix_lazy();
-
- void DHP_base_cmp_lazy();
- void DHP_base_less_lazy();
- void DHP_base_cmpmix_lazy();
- void DHP_member_cmp_lazy();
- void DHP_member_less_lazy();
- void DHP_member_cmpmix_lazy();
-
- void RCU_GPI_base_cmp_lazy();
- void RCU_GPI_base_less_lazy();
- void RCU_GPI_base_cmpmix_lazy();
- void RCU_GPI_member_cmp_lazy();
- void RCU_GPI_member_less_lazy();
- void RCU_GPI_member_cmpmix_lazy();
-
- void RCU_GPB_base_cmp_lazy();
- void RCU_GPB_base_less_lazy();
- void RCU_GPB_base_cmpmix_lazy();
- void RCU_GPB_member_cmp_lazy();
- void RCU_GPB_member_less_lazy();
- void RCU_GPB_member_cmpmix_lazy();
-
- void RCU_GPT_base_cmp_lazy();
- void RCU_GPT_base_less_lazy();
- void RCU_GPT_base_cmpmix_lazy();
- void RCU_GPT_member_cmp_lazy();
- void RCU_GPT_member_less_lazy();
- void RCU_GPT_member_cmpmix_lazy();
-
- void RCU_SHB_base_cmp_lazy();
- void RCU_SHB_base_less_lazy();
- void RCU_SHB_base_cmpmix_lazy();
- void RCU_SHB_member_cmp_lazy();
- void RCU_SHB_member_less_lazy();
- void RCU_SHB_member_cmpmix_lazy();
-
- void RCU_SHT_base_cmp_lazy();
- void RCU_SHT_base_less_lazy();
- void RCU_SHT_base_cmpmix_lazy();
- void RCU_SHT_member_cmp_lazy();
- void RCU_SHT_member_less_lazy();
- void RCU_SHT_member_cmpmix_lazy();
-
- void nogc_base_cmp_lazy();
- void nogc_base_less_lazy();
- void nogc_base_cmpmix_lazy();
- void nogc_member_cmp_lazy();
- void nogc_member_less_lazy();
- void nogc_member_cmpmix_lazy();
-
- // SplitListSet + MichaelList [dyn - dynamic bucket table, st - static bucket table]
- void split_dyn_HP_base_cmp();
- void split_dyn_HP_base_less();
- void split_dyn_HP_base_cmpmix();
- void split_dyn_HP_base_cmpmix_stat();
- void split_dyn_HP_member_cmp();
- void split_dyn_HP_member_less();
- void split_dyn_HP_member_cmpmix();
- void split_dyn_HP_member_cmpmix_stat();
- void split_st_HP_base_cmp();
- void split_st_HP_base_less();
- void split_st_HP_base_cmpmix();
- void split_st_HP_base_cmpmix_stat();
- void split_st_HP_member_cmp();
- void split_st_HP_member_less();
- void split_st_HP_member_cmpmix();
- void split_st_HP_member_cmpmix_stat();
-
- void split_dyn_DHP_base_cmp();
- void split_dyn_DHP_base_less();
- void split_dyn_DHP_base_cmpmix();
- void split_dyn_DHP_base_cmpmix_stat();
- void split_dyn_DHP_member_cmp();
- void split_dyn_DHP_member_less();
- void split_dyn_DHP_member_cmpmix();
- void split_dyn_DHP_member_cmpmix_stat();
- void split_st_DHP_base_cmp();
- void split_st_DHP_base_less();
- void split_st_DHP_base_cmpmix();
- void split_st_DHP_base_cmpmix_stat();
- void split_st_DHP_member_cmp();
- void split_st_DHP_member_less();
- void split_st_DHP_member_cmpmix();
- void split_st_DHP_member_cmpmix_stat();
-
- void split_dyn_RCU_GPI_base_cmp();
- void split_dyn_RCU_GPI_base_less();
- void split_dyn_RCU_GPI_base_cmpmix();
- void split_dyn_RCU_GPI_base_cmpmix_stat();
- void split_dyn_RCU_GPI_member_cmp();
- void split_dyn_RCU_GPI_member_less();
- void split_dyn_RCU_GPI_member_cmpmix();
- void split_dyn_RCU_GPI_member_cmpmix_stat();
- void split_st_RCU_GPI_base_cmp();
- void split_st_RCU_GPI_base_less();
- void split_st_RCU_GPI_base_cmpmix();
- void split_st_RCU_GPI_base_cmpmix_stat();
- void split_st_RCU_GPI_member_cmp();
- void split_st_RCU_GPI_member_less();
- void split_st_RCU_GPI_member_cmpmix();
- void split_st_RCU_GPI_member_cmpmix_stat();
-
- void split_dyn_RCU_GPB_base_cmp();
- void split_dyn_RCU_GPB_base_less();
- void split_dyn_RCU_GPB_base_cmpmix();
- void split_dyn_RCU_GPB_base_cmpmix_stat();
- void split_dyn_RCU_GPB_member_cmp();
- void split_dyn_RCU_GPB_member_less();
- void split_dyn_RCU_GPB_member_cmpmix();
- void split_dyn_RCU_GPB_member_cmpmix_stat();
- void split_st_RCU_GPB_base_cmp();
- void split_st_RCU_GPB_base_less();
- void split_st_RCU_GPB_base_cmpmix();
- void split_st_RCU_GPB_base_cmpmix_stat();
- void split_st_RCU_GPB_member_cmp();
- void split_st_RCU_GPB_member_less();
- void split_st_RCU_GPB_member_cmpmix();
- void split_st_RCU_GPB_member_cmpmix_stat();
-
- void split_dyn_RCU_GPT_base_cmp();
- void split_dyn_RCU_GPT_base_less();
- void split_dyn_RCU_GPT_base_cmpmix();
- void split_dyn_RCU_GPT_base_cmpmix_stat();
- void split_dyn_RCU_GPT_member_cmp();
- void split_dyn_RCU_GPT_member_less();
- void split_dyn_RCU_GPT_member_cmpmix();
- void split_dyn_RCU_GPT_member_cmpmix_stat();
- void split_st_RCU_GPT_base_cmp();
- void split_st_RCU_GPT_base_less();
- void split_st_RCU_GPT_base_cmpmix();
- void split_st_RCU_GPT_base_cmpmix_stat();
- void split_st_RCU_GPT_member_cmp();
- void split_st_RCU_GPT_member_less();
- void split_st_RCU_GPT_member_cmpmix();
- void split_st_RCU_GPT_member_cmpmix_stat();
-
- void split_dyn_RCU_SHB_base_cmp();
- void split_dyn_RCU_SHB_base_less();
- void split_dyn_RCU_SHB_base_cmpmix();
- void split_dyn_RCU_SHB_base_cmpmix_stat();
- void split_dyn_RCU_SHB_member_cmp();
- void split_dyn_RCU_SHB_member_less();
- void split_dyn_RCU_SHB_member_cmpmix();
- void split_dyn_RCU_SHB_member_cmpmix_stat();
- void split_st_RCU_SHB_base_cmp();
- void split_st_RCU_SHB_base_less();
- void split_st_RCU_SHB_base_cmpmix();
- void split_st_RCU_SHB_base_cmpmix_stat();
- void split_st_RCU_SHB_member_cmp();
- void split_st_RCU_SHB_member_less();
- void split_st_RCU_SHB_member_cmpmix();
- void split_st_RCU_SHB_member_cmpmix_stat();
-
- void split_dyn_RCU_SHT_base_cmp();
- void split_dyn_RCU_SHT_base_less();
- void split_dyn_RCU_SHT_base_cmpmix();
- void split_dyn_RCU_SHT_base_cmpmix_stat();
- void split_dyn_RCU_SHT_member_cmp();
- void split_dyn_RCU_SHT_member_less();
- void split_dyn_RCU_SHT_member_cmpmix();
- void split_dyn_RCU_SHT_member_cmpmix_stat();
- void split_st_RCU_SHT_base_cmp();
- void split_st_RCU_SHT_base_less();
- void split_st_RCU_SHT_base_cmpmix();
- void split_st_RCU_SHT_base_cmpmix_stat();
- void split_st_RCU_SHT_member_cmp();
- void split_st_RCU_SHT_member_less();
- void split_st_RCU_SHT_member_cmpmix();
- void split_st_RCU_SHT_member_cmpmix_stat();
-
- void split_dyn_nogc_base_cmp();
- void split_dyn_nogc_base_less();
- void split_dyn_nogc_base_cmpmix();
- void split_dyn_nogc_base_cmpmix_stat();
- void split_dyn_nogc_member_cmp();
- void split_dyn_nogc_member_less();
- void split_dyn_nogc_member_cmpmix();
- void split_dyn_nogc_member_cmpmix_stat();
- void split_st_nogc_base_cmp();
- void split_st_nogc_base_less();
- void split_st_nogc_base_cmpmix();
- void split_st_nogc_base_cmpmix_stat();
- void split_st_nogc_member_cmp();
- void split_st_nogc_member_less();
- void split_st_nogc_member_cmpmix();
- void split_st_nogc_member_cmpmix_stat();
-
-
- // SplitListSet + LazyList [dyn - dynamic bucket table, st - static bucket table]
- void split_dyn_HP_base_cmp_lazy();
- void split_dyn_HP_base_less_lazy();
- void split_dyn_HP_base_cmpmix_lazy();
- void split_dyn_HP_base_cmpmix_stat_lazy();
- void split_dyn_HP_member_cmp_lazy();
- void split_dyn_HP_member_less_lazy();
- void split_dyn_HP_member_cmpmix_lazy();
- void split_dyn_HP_member_cmpmix_stat_lazy();
- void split_st_HP_base_cmp_lazy();
- void split_st_HP_base_less_lazy();
- void split_st_HP_base_cmpmix_lazy();
- void split_st_HP_base_cmpmix_stat_lazy();
- void split_st_HP_member_cmp_lazy();
- void split_st_HP_member_less_lazy();
- void split_st_HP_member_cmpmix_lazy();
- void split_st_HP_member_cmpmix_stat_lazy();
-
- void split_dyn_DHP_base_cmp_lazy();
- void split_dyn_DHP_base_less_lazy();
- void split_dyn_DHP_base_cmpmix_lazy();
- void split_dyn_DHP_base_cmpmix_stat_lazy();
- void split_dyn_DHP_member_cmp_lazy();
- void split_dyn_DHP_member_less_lazy();
- void split_dyn_DHP_member_cmpmix_lazy();
- void split_dyn_DHP_member_cmpmix_stat_lazy();
- void split_st_DHP_base_cmp_lazy();
- void split_st_DHP_base_less_lazy();
- void split_st_DHP_base_cmpmix_lazy();
- void split_st_DHP_base_cmpmix_stat_lazy();
- void split_st_DHP_member_cmp_lazy();
- void split_st_DHP_member_less_lazy();
- void split_st_DHP_member_cmpmix_lazy();
- void split_st_DHP_member_cmpmix_stat_lazy();
-
- void split_dyn_RCU_GPI_base_cmp_lazy();
- void split_dyn_RCU_GPI_base_less_lazy();
- void split_dyn_RCU_GPI_base_cmpmix_lazy();
- void split_dyn_RCU_GPI_base_cmpmix_stat_lazy();
- void split_dyn_RCU_GPI_member_cmp_lazy();
- void split_dyn_RCU_GPI_member_less_lazy();
- void split_dyn_RCU_GPI_member_cmpmix_lazy();
- void split_dyn_RCU_GPI_member_cmpmix_stat_lazy();
- void split_st_RCU_GPI_base_cmp_lazy();
- void split_st_RCU_GPI_base_less_lazy();
- void split_st_RCU_GPI_base_cmpmix_lazy();
- void split_st_RCU_GPI_base_cmpmix_stat_lazy();
- void split_st_RCU_GPI_member_cmp_lazy();
- void split_st_RCU_GPI_member_less_lazy();
- void split_st_RCU_GPI_member_cmpmix_lazy();
- void split_st_RCU_GPI_member_cmpmix_stat_lazy();
-
- void split_dyn_RCU_GPB_base_cmp_lazy();
- void split_dyn_RCU_GPB_base_less_lazy();
- void split_dyn_RCU_GPB_base_cmpmix_lazy();
- void split_dyn_RCU_GPB_base_cmpmix_stat_lazy();
- void split_dyn_RCU_GPB_member_cmp_lazy();
- void split_dyn_RCU_GPB_member_less_lazy();
- void split_dyn_RCU_GPB_member_cmpmix_lazy();
- void split_dyn_RCU_GPB_member_cmpmix_stat_lazy();
- void split_st_RCU_GPB_base_cmp_lazy();
- void split_st_RCU_GPB_base_less_lazy();
- void split_st_RCU_GPB_base_cmpmix_lazy();
- void split_st_RCU_GPB_base_cmpmix_stat_lazy();
- void split_st_RCU_GPB_member_cmp_lazy();
- void split_st_RCU_GPB_member_less_lazy();
- void split_st_RCU_GPB_member_cmpmix_lazy();
- void split_st_RCU_GPB_member_cmpmix_stat_lazy();
-
- void split_dyn_RCU_GPT_base_cmp_lazy();
- void split_dyn_RCU_GPT_base_less_lazy();
- void split_dyn_RCU_GPT_base_cmpmix_lazy();
- void split_dyn_RCU_GPT_base_cmpmix_stat_lazy();
- void split_dyn_RCU_GPT_member_cmp_lazy();
- void split_dyn_RCU_GPT_member_less_lazy();
- void split_dyn_RCU_GPT_member_cmpmix_lazy();
- void split_dyn_RCU_GPT_member_cmpmix_stat_lazy();
- void split_st_RCU_GPT_base_cmp_lazy();
- void split_st_RCU_GPT_base_less_lazy();
- void split_st_RCU_GPT_base_cmpmix_lazy();
- void split_st_RCU_GPT_base_cmpmix_stat_lazy();
- void split_st_RCU_GPT_member_cmp_lazy();
- void split_st_RCU_GPT_member_less_lazy();
- void split_st_RCU_GPT_member_cmpmix_lazy();
- void split_st_RCU_GPT_member_cmpmix_stat_lazy();
-
- void split_dyn_RCU_SHB_base_cmp_lazy();
- void split_dyn_RCU_SHB_base_less_lazy();
- void split_dyn_RCU_SHB_base_cmpmix_lazy();
- void split_dyn_RCU_SHB_base_cmpmix_stat_lazy();
- void split_dyn_RCU_SHB_member_cmp_lazy();
- void split_dyn_RCU_SHB_member_less_lazy();
- void split_dyn_RCU_SHB_member_cmpmix_lazy();
- void split_dyn_RCU_SHB_member_cmpmix_stat_lazy();
- void split_st_RCU_SHB_base_cmp_lazy();
- void split_st_RCU_SHB_base_less_lazy();
- void split_st_RCU_SHB_base_cmpmix_lazy();
- void split_st_RCU_SHB_base_cmpmix_stat_lazy();
- void split_st_RCU_SHB_member_cmp_lazy();
- void split_st_RCU_SHB_member_less_lazy();
- void split_st_RCU_SHB_member_cmpmix_lazy();
- void split_st_RCU_SHB_member_cmpmix_stat_lazy();
-
- void split_dyn_RCU_SHT_base_cmp_lazy();
- void split_dyn_RCU_SHT_base_less_lazy();
- void split_dyn_RCU_SHT_base_cmpmix_lazy();
- void split_dyn_RCU_SHT_base_cmpmix_stat_lazy();
- void split_dyn_RCU_SHT_member_cmp_lazy();
- void split_dyn_RCU_SHT_member_less_lazy();
- void split_dyn_RCU_SHT_member_cmpmix_lazy();
- void split_dyn_RCU_SHT_member_cmpmix_stat_lazy();
- void split_st_RCU_SHT_base_cmp_lazy();
- void split_st_RCU_SHT_base_less_lazy();
- void split_st_RCU_SHT_base_cmpmix_lazy();
- void split_st_RCU_SHT_base_cmpmix_stat_lazy();
- void split_st_RCU_SHT_member_cmp_lazy();
- void split_st_RCU_SHT_member_less_lazy();
- void split_st_RCU_SHT_member_cmpmix_lazy();
- void split_st_RCU_SHT_member_cmpmix_stat_lazy();
-
- void split_dyn_nogc_base_cmp_lazy();
- void split_dyn_nogc_base_less_lazy();
- void split_dyn_nogc_base_cmpmix_lazy();
- void split_dyn_nogc_base_cmpmix_stat_lazy();
- void split_dyn_nogc_member_cmp_lazy();
- void split_dyn_nogc_member_less_lazy();
- void split_dyn_nogc_member_cmpmix_lazy();
- void split_dyn_nogc_member_cmpmix_stat_lazy();
- void split_st_nogc_base_cmp_lazy();
- void split_st_nogc_base_less_lazy();
- void split_st_nogc_base_cmpmix_lazy();
- void split_st_nogc_base_cmpmix_stat_lazy();
- void split_st_nogc_member_cmp_lazy();
- void split_st_nogc_member_less_lazy();
- void split_st_nogc_member_cmpmix_lazy();
- void split_st_nogc_member_cmpmix_stat_lazy();
-
- CPPUNIT_TEST_SUITE(IntrusiveHashSetHdrTest)
- CPPUNIT_TEST(HP_base_cmp)
- CPPUNIT_TEST(HP_base_less)
- CPPUNIT_TEST(HP_base_cmpmix)
- CPPUNIT_TEST(HP_member_cmp)
- CPPUNIT_TEST(HP_member_less)
- CPPUNIT_TEST(HP_member_cmpmix)
-
- CPPUNIT_TEST(DHP_base_cmp)
- CPPUNIT_TEST(DHP_base_less)
- CPPUNIT_TEST(DHP_base_cmpmix)
- CPPUNIT_TEST(DHP_member_cmp)
- CPPUNIT_TEST(DHP_member_less)
- CPPUNIT_TEST(DHP_member_cmpmix)
-
- CPPUNIT_TEST(RCU_GPI_base_cmp)
- CPPUNIT_TEST(RCU_GPI_base_less)
- CPPUNIT_TEST(RCU_GPI_base_cmpmix)
- CPPUNIT_TEST(RCU_GPI_member_cmp)
- CPPUNIT_TEST(RCU_GPI_member_less)
- CPPUNIT_TEST(RCU_GPI_member_cmpmix)
-
- CPPUNIT_TEST(RCU_GPB_base_cmp)
- CPPUNIT_TEST(RCU_GPB_base_less)
- CPPUNIT_TEST(RCU_GPB_base_cmpmix)
- CPPUNIT_TEST(RCU_GPB_member_cmp)
- CPPUNIT_TEST(RCU_GPB_member_less)
- CPPUNIT_TEST(RCU_GPB_member_cmpmix)
-
- CPPUNIT_TEST(RCU_GPT_base_cmp)
- CPPUNIT_TEST(RCU_GPT_base_less)
- CPPUNIT_TEST(RCU_GPT_base_cmpmix)
- CPPUNIT_TEST(RCU_GPT_member_cmp)
- CPPUNIT_TEST(RCU_GPT_member_less)
- CPPUNIT_TEST(RCU_GPT_member_cmpmix)
-
- CPPUNIT_TEST(RCU_SHB_base_cmp)
- CPPUNIT_TEST(RCU_SHB_base_less)
- CPPUNIT_TEST(RCU_SHB_base_cmpmix)
- CPPUNIT_TEST(RCU_SHB_member_cmp)
- CPPUNIT_TEST(RCU_SHB_member_less)
- CPPUNIT_TEST(RCU_SHB_member_cmpmix)
-
- CPPUNIT_TEST(RCU_SHT_base_cmp)
- CPPUNIT_TEST(RCU_SHT_base_less)
- CPPUNIT_TEST(RCU_SHT_base_cmpmix)
- CPPUNIT_TEST(RCU_SHT_member_cmp)
- CPPUNIT_TEST(RCU_SHT_member_less)
- CPPUNIT_TEST(RCU_SHT_member_cmpmix)
-
- CPPUNIT_TEST(nogc_base_cmp)
- CPPUNIT_TEST(nogc_base_less)
- CPPUNIT_TEST(nogc_base_cmpmix)
- CPPUNIT_TEST(nogc_member_cmp)
- CPPUNIT_TEST(nogc_member_less)
- CPPUNIT_TEST(nogc_member_cmpmix)
-
- CPPUNIT_TEST(HP_base_cmp_lazy)
- CPPUNIT_TEST(HP_base_less_lazy)
- CPPUNIT_TEST(HP_base_cmpmix_lazy)
- CPPUNIT_TEST(HP_member_cmp_lazy)
- CPPUNIT_TEST(HP_member_less_lazy)
- CPPUNIT_TEST(HP_member_cmpmix_lazy)
-
- CPPUNIT_TEST(DHP_base_cmp_lazy)
- CPPUNIT_TEST(DHP_base_less_lazy)
- CPPUNIT_TEST(DHP_base_cmpmix_lazy)
- CPPUNIT_TEST(DHP_member_cmp_lazy)
- CPPUNIT_TEST(DHP_member_less_lazy)
- CPPUNIT_TEST(DHP_member_cmpmix_lazy)
-
- CPPUNIT_TEST(RCU_GPI_base_cmp_lazy)
- CPPUNIT_TEST(RCU_GPI_base_less_lazy)
- CPPUNIT_TEST(RCU_GPI_base_cmpmix_lazy)
- CPPUNIT_TEST(RCU_GPI_member_cmp_lazy)
- CPPUNIT_TEST(RCU_GPI_member_less_lazy)
- CPPUNIT_TEST(RCU_GPI_member_cmpmix_lazy)
-
- CPPUNIT_TEST(RCU_GPB_base_cmp_lazy)
- CPPUNIT_TEST(RCU_GPB_base_less_lazy)
- CPPUNIT_TEST(RCU_GPB_base_cmpmix_lazy)
- CPPUNIT_TEST(RCU_GPB_member_cmp_lazy)
- CPPUNIT_TEST(RCU_GPB_member_less_lazy)
- CPPUNIT_TEST(RCU_GPB_member_cmpmix_lazy)
-
- CPPUNIT_TEST(RCU_GPT_base_cmp_lazy)
- CPPUNIT_TEST(RCU_GPT_base_less_lazy)
- CPPUNIT_TEST(RCU_GPT_base_cmpmix_lazy)
- CPPUNIT_TEST(RCU_GPT_member_cmp_lazy)
- CPPUNIT_TEST(RCU_GPT_member_less_lazy)
- CPPUNIT_TEST(RCU_GPT_member_cmpmix_lazy)
-
- CPPUNIT_TEST(RCU_SHB_base_cmp_lazy)
- CPPUNIT_TEST(RCU_SHB_base_less_lazy)
- CPPUNIT_TEST(RCU_SHB_base_cmpmix_lazy)
- CPPUNIT_TEST(RCU_SHB_member_cmp_lazy)
- CPPUNIT_TEST(RCU_SHB_member_less_lazy)
- CPPUNIT_TEST(RCU_SHB_member_cmpmix_lazy)
-
- CPPUNIT_TEST(RCU_SHT_base_cmp_lazy)
- CPPUNIT_TEST(RCU_SHT_base_less_lazy)
- CPPUNIT_TEST(RCU_SHT_base_cmpmix_lazy)
- CPPUNIT_TEST(RCU_SHT_member_cmp_lazy)
- CPPUNIT_TEST(RCU_SHT_member_less_lazy)
- CPPUNIT_TEST(RCU_SHT_member_cmpmix_lazy)
-
- CPPUNIT_TEST(nogc_base_cmp_lazy)
- CPPUNIT_TEST(nogc_base_less_lazy)
- CPPUNIT_TEST(nogc_base_cmpmix_lazy)
- CPPUNIT_TEST(nogc_member_cmp_lazy)
- CPPUNIT_TEST(nogc_member_less_lazy)
- CPPUNIT_TEST(nogc_member_cmpmix_lazy)
-
- CPPUNIT_TEST(split_dyn_HP_base_cmp)
- CPPUNIT_TEST(split_dyn_HP_base_less)
- CPPUNIT_TEST(split_dyn_HP_base_cmpmix)
- CPPUNIT_TEST( split_dyn_HP_base_cmpmix_stat )
- CPPUNIT_TEST( split_dyn_HP_member_cmp )
- CPPUNIT_TEST(split_dyn_HP_member_less)
- CPPUNIT_TEST(split_dyn_HP_member_cmpmix)
- CPPUNIT_TEST( split_dyn_HP_member_cmpmix_stat )
- CPPUNIT_TEST( split_st_HP_base_cmp )
- CPPUNIT_TEST(split_st_HP_base_less)
- CPPUNIT_TEST(split_st_HP_base_cmpmix)
- CPPUNIT_TEST( split_st_HP_base_cmpmix_stat )
- CPPUNIT_TEST( split_st_HP_member_cmp )
- CPPUNIT_TEST(split_st_HP_member_less)
- CPPUNIT_TEST(split_st_HP_member_cmpmix)
- CPPUNIT_TEST( split_st_HP_member_cmpmix_stat )
-
- CPPUNIT_TEST(split_dyn_DHP_base_cmp)
- CPPUNIT_TEST(split_dyn_DHP_base_less)
- CPPUNIT_TEST(split_dyn_DHP_base_cmpmix)
- CPPUNIT_TEST( split_dyn_DHP_base_cmpmix_stat )
- CPPUNIT_TEST( split_dyn_DHP_member_cmp )
- CPPUNIT_TEST(split_dyn_DHP_member_less)
- CPPUNIT_TEST(split_dyn_DHP_member_cmpmix)
- CPPUNIT_TEST( split_dyn_DHP_member_cmpmix_stat )
- CPPUNIT_TEST( split_st_DHP_base_cmp )
- CPPUNIT_TEST(split_st_DHP_base_less)
- CPPUNIT_TEST(split_st_DHP_base_cmpmix)
- CPPUNIT_TEST( split_st_DHP_base_cmpmix_stat )
- CPPUNIT_TEST( split_st_DHP_member_cmp )
- CPPUNIT_TEST(split_st_DHP_member_less)
- CPPUNIT_TEST(split_st_DHP_member_cmpmix)
- CPPUNIT_TEST( split_st_DHP_member_cmpmix_stat )
-
- CPPUNIT_TEST(split_dyn_RCU_GPI_base_cmp)
- CPPUNIT_TEST(split_dyn_RCU_GPI_base_less)
- CPPUNIT_TEST(split_dyn_RCU_GPI_base_cmpmix)
- CPPUNIT_TEST( split_dyn_RCU_GPI_base_cmpmix_stat )
- CPPUNIT_TEST( split_dyn_RCU_GPI_member_cmp )
- CPPUNIT_TEST(split_dyn_RCU_GPI_member_less)
- CPPUNIT_TEST(split_dyn_RCU_GPI_member_cmpmix)
- CPPUNIT_TEST( split_dyn_RCU_GPI_member_cmpmix_stat )
- CPPUNIT_TEST( split_st_RCU_GPI_base_cmp )
- CPPUNIT_TEST(split_st_RCU_GPI_base_less)
- CPPUNIT_TEST(split_st_RCU_GPI_base_cmpmix)
- CPPUNIT_TEST( split_st_RCU_GPI_base_cmpmix_stat )
- CPPUNIT_TEST( split_st_RCU_GPI_member_cmp )
- CPPUNIT_TEST(split_st_RCU_GPI_member_less)
- CPPUNIT_TEST(split_st_RCU_GPI_member_cmpmix)
- CPPUNIT_TEST( split_st_RCU_GPI_member_cmpmix_stat )
-
- CPPUNIT_TEST(split_dyn_RCU_GPB_base_cmp)
- CPPUNIT_TEST(split_dyn_RCU_GPB_base_less)
- CPPUNIT_TEST(split_dyn_RCU_GPB_base_cmpmix)
- CPPUNIT_TEST( split_dyn_RCU_GPB_base_cmpmix_stat )
- CPPUNIT_TEST( split_dyn_RCU_GPB_member_cmp )
- CPPUNIT_TEST(split_dyn_RCU_GPB_member_less)
- CPPUNIT_TEST(split_dyn_RCU_GPB_member_cmpmix)
- CPPUNIT_TEST( split_dyn_RCU_GPB_member_cmpmix_stat )
- CPPUNIT_TEST( split_st_RCU_GPB_base_cmp )
- CPPUNIT_TEST(split_st_RCU_GPB_base_less)
- CPPUNIT_TEST(split_st_RCU_GPB_base_cmpmix)
- CPPUNIT_TEST( split_st_RCU_GPB_base_cmpmix_stat )
- CPPUNIT_TEST( split_st_RCU_GPB_member_cmp )
- CPPUNIT_TEST(split_st_RCU_GPB_member_less)
- CPPUNIT_TEST(split_st_RCU_GPB_member_cmpmix)
- CPPUNIT_TEST( split_st_RCU_GPB_member_cmpmix_stat )
-
- CPPUNIT_TEST(split_dyn_RCU_GPT_base_cmp)
- CPPUNIT_TEST(split_dyn_RCU_GPT_base_less)
- CPPUNIT_TEST(split_dyn_RCU_GPT_base_cmpmix)
- CPPUNIT_TEST( split_dyn_RCU_GPT_base_cmpmix_stat )
- CPPUNIT_TEST( split_dyn_RCU_GPT_member_cmp )
- CPPUNIT_TEST(split_dyn_RCU_GPT_member_less)
- CPPUNIT_TEST(split_dyn_RCU_GPT_member_cmpmix)
- CPPUNIT_TEST( split_dyn_RCU_GPT_member_cmpmix_stat )
- CPPUNIT_TEST( split_st_RCU_GPT_base_cmp )
- CPPUNIT_TEST(split_st_RCU_GPT_base_less)
- CPPUNIT_TEST(split_st_RCU_GPT_base_cmpmix)
- CPPUNIT_TEST( split_st_RCU_GPT_base_cmpmix_stat )
- CPPUNIT_TEST( split_st_RCU_GPT_member_cmp )
- CPPUNIT_TEST(split_st_RCU_GPT_member_less)
- CPPUNIT_TEST(split_st_RCU_GPT_member_cmpmix)
- CPPUNIT_TEST( split_st_RCU_GPT_member_cmpmix_stat )
-
- CPPUNIT_TEST(split_dyn_RCU_SHB_base_cmp)
- CPPUNIT_TEST(split_dyn_RCU_SHB_base_less)
- CPPUNIT_TEST(split_dyn_RCU_SHB_base_cmpmix)
- CPPUNIT_TEST( split_dyn_RCU_SHB_base_cmpmix_stat )
- CPPUNIT_TEST( split_dyn_RCU_SHB_member_cmp )
- CPPUNIT_TEST(split_dyn_RCU_SHB_member_less)
- CPPUNIT_TEST(split_dyn_RCU_SHB_member_cmpmix)
- CPPUNIT_TEST( split_dyn_RCU_SHB_member_cmpmix_stat )
- CPPUNIT_TEST( split_st_RCU_SHB_base_cmp )
- CPPUNIT_TEST(split_st_RCU_SHB_base_less)
- CPPUNIT_TEST(split_st_RCU_SHB_base_cmpmix)
- CPPUNIT_TEST( split_st_RCU_SHB_base_cmpmix_stat )
- CPPUNIT_TEST( split_st_RCU_SHB_member_cmp )
- CPPUNIT_TEST(split_st_RCU_SHB_member_less)
- CPPUNIT_TEST(split_st_RCU_SHB_member_cmpmix)
- CPPUNIT_TEST( split_st_RCU_SHB_member_cmpmix_stat )
-
- CPPUNIT_TEST(split_dyn_RCU_SHT_base_cmp)
- CPPUNIT_TEST(split_dyn_RCU_SHT_base_less)
- CPPUNIT_TEST(split_dyn_RCU_SHT_base_cmpmix)
- CPPUNIT_TEST( split_dyn_RCU_SHT_base_cmpmix_stat )
- CPPUNIT_TEST( split_dyn_RCU_SHT_member_cmp )
- CPPUNIT_TEST(split_dyn_RCU_SHT_member_less)
- CPPUNIT_TEST(split_dyn_RCU_SHT_member_cmpmix)
- CPPUNIT_TEST( split_dyn_RCU_SHT_member_cmpmix_stat )
- CPPUNIT_TEST( split_st_RCU_SHT_base_cmp )
- CPPUNIT_TEST(split_st_RCU_SHT_base_less)
- CPPUNIT_TEST(split_st_RCU_SHT_base_cmpmix)
- CPPUNIT_TEST( split_st_RCU_SHT_base_cmpmix_stat )
- CPPUNIT_TEST( split_st_RCU_SHT_member_cmp )
- CPPUNIT_TEST(split_st_RCU_SHT_member_less)
- CPPUNIT_TEST(split_st_RCU_SHT_member_cmpmix)
- CPPUNIT_TEST( split_st_RCU_SHT_member_cmpmix_stat )
-
- CPPUNIT_TEST(split_dyn_nogc_base_cmp)
- CPPUNIT_TEST(split_dyn_nogc_base_less)
- CPPUNIT_TEST(split_dyn_nogc_base_cmpmix)
- CPPUNIT_TEST( split_dyn_nogc_base_cmpmix_stat )
- CPPUNIT_TEST( split_dyn_nogc_member_cmp )
- CPPUNIT_TEST(split_dyn_nogc_member_less)
- CPPUNIT_TEST(split_dyn_nogc_member_cmpmix)
- CPPUNIT_TEST( split_dyn_nogc_member_cmpmix_stat )
- CPPUNIT_TEST( split_st_nogc_base_cmp )
- CPPUNIT_TEST(split_st_nogc_base_less)
- CPPUNIT_TEST(split_st_nogc_base_cmpmix)
- CPPUNIT_TEST( split_st_nogc_base_cmpmix_stat )
- CPPUNIT_TEST( split_st_nogc_member_cmp )
- CPPUNIT_TEST(split_st_nogc_member_less)
- CPPUNIT_TEST(split_st_nogc_member_cmpmix)
- CPPUNIT_TEST( split_st_nogc_member_cmpmix_stat )
-
- CPPUNIT_TEST(split_dyn_HP_base_cmp_lazy)
- CPPUNIT_TEST(split_dyn_HP_base_less_lazy)
- CPPUNIT_TEST(split_dyn_HP_base_cmpmix_lazy)
- CPPUNIT_TEST( split_dyn_HP_base_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_dyn_HP_member_cmp_lazy )
- CPPUNIT_TEST(split_dyn_HP_member_less_lazy)
- CPPUNIT_TEST(split_dyn_HP_member_cmpmix_lazy)
- CPPUNIT_TEST( split_dyn_HP_member_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_st_HP_base_cmp_lazy )
- CPPUNIT_TEST(split_st_HP_base_less_lazy)
- CPPUNIT_TEST(split_st_HP_base_cmpmix_lazy)
- CPPUNIT_TEST( split_st_HP_base_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_st_HP_member_cmp_lazy )
- CPPUNIT_TEST(split_st_HP_member_less_lazy)
- CPPUNIT_TEST(split_st_HP_member_cmpmix_lazy)
- CPPUNIT_TEST( split_st_HP_member_cmpmix_stat_lazy )
-
- CPPUNIT_TEST(split_dyn_DHP_base_cmp_lazy)
- CPPUNIT_TEST(split_dyn_DHP_base_less_lazy)
- CPPUNIT_TEST(split_dyn_DHP_base_cmpmix_lazy)
- CPPUNIT_TEST( split_dyn_DHP_base_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_dyn_DHP_member_cmp_lazy )
- CPPUNIT_TEST(split_dyn_DHP_member_less_lazy)
- CPPUNIT_TEST(split_dyn_DHP_member_cmpmix_lazy)
- CPPUNIT_TEST( split_dyn_DHP_member_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_st_DHP_base_cmp_lazy )
- CPPUNIT_TEST(split_st_DHP_base_less_lazy)
- CPPUNIT_TEST(split_st_DHP_base_cmpmix_lazy)
- CPPUNIT_TEST( split_st_DHP_base_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_st_DHP_member_cmp_lazy )
- CPPUNIT_TEST(split_st_DHP_member_less_lazy)
- CPPUNIT_TEST(split_st_DHP_member_cmpmix_lazy)
- CPPUNIT_TEST( split_st_DHP_member_cmpmix_stat_lazy )
-
- CPPUNIT_TEST(split_dyn_RCU_GPI_base_cmp_lazy)
- CPPUNIT_TEST(split_dyn_RCU_GPI_base_less_lazy)
- CPPUNIT_TEST(split_dyn_RCU_GPI_base_cmpmix_lazy)
- CPPUNIT_TEST( split_dyn_RCU_GPI_base_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_dyn_RCU_GPI_member_cmp_lazy )
- CPPUNIT_TEST(split_dyn_RCU_GPI_member_less_lazy)
- CPPUNIT_TEST(split_dyn_RCU_GPI_member_cmpmix_lazy)
- CPPUNIT_TEST( split_dyn_RCU_GPI_member_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_st_RCU_GPI_base_cmp_lazy )
- CPPUNIT_TEST(split_st_RCU_GPI_base_less_lazy)
- CPPUNIT_TEST(split_st_RCU_GPI_base_cmpmix_lazy)
- CPPUNIT_TEST( split_st_RCU_GPI_base_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_st_RCU_GPI_member_cmp_lazy )
- CPPUNIT_TEST(split_st_RCU_GPI_member_less_lazy)
- CPPUNIT_TEST(split_st_RCU_GPI_member_cmpmix_lazy)
- CPPUNIT_TEST( split_st_RCU_GPI_member_cmpmix_stat_lazy )
-
- CPPUNIT_TEST(split_dyn_RCU_GPB_base_cmp_lazy)
- CPPUNIT_TEST(split_dyn_RCU_GPB_base_less_lazy)
- CPPUNIT_TEST(split_dyn_RCU_GPB_base_cmpmix_lazy)
- CPPUNIT_TEST( split_dyn_RCU_GPB_base_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_dyn_RCU_GPB_member_cmp_lazy )
- CPPUNIT_TEST(split_dyn_RCU_GPB_member_less_lazy)
- CPPUNIT_TEST(split_dyn_RCU_GPB_member_cmpmix_lazy)
- CPPUNIT_TEST( split_dyn_RCU_GPB_member_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_st_RCU_GPB_base_cmp_lazy )
- CPPUNIT_TEST(split_st_RCU_GPB_base_less_lazy)
- CPPUNIT_TEST(split_st_RCU_GPB_base_cmpmix_lazy)
- CPPUNIT_TEST( split_st_RCU_GPB_base_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_st_RCU_GPB_member_cmp_lazy )
- CPPUNIT_TEST(split_st_RCU_GPB_member_less_lazy)
- CPPUNIT_TEST(split_st_RCU_GPB_member_cmpmix_lazy)
- CPPUNIT_TEST( split_st_RCU_GPB_member_cmpmix_stat_lazy )
-
- CPPUNIT_TEST(split_dyn_RCU_GPT_base_cmp_lazy)
- CPPUNIT_TEST(split_dyn_RCU_GPT_base_less_lazy)
- CPPUNIT_TEST(split_dyn_RCU_GPT_base_cmpmix_lazy)
- CPPUNIT_TEST( split_dyn_RCU_GPT_base_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_dyn_RCU_GPT_member_cmp_lazy )
- CPPUNIT_TEST(split_dyn_RCU_GPT_member_less_lazy)
- CPPUNIT_TEST(split_dyn_RCU_GPT_member_cmpmix_lazy)
- CPPUNIT_TEST( split_dyn_RCU_GPT_member_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_st_RCU_GPT_base_cmp_lazy )
- CPPUNIT_TEST(split_st_RCU_GPT_base_less_lazy)
- CPPUNIT_TEST(split_st_RCU_GPT_base_cmpmix_lazy)
- CPPUNIT_TEST( split_st_RCU_GPT_base_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_st_RCU_GPT_member_cmp_lazy )
- CPPUNIT_TEST(split_st_RCU_GPT_member_less_lazy)
- CPPUNIT_TEST(split_st_RCU_GPT_member_cmpmix_lazy)
- CPPUNIT_TEST( split_st_RCU_GPT_member_cmpmix_stat_lazy )
-
- CPPUNIT_TEST(split_dyn_RCU_SHB_base_cmp_lazy)
- CPPUNIT_TEST(split_dyn_RCU_SHB_base_less_lazy)
- CPPUNIT_TEST(split_dyn_RCU_SHB_base_cmpmix_lazy)
- CPPUNIT_TEST( split_dyn_RCU_SHB_base_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_dyn_RCU_SHB_member_cmp_lazy )
- CPPUNIT_TEST(split_dyn_RCU_SHB_member_less_lazy)
- CPPUNIT_TEST(split_dyn_RCU_SHB_member_cmpmix_lazy)
- CPPUNIT_TEST( split_dyn_RCU_SHB_member_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_st_RCU_SHB_base_cmp_lazy )
- CPPUNIT_TEST(split_st_RCU_SHB_base_less_lazy)
- CPPUNIT_TEST(split_st_RCU_SHB_base_cmpmix_lazy)
- CPPUNIT_TEST( split_st_RCU_SHB_base_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_st_RCU_SHB_member_cmp_lazy )
- CPPUNIT_TEST(split_st_RCU_SHB_member_less_lazy)
- CPPUNIT_TEST(split_st_RCU_SHB_member_cmpmix_lazy)
- CPPUNIT_TEST( split_st_RCU_SHB_member_cmpmix_stat_lazy )
-
- CPPUNIT_TEST(split_dyn_RCU_SHT_base_cmp_lazy)
- CPPUNIT_TEST(split_dyn_RCU_SHT_base_less_lazy)
- CPPUNIT_TEST(split_dyn_RCU_SHT_base_cmpmix_lazy)
- CPPUNIT_TEST( split_dyn_RCU_SHT_base_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_dyn_RCU_SHT_member_cmp_lazy )
- CPPUNIT_TEST(split_dyn_RCU_SHT_member_less_lazy)
- CPPUNIT_TEST(split_dyn_RCU_SHT_member_cmpmix_lazy)
- CPPUNIT_TEST( split_dyn_RCU_SHT_member_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_st_RCU_SHT_base_cmp_lazy )
- CPPUNIT_TEST(split_st_RCU_SHT_base_less_lazy)
- CPPUNIT_TEST(split_st_RCU_SHT_base_cmpmix_lazy)
- CPPUNIT_TEST( split_st_RCU_SHT_base_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_st_RCU_SHT_member_cmp_lazy )
- CPPUNIT_TEST(split_st_RCU_SHT_member_less_lazy)
- CPPUNIT_TEST(split_st_RCU_SHT_member_cmpmix_lazy)
- CPPUNIT_TEST( split_st_RCU_SHT_member_cmpmix_stat_lazy )
-
- CPPUNIT_TEST(split_dyn_nogc_base_cmp_lazy)
- CPPUNIT_TEST(split_dyn_nogc_base_less_lazy)
- CPPUNIT_TEST(split_dyn_nogc_base_cmpmix_lazy)
- CPPUNIT_TEST( split_dyn_nogc_base_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_dyn_nogc_member_cmp_lazy )
- CPPUNIT_TEST(split_dyn_nogc_member_less_lazy)
- CPPUNIT_TEST(split_dyn_nogc_member_cmpmix_lazy)
- CPPUNIT_TEST( split_dyn_nogc_member_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_st_nogc_base_cmp_lazy )
- CPPUNIT_TEST(split_st_nogc_base_less_lazy)
- CPPUNIT_TEST(split_st_nogc_base_cmpmix_lazy)
- CPPUNIT_TEST( split_st_nogc_base_cmpmix_stat_lazy )
- CPPUNIT_TEST( split_st_nogc_member_cmp_lazy )
- CPPUNIT_TEST(split_st_nogc_member_less_lazy)
- CPPUNIT_TEST(split_st_nogc_member_cmpmix_lazy)
- CPPUNIT_TEST( split_st_nogc_member_cmpmix_stat_lazy )
- CPPUNIT_TEST_SUITE_END()
-
- };
-
-} // namespace set
-
-#endif // #ifndef CDSTEST_HDR_INTRUSIVE_SET_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.
-*/
-
-#include "set/hdr_intrusive_skiplist_set.h"
-
-#include <cds/intrusive/skip_list_dhp.h>
-#include "map/print_skiplist_stat.h"
-
-namespace set {
-
- void IntrusiveSkipListSet::skiplist_dhp_base_cmp()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_base_less()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_base_cmpmix()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,co::compare< cmp<item> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_base_cmp_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_base_less_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_base_cmpmix_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_base_cmp_xorshift()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_base_less_xorshift()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_base_cmpmix_xorshift()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_base_cmp_xorshift_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_base_less_xorshift_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_base_cmpmix_xorshift_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-
- //*********
- void IntrusiveSkipListSet::skiplist_dhp_base_cmp_pascal()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_base_less_pascal()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_base_cmpmix_pascal()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_base_cmp_pascal_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_base_less_pascal_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_base_cmpmix_pascal_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-} // 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/hdr_intrusive_skiplist_set.h"
-
-#include <cds/intrusive/skip_list_dhp.h>
-#include "map/print_skiplist_stat.h"
-
-namespace set {
- void IntrusiveSkipListSet::skiplist_dhp_member_cmp()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::DHP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_member_less()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_member_cmpmix()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_member_cmp_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::DHP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_member_less_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_member_cmpmix_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_member_cmp_xorshift()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::DHP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_member_less_xorshift()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_member_cmpmix_xorshift()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_member_cmp_xorshift_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::DHP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_member_less_xorshift_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_member_cmpmix_xorshift_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-
- void IntrusiveSkipListSet::skiplist_dhp_member_cmp_pascal()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::DHP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_member_less_pascal()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_member_cmpmix_pascal()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_member_cmp_pascal_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::DHP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_member_less_pascal_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_dhp_member_cmpmix_pascal_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::DHP> > item;
-
- typedef ci::SkipListSet< cds::gc::DHP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-} // 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/hdr_intrusive_skiplist_set.h"
-
-#include <cds/intrusive/skip_list_hp.h>
-#include "map/print_skiplist_stat.h"
-
-namespace set {
-
- void IntrusiveSkipListSet::skiplist_hp_base_cmp()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item;
- struct set_traits : public ci::skip_list::traits
- {
- typedef ci::skip_list::base_hook< co::gc<cds::gc::HP> > hook;
- typedef cmp<item> compare;
- typedef faked_disposer disposer;
- typedef cds::atomicity::item_counter item_counter;
- };
- typedef ci::SkipListSet< cds::gc::HP, item, set_traits > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_base_less()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_base_cmpmix()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_base_cmp_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_base_less_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_base_cmpmix_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_base_cmp_xorshift()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_base_less_xorshift()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_base_cmpmix_xorshift()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_base_cmp_xorshift_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_base_less_xorshift_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_base_cmpmix_xorshift_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-
- //*********
- void IntrusiveSkipListSet::skiplist_hp_base_cmp_pascal()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_base_less_pascal()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_base_cmpmix_pascal()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_base_cmp_pascal_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_base_less_pascal_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_base_cmpmix_pascal_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-} // namespace set
-
-CPPUNIT_TEST_SUITE_REGISTRATION(set::IntrusiveSkipListSet);
+++ /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/hdr_intrusive_skiplist_set.h"
-
-#include <cds/intrusive/skip_list_hp.h>
-#include "map/print_skiplist_stat.h"
-
-namespace set {
- void IntrusiveSkipListSet::skiplist_hp_member_cmp()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::HP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_member_less()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_member_cmpmix()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_member_cmp_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::HP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_member_less_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_member_cmpmix_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_member_cmp_xorshift()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::HP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_member_less_xorshift()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_member_cmpmix_xorshift()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_member_cmp_xorshift_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::HP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_member_less_xorshift_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_member_cmpmix_xorshift_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-
- void IntrusiveSkipListSet::skiplist_hp_member_cmp_pascal()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::HP> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_member_less_pascal()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_member_cmpmix_pascal()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_member_cmp_pascal_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::HP> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_member_less_pascal_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hp_member_cmpmix_pascal_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::HP> > item;
-
- typedef ci::SkipListSet< cds::gc::HP, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-} // 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/hdr_intrusive_skiplist_set.h"
-
-#include <cds/intrusive/skip_list_nogc.h>
-#include "map/print_skiplist_stat.h"
-
-namespace set {
-
- void IntrusiveSkipListSet::skiplist_nogc_base_cmp()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_base_less()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_base_cmpmix()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,co::compare< cmp<item> >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_base_cmp_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::compare< cmp<item> >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_base_less_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_base_cmpmix_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_base_cmp_xorshift()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_base_less_xorshift()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_base_cmpmix_xorshift()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_base_cmp_xorshift_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_base_less_xorshift_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_base_cmpmix_xorshift_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-
- //*********
- void IntrusiveSkipListSet::skiplist_nogc_base_cmp_pascal()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_base_less_pascal()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_base_cmpmix_pascal()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_base_cmp_pascal_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_base_less_pascal_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_base_cmpmix_pascal_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-} // 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/hdr_intrusive_skiplist_set.h"
-
-#include <cds/intrusive/skip_list_nogc.h>
-#include "map/print_skiplist_stat.h"
-
-namespace set {
-
- void IntrusiveSkipListSet::skiplist_nogc_member_cmp()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::nogc> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_member_less()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_member_cmpmix()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,co::compare< cmp<item> >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_member_cmp_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::nogc> > >
- ,co::compare< cmp<item> >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_member_less_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_member_cmpmix_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_member_cmp_xorshift()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::nogc> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_member_less_xorshift()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_member_cmpmix_xorshift()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_member_cmp_xorshift_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::nogc> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_member_less_xorshift_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_member_cmpmix_xorshift_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-
- //*********
- void IntrusiveSkipListSet::skiplist_nogc_member_cmp_pascal()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::nogc> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_member_less_pascal()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_member_cmpmix_pascal()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_member_cmp_pascal_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::nogc> > >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_member_less_pascal_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_nogc_member_cmpmix_pascal_stat()
- {
- typedef member_int_item< ci::skip_list::node< cds::gc::nogc> > item;
-
- typedef ci::SkipListSet< cds::gc::nogc, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist_nogc<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-} // 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/hdr_intrusive_skiplist_set_rcu.h"
-
-#include <cds/urcu/general_buffered.h>
-#include <cds/intrusive/skip_list_rcu.h>
-#include "map/print_skiplist_stat.h"
-
-namespace set {
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type;
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmp()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_less()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmpmix()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,co::compare< cmp<item> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmp_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_less_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmpmix_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmp_xorshift()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_less_xorshift()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmpmix_xorshift()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmp_xorshift_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_less_xorshift_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmpmix_xorshift_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-
- //*********
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmp_pascal()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_less_pascal()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmpmix_pascal()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmp_pascal_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_less_pascal_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_base_cmpmix_pascal_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-} // namespace set
-
-CPPUNIT_TEST_SUITE_REGISTRATION(set::IntrusiveSkipListSetRCU);
+++ /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/hdr_intrusive_skiplist_set_rcu.h"
-
-#include <cds/urcu/general_buffered.h>
-#include <cds/intrusive/skip_list_rcu.h>
-#include "map/print_skiplist_stat.h"
-
-namespace set {
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type;
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmp()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_less()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmpmix()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmp_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_less_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmpmix_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmp_xorshift()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_less_xorshift()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmpmix_xorshift()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmp_xorshift_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_less_xorshift_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmpmix_xorshift_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmp_pascal()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_less_pascal()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmpmix_pascal()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmp_pascal_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_less_pascal_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpb_member_cmpmix_pascal_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-} // 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/hdr_intrusive_skiplist_set_rcu.h"
-
-#include <cds/urcu/general_instant.h>
-#include <cds/intrusive/skip_list_rcu.h>
-#include "map/print_skiplist_stat.h"
-
-namespace set {
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type;
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmp()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_less()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmpmix()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,co::compare< cmp<item> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmp_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_less_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmpmix_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmp_xorshift()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_less_xorshift()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmpmix_xorshift()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmp_xorshift_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_less_xorshift_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmpmix_xorshift_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-
- //*********
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmp_pascal()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_less_pascal()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmpmix_pascal()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmp_pascal_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_less_pascal_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_base_cmpmix_pascal_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-} // 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/hdr_intrusive_skiplist_set_rcu.h"
-
-#include <cds/urcu/general_instant.h>
-#include <cds/intrusive/skip_list_rcu.h>
-#include "map/print_skiplist_stat.h"
-
-namespace set {
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type;
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmp()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_less()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmpmix()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmp_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_less_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmpmix_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmp_xorshift()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_less_xorshift()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmpmix_xorshift()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmp_xorshift_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_less_xorshift_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmpmix_xorshift_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmp_pascal()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_less_pascal()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmpmix_pascal()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmp_pascal_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_less_pascal_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpi_member_cmpmix_pascal_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-} // 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/hdr_intrusive_skiplist_set_rcu.h"
-
-#include <cds/urcu/general_threaded.h>
-#include <cds/intrusive/skip_list_rcu.h>
-#include "map/print_skiplist_stat.h"
-
-namespace set {
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type;
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmp()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_less()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmpmix()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,co::compare< cmp<item> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmp_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_less_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmpmix_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmp_xorshift()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_less_xorshift()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmpmix_xorshift()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmp_xorshift_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_less_xorshift_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmpmix_xorshift_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-
- //*********
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmp_pascal()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_less_pascal()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmpmix_pascal()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmp_pascal_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_less_pascal_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_base_cmpmix_pascal_stat()
- {
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-} // 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/hdr_intrusive_skiplist_set_rcu.h"
-
-#include <cds/urcu/general_threaded.h>
-#include <cds/intrusive/skip_list_rcu.h>
-#include "map/print_skiplist_stat.h"
-
-namespace set {
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type;
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmp()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_less()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmpmix()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmp_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_less_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmpmix_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmp_xorshift()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_less_xorshift()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmpmix_xorshift()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmp_xorshift_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_less_xorshift_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmpmix_xorshift_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmp_pascal()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_less_pascal()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmpmix_pascal()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmp_pascal_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_less_pascal_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_gpt_member_cmpmix_pascal_stat()
- {
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-} // 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/hdr_intrusive_skiplist_set_rcu.h"
-
-#include <cds/urcu/signal_buffered.h>
-#include <cds/intrusive/skip_list_rcu.h>
-#include "map/print_skiplist_stat.h"
-
-namespace set {
-
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type;
- }
-#endif
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,co::compare< cmp<item> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmp_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_less_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmpmix_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmp_xorshift()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_less_xorshift()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmpmix_xorshift()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmp_xorshift_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_less_xorshift_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmpmix_xorshift_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
-
- //*********
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmp_pascal()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_less_pascal()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmpmix_pascal()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmp_pascal_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_less_pascal_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_base_cmpmix_pascal_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
-} // namespace set
-
-CPPUNIT_TEST_SUITE_REGISTRATION(set::IntrusiveSkipListSetRCU);
+++ /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/hdr_intrusive_skiplist_set_rcu.h"
-
-#include <cds/urcu/signal_buffered.h>
-#include <cds/intrusive/skip_list_rcu.h>
-#include "map/print_skiplist_stat.h"
-
-namespace set {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type;
- }
-#endif
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmp_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_less_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmpmix_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmp_xorshift()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_less_xorshift()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmpmix_xorshift()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmp_xorshift_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_less_xorshift_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmpmix_xorshift_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmp_pascal()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_less_pascal()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmpmix_pascal()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmp_pascal_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_less_pascal_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_shb_member_cmpmix_pascal_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
-} // 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/hdr_intrusive_skiplist_set_rcu.h"
-
-#include <cds/urcu/signal_threaded.h>
-#include <cds/intrusive/skip_list_rcu.h>
-#include "map/print_skiplist_stat.h"
-
-namespace set {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type;
- }
-#endif
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,co::compare< cmp<item> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmp_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_less_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmpmix_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmp_xorshift()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_less_xorshift()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmpmix_xorshift()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmp_xorshift_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_less_xorshift_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmpmix_xorshift_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
-
- //*********
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmp_pascal()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_less_pascal()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmpmix_pascal()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmp_pascal_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_less_pascal_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_base_cmpmix_pascal_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
-} // 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/hdr_intrusive_skiplist_set_rcu.h"
-
-#include <cds/urcu/signal_threaded.h>
-#include <cds/intrusive/skip_list_rcu.h>
-#include "map/print_skiplist_stat.h"
-
-namespace set {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type;
- }
-#endif
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmp_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_less_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmpmix_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmp_xorshift()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_less_xorshift()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmpmix_xorshift()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmp_xorshift_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_less_xorshift_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmpmix_xorshift_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmp_pascal()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_less_pascal()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmpmix_pascal()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmp_pascal_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_less_pascal_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
- void IntrusiveSkipListSetRCU::skiplist_rcu_sht_member_cmpmix_pascal_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::skip_list::node< rcu_type> > item;
-
- typedef ci::SkipListSet< rcu_type, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::member_hook< offsetof(item, hMember), co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
-#endif
- }
-
-} // 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.
-*/
-
-#ifndef CDSTEST_HDR_INTRUSIVE_SKIPLIST_SET_H
-#define CDSTEST_HDR_INTRUSIVE_SKIPLIST_SET_H
-
-#include "set/hdr_intrusive_set.h"
-
-namespace set {
-
- class IntrusiveSkipListSet: public IntrusiveHashSetHdrTest
- {
- typedef IntrusiveHashSetHdrTest base_class;
-
- static size_t const c_nArrSize = 1000;
-
- protected:
- struct other_key {
- int nKey;
-
- other_key()
- {}
-
- other_key( int key )
- : nKey(key)
- {}
-
- template <typename Q>
- other_key& operator=( Q const& src )
- {
- nKey = src.nKey;
- return *this;
- }
- };
-
- template <typename StoredType>
- struct other_key_less
- {
- bool operator ()( StoredType const& n, other_key k ) const
- {
- return n.nKey < k.nKey;
- }
- bool operator ()( other_key k, StoredType const& n ) const
- {
- return k.nKey < n.nKey;
- }
- };
-
- struct copy_other_key
- {
- template <typename Q>
- void operator()( other_key& dest, Q const& src ) const
- {
- dest.nKey = src.nKey;
- }
- };
-
- protected:
- template <class Set, typename PrintStat>
- void test_skiplist()
- {
- {
- Set s;
- base_class::test_int_with( s );
- }
-
- test_skiplist_<Set, PrintStat >();
- }
-
- template <class Set, typename PrintStat>
- void test_skiplist_()
- {
- Set s;
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
-
- typedef typename Set::value_type value_type;
- typedef typename Set::iterator set_iterator;
- typedef typename Set::const_iterator const_set_iterator;
- typedef typename base_class::less<value_type> less;
-
- value_type v[c_nArrSize];
- int nCount = 0;
- int nPrevKey = 0;
-
- // Test iterator - ascending order
- for ( int i = 0; i < (int) (sizeof(v)/sizeof(v[0])); ++i ) {
- v[i].nKey = i;
- v[i].nVal = i * 2;
-
- CPPUNIT_ASSERT( s.insert( v[i] ));
- }
- CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) ));
- //CPPUNIT_MSG( PrintStat()(s, "Iterator test, ascending insert order") );
-
- nCount = 0;
- nPrevKey = 0;
- for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal );
- CPPUNIT_ASSERT( s.contains( it->nKey ));
- it->nVal = (*it).nKey;
- ++nCount;
- if ( it != s.begin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) ));
- CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0]));
-
- nCount = 0;
- for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey == it->nVal );
- ++nCount;
- if ( it != s.cbegin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) ));
- CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0]));
-
- for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) {
- CPPUNIT_ASSERT( v[i].nKey == v[i].nVal );
- CPPUNIT_ASSERT( s.contains( v[i].nKey, less() ));
- }
-
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
- Set::gc::force_dispose();
-
- for ( size_t i = 0; i < (int) sizeof(v)/sizeof(v[0]); ++i ) {
- CPPUNIT_ASSERT( v[i].nDisposeCount == 1 );
- }
-
- // Test iterator - descending order
- for ( int i = (int) sizeof(v)/sizeof(v[0]) - 1; i >= 0; --i ) {
- v[i].nKey = i;
- v[i].nVal = i * 2;
-
- CPPUNIT_ASSERT( s.insert( v[i] ));
- }
- CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) ));
-
- //CPPUNIT_MSG( PrintStat()(s, "Iterator test, descending insert order") );
-
- nCount = 0;
- for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal );
- it->nVal = (*it).nKey;
- ++nCount;
- if ( it != s.begin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) ));
- CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0]));
-
- nCount = 0;
- for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey == it->nVal );
- ++nCount;
- if ( it != s.cbegin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) ));
- CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0]));
-
- for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) {
- CPPUNIT_ASSERT( v[i].nKey == v[i].nVal );
- }
-
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
- Set::gc::force_dispose();
-
- for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) {
- CPPUNIT_ASSERT( v[i].nDisposeCount == 2 );
- }
-
- // Test iterator - random order
- fill_skiplist( s, v );
- //CPPUNIT_MSG( PrintStat()(s, "Iterator test, random insert order") );
-
- nCount = 0;
- for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal );
- it->nVal = (*it).nKey;
- ++nCount;
- if ( it != s.begin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) ));
- CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0]));
-
- nCount = 0;
- for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey == it->nVal );
- ++nCount;
- if ( it != s.cbegin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) ));
- CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0]));
-
- for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) {
- CPPUNIT_ASSERT( v[i].nKey == v[i].nVal );
- }
-
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
- Set::gc::force_dispose();
-
- for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) {
- CPPUNIT_ASSERT( v[i].nDisposeCount == 3 );
- }
-
- CPPUNIT_MSG( "extract test" );
- // extract/get test
- {
- typename Set::guarded_ptr gp;
-
- // extract
- fill_skiplist( s, v );
- for ( int i = c_nArrSize - 1; i >= 0; i -= 1 ) {
- gp = s.get( i );
- CPPUNIT_CHECK( gp );
- CPPUNIT_CHECK( gp->nKey == i );
- CPPUNIT_CHECK( gp->nVal == i * 2 );
- gp->nVal *= 2;
- gp.release();
-
- gp = s.extract( i );
- CPPUNIT_CHECK( gp );
- CPPUNIT_CHECK_EX( gp->nKey == i, "i=" << i << ", gp->nKey=" << gp->nKey);
- CPPUNIT_CHECK_EX( (*gp).nVal == i * 4, "i=" << i << ", gp->nVal=" << gp->nVal );
- gp.release();
-
- gp = s.extract( i );
- CPPUNIT_CHECK( !gp );
- CPPUNIT_CHECK( !s.get( i ));
- }
- CPPUNIT_CHECK( s.empty() );
- Set::gc::force_dispose();
-
- // extract_with
- fill_skiplist( s, v );
- for ( int i = c_nArrSize - 1; i >= 0; i -= 1 ) {
- gp = s.get_with( other_key( i ), other_key_less<typename Set::value_type>() );
- CPPUNIT_CHECK( gp );
- CPPUNIT_CHECK( gp->nKey == i );
- CPPUNIT_CHECK( (*gp).nVal == i * 2 );
- gp->nVal *= 2;
- gp.release();
-
- gp = s.extract_with( other_key( i ), other_key_less<typename Set::value_type>() );
- CPPUNIT_CHECK( gp );
- CPPUNIT_CHECK_EX( gp->nKey == i, "i=" << i << ", gp->nKey=" << gp->nKey);
- CPPUNIT_CHECK_EX( (*gp).nVal == i * 4, "i=" << i << ", gp->nVal=" << gp->nVal );
- gp.release();
-
- gp = s.extract_with( other_key( i ), other_key_less<typename Set::value_type>() );
- CPPUNIT_CHECK( !gp );
- CPPUNIT_CHECK( !s.get_with( other_key(i), other_key_less<typename Set::value_type>() ));
- }
- CPPUNIT_CHECK( s.empty() );
- Set::gc::force_dispose();
-
- // extract_min
- {
- fill_skiplist( s, v );
- int nPrevKey;
- gp = s.extract_min();
- CPPUNIT_ASSERT( gp );
- nPrevKey = gp->nKey;
- while ( !s.empty() ) {
- gp = s.extract_min();
- CPPUNIT_CHECK( gp );
- CPPUNIT_ASSERT( !gp.empty());
- CPPUNIT_CHECK( gp->nKey == nPrevKey + 1 );
- CPPUNIT_CHECK( (*gp).nVal == (nPrevKey + 1) * 2 );
- nPrevKey = gp->nKey;
- gp.release();
- }
- gp.release();
- CPPUNIT_CHECK( !s.extract_min());
- CPPUNIT_CHECK( gp.empty());
- }
- Set::gc::force_dispose();
-
- // extract_max
- {
- fill_skiplist( s, v );
- int nPrevKey;
- gp = s.extract_max();
- CPPUNIT_ASSERT( gp );
- nPrevKey = gp->nKey;
- while ( !s.empty() ) {
- gp = s.extract_max();
- CPPUNIT_CHECK( gp );
- CPPUNIT_ASSERT( !gp.empty() );
- CPPUNIT_CHECK( gp->nKey == nPrevKey - 1 );
- CPPUNIT_CHECK( (*gp).nVal == (nPrevKey - 1) * 2 );
- nPrevKey = gp->nKey;
- gp.release();
- }
- gp.release();
- CPPUNIT_CHECK( !s.extract_min());
- CPPUNIT_CHECK( gp.empty());
-
- CPPUNIT_CHECK( !s.extract_max());
- }
- Set::gc::force_dispose();
- }
-
- CPPUNIT_MSG( PrintStat()(s, nullptr) );
- }
-
- template <typename Set>
- void fill_skiplist( Set& s, typename Set::value_type * pArr )
- {
- int nRand[c_nArrSize];
- for ( int i = 0; i < (int) c_nArrSize; ++i ) {
- nRand[i] = i;
- }
- shuffle( nRand, nRand + c_nArrSize );
-
- for ( int i = 0; i < (int) c_nArrSize; ++i ) {
- pArr[i].nKey = nRand[i];
- pArr[i].nVal = nRand[i] * 2;
- CPPUNIT_ASSERT( s.insert( pArr[i] ));
- }
- CPPUNIT_CHECK( check_size( s, c_nArrSize ));
- }
-
- template <class Set, typename PrintStat>
- void test_skiplist_nogc()
- {
- typedef typename Set::value_type value_type;
- typedef typename Set::iterator set_iterator;
- typedef typename Set::iterator const_set_iterator;
- typedef typename base_class::less<value_type> less;
-
- value_type v1( 10, 50 );
- value_type v2( 5, 25 );
- value_type v3( 20, 100 );
- int key;
-
- Set s;
-
- // insert test
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
-
- // insert/find test
- CPPUNIT_ASSERT( s.contains( v1.key() ) == nullptr );
- CPPUNIT_ASSERT( s.insert( v1 ));
- CPPUNIT_ASSERT( s.contains( v1.key() ) == &v1 );
- CPPUNIT_ASSERT( check_size( s, 1 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- CPPUNIT_ASSERT( s.contains( v2.key(), less() ) == nullptr );
- CPPUNIT_ASSERT( s.insert( v2 ));
- CPPUNIT_ASSERT( v2.nFindCount == 0 );
- CPPUNIT_ASSERT( s.find_with( key = v2.key(), less(), find_functor() ));
- CPPUNIT_ASSERT( v2.nFindCount == 1 );
- v2.nFindCount = 0;
- CPPUNIT_ASSERT( check_size( s, 2 ));
- CPPUNIT_ASSERT( !s.empty() );
-
- {
- find_functor ff;
- CPPUNIT_ASSERT( s.contains( v3 ) == nullptr );
- CPPUNIT_ASSERT( s.insert( v3 ));
- CPPUNIT_ASSERT( v3.nFindCount == 0 );
- CPPUNIT_ASSERT( s.find( v3, std::ref(ff) ));
- CPPUNIT_ASSERT( v3.nFindCount == 1 );
- v3.nFindCount = 0;
- CPPUNIT_ASSERT( check_size( s, 3 ));
- CPPUNIT_ASSERT( !s.empty() );
- }
-
- CPPUNIT_ASSERT( !s.empty() );
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
- //CPPUNIT_MSG( PrintStat()(s, "Insert test") );
-
- update_functor f;
- std::pair<bool, bool> ret = s.update( v1, f, true );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( ret.second );
- CPPUNIT_ASSERT( v1.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v1.nUpdateCount == 0 );
- CPPUNIT_ASSERT( check_size( s, 1 ));
-
- ret = s.update( v2, f, false );
- CPPUNIT_ASSERT( !ret.first );
- CPPUNIT_ASSERT( !ret.second );
- CPPUNIT_ASSERT( v2.nUpdateNewCount == 0 );
- CPPUNIT_ASSERT( v2.nUpdateCount == 0 );
- CPPUNIT_ASSERT( check_size( s, 1 ));
-
- ret = s.update( v2, f );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( ret.second );
- CPPUNIT_ASSERT( v2.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v2.nUpdateCount == 0 );
- CPPUNIT_ASSERT( check_size( s, 2 ));
-
- ret = s.update( v3, f, true );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( ret.second );
- CPPUNIT_ASSERT( v3.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v3.nUpdateCount == 0 );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- CPPUNIT_ASSERT( s.contains( v1 ) == &v1 );
- CPPUNIT_ASSERT( s.contains( v2, base_class::less<value_type>() ) == &v2 );
- CPPUNIT_ASSERT( s.contains( v3 ) == &v3 );
-
- ret = s.update( v1, f, true );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( !ret.second );
- CPPUNIT_ASSERT( v1.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v1.nUpdateCount == 1 );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- ret = s.update( v2, f, false );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( !ret.second );
- CPPUNIT_ASSERT( v2.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v2.nUpdateCount == 1 );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- ret = s.update( v3, f );
- CPPUNIT_ASSERT( ret.first );
- CPPUNIT_ASSERT( !ret.second );
- CPPUNIT_ASSERT( v3.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( v3.nUpdateCount == 1 );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- CPPUNIT_ASSERT( s.contains( v1 ) == &v1 );
- CPPUNIT_ASSERT( s.contains( v2 ) == &v2 );
- CPPUNIT_ASSERT( s.contains( v3 ) == &v3 );
-
- CPPUNIT_ASSERT( !s.empty() );
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
-
- // get_min test
- CPPUNIT_CHECK( s.get_min() == nullptr );
- CPPUNIT_CHECK( s.get_max() == nullptr );
-
- {
- value_type v[1000];
- for ( int i = 999; i >= 0; --i ) {
- v[i].nKey = i;
- v[i].nVal = i * 2;
-
- CPPUNIT_ASSERT( s.insert( v[i] ));
- value_type * pVal = s.get_min();
- CPPUNIT_ASSERT( pVal != nullptr );
- CPPUNIT_CHECK( pVal->nKey == i );
- CPPUNIT_CHECK( pVal->nVal == i * 2 );
- }
-
- CPPUNIT_ASSERT( !s.empty() );
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
- }
-
- // Iterator test
- {
- value_type v[500];
-
- for ( int i = 0; unsigned(i) < sizeof(v)/sizeof(v[0]); ++i ) {
- v[i].nKey = i;
- v[i].nVal = i * 2;
-
- CPPUNIT_ASSERT( s.insert( v[i] ));
-
- value_type * pVal = s.get_max();
- CPPUNIT_ASSERT( pVal != nullptr );
- CPPUNIT_CHECK( pVal->nKey == i );
- CPPUNIT_CHECK( pVal->nVal == i * 2 );
- }
-
- int nCount = 0;
- for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal );
- it->nVal = (*it).nKey;
- ++nCount;
- }
- CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0]));
-
- nCount = 0;
- for ( const_set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey == it->nVal );
- ++nCount;
- }
- CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0]));
-
- for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) {
- CPPUNIT_ASSERT( v[i].nKey == v[i].nVal );
- }
-
- //CPPUNIT_MSG( PrintStat()(s, "Iterator test") );
- s.clear();
- }
-
- // Test empty set
- CPPUNIT_ASSERT( s.begin() == s.end() );
- CPPUNIT_ASSERT( s.cbegin() == s.cend() );
-
- CPPUNIT_MSG( PrintStat()(s, nullptr) );
- }
-
- public:
- // Skip-list - gc::HP
- void skiplist_hp_base_cmp();
- void skiplist_hp_base_less();
- void skiplist_hp_base_cmpmix();
- void skiplist_hp_base_cmp_stat();
- void skiplist_hp_base_less_stat();
- void skiplist_hp_base_cmpmix_stat();
- void skiplist_hp_base_cmp_xorshift();
- void skiplist_hp_base_less_xorshift();
- void skiplist_hp_base_cmpmix_xorshift();
- void skiplist_hp_base_cmp_xorshift_stat();
- void skiplist_hp_base_less_xorshift_stat();
- void skiplist_hp_base_cmpmix_xorshift_stat();
- void skiplist_hp_base_cmp_pascal();
- void skiplist_hp_base_less_pascal();
- void skiplist_hp_base_cmpmix_pascal();
- void skiplist_hp_base_cmp_pascal_stat();
- void skiplist_hp_base_less_pascal_stat();
- void skiplist_hp_base_cmpmix_pascal_stat();
-
- void skiplist_hp_member_cmp();
- void skiplist_hp_member_less();
- void skiplist_hp_member_cmpmix();
- void skiplist_hp_member_cmp_stat();
- void skiplist_hp_member_less_stat();
- void skiplist_hp_member_cmpmix_stat();
- void skiplist_hp_member_cmp_xorshift();
- void skiplist_hp_member_less_xorshift();
- void skiplist_hp_member_cmpmix_xorshift();
- void skiplist_hp_member_cmp_xorshift_stat();
- void skiplist_hp_member_less_xorshift_stat();
- void skiplist_hp_member_cmpmix_xorshift_stat();
- void skiplist_hp_member_cmp_pascal();
- void skiplist_hp_member_less_pascal();
- void skiplist_hp_member_cmpmix_pascal();
- void skiplist_hp_member_cmp_pascal_stat();
- void skiplist_hp_member_less_pascal_stat();
- void skiplist_hp_member_cmpmix_pascal_stat();
-
- // Skip-list - gc::DHP
- void skiplist_dhp_base_cmp();
- void skiplist_dhp_base_less();
- void skiplist_dhp_base_cmpmix();
- void skiplist_dhp_base_cmp_stat();
- void skiplist_dhp_base_less_stat();
- void skiplist_dhp_base_cmpmix_stat();
- void skiplist_dhp_base_cmp_xorshift();
- void skiplist_dhp_base_less_xorshift();
- void skiplist_dhp_base_cmpmix_xorshift();
- void skiplist_dhp_base_cmp_xorshift_stat();
- void skiplist_dhp_base_less_xorshift_stat();
- void skiplist_dhp_base_cmpmix_xorshift_stat();
- void skiplist_dhp_base_cmp_pascal();
- void skiplist_dhp_base_less_pascal();
- void skiplist_dhp_base_cmpmix_pascal();
- void skiplist_dhp_base_cmp_pascal_stat();
- void skiplist_dhp_base_less_pascal_stat();
- void skiplist_dhp_base_cmpmix_pascal_stat();
-
- void skiplist_dhp_member_cmp();
- void skiplist_dhp_member_less();
- void skiplist_dhp_member_cmpmix();
- void skiplist_dhp_member_cmp_stat();
- void skiplist_dhp_member_less_stat();
- void skiplist_dhp_member_cmpmix_stat();
- void skiplist_dhp_member_cmp_xorshift();
- void skiplist_dhp_member_less_xorshift();
- void skiplist_dhp_member_cmpmix_xorshift();
- void skiplist_dhp_member_cmp_xorshift_stat();
- void skiplist_dhp_member_less_xorshift_stat();
- void skiplist_dhp_member_cmpmix_xorshift_stat();
- void skiplist_dhp_member_cmp_pascal();
- void skiplist_dhp_member_less_pascal();
- void skiplist_dhp_member_cmpmix_pascal();
- void skiplist_dhp_member_cmp_pascal_stat();
- void skiplist_dhp_member_less_pascal_stat();
- void skiplist_dhp_member_cmpmix_pascal_stat();
-
- // Skip-list - gc::nogc
- void skiplist_nogc_base_cmp();
- void skiplist_nogc_base_less();
- void skiplist_nogc_base_cmpmix();
- void skiplist_nogc_base_cmp_stat();
- void skiplist_nogc_base_less_stat();
- void skiplist_nogc_base_cmpmix_stat();
- void skiplist_nogc_base_cmp_xorshift();
- void skiplist_nogc_base_less_xorshift();
- void skiplist_nogc_base_cmpmix_xorshift();
- void skiplist_nogc_base_cmp_xorshift_stat();
- void skiplist_nogc_base_less_xorshift_stat();
- void skiplist_nogc_base_cmpmix_xorshift_stat();
- void skiplist_nogc_base_cmp_pascal();
- void skiplist_nogc_base_less_pascal();
- void skiplist_nogc_base_cmpmix_pascal();
- void skiplist_nogc_base_cmp_pascal_stat();
- void skiplist_nogc_base_less_pascal_stat();
- void skiplist_nogc_base_cmpmix_pascal_stat();
-
- void skiplist_nogc_member_cmp();
- void skiplist_nogc_member_less();
- void skiplist_nogc_member_cmpmix();
- void skiplist_nogc_member_cmp_stat();
- void skiplist_nogc_member_less_stat();
- void skiplist_nogc_member_cmpmix_stat();
- void skiplist_nogc_member_cmp_xorshift();
- void skiplist_nogc_member_less_xorshift();
- void skiplist_nogc_member_cmpmix_xorshift();
- void skiplist_nogc_member_cmp_xorshift_stat();
- void skiplist_nogc_member_less_xorshift_stat();
- void skiplist_nogc_member_cmpmix_xorshift_stat();
- void skiplist_nogc_member_cmp_pascal();
- void skiplist_nogc_member_less_pascal();
- void skiplist_nogc_member_cmpmix_pascal();
- void skiplist_nogc_member_cmp_pascal_stat();
- void skiplist_nogc_member_less_pascal_stat();
- void skiplist_nogc_member_cmpmix_pascal_stat();
-
- CPPUNIT_TEST_SUITE(IntrusiveSkipListSet)
- CPPUNIT_TEST(skiplist_hp_base_cmp)
- CPPUNIT_TEST(skiplist_hp_base_less)
- CPPUNIT_TEST(skiplist_hp_base_cmpmix)
- CPPUNIT_TEST(skiplist_hp_base_cmp_stat)
- CPPUNIT_TEST(skiplist_hp_base_less_stat)
- CPPUNIT_TEST(skiplist_hp_base_cmpmix_stat)
- CPPUNIT_TEST(skiplist_hp_base_cmp_xorshift)
- CPPUNIT_TEST(skiplist_hp_base_less_xorshift)
- CPPUNIT_TEST(skiplist_hp_base_cmpmix_xorshift)
- CPPUNIT_TEST(skiplist_hp_base_cmp_xorshift_stat)
- CPPUNIT_TEST(skiplist_hp_base_less_xorshift_stat)
- CPPUNIT_TEST(skiplist_hp_base_cmpmix_xorshift_stat)
- CPPUNIT_TEST(skiplist_hp_base_cmp_pascal)
- CPPUNIT_TEST(skiplist_hp_base_less_pascal)
- CPPUNIT_TEST(skiplist_hp_base_cmpmix_pascal)
- CPPUNIT_TEST(skiplist_hp_base_cmp_pascal_stat)
- CPPUNIT_TEST(skiplist_hp_base_less_pascal_stat)
- CPPUNIT_TEST(skiplist_hp_base_cmpmix_pascal_stat)
-
- CPPUNIT_TEST(skiplist_hp_member_cmp)
- CPPUNIT_TEST(skiplist_hp_member_less)
- CPPUNIT_TEST(skiplist_hp_member_cmpmix)
- CPPUNIT_TEST(skiplist_hp_member_cmp_stat)
- CPPUNIT_TEST(skiplist_hp_member_less_stat)
- CPPUNIT_TEST(skiplist_hp_member_cmpmix_stat)
- CPPUNIT_TEST(skiplist_hp_member_cmp_xorshift)
- CPPUNIT_TEST(skiplist_hp_member_less_xorshift)
- CPPUNIT_TEST(skiplist_hp_member_cmpmix_xorshift)
- CPPUNIT_TEST(skiplist_hp_member_cmp_xorshift_stat)
- CPPUNIT_TEST(skiplist_hp_member_less_xorshift_stat)
- CPPUNIT_TEST(skiplist_hp_member_cmpmix_xorshift_stat)
- CPPUNIT_TEST(skiplist_hp_member_cmp_pascal)
- CPPUNIT_TEST(skiplist_hp_member_less_pascal)
- CPPUNIT_TEST(skiplist_hp_member_cmpmix_pascal)
- CPPUNIT_TEST(skiplist_hp_member_cmp_pascal_stat)
- CPPUNIT_TEST(skiplist_hp_member_less_pascal_stat)
- CPPUNIT_TEST(skiplist_hp_member_cmpmix_pascal_stat)
-
- CPPUNIT_TEST(skiplist_dhp_base_cmp)
- CPPUNIT_TEST(skiplist_dhp_base_less)
- CPPUNIT_TEST(skiplist_dhp_base_cmpmix)
- CPPUNIT_TEST(skiplist_dhp_base_cmp_stat)
- CPPUNIT_TEST(skiplist_dhp_base_less_stat)
- CPPUNIT_TEST(skiplist_dhp_base_cmpmix_stat)
- CPPUNIT_TEST(skiplist_dhp_base_cmp_xorshift)
- CPPUNIT_TEST(skiplist_dhp_base_less_xorshift)
- CPPUNIT_TEST(skiplist_dhp_base_cmpmix_xorshift)
- CPPUNIT_TEST(skiplist_dhp_base_cmp_xorshift_stat)
- CPPUNIT_TEST(skiplist_dhp_base_less_xorshift_stat)
- CPPUNIT_TEST(skiplist_dhp_base_cmpmix_xorshift_stat)
- CPPUNIT_TEST(skiplist_dhp_base_cmp_pascal)
- CPPUNIT_TEST(skiplist_dhp_base_less_pascal)
- CPPUNIT_TEST(skiplist_dhp_base_cmpmix_pascal)
- CPPUNIT_TEST(skiplist_dhp_base_cmp_pascal_stat)
- CPPUNIT_TEST(skiplist_dhp_base_less_pascal_stat)
- CPPUNIT_TEST(skiplist_dhp_base_cmpmix_pascal_stat)
-
- CPPUNIT_TEST(skiplist_dhp_member_cmp)
- CPPUNIT_TEST(skiplist_dhp_member_less)
- CPPUNIT_TEST(skiplist_dhp_member_cmpmix)
- CPPUNIT_TEST(skiplist_dhp_member_cmp_stat)
- CPPUNIT_TEST(skiplist_dhp_member_less_stat)
- CPPUNIT_TEST(skiplist_dhp_member_cmpmix_stat)
- CPPUNIT_TEST(skiplist_dhp_member_cmp_xorshift)
- CPPUNIT_TEST(skiplist_dhp_member_less_xorshift)
- CPPUNIT_TEST(skiplist_dhp_member_cmpmix_xorshift)
- CPPUNIT_TEST(skiplist_dhp_member_cmp_xorshift_stat)
- CPPUNIT_TEST(skiplist_dhp_member_less_xorshift_stat)
- CPPUNIT_TEST(skiplist_dhp_member_cmpmix_xorshift_stat)
- CPPUNIT_TEST(skiplist_dhp_member_cmp_pascal)
- CPPUNIT_TEST(skiplist_dhp_member_less_pascal)
- CPPUNIT_TEST(skiplist_dhp_member_cmpmix_pascal)
- CPPUNIT_TEST(skiplist_dhp_member_cmp_pascal_stat)
- CPPUNIT_TEST(skiplist_dhp_member_less_pascal_stat)
- CPPUNIT_TEST(skiplist_dhp_member_cmpmix_pascal_stat)
-
- CPPUNIT_TEST(skiplist_nogc_base_cmp)
- CPPUNIT_TEST(skiplist_nogc_base_less)
- CPPUNIT_TEST(skiplist_nogc_base_cmpmix)
- CPPUNIT_TEST(skiplist_nogc_base_cmp_stat)
- CPPUNIT_TEST(skiplist_nogc_base_less_stat)
- CPPUNIT_TEST(skiplist_nogc_base_cmpmix_stat)
- CPPUNIT_TEST(skiplist_nogc_base_cmp_xorshift)
- CPPUNIT_TEST(skiplist_nogc_base_less_xorshift)
- CPPUNIT_TEST(skiplist_nogc_base_cmpmix_xorshift)
- CPPUNIT_TEST(skiplist_nogc_base_cmp_xorshift_stat)
- CPPUNIT_TEST(skiplist_nogc_base_less_xorshift_stat)
- CPPUNIT_TEST(skiplist_nogc_base_cmpmix_xorshift_stat)
- CPPUNIT_TEST(skiplist_nogc_base_cmp_pascal)
- CPPUNIT_TEST(skiplist_nogc_base_less_pascal)
- CPPUNIT_TEST(skiplist_nogc_base_cmpmix_pascal)
- CPPUNIT_TEST(skiplist_nogc_base_cmp_pascal_stat)
- CPPUNIT_TEST(skiplist_nogc_base_less_pascal_stat)
- CPPUNIT_TEST(skiplist_nogc_base_cmpmix_pascal_stat)
-
- CPPUNIT_TEST(skiplist_nogc_member_cmp)
- CPPUNIT_TEST(skiplist_nogc_member_less)
- CPPUNIT_TEST(skiplist_nogc_member_cmpmix)
- CPPUNIT_TEST(skiplist_nogc_member_cmp_stat)
- CPPUNIT_TEST(skiplist_nogc_member_less_stat)
- CPPUNIT_TEST(skiplist_nogc_member_cmpmix_stat)
- CPPUNIT_TEST(skiplist_nogc_member_cmp_xorshift)
- CPPUNIT_TEST(skiplist_nogc_member_less_xorshift)
- CPPUNIT_TEST(skiplist_nogc_member_cmpmix_xorshift)
- CPPUNIT_TEST(skiplist_nogc_member_cmp_xorshift_stat)
- CPPUNIT_TEST(skiplist_nogc_member_less_xorshift_stat)
- CPPUNIT_TEST(skiplist_nogc_member_cmpmix_xorshift_stat)
- CPPUNIT_TEST(skiplist_nogc_member_cmp_pascal)
- CPPUNIT_TEST(skiplist_nogc_member_less_pascal)
- CPPUNIT_TEST(skiplist_nogc_member_cmpmix_pascal)
- CPPUNIT_TEST(skiplist_nogc_member_cmp_pascal_stat)
- CPPUNIT_TEST(skiplist_nogc_member_less_pascal_stat)
- CPPUNIT_TEST(skiplist_nogc_member_cmpmix_pascal_stat)
-
- CPPUNIT_TEST_SUITE_END()
- };
-} // namespace set
-
-#endif // #ifndef CDSTEST_HDR_INTRUSIVE_SKIPLIST_SET_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 CDSTEST_HDR_INTRUSIVE_SKIPLIST_SET_RCU_H
-#define CDSTEST_HDR_INTRUSIVE_SKIPLIST_SET_RCU_H
-
-#include "set/hdr_intrusive_set.h"
-
-namespace set {
-
- class IntrusiveSkipListSetRCU: public IntrusiveHashSetHdrTest
- {
- typedef IntrusiveHashSetHdrTest base_class;
-
- static size_t const c_nArrSize = 1000;
-
- template <typename Set>
- struct extract_disposer {
- void operator()( typename Set::value_type * pVal ) const
- {
- pVal->nVal = 0;
- }
- };
-
- protected:
- struct other_key {
- int nKey;
-
- other_key()
- {}
-
- other_key( int key )
- : nKey(key)
- {}
-
- template <typename Q>
- other_key& operator=( Q const& src )
- {
- nKey = src.nKey;
- return *this;
- }
- };
-
- template <typename StoredType>
- struct other_key_less
- {
- bool operator ()( StoredType const& n, other_key k ) const
- {
- return n.nKey < k.nKey;
- }
- bool operator ()( other_key k, StoredType const& n ) const
- {
- return k.nKey < n.nKey;
- }
- };
-
- struct copy_other_key
- {
- template <typename Q>
- void operator()( other_key& dest, Q const& src ) const
- {
- dest.nKey = src.nKey;
- }
- };
-
- protected:
-
- template <class Set, typename PrintStat>
- void test_skiplist()
- {
- {
- Set s;
- base_class::test_int_with( s );
- }
-
- test_skiplist_<Set, PrintStat >();
- }
-
- template <class Set, typename PrintStat>
- void test_skiplist_()
- {
- Set s;
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
-
- typedef typename Set::gc::scoped_lock rcu_lock;
- typedef typename Set::value_type value_type;
- typedef typename Set::iterator set_iterator;
- typedef typename Set::const_iterator const_set_iterator;
-
- value_type v[c_nArrSize];
- int nCount = 0;
- int nPrevKey = 0;
-
- // Test iterator - ascending order
- for ( int i = 0; i < (int) (sizeof(v)/sizeof(v[0])); ++i ) {
- v[i].nKey = i;
- v[i].nVal = i * 2;
-
- CPPUNIT_ASSERT( s.insert( v[i] ));
- }
- CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) ));
-
- //CPPUNIT_MSG( PrintStat()(s, "Iterator test, ascending insert order") );
-
- nCount = 0;
- nPrevKey = 0;
- {
- rcu_lock l;
- for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal );
- CPPUNIT_ASSERT( s.contains( it->nKey ));
- it->nVal = (*it).nKey;
- ++nCount;
- if ( it != s.begin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- }
- CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) ));
- CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0]));
-
- nCount = 0;
- {
- rcu_lock l;
- for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey == it->nVal );
- ++nCount;
- if ( it != s.cbegin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- }
- CPPUNIT_CHECK( check_size( s, sizeof(v)/sizeof(v[0]) ));
- CPPUNIT_CHECK( nCount == sizeof(v)/sizeof(v[0]));
-
- for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) {
- CPPUNIT_ASSERT( v[i].nKey == v[i].nVal );
- CPPUNIT_ASSERT( s.contains( v[i].nKey ));
- }
-
- s.clear();
- CPPUNIT_CHECK( s.empty() );
- CPPUNIT_CHECK( check_size( s, 0));
- Set::gc::force_dispose();
-
- for ( size_t i = 0; i < (int) sizeof(v)/sizeof(v[0]); ++i ) {
- CPPUNIT_CHECK( v[i].nDisposeCount == 1 );
- }
-
- // Test iterator - descending order
- for ( int i = (int) sizeof(v)/sizeof(v[0]) - 1; i >= 0; --i ) {
- v[i].nKey = i;
- v[i].nVal = i * 2;
-
- CPPUNIT_ASSERT( s.insert( v[i] ));
- }
- CPPUNIT_CHECK( check_size( s, sizeof(v)/sizeof(v[0]) ));
-
- //CPPUNIT_MSG( PrintStat()(s, "Iterator test, descending insert order") );
-
- nCount = 0;
- {
- rcu_lock l;
- for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal );
- it->nVal = (*it).nKey;
- ++nCount;
- if ( it != s.begin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- }
- CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) ));
- CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0]));
-
- nCount = 0;
- {
- rcu_lock l;
- for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey == it->nVal );
- ++nCount;
- if ( it != s.cbegin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- }
- CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) ));
- CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0]));
-
- for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) {
- CPPUNIT_ASSERT( v[i].nKey == v[i].nVal );
- }
-
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
- Set::gc::force_dispose();
-
- for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) {
- CPPUNIT_ASSERT( v[i].nDisposeCount == 2 );
- }
-
- // Test iterator - random order
- fill_skiplist( s, v );
- CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) ));
- //CPPUNIT_MSG( PrintStat()(s, "Iterator test, random insert order") );
-
- nCount = 0;
- {
- rcu_lock l;
- for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal );
- it->nVal = (*it).nKey;
- ++nCount;
- if ( it != s.begin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- }
- CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) ));
- CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0]));
-
- nCount = 0;
- {
- rcu_lock l;
- for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey == it->nVal );
- ++nCount;
- if ( it != s.cbegin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- }
- CPPUNIT_ASSERT( check_size( s, sizeof(v)/sizeof(v[0]) ));
- CPPUNIT_ASSERT( nCount == sizeof(v)/sizeof(v[0]));
-
- for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) {
- CPPUNIT_ASSERT( v[i].nKey == v[i].nVal );
- }
-
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
- Set::gc::force_dispose();
-
- for ( size_t i = 0; i < sizeof(v)/sizeof(v[0]); ++i ) {
- CPPUNIT_ASSERT( v[i].nDisposeCount == 3 );
- }
-
- // extract/get test
- {
- typename Set::exempt_ptr ep;
- typename Set::raw_ptr rp;
- // extract
- {
- fill_skiplist( s, v );
-
- for ( int i = c_nArrSize - 1; i >= 0; i -= 1 ) {
- {
- rcu_lock l;
- rp = s.get( i );
- CPPUNIT_ASSERT( rp );
- CPPUNIT_CHECK( rp->nKey == i );
- CPPUNIT_CHECK( rp->nVal == i * 2 );
- rp->nVal *= 2;
- }
- rp.release();
-
- ep = s.extract( i );
- CPPUNIT_ASSERT( ep );
- CPPUNIT_ASSERT( !ep.empty() );
- CPPUNIT_CHECK( ep->nKey == i );
- CPPUNIT_CHECK( ep->nVal == i * 4 );
- ep.release();
-
- {
- rcu_lock l;
- CPPUNIT_CHECK( !s.get( i ));
- }
- ep = s.extract( i );
- CPPUNIT_CHECK( !ep );
- CPPUNIT_ASSERT( ep.empty() );
- }
- CPPUNIT_CHECK( s.empty() );
- }
- Set::gc::force_dispose();
-
- // extract_with
- {
- fill_skiplist( s, v );
- for ( int i = c_nArrSize - 1; i >= 0; i -= 1 ) {
- {
- rcu_lock l;
- rp = s.get_with( other_key(i), other_key_less<typename Set::value_type>() );
- CPPUNIT_ASSERT( rp );
- CPPUNIT_CHECK( rp->nKey == i );
- CPPUNIT_CHECK( rp->nVal == i * 2 );
- rp->nVal *= 2;
- }
- rp.release();
-
- ep = s.extract_with( other_key( i ), other_key_less<typename Set::value_type>() );
- CPPUNIT_ASSERT( ep );
- CPPUNIT_ASSERT( !ep.empty() );
- CPPUNIT_CHECK( ep->nKey == i );
- CPPUNIT_CHECK( ep->nVal == i * 4 );
- ep.release();
-
- {
- rcu_lock l;
- CPPUNIT_CHECK( !s.get_with( other_key( i ), other_key_less<typename Set::value_type>() ));
- }
- ep = s.extract_with( other_key( i ), other_key_less<typename Set::value_type>() );
- CPPUNIT_CHECK( !ep );
- }
- CPPUNIT_CHECK( s.empty() );
- }
- Set::gc::force_dispose();
-
- // extract_min
- {
- fill_skiplist( s, v );
- int nPrevKey;
-
- ep = s.extract_min();
- CPPUNIT_ASSERT( ep );
- CPPUNIT_ASSERT( !ep.empty());
- nPrevKey = ep->nKey;
- ep.release();
-
- while ( !s.empty() ) {
- ep = s.extract_min();
- CPPUNIT_ASSERT( ep );
- CPPUNIT_ASSERT( !ep.empty());
- CPPUNIT_CHECK( ep->nKey == nPrevKey + 1 );
- CPPUNIT_CHECK( ep->nVal == (nPrevKey + 1) * 2 );
- nPrevKey = ep->nKey;
- ep.release();
- }
- ep = s.extract_min();
- CPPUNIT_CHECK( !ep );
- CPPUNIT_CHECK( !s.extract_max() );
- }
- Set::gc::force_dispose();
-
- // extract_max
- {
- fill_skiplist( s, v );
- int nPrevKey;
-
- ep = s.extract_max();
- CPPUNIT_ASSERT( ep );
- CPPUNIT_ASSERT( !ep.empty());
- nPrevKey = ep->nKey;
- ep.release();
-
- while ( !s.empty() ) {
- ep = s.extract_max();
- CPPUNIT_ASSERT( ep );
- CPPUNIT_ASSERT( !ep.empty());
- CPPUNIT_CHECK( ep->nKey == nPrevKey - 1 );
- CPPUNIT_CHECK( ep->nVal == (nPrevKey - 1) * 2 );
- nPrevKey = ep->nKey;
- ep.release();
- }
- ep = s.extract_min();
- CPPUNIT_CHECK( !ep );
- CPPUNIT_CHECK( !s.extract_max() );
- }
- Set::gc::force_dispose();
- }
-
- CPPUNIT_MSG( PrintStat()(s, nullptr) );
- }
-
- template <typename Set>
- void fill_skiplist( Set& s, typename Set::value_type * pArr )
- {
- int nRand[c_nArrSize];
- for ( int i = 0; i < (int) c_nArrSize; ++i ) {
- nRand[i] = i;
- }
- shuffle( nRand, nRand + c_nArrSize );
-
- for ( int i = 0; i < (int) c_nArrSize; ++i ) {
- pArr[i].nKey = nRand[i];
- pArr[i].nVal = nRand[i] * 2;
- CPPUNIT_ASSERT( s.insert( pArr[i] ));
- }
- CPPUNIT_CHECK( check_size( s, c_nArrSize ));
- }
-
- public:
-
- // Skip-list RCU
- void skiplist_rcu_gpi_base_cmp();
- void skiplist_rcu_gpi_base_less();
- void skiplist_rcu_gpi_base_cmpmix();
- void skiplist_rcu_gpi_base_cmp_stat();
- void skiplist_rcu_gpi_base_less_stat();
- void skiplist_rcu_gpi_base_cmpmix_stat();
- void skiplist_rcu_gpi_base_cmp_xorshift();
- void skiplist_rcu_gpi_base_less_xorshift();
- void skiplist_rcu_gpi_base_cmpmix_xorshift();
- void skiplist_rcu_gpi_base_cmp_xorshift_stat();
- void skiplist_rcu_gpi_base_less_xorshift_stat();
- void skiplist_rcu_gpi_base_cmpmix_xorshift_stat();
- void skiplist_rcu_gpi_base_cmp_pascal();
- void skiplist_rcu_gpi_base_less_pascal();
- void skiplist_rcu_gpi_base_cmpmix_pascal();
- void skiplist_rcu_gpi_base_cmp_pascal_stat();
- void skiplist_rcu_gpi_base_less_pascal_stat();
- void skiplist_rcu_gpi_base_cmpmix_pascal_stat();
-
- void skiplist_rcu_gpi_member_cmp();
- void skiplist_rcu_gpi_member_less();
- void skiplist_rcu_gpi_member_cmpmix();
- void skiplist_rcu_gpi_member_cmp_stat();
- void skiplist_rcu_gpi_member_less_stat();
- void skiplist_rcu_gpi_member_cmpmix_stat();
- void skiplist_rcu_gpi_member_cmp_xorshift();
- void skiplist_rcu_gpi_member_less_xorshift();
- void skiplist_rcu_gpi_member_cmpmix_xorshift();
- void skiplist_rcu_gpi_member_cmp_xorshift_stat();
- void skiplist_rcu_gpi_member_less_xorshift_stat();
- void skiplist_rcu_gpi_member_cmpmix_xorshift_stat();
- void skiplist_rcu_gpi_member_cmp_pascal();
- void skiplist_rcu_gpi_member_less_pascal();
- void skiplist_rcu_gpi_member_cmpmix_pascal();
- void skiplist_rcu_gpi_member_cmp_pascal_stat();
- void skiplist_rcu_gpi_member_less_pascal_stat();
- void skiplist_rcu_gpi_member_cmpmix_pascal_stat();
-
- // general_buffered
- void skiplist_rcu_gpb_base_cmp();
- void skiplist_rcu_gpb_base_less();
- void skiplist_rcu_gpb_base_cmpmix();
- void skiplist_rcu_gpb_base_cmp_stat();
- void skiplist_rcu_gpb_base_less_stat();
- void skiplist_rcu_gpb_base_cmpmix_stat();
- void skiplist_rcu_gpb_base_cmp_xorshift();
- void skiplist_rcu_gpb_base_less_xorshift();
- void skiplist_rcu_gpb_base_cmpmix_xorshift();
- void skiplist_rcu_gpb_base_cmp_xorshift_stat();
- void skiplist_rcu_gpb_base_less_xorshift_stat();
- void skiplist_rcu_gpb_base_cmpmix_xorshift_stat();
- void skiplist_rcu_gpb_base_cmp_pascal();
- void skiplist_rcu_gpb_base_less_pascal();
- void skiplist_rcu_gpb_base_cmpmix_pascal();
- void skiplist_rcu_gpb_base_cmp_pascal_stat();
- void skiplist_rcu_gpb_base_less_pascal_stat();
- void skiplist_rcu_gpb_base_cmpmix_pascal_stat();
-
- void skiplist_rcu_gpb_member_cmp();
- void skiplist_rcu_gpb_member_less();
- void skiplist_rcu_gpb_member_cmpmix();
- void skiplist_rcu_gpb_member_cmp_stat();
- void skiplist_rcu_gpb_member_less_stat();
- void skiplist_rcu_gpb_member_cmpmix_stat();
- void skiplist_rcu_gpb_member_cmp_xorshift();
- void skiplist_rcu_gpb_member_less_xorshift();
- void skiplist_rcu_gpb_member_cmpmix_xorshift();
- void skiplist_rcu_gpb_member_cmp_xorshift_stat();
- void skiplist_rcu_gpb_member_less_xorshift_stat();
- void skiplist_rcu_gpb_member_cmpmix_xorshift_stat();
- void skiplist_rcu_gpb_member_cmp_pascal();
- void skiplist_rcu_gpb_member_less_pascal();
- void skiplist_rcu_gpb_member_cmpmix_pascal();
- void skiplist_rcu_gpb_member_cmp_pascal_stat();
- void skiplist_rcu_gpb_member_less_pascal_stat();
- void skiplist_rcu_gpb_member_cmpmix_pascal_stat();
-
- // general_threaded
- void skiplist_rcu_gpt_base_cmp();
- void skiplist_rcu_gpt_base_less();
- void skiplist_rcu_gpt_base_cmpmix();
- void skiplist_rcu_gpt_base_cmp_stat();
- void skiplist_rcu_gpt_base_less_stat();
- void skiplist_rcu_gpt_base_cmpmix_stat();
- void skiplist_rcu_gpt_base_cmp_xorshift();
- void skiplist_rcu_gpt_base_less_xorshift();
- void skiplist_rcu_gpt_base_cmpmix_xorshift();
- void skiplist_rcu_gpt_base_cmp_xorshift_stat();
- void skiplist_rcu_gpt_base_less_xorshift_stat();
- void skiplist_rcu_gpt_base_cmpmix_xorshift_stat();
- void skiplist_rcu_gpt_base_cmp_pascal();
- void skiplist_rcu_gpt_base_less_pascal();
- void skiplist_rcu_gpt_base_cmpmix_pascal();
- void skiplist_rcu_gpt_base_cmp_pascal_stat();
- void skiplist_rcu_gpt_base_less_pascal_stat();
- void skiplist_rcu_gpt_base_cmpmix_pascal_stat();
-
- void skiplist_rcu_gpt_member_cmp();
- void skiplist_rcu_gpt_member_less();
- void skiplist_rcu_gpt_member_cmpmix();
- void skiplist_rcu_gpt_member_cmp_stat();
- void skiplist_rcu_gpt_member_less_stat();
- void skiplist_rcu_gpt_member_cmpmix_stat();
- void skiplist_rcu_gpt_member_cmp_xorshift();
- void skiplist_rcu_gpt_member_less_xorshift();
- void skiplist_rcu_gpt_member_cmpmix_xorshift();
- void skiplist_rcu_gpt_member_cmp_xorshift_stat();
- void skiplist_rcu_gpt_member_less_xorshift_stat();
- void skiplist_rcu_gpt_member_cmpmix_xorshift_stat();
- void skiplist_rcu_gpt_member_cmp_pascal();
- void skiplist_rcu_gpt_member_less_pascal();
- void skiplist_rcu_gpt_member_cmpmix_pascal();
- void skiplist_rcu_gpt_member_cmp_pascal_stat();
- void skiplist_rcu_gpt_member_less_pascal_stat();
- void skiplist_rcu_gpt_member_cmpmix_pascal_stat();
-
- // signal_buffered
- void skiplist_rcu_shb_base_cmp();
- void skiplist_rcu_shb_base_less();
- void skiplist_rcu_shb_base_cmpmix();
- void skiplist_rcu_shb_base_cmp_stat();
- void skiplist_rcu_shb_base_less_stat();
- void skiplist_rcu_shb_base_cmpmix_stat();
- void skiplist_rcu_shb_base_cmp_xorshift();
- void skiplist_rcu_shb_base_less_xorshift();
- void skiplist_rcu_shb_base_cmpmix_xorshift();
- void skiplist_rcu_shb_base_cmp_xorshift_stat();
- void skiplist_rcu_shb_base_less_xorshift_stat();
- void skiplist_rcu_shb_base_cmpmix_xorshift_stat();
- void skiplist_rcu_shb_base_cmp_pascal();
- void skiplist_rcu_shb_base_less_pascal();
- void skiplist_rcu_shb_base_cmpmix_pascal();
- void skiplist_rcu_shb_base_cmp_pascal_stat();
- void skiplist_rcu_shb_base_less_pascal_stat();
- void skiplist_rcu_shb_base_cmpmix_pascal_stat();
-
- void skiplist_rcu_shb_member_cmp();
- void skiplist_rcu_shb_member_less();
- void skiplist_rcu_shb_member_cmpmix();
- void skiplist_rcu_shb_member_cmp_stat();
- void skiplist_rcu_shb_member_less_stat();
- void skiplist_rcu_shb_member_cmpmix_stat();
- void skiplist_rcu_shb_member_cmp_xorshift();
- void skiplist_rcu_shb_member_less_xorshift();
- void skiplist_rcu_shb_member_cmpmix_xorshift();
- void skiplist_rcu_shb_member_cmp_xorshift_stat();
- void skiplist_rcu_shb_member_less_xorshift_stat();
- void skiplist_rcu_shb_member_cmpmix_xorshift_stat();
- void skiplist_rcu_shb_member_cmp_pascal();
- void skiplist_rcu_shb_member_less_pascal();
- void skiplist_rcu_shb_member_cmpmix_pascal();
- void skiplist_rcu_shb_member_cmp_pascal_stat();
- void skiplist_rcu_shb_member_less_pascal_stat();
- void skiplist_rcu_shb_member_cmpmix_pascal_stat();
-
- // signal_threaded
- void skiplist_rcu_sht_base_cmp();
- void skiplist_rcu_sht_base_less();
- void skiplist_rcu_sht_base_cmpmix();
- void skiplist_rcu_sht_base_cmp_stat();
- void skiplist_rcu_sht_base_less_stat();
- void skiplist_rcu_sht_base_cmpmix_stat();
- void skiplist_rcu_sht_base_cmp_xorshift();
- void skiplist_rcu_sht_base_less_xorshift();
- void skiplist_rcu_sht_base_cmpmix_xorshift();
- void skiplist_rcu_sht_base_cmp_xorshift_stat();
- void skiplist_rcu_sht_base_less_xorshift_stat();
- void skiplist_rcu_sht_base_cmpmix_xorshift_stat();
- void skiplist_rcu_sht_base_cmp_pascal();
- void skiplist_rcu_sht_base_less_pascal();
- void skiplist_rcu_sht_base_cmpmix_pascal();
- void skiplist_rcu_sht_base_cmp_pascal_stat();
- void skiplist_rcu_sht_base_less_pascal_stat();
- void skiplist_rcu_sht_base_cmpmix_pascal_stat();
-
- void skiplist_rcu_sht_member_cmp();
- void skiplist_rcu_sht_member_less();
- void skiplist_rcu_sht_member_cmpmix();
- void skiplist_rcu_sht_member_cmp_stat();
- void skiplist_rcu_sht_member_less_stat();
- void skiplist_rcu_sht_member_cmpmix_stat();
- void skiplist_rcu_sht_member_cmp_xorshift();
- void skiplist_rcu_sht_member_less_xorshift();
- void skiplist_rcu_sht_member_cmpmix_xorshift();
- void skiplist_rcu_sht_member_cmp_xorshift_stat();
- void skiplist_rcu_sht_member_less_xorshift_stat();
- void skiplist_rcu_sht_member_cmpmix_xorshift_stat();
- void skiplist_rcu_sht_member_cmp_pascal();
- void skiplist_rcu_sht_member_less_pascal();
- void skiplist_rcu_sht_member_cmpmix_pascal();
- void skiplist_rcu_sht_member_cmp_pascal_stat();
- void skiplist_rcu_sht_member_less_pascal_stat();
- void skiplist_rcu_sht_member_cmpmix_pascal_stat();
-
- CPPUNIT_TEST_SUITE(IntrusiveSkipListSetRCU)
- CPPUNIT_TEST(skiplist_rcu_gpi_base_cmp)
- CPPUNIT_TEST(skiplist_rcu_gpi_base_less)
- CPPUNIT_TEST(skiplist_rcu_gpi_base_cmpmix)
- CPPUNIT_TEST(skiplist_rcu_gpi_base_cmp_stat)
- CPPUNIT_TEST(skiplist_rcu_gpi_base_less_stat)
- CPPUNIT_TEST(skiplist_rcu_gpi_base_cmpmix_stat)
- CPPUNIT_TEST(skiplist_rcu_gpi_base_cmp_xorshift)
- CPPUNIT_TEST(skiplist_rcu_gpi_base_less_xorshift)
- CPPUNIT_TEST(skiplist_rcu_gpi_base_cmpmix_xorshift)
- CPPUNIT_TEST(skiplist_rcu_gpi_base_cmp_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_gpi_base_less_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_gpi_base_cmpmix_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_gpi_base_cmp_pascal)
- CPPUNIT_TEST(skiplist_rcu_gpi_base_less_pascal)
- CPPUNIT_TEST(skiplist_rcu_gpi_base_cmpmix_pascal)
- CPPUNIT_TEST(skiplist_rcu_gpi_base_cmp_pascal_stat)
- CPPUNIT_TEST(skiplist_rcu_gpi_base_less_pascal_stat)
- CPPUNIT_TEST(skiplist_rcu_gpi_base_cmpmix_pascal_stat)
-
- CPPUNIT_TEST(skiplist_rcu_gpi_member_cmp)
- CPPUNIT_TEST(skiplist_rcu_gpi_member_less)
- CPPUNIT_TEST(skiplist_rcu_gpi_member_cmpmix)
- CPPUNIT_TEST(skiplist_rcu_gpi_member_cmp_stat)
- CPPUNIT_TEST(skiplist_rcu_gpi_member_less_stat)
- CPPUNIT_TEST(skiplist_rcu_gpi_member_cmpmix_stat)
- CPPUNIT_TEST(skiplist_rcu_gpi_member_cmp_xorshift)
- CPPUNIT_TEST(skiplist_rcu_gpi_member_less_xorshift)
- CPPUNIT_TEST(skiplist_rcu_gpi_member_cmpmix_xorshift)
- CPPUNIT_TEST(skiplist_rcu_gpi_member_cmp_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_gpi_member_less_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_gpi_member_cmpmix_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_gpi_member_cmp_pascal)
- CPPUNIT_TEST(skiplist_rcu_gpi_member_less_pascal)
- CPPUNIT_TEST(skiplist_rcu_gpi_member_cmpmix_pascal)
- CPPUNIT_TEST(skiplist_rcu_gpi_member_cmp_pascal_stat)
- CPPUNIT_TEST(skiplist_rcu_gpi_member_less_pascal_stat)
- CPPUNIT_TEST(skiplist_rcu_gpi_member_cmpmix_pascal_stat)
-
- //
- CPPUNIT_TEST(skiplist_rcu_gpb_base_cmp)
- CPPUNIT_TEST(skiplist_rcu_gpb_base_less)
- CPPUNIT_TEST(skiplist_rcu_gpb_base_cmpmix)
- CPPUNIT_TEST(skiplist_rcu_gpb_base_cmp_stat)
- CPPUNIT_TEST(skiplist_rcu_gpb_base_less_stat)
- CPPUNIT_TEST(skiplist_rcu_gpb_base_cmpmix_stat)
- CPPUNIT_TEST(skiplist_rcu_gpb_base_cmp_xorshift)
- CPPUNIT_TEST(skiplist_rcu_gpb_base_less_xorshift)
- CPPUNIT_TEST(skiplist_rcu_gpb_base_cmpmix_xorshift)
- CPPUNIT_TEST(skiplist_rcu_gpb_base_cmp_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_gpb_base_less_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_gpb_base_cmpmix_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_gpb_base_cmp_pascal)
- CPPUNIT_TEST(skiplist_rcu_gpb_base_less_pascal)
- CPPUNIT_TEST(skiplist_rcu_gpb_base_cmpmix_pascal)
- CPPUNIT_TEST(skiplist_rcu_gpb_base_cmp_pascal_stat)
- CPPUNIT_TEST(skiplist_rcu_gpb_base_less_pascal_stat)
- CPPUNIT_TEST(skiplist_rcu_gpb_base_cmpmix_pascal_stat)
-
- CPPUNIT_TEST(skiplist_rcu_gpb_member_cmp)
- CPPUNIT_TEST(skiplist_rcu_gpb_member_less)
- CPPUNIT_TEST(skiplist_rcu_gpb_member_cmpmix)
- CPPUNIT_TEST(skiplist_rcu_gpb_member_cmp_stat)
- CPPUNIT_TEST(skiplist_rcu_gpb_member_less_stat)
- CPPUNIT_TEST(skiplist_rcu_gpb_member_cmpmix_stat)
- CPPUNIT_TEST(skiplist_rcu_gpb_member_cmp_xorshift)
- CPPUNIT_TEST(skiplist_rcu_gpb_member_less_xorshift)
- CPPUNIT_TEST(skiplist_rcu_gpb_member_cmpmix_xorshift)
- CPPUNIT_TEST(skiplist_rcu_gpb_member_cmp_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_gpb_member_less_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_gpb_member_cmpmix_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_gpb_member_cmp_pascal)
- CPPUNIT_TEST(skiplist_rcu_gpb_member_less_pascal)
- CPPUNIT_TEST(skiplist_rcu_gpb_member_cmpmix_pascal)
- CPPUNIT_TEST(skiplist_rcu_gpb_member_cmp_pascal_stat)
- CPPUNIT_TEST(skiplist_rcu_gpb_member_less_pascal_stat)
- CPPUNIT_TEST(skiplist_rcu_gpb_member_cmpmix_pascal_stat)
-
- //
- CPPUNIT_TEST(skiplist_rcu_gpt_base_cmp)
- CPPUNIT_TEST(skiplist_rcu_gpt_base_less)
- CPPUNIT_TEST(skiplist_rcu_gpt_base_cmpmix)
- CPPUNIT_TEST(skiplist_rcu_gpt_base_cmp_stat)
- CPPUNIT_TEST(skiplist_rcu_gpt_base_less_stat)
- CPPUNIT_TEST(skiplist_rcu_gpt_base_cmpmix_stat)
- CPPUNIT_TEST(skiplist_rcu_gpt_base_cmp_xorshift)
- CPPUNIT_TEST(skiplist_rcu_gpt_base_less_xorshift)
- CPPUNIT_TEST(skiplist_rcu_gpt_base_cmpmix_xorshift)
- CPPUNIT_TEST(skiplist_rcu_gpt_base_cmp_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_gpt_base_less_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_gpt_base_cmpmix_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_gpt_base_cmp_pascal)
- CPPUNIT_TEST(skiplist_rcu_gpt_base_less_pascal)
- CPPUNIT_TEST(skiplist_rcu_gpt_base_cmpmix_pascal)
- CPPUNIT_TEST(skiplist_rcu_gpt_base_cmp_pascal_stat)
- CPPUNIT_TEST(skiplist_rcu_gpt_base_less_pascal_stat)
- CPPUNIT_TEST(skiplist_rcu_gpt_base_cmpmix_pascal_stat)
-
- CPPUNIT_TEST(skiplist_rcu_gpt_member_cmp)
- CPPUNIT_TEST(skiplist_rcu_gpt_member_less)
- CPPUNIT_TEST(skiplist_rcu_gpt_member_cmpmix)
- CPPUNIT_TEST(skiplist_rcu_gpt_member_cmp_stat)
- CPPUNIT_TEST(skiplist_rcu_gpt_member_less_stat)
- CPPUNIT_TEST(skiplist_rcu_gpt_member_cmpmix_stat)
- CPPUNIT_TEST(skiplist_rcu_gpt_member_cmp_xorshift)
- CPPUNIT_TEST(skiplist_rcu_gpt_member_less_xorshift)
- CPPUNIT_TEST(skiplist_rcu_gpt_member_cmpmix_xorshift)
- CPPUNIT_TEST(skiplist_rcu_gpt_member_cmp_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_gpt_member_less_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_gpt_member_cmpmix_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_gpt_member_cmp_pascal)
- CPPUNIT_TEST(skiplist_rcu_gpt_member_less_pascal)
- CPPUNIT_TEST(skiplist_rcu_gpt_member_cmpmix_pascal)
- CPPUNIT_TEST(skiplist_rcu_gpt_member_cmp_pascal_stat)
- CPPUNIT_TEST(skiplist_rcu_gpt_member_less_pascal_stat)
- CPPUNIT_TEST(skiplist_rcu_gpt_member_cmpmix_pascal_stat)
-
- //
- CPPUNIT_TEST(skiplist_rcu_shb_base_cmp)
- CPPUNIT_TEST(skiplist_rcu_shb_base_less)
- CPPUNIT_TEST(skiplist_rcu_shb_base_cmpmix)
- CPPUNIT_TEST(skiplist_rcu_shb_base_cmp_stat)
- CPPUNIT_TEST(skiplist_rcu_shb_base_less_stat)
- CPPUNIT_TEST(skiplist_rcu_shb_base_cmpmix_stat)
- CPPUNIT_TEST(skiplist_rcu_shb_base_cmp_xorshift)
- CPPUNIT_TEST(skiplist_rcu_shb_base_less_xorshift)
- CPPUNIT_TEST(skiplist_rcu_shb_base_cmpmix_xorshift)
- CPPUNIT_TEST(skiplist_rcu_shb_base_cmp_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_shb_base_less_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_shb_base_cmpmix_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_shb_base_cmp_pascal)
- CPPUNIT_TEST(skiplist_rcu_shb_base_less_pascal)
- CPPUNIT_TEST(skiplist_rcu_shb_base_cmpmix_pascal)
- CPPUNIT_TEST(skiplist_rcu_shb_base_cmp_pascal_stat)
- CPPUNIT_TEST(skiplist_rcu_shb_base_less_pascal_stat)
- CPPUNIT_TEST(skiplist_rcu_shb_base_cmpmix_pascal_stat)
-
- CPPUNIT_TEST(skiplist_rcu_shb_member_cmp)
- CPPUNIT_TEST(skiplist_rcu_shb_member_less)
- CPPUNIT_TEST(skiplist_rcu_shb_member_cmpmix)
- CPPUNIT_TEST(skiplist_rcu_shb_member_cmp_stat)
- CPPUNIT_TEST(skiplist_rcu_shb_member_less_stat)
- CPPUNIT_TEST(skiplist_rcu_shb_member_cmpmix_stat)
- CPPUNIT_TEST(skiplist_rcu_shb_member_cmp_xorshift)
- CPPUNIT_TEST(skiplist_rcu_shb_member_less_xorshift)
- CPPUNIT_TEST(skiplist_rcu_shb_member_cmpmix_xorshift)
- CPPUNIT_TEST(skiplist_rcu_shb_member_cmp_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_shb_member_less_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_shb_member_cmpmix_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_shb_member_cmp_pascal)
- CPPUNIT_TEST(skiplist_rcu_shb_member_less_pascal)
- CPPUNIT_TEST(skiplist_rcu_shb_member_cmpmix_pascal)
- CPPUNIT_TEST(skiplist_rcu_shb_member_cmp_pascal_stat)
- CPPUNIT_TEST(skiplist_rcu_shb_member_less_pascal_stat)
- CPPUNIT_TEST(skiplist_rcu_shb_member_cmpmix_pascal_stat)
-
- //
- CPPUNIT_TEST(skiplist_rcu_sht_base_cmp)
- CPPUNIT_TEST(skiplist_rcu_sht_base_less)
- CPPUNIT_TEST(skiplist_rcu_sht_base_cmpmix)
- CPPUNIT_TEST(skiplist_rcu_sht_base_cmp_stat)
- CPPUNIT_TEST(skiplist_rcu_sht_base_less_stat)
- CPPUNIT_TEST(skiplist_rcu_sht_base_cmpmix_stat)
- CPPUNIT_TEST(skiplist_rcu_sht_base_cmp_xorshift)
- CPPUNIT_TEST(skiplist_rcu_sht_base_less_xorshift)
- CPPUNIT_TEST(skiplist_rcu_sht_base_cmpmix_xorshift)
- CPPUNIT_TEST(skiplist_rcu_sht_base_cmp_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_sht_base_less_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_sht_base_cmpmix_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_sht_base_cmp_pascal)
- CPPUNIT_TEST(skiplist_rcu_sht_base_less_pascal)
- CPPUNIT_TEST(skiplist_rcu_sht_base_cmpmix_pascal)
- CPPUNIT_TEST(skiplist_rcu_sht_base_cmp_pascal_stat)
- CPPUNIT_TEST(skiplist_rcu_sht_base_less_pascal_stat)
- CPPUNIT_TEST(skiplist_rcu_sht_base_cmpmix_pascal_stat)
-
- CPPUNIT_TEST(skiplist_rcu_sht_member_cmp)
- CPPUNIT_TEST(skiplist_rcu_sht_member_less)
- CPPUNIT_TEST(skiplist_rcu_sht_member_cmpmix)
- CPPUNIT_TEST(skiplist_rcu_sht_member_cmp_stat)
- CPPUNIT_TEST(skiplist_rcu_sht_member_less_stat)
- CPPUNIT_TEST(skiplist_rcu_sht_member_cmpmix_stat)
- CPPUNIT_TEST(skiplist_rcu_sht_member_cmp_xorshift)
- CPPUNIT_TEST(skiplist_rcu_sht_member_less_xorshift)
- CPPUNIT_TEST(skiplist_rcu_sht_member_cmpmix_xorshift)
- CPPUNIT_TEST(skiplist_rcu_sht_member_cmp_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_sht_member_less_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_sht_member_cmpmix_xorshift_stat)
- CPPUNIT_TEST(skiplist_rcu_sht_member_cmp_pascal)
- CPPUNIT_TEST(skiplist_rcu_sht_member_less_pascal)
- CPPUNIT_TEST(skiplist_rcu_sht_member_cmpmix_pascal)
- CPPUNIT_TEST(skiplist_rcu_sht_member_cmp_pascal_stat)
- CPPUNIT_TEST(skiplist_rcu_sht_member_less_pascal_stat)
- CPPUNIT_TEST(skiplist_rcu_sht_member_cmpmix_pascal_stat)
-
- CPPUNIT_TEST_SUITE_END()
- };
-} // namespace set
-
-#endif // #ifndef CDSTEST_HDR_INTRUSIVE_SKIPLIST_SET_RCU_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.
-*/
-
-#include "set/hdr_intrusive_set.h"
-#include <cds/intrusive/michael_list_dhp.h>
-#include <cds/intrusive/split_list.h>
-
-namespace set {
-
- void IntrusiveHashSetHdrTest::split_dyn_DHP_base_cmp()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::DHP> > > item;
- typedef ci::MichaelList< cds::gc::DHP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_DHP_base_less()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::DHP> > > item;
- typedef ci::MichaelList< cds::gc::DHP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_DHP_base_cmpmix()
- {
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<cds::gc::DHP> > > item;
- typedef ci::MichaelList< cds::gc::DHP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_DHP_base_cmpmix_stat()
- {
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<cds::gc::DHP> > > item;
- typedef ci::MichaelList< cds::gc::DHP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::stat< ci::split_list::stat<> >
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_DHP_member_cmp()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::DHP> > > item;
- typedef ci::MichaelList< cds::gc::DHP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::DHP>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_DHP_member_less()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::DHP> > > item;
- typedef ci::MichaelList< cds::gc::DHP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::DHP>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_DHP_member_cmpmix()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::DHP> > > item;
- typedef ci::MichaelList< cds::gc::DHP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::DHP>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_DHP_member_cmpmix_stat()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::DHP> > > item;
- struct list_traits : public ci::michael_list::traits
- {
- typedef ci::michael_list::member_hook< offsetof( item, hMember ), co::gc<cds::gc::DHP> > hook;
- typedef cmp<item> compare;
- typedef IntrusiveHashSetHdrTest::less<item> less;
- typedef faked_disposer disposer;
- };
- typedef ci::MichaelList< cds::gc::DHP, item, list_traits > ord_list;
-
- struct set_traits : public ci::split_list::traits {
- typedef hash_int hash;
- typedef simple_item_counter item_counter;
- typedef co::v::sequential_consistent memory_model;
- typedef ci::split_list::stat<> stat;
- };
- typedef ci::SplitListSet< cds::gc::DHP, ord_list, set_traits > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
-
- // Static bucket table
- void IntrusiveHashSetHdrTest::split_st_DHP_base_cmp()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::DHP> > > item;
- typedef ci::MichaelList< cds::gc::DHP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_DHP_base_less()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::DHP> > > item;
- typedef ci::MichaelList< cds::gc::DHP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_DHP_base_cmpmix()
- {
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<cds::gc::DHP> > > item;
- typedef ci::MichaelList< cds::gc::DHP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_DHP_base_cmpmix_stat()
- {
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<cds::gc::DHP> > > item;
- struct list_traits :
- public ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- {};
- typedef ci::MichaelList< cds::gc::DHP, item, list_traits > ord_list;
-
- struct set_traits :
- public ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<> >
- >::type
- {};
- typedef ci::SplitListSet< cds::gc::DHP, ord_list, set_traits > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_DHP_member_cmp()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::DHP> > > item;
- typedef ci::MichaelList< cds::gc::DHP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::DHP>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_DHP_member_less()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::DHP> > > item;
- typedef ci::MichaelList< cds::gc::DHP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::DHP>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- ci::split_list::dynamic_bucket_table<false>
- ,co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_DHP_member_cmpmix()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::DHP> > > item;
- typedef ci::MichaelList< cds::gc::DHP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::DHP>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_DHP_member_cmpmix_stat()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::DHP> > > item;
- typedef ci::MichaelList< cds::gc::DHP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::DHP>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<> >
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/intrusive/lazy_list_dhp.h>
-#include <cds/intrusive/split_list.h>
-
-namespace set {
-
- void IntrusiveHashSetHdrTest::split_dyn_DHP_base_cmp_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::DHP> > > item;
- typedef ci::LazyList< cds::gc::DHP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_DHP_base_less_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::DHP> > > item;
- typedef ci::LazyList< cds::gc::DHP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_DHP_base_cmpmix_lazy()
- {
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<cds::gc::DHP> > > item;
- typedef ci::LazyList< cds::gc::DHP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_DHP_base_cmpmix_stat_lazy()
- {
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<cds::gc::DHP> > > item;
- typedef ci::LazyList< cds::gc::DHP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::stat< ci::split_list::stat<> >
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_DHP_member_cmp_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::DHP> > > item;
- typedef ci::LazyList< cds::gc::DHP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::DHP>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_DHP_member_less_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::DHP> > > item;
- typedef ci::LazyList< cds::gc::DHP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::DHP>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_DHP_member_cmpmix_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::DHP> > > item;
- typedef ci::LazyList< cds::gc::DHP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::DHP>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_DHP_member_cmpmix_stat_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::DHP> > > item;
- struct list_traits : public ci::lazy_list::traits
- {
- typedef ci::lazy_list::member_hook< offsetof( item, hMember ), co::gc<cds::gc::DHP>> hook;
- typedef cmp<item> compare;
- typedef IntrusiveHashSetHdrTest::less<item> less;
- typedef faked_disposer disposer;
- };
- typedef ci::LazyList< cds::gc::DHP, item, list_traits > ord_list;
-
- struct set_traits : public ci::split_list::traits {
- typedef hash_int hash;
- typedef simple_item_counter item_counter;
- typedef ci::split_list::stat<> stat;
- };
- typedef ci::SplitListSet< cds::gc::DHP, ord_list, set_traits > set;
-
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- // Static bucket table
- void IntrusiveHashSetHdrTest::split_st_DHP_base_cmp_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::DHP> > > item;
- typedef ci::LazyList< cds::gc::DHP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_DHP_base_less_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::DHP> > > item;
- typedef ci::LazyList< cds::gc::DHP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_DHP_base_cmpmix_lazy()
- {
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<cds::gc::DHP> > > item;
- typedef ci::LazyList< cds::gc::DHP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_DHP_base_cmpmix_stat_lazy()
- {
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<cds::gc::DHP> > > item;
- typedef ci::LazyList< cds::gc::DHP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::DHP> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<> >
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_DHP_member_cmp_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::DHP> > > item;
- typedef ci::LazyList< cds::gc::DHP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::DHP>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_DHP_member_less_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::DHP> > > item;
- typedef ci::LazyList< cds::gc::DHP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::DHP>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- ci::split_list::dynamic_bucket_table<false>
- ,co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_DHP_member_cmpmix_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::DHP> > > item;
- typedef ci::LazyList< cds::gc::DHP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::DHP>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_DHP_member_cmpmix_stat_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::DHP> > > item;
- typedef ci::LazyList< cds::gc::DHP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::DHP>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::DHP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<> >
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/intrusive/michael_list_hp.h>
-#include <cds/intrusive/split_list.h>
-
-namespace set {
-
- void IntrusiveHashSetHdrTest::split_dyn_HP_base_cmp()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::HP> > > item;
- typedef ci::MichaelList< cds::gc::HP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_HP_base_less()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::HP> > > item;
- typedef ci::MichaelList< cds::gc::HP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_HP_base_cmpmix()
- {
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<cds::gc::HP> > > item;
- typedef ci::MichaelList< cds::gc::HP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_HP_base_cmpmix_stat()
- {
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<cds::gc::HP> > > item;
- typedef ci::MichaelList< cds::gc::HP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::stat< ci::split_list::stat<> >
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_HP_member_cmp()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::HP> > > item;
- typedef ci::MichaelList< cds::gc::HP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::HP>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_HP_member_less()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::HP> > > item;
- typedef ci::MichaelList< cds::gc::HP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::HP>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_HP_member_cmpmix()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::HP> > > item;
- typedef ci::MichaelList< cds::gc::HP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::HP>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- , ci::split_list::dynamic_bucket_table<true>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_HP_member_cmpmix_stat()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::HP> > > item;
- struct list_traits : public ci::michael_list::traits {
- typedef ci::michael_list::member_hook< offsetof( item, hMember ), co::gc<cds::gc::HP>> hook;
- typedef cmp<item> compare;
- typedef IntrusiveHashSetHdrTest::less<item> less;
- typedef faked_disposer disposer;
- };
- typedef ci::MichaelList< cds::gc::HP, item, list_traits > ord_list;
-
- struct set_traits : public ci::split_list::traits {
- typedef hash_int hash;
- typedef simple_item_counter item_counter;
- typedef ci::split_list::stat<> stat;
- };
- typedef ci::SplitListSet< cds::gc::HP, ord_list, set_traits > set;
-
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- // Static bucket table
- void IntrusiveHashSetHdrTest::split_st_HP_base_cmp()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::HP> > > item;
- typedef ci::MichaelList< cds::gc::HP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_HP_base_less()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::HP> > > item;
- typedef ci::MichaelList< cds::gc::HP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_HP_base_cmpmix()
- {
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<cds::gc::HP> > > item;
- typedef ci::MichaelList< cds::gc::HP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_HP_base_cmpmix_stat()
- {
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<cds::gc::HP> > > item;
- struct list_traits :
- public ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- {};
- typedef ci::MichaelList< cds::gc::HP, item, list_traits > ord_list;
-
- struct set_traits :
- public ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<> >
- >::type
- {};
- typedef ci::SplitListSet< cds::gc::HP, ord_list, set_traits > set;
-
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_HP_member_cmp()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::HP> > > item;
- typedef ci::MichaelList< cds::gc::HP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::HP>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_HP_member_less()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::HP> > > item;
- typedef ci::MichaelList< cds::gc::HP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::HP>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- ci::split_list::dynamic_bucket_table<false>
- ,co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_HP_member_cmpmix()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::HP> > > item;
- typedef ci::MichaelList< cds::gc::HP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::HP>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_HP_member_cmpmix_stat()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::HP> > > item;
- typedef ci::MichaelList< cds::gc::HP
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::HP>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<> >
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/intrusive/lazy_list_hp.h>
-#include <cds/intrusive/split_list.h>
-
-namespace set {
-
- void IntrusiveHashSetHdrTest::split_dyn_HP_base_cmp_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::HP> > > item;
- typedef ci::LazyList< cds::gc::HP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::opt::back_off< cds::backoff::empty >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_HP_base_less_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::HP> > > item;
- typedef ci::LazyList< cds::gc::HP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_HP_base_cmpmix_lazy()
- {
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<cds::gc::HP> > > item;
- typedef ci::LazyList< cds::gc::HP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_HP_base_cmpmix_stat_lazy()
- {
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<cds::gc::HP> > > item;
- typedef ci::LazyList< cds::gc::HP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::stat< ci::split_list::stat<> >
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_HP_member_cmp_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::HP> > > item;
- typedef ci::LazyList< cds::gc::HP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::HP>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_HP_member_less_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::HP> > > item;
- typedef ci::LazyList< cds::gc::HP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::HP>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_HP_member_cmpmix_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::HP> > > item;
- typedef ci::LazyList< cds::gc::HP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::HP>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_HP_member_cmpmix_stat_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::HP> > > item;
- struct list_traits : public ci::lazy_list::traits
- {
- typedef ci::lazy_list::member_hook< offsetof( item, hMember ), co::gc<cds::gc::HP>> hook;
- typedef cmp<item> compare;
- typedef IntrusiveHashSetHdrTest::less<item> less;
- typedef faked_disposer disposer;
- };
- typedef ci::LazyList< cds::gc::HP, item, list_traits > ord_list;
-
- struct set_traits : public ci::split_list::traits
- {
- typedef hash_int hash;
- typedef simple_item_counter item_counter;
- typedef ci::split_list::stat<> stat;
- };
- typedef ci::SplitListSet< cds::gc::HP, ord_list, set_traits > set;
-
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_int<set>();
- }
-
-
- // Static bucket table
- void IntrusiveHashSetHdrTest::split_st_HP_base_cmp_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::HP> > > item;
- typedef ci::LazyList< cds::gc::HP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_HP_base_less_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::HP> > > item;
- typedef ci::LazyList< cds::gc::HP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_HP_base_cmpmix_lazy()
- {
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<cds::gc::HP> > > item;
- typedef ci::LazyList< cds::gc::HP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_HP_base_cmpmix_stat_lazy()
- {
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<cds::gc::HP> > > item;
- struct list_traits :
- public ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::HP> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- {};
- typedef ci::LazyList< cds::gc::HP, item, list_traits > ord_list;
-
- struct set_traits :
- public ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- {
- typedef ci::split_list::stat<> stat;
- };
- typedef ci::SplitListSet< cds::gc::HP, ord_list, set_traits > set;
-
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_HP_member_cmp_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::HP> > > item;
- typedef ci::LazyList< cds::gc::HP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::HP>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_HP_member_less_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::HP> > > item;
- typedef ci::LazyList< cds::gc::HP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::HP>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- ci::split_list::dynamic_bucket_table<false>
- ,co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_HP_member_cmpmix_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::HP> > > item;
- typedef ci::LazyList< cds::gc::HP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::HP>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_HP_member_cmpmix_stat_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::HP> > > item;
- typedef ci::LazyList< cds::gc::HP
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::HP>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< cds::gc::HP, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<> >
- >::type
- > set;
-
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_int<set>();
- }
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/intrusive/michael_list_nogc.h>
-#include <cds/intrusive/split_list_nogc.h>
-
-namespace set {
-
- void IntrusiveHashSetHdrTest::split_dyn_nogc_base_cmp()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::nogc> > > item;
- typedef ci::MichaelList< cds::gc::nogc
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_nogc_base_less()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::nogc> > > item;
- typedef ci::MichaelList< cds::gc::nogc
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_nogc_base_cmpmix()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::nogc> > > item;
- typedef ci::MichaelList< cds::gc::nogc
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_nogc_base_cmpmix_stat()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::nogc> > > item;
- struct list_traits : public ci::michael_list::traits
- {
- typedef ci::michael_list::base_hook< co::gc<cds::gc::nogc> > hook;
- typedef cmp<item> compare;
- typedef IntrusiveHashSetHdrTest::less<item> less;
- typedef faked_disposer disposer;
- };
- typedef ci::MichaelList< cds::gc::nogc, item, list_traits > bucket_type;
-
- struct set_traits : public ci::split_list::make_traits< ci::split_list::dynamic_bucket_table<true> >::type
- {
- typedef hash_int hash;
- typedef simple_item_counter item_counter;
- typedef ci::split_list::stat<> stat;
- };
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type, set_traits > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_nogc_member_cmp()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::nogc> > > item;
- typedef ci::MichaelList< cds::gc::nogc
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::nogc>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_nogc_member_less()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::nogc> > > item;
- typedef ci::MichaelList< cds::gc::nogc
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::nogc>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_nogc_member_cmpmix()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::nogc> > > item;
- typedef ci::MichaelList< cds::gc::nogc
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::nogc>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_nogc_member_cmpmix_stat()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::nogc> > > item;
- struct list_traits:
- public ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::nogc>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- {};
- typedef ci::MichaelList< cds::gc::nogc, item, list_traits > bucket_type;
-
- struct set_traits :
- public ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::stat< ci::split_list::stat<> >
- >::type
- {};
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type, set_traits > set;
-
- test_int_nogc<set>();
- }
-
- // Static bucket table
- void IntrusiveHashSetHdrTest::split_st_nogc_base_cmp()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::nogc> > > item;
- typedef ci::MichaelList< cds::gc::nogc
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_nogc_base_less()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::nogc> > > item;
- typedef ci::MichaelList< cds::gc::nogc
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_nogc_base_cmpmix()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::nogc> > > item;
- typedef ci::MichaelList< cds::gc::nogc
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_nogc_base_cmpmix_stat()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::nogc> > > item;
- typedef ci::MichaelList< cds::gc::nogc
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<> >
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_nogc_member_cmp()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::nogc> > > item;
- typedef ci::MichaelList< cds::gc::nogc
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::nogc>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_nogc_member_less()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::nogc> > > item;
- typedef ci::MichaelList< cds::gc::nogc
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::nogc>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_nogc_member_cmpmix()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::nogc> > > item;
- typedef ci::MichaelList< cds::gc::nogc
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::nogc>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_nogc_member_cmpmix_stat()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<cds::gc::nogc> > > item;
- typedef ci::MichaelList< cds::gc::nogc
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::nogc>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<> >
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/intrusive/lazy_list_nogc.h>
-#include <cds/intrusive/split_list_nogc.h>
-
-namespace set {
-
- void IntrusiveHashSetHdrTest::split_dyn_nogc_base_cmp_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::nogc> > > item;
- typedef ci::LazyList< cds::gc::nogc
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::opt::back_off< cds::backoff::empty >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_nogc_base_less_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::nogc> > > item;
- typedef ci::LazyList< cds::gc::nogc
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_nogc_base_cmpmix_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::nogc> > > item;
- typedef ci::LazyList< cds::gc::nogc
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_nogc_base_cmpmix_stat_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::nogc> > > item;
- struct list_traits : public ci::lazy_list::traits
- {
- typedef ci::lazy_list::base_hook< co::gc<cds::gc::nogc> > hook;
- typedef IntrusiveHashSetHdrTest::less<item> less;
- typedef cmp<item> compare;
- typedef faked_disposer disposer;
- };
- typedef ci::LazyList< cds::gc::nogc, item, list_traits > bucket_type;
-
- struct set_traits : public ci::split_list::make_traits<ci::split_list::dynamic_bucket_table<true>>::type
- {
- typedef hash_int hash;
- typedef simple_item_counter item_counter;
- typedef ci::split_list::stat<> stat;
- };
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type, set_traits > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_nogc_member_cmp_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::nogc> > > item;
- typedef ci::LazyList< cds::gc::nogc
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::nogc>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_nogc_member_less_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::nogc> > > item;
- typedef ci::LazyList< cds::gc::nogc
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::nogc>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_nogc_member_cmpmix_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::nogc> > > item;
- typedef ci::LazyList< cds::gc::nogc
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::nogc>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_nogc_member_cmpmix_stat_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::nogc> > > item;
- struct list_traits :
- public ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::nogc>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- {};
- typedef ci::LazyList< cds::gc::nogc, item, list_traits > bucket_type;
-
- struct set_traits :
- public ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::stat< ci::split_list::stat<> >
- >::type
- {};
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type, set_traits > set;
-
- test_int_nogc<set>();
- }
-
- // Static bucket table
- void IntrusiveHashSetHdrTest::split_st_nogc_base_cmp_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::nogc> > > item;
- typedef ci::LazyList< cds::gc::nogc
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_nogc_base_less_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::nogc> > > item;
- typedef ci::LazyList< cds::gc::nogc
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_nogc_base_cmpmix_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::nogc> > > item;
- typedef ci::LazyList< cds::gc::nogc
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_nogc_base_cmpmix_stat_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::nogc> > > item;
- typedef ci::LazyList< cds::gc::nogc
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::nogc> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<> >
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_nogc_member_cmp_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::nogc> > > item;
- typedef ci::LazyList< cds::gc::nogc
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::nogc>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_nogc_member_less_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::nogc> > > item;
- typedef ci::LazyList< cds::gc::nogc
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::nogc>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_nogc_member_cmpmix_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::nogc> > > item;
- typedef ci::LazyList< cds::gc::nogc
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::nogc>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_nogc_member_cmpmix_stat_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<cds::gc::nogc> > > item;
- typedef ci::LazyList< cds::gc::nogc
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<cds::gc::nogc>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > bucket_type;
-
- typedef ci::SplitListSet< cds::gc::nogc, bucket_type,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<> >
- >::type
- > set;
-
- test_int_nogc<set>();
- }
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/urcu/general_buffered.h>
-#include <cds/intrusive/michael_list_rcu.h>
-#include <cds/intrusive/split_list_rcu.h>
-
-namespace set {
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type;
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_base_cmp()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList < rcu_type
- , item
- , ci::michael_list::make_traits <
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- , co::compare< cmp<item> >
- , ci::opt::disposer < faked_disposer >
- > ::type
- > ord_list;
-
- typedef ci::SplitListSet < rcu_type, ord_list,
- ci::split_list::make_traits <
- co::hash< hash_int >
- , ci::split_list::dynamic_bucket_table<true>
- , co::memory_model < co::v::relaxed_ordering >
- > ::type
- > set;
- static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table");
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_base_less()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList < rcu_type
- , item
- , ci::michael_list::make_traits <
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- , co::less< less<item> >
- , ci::opt::disposer < faked_disposer >
- > ::type
- > ord_list;
-
- typedef ci::SplitListSet < rcu_type, ord_list,
- ci::split_list::make_traits <
- co::hash< hash_int >
- , co::memory_model < co::v::sequential_consistent >
- > ::type
- > set;
- static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table");
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_base_cmpmix()
- {
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList < rcu_type
- , item
- , ci::michael_list::make_traits <
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- , co::less< less<item> >
- , co::compare< cmp<item> >
- , ci::opt::disposer < faked_disposer >
- > ::type
- > ord_list;
-
- typedef ci::SplitListSet < rcu_type, ord_list,
- ci::split_list::make_traits <
- co::hash< hash_int >
- , co::item_counter< simple_item_counter >
- , ci::split_list::dynamic_bucket_table < true >
- > ::type
- > set;
- static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table");
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_base_cmpmix_stat()
- {
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
- struct list_traits : public ci::michael_list::traits
- {
- typedef ci::michael_list::base_hook< co::gc<rcu_type> > hook;
- typedef IntrusiveHashSetHdrTest::less<item> less;
- typedef cmp<item> compare;
- typedef faked_disposer disposer;
- };
- typedef ci::MichaelList< rcu_type, item, list_traits > ord_list;
-
- struct set_traits : public ci::split_list::make_traits<ci::split_list::dynamic_bucket_table<true> >::type
- {
- typedef hash_int hash;
- typedef simple_item_counter item_counter;
- typedef ci::split_list::stat<> stat;
- };
- typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set;
-
- static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table");
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_member_cmp()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList < rcu_type
- , item
- , ci::michael_list::make_traits <
- ci::opt::hook< ci::michael_list::member_hook <
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- , co::compare< cmp<item> >
- , ci::opt::disposer < faked_disposer >
- > ::type
- > ord_list;
-
- typedef ci::SplitListSet < rcu_type, ord_list,
- ci::split_list::make_traits <
- co::hash < hash_int >
- > ::type
- > set;
- static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table");
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_member_less()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList < rcu_type
- , item
- , ci::michael_list::make_traits <
- ci::opt::hook< ci::michael_list::member_hook <
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- , co::less< less<item> >
- , ci::opt::disposer < faked_disposer >
- > ::type
- > ord_list;
-
- typedef ci::SplitListSet < rcu_type, ord_list,
- ci::split_list::make_traits <
- co::hash< hash_int >
- , co::memory_model < co::v::relaxed_ordering >
- > ::type
- > set;
- static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table");
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_member_cmpmix()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList < rcu_type
- , item
- , ci::michael_list::make_traits <
- ci::opt::hook< ci::michael_list::member_hook <
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- , co::compare< cmp<item> >
- , co::less< less<item> >
- , ci::opt::disposer < faked_disposer >
- > ::type
- > ord_list;
-
- typedef ci::SplitListSet < rcu_type, ord_list,
- ci::split_list::make_traits <
- co::hash< hash_int >
- , co::item_counter< simple_item_counter >
- , co::memory_model < co::v::sequential_consistent >
- > ::type
- > set;
- static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table");
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_member_cmpmix_stat()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- struct list_traits :
- public ci::michael_list::make_traits <
- ci::opt::hook< ci::michael_list::member_hook <
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- , co::compare< cmp<item> >
- , co::less< less<item> >
- , ci::opt::disposer < faked_disposer >
- > ::type
- {};
- typedef ci::MichaelList< rcu_type, item, list_traits > ord_list;
-
- struct set_traits :
- public ci::split_list::make_traits <
- co::hash< hash_int >
- , co::item_counter< simple_item_counter >
- , co::memory_model<co::v::sequential_consistent>
- , co::stat < ci::split_list::stat<> >
- > ::type
- {};
- typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set;
- static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table");
-
- test_rcu_int_michael_list<set>();
- }
-
- // Static bucket table
- void IntrusiveHashSetHdrTest::split_st_RCU_GPB_base_cmp()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList < rcu_type
- , item
- , ci::michael_list::make_traits <
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- , co::compare< cmp<item> >
- , ci::opt::disposer < faked_disposer >
- > ::type
- > ord_list;
-
- typedef ci::SplitListSet < rcu_type, ord_list,
- ci::split_list::make_traits <
- co::hash< hash_int >
- , ci::split_list::dynamic_bucket_table<false>
- , co::memory_model < co::v::relaxed_ordering >
- > ::type
- > set;
- static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table");
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPB_base_less()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList < rcu_type
- , item
- , ci::michael_list::make_traits <
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- , co::less< less<item> >
- , ci::opt::disposer < faked_disposer >
- > ::type
- > ord_list;
-
- typedef ci::SplitListSet < rcu_type, ord_list,
- ci::split_list::make_traits <
- co::hash< hash_int >
- , ci::split_list::dynamic_bucket_table<false>
- , co::memory_model < co::v::sequential_consistent >
- > ::type
- > set;
- static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table");
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPB_base_cmpmix()
- {
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList < rcu_type
- , item
- , ci::michael_list::make_traits <
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- , co::less< less<item> >
- , co::compare< cmp<item> >
- , ci::opt::disposer < faked_disposer >
- > ::type
- > ord_list;
-
- typedef ci::SplitListSet < rcu_type, ord_list,
- ci::split_list::make_traits <
- co::hash< hash_int >
- , co::item_counter< simple_item_counter >
- , ci::split_list::dynamic_bucket_table < false >
- > ::type
- > set;
- static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table");
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPB_base_cmpmix_stat()
- {
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList < rcu_type
- , item
- , ci::michael_list::make_traits <
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- , co::less< less<item> >
- , co::compare< cmp<item> >
- , ci::opt::disposer < faked_disposer >
- > ::type
- > ord_list;
-
- typedef ci::SplitListSet < rcu_type, ord_list,
- ci::split_list::make_traits <
- co::hash< hash_int >
- , co::item_counter< simple_item_counter >
- , ci::split_list::dynamic_bucket_table<false>
- , co::stat < ci::split_list::stat<> >
- > ::type
- > set;
- static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table");
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPB_member_cmp()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList < rcu_type
- , item
- , ci::michael_list::make_traits <
- ci::opt::hook< ci::michael_list::member_hook <
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- , co::compare< cmp<item> >
- , ci::opt::disposer < faked_disposer >
- > ::type
- > ord_list;
-
- typedef ci::SplitListSet < rcu_type, ord_list,
- ci::split_list::make_traits <
- co::hash< hash_int >
- , ci::split_list::dynamic_bucket_table<false>
- , co::memory_model < co::v::relaxed_ordering >
- > ::type
- > set;
- static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table");
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPB_member_less()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList < rcu_type
- , item
- , ci::michael_list::make_traits <
- ci::opt::hook< ci::michael_list::member_hook <
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- , co::less< less<item> >
- , ci::opt::disposer < faked_disposer >
- > ::type
- > ord_list;
-
- typedef ci::SplitListSet < rcu_type, ord_list,
- ci::split_list::make_traits <
- ci::split_list::dynamic_bucket_table<false>
- , co::hash< hash_int >
- , co::memory_model < co::v::sequential_consistent >
- > ::type
- > set;
- static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table");
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPB_member_cmpmix()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList < rcu_type
- , item
- , ci::michael_list::make_traits <
- ci::opt::hook< ci::michael_list::member_hook <
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- , co::compare< cmp<item> >
- , co::less< less<item> >
- , ci::opt::disposer < faked_disposer >
- > ::type
- > ord_list;
-
- typedef ci::SplitListSet < rcu_type, ord_list,
- ci::split_list::make_traits <
- co::hash< hash_int >
- , co::item_counter< simple_item_counter >
- , ci::split_list::dynamic_bucket_table < false >
- > ::type
- > set;
- static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table");
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPB_member_cmpmix_stat()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList < rcu_type
- , item
- , ci::michael_list::make_traits <
- ci::opt::hook< ci::michael_list::member_hook <
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- , co::compare< cmp<item> >
- , co::less< less<item> >
- , ci::opt::disposer < faked_disposer >
- > ::type
- > ord_list;
-
- typedef ci::SplitListSet < rcu_type, ord_list,
- ci::split_list::make_traits <
- co::hash< hash_int >
- , co::item_counter< simple_item_counter >
- , ci::split_list::dynamic_bucket_table<false>
- , co::stat < ci::split_list::stat<> >
- > ::type
- > set;
- static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table");
-
- test_rcu_int_michael_list<set>();
- }
-} // 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/hdr_intrusive_set.h"
-#include <cds/urcu/general_buffered.h>
-#include <cds/intrusive/lazy_list_rcu.h>
-#include <cds/intrusive/split_list_rcu.h>
-
-namespace set {
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type;
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_base_cmp_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_base_less_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_base_cmpmix_lazy()
- {
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_base_cmpmix_stat_lazy()
- {
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<rcu_type> > > item;
- struct list_traits : public ci::lazy_list::traits
- {
- typedef ci::lazy_list::base_hook< co::gc<rcu_type> > hook;
- typedef IntrusiveHashSetHdrTest::less< item > less;
- typedef cmp<item> compare;
- typedef faked_disposer disposer;
- };
- typedef ci::LazyList< rcu_type, item, list_traits > ord_list;
-
- struct set_traits : public ci::split_list::make_traits<ci::split_list::dynamic_bucket_table<true>>::type
- {
- typedef hash_int hash;
- typedef simple_item_counter item_counter;
- typedef ci::split_list::stat<> stat;
- };
- typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_member_cmp_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_member_less_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_member_cmpmix_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_member_cmpmix_stat_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- struct list_traits :
- public ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- {};
- typedef ci::LazyList< rcu_type, item, list_traits > ord_list;
-
- struct set_traits :
- public ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,co::stat< ci::split_list::stat<> >
- >::type
- {};
- typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
- // Static bucket table
- void IntrusiveHashSetHdrTest::split_st_RCU_GPB_base_cmp_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPB_base_less_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPB_base_cmpmix_lazy()
- {
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPB_base_cmpmix_stat_lazy()
- {
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<>>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPB_member_cmp_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPB_member_less_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- ci::split_list::dynamic_bucket_table<false>
- ,co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPB_member_cmpmix_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPB_member_cmpmix_stat_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<>>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/urcu/general_instant.h>
-#include <cds/intrusive/michael_list_rcu.h>
-#include <cds/intrusive/split_list_rcu.h>
-
-namespace set {
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type;
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_base_cmp()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_base_less()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_base_cmpmix()
- {
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_member_cmp()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_member_less()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_member_cmpmix()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
-
- // Static bucket table
- void IntrusiveHashSetHdrTest::split_st_RCU_GPI_base_cmp()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPI_base_less()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPI_base_cmpmix()
- {
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPI_member_cmp()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPI_member_less()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- ci::split_list::dynamic_bucket_table<false>
- ,co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPI_member_cmpmix()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_base_cmpmix_stat()
- {
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
- struct list_traits : public ci::michael_list::traits
- {
- typedef ci::michael_list::base_hook< co::gc<rcu_type> > hook;
- typedef IntrusiveHashSetHdrTest::less<item> less;
- typedef cmp<item> compare;
- typedef faked_disposer disposer;
- };
- typedef ci::MichaelList< rcu_type, item, list_traits > ord_list;
-
- struct set_traits : public ci::split_list::make_traits<ci::split_list::dynamic_bucket_table<true> >::type
- {
- typedef hash_int hash;
- typedef simple_item_counter item_counter;
- typedef ci::split_list::stat<> stat;
- };
- typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set;
-
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_member_cmpmix_stat()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- struct list_traits :
- public ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- {};
- typedef ci::MichaelList< rcu_type, item, list_traits > ord_list;
-
- struct set_traits :
- public ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,co::memory_model<co::v::sequential_consistent>
- ,co::stat< ci::split_list::stat<>>
- >::type
- {};
- typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPI_base_cmpmix_stat()
- {
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<>>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPI_member_cmpmix_stat()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<> >
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/urcu/general_instant.h>
-#include <cds/intrusive/lazy_list_rcu.h>
-#include <cds/intrusive/split_list_rcu.h>
-
-namespace set {
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type;
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_base_cmp_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_base_less_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_base_cmpmix_lazy()
- {
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_member_cmp_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_member_less_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_member_cmpmix_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
-
- // Static bucket table
- void IntrusiveHashSetHdrTest::split_st_RCU_GPI_base_cmp_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPI_base_less_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPI_base_cmpmix_lazy()
- {
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPI_member_cmp_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPI_member_less_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- ci::split_list::dynamic_bucket_table<false>
- ,co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPI_member_cmpmix_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_base_cmpmix_stat_lazy()
- {
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<rcu_type> > > item;
- struct list_traits : public ci::lazy_list::traits
- {
- typedef ci::lazy_list::base_hook< co::gc<rcu_type> > hook;
- typedef IntrusiveHashSetHdrTest::less< item > less;
- typedef cmp<item> compare;
- typedef faked_disposer disposer;
- };
- typedef ci::LazyList< rcu_type, item, list_traits > ord_list;
-
- struct set_traits : public ci::split_list::make_traits<ci::split_list::dynamic_bucket_table<true>>::type
- {
- typedef hash_int hash;
- typedef simple_item_counter item_counter;
- typedef ci::split_list::stat<> stat;
- };
- typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_member_cmpmix_stat_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- struct list_traits :
- public ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- {};
- typedef ci::LazyList< rcu_type, item, list_traits > ord_list;
-
- struct set_traits :
- public ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,co::stat< ci::split_list::stat<> >
- >::type
- {};
- typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPI_base_cmpmix_stat_lazy()
- {
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<>>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPI_member_cmpmix_stat_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<>>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
-
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/urcu/general_threaded.h>
-#include <cds/intrusive/michael_list_rcu.h>
-#include <cds/intrusive/split_list_rcu.h>
-
-namespace set {
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type;
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_base_cmp()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_base_less()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_base_cmpmix()
- {
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_member_cmp()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_member_less()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_member_cmpmix()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
-
- // Static bucket table
- void IntrusiveHashSetHdrTest::split_st_RCU_GPT_base_cmp()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPT_base_less()
- {
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPT_base_cmpmix()
- {
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPT_member_cmp()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPT_member_less()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- ci::split_list::dynamic_bucket_table<false>
- ,co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPT_member_cmpmix()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_base_cmpmix_stat()
- {
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
- struct list_traits : public ci::michael_list::traits
- {
- typedef ci::michael_list::base_hook< co::gc<rcu_type> > hook;
- typedef IntrusiveHashSetHdrTest::less<item> less;
- typedef cmp<item> compare;
- typedef faked_disposer disposer;
- };
- typedef ci::MichaelList< rcu_type, item, list_traits > ord_list;
-
- struct set_traits : public ci::split_list::make_traits<ci::split_list::dynamic_bucket_table<true> >::type
- {
- typedef hash_int hash;
- typedef simple_item_counter item_counter;
- typedef ci::split_list::stat<> stat;
- };
- typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set;
-
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_member_cmpmix_stat()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- struct list_traits :
- public ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- {};
- typedef ci::MichaelList< rcu_type, item, list_traits > ord_list;
-
- struct set_traits :
- public ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,co::memory_model<co::v::sequential_consistent>
- ,co::stat< ci::split_list::stat<>>
- >::type
- {};
- typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPT_base_cmpmix_stat()
- {
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<>>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPT_member_cmpmix_stat()
- {
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<> >
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
- }
-
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/urcu/general_threaded.h>
-#include <cds/intrusive/lazy_list_rcu.h>
-#include <cds/intrusive/split_list_rcu.h>
-
-namespace set {
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type;
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_base_cmp_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_base_less_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_base_cmpmix_lazy()
- {
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_member_cmp_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_member_less_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_member_cmpmix_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
-
- // Static bucket table
- void IntrusiveHashSetHdrTest::split_st_RCU_GPT_base_cmp_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPT_base_less_lazy()
- {
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPT_base_cmpmix_lazy()
- {
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPT_member_cmp_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPT_member_less_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- ci::split_list::dynamic_bucket_table<false>
- ,co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPT_member_cmpmix_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_base_cmpmix_stat_lazy()
- {
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<rcu_type> > > item;
- struct list_traits : public ci::lazy_list::traits
- {
- typedef ci::lazy_list::base_hook< co::gc<rcu_type> > hook;
- typedef IntrusiveHashSetHdrTest::less< item > less;
- typedef cmp<item> compare;
- typedef faked_disposer disposer;
- };
- typedef ci::LazyList< rcu_type, item, list_traits > ord_list;
-
- struct set_traits : public ci::split_list::make_traits<ci::split_list::dynamic_bucket_table<true>>::type
- {
- typedef hash_int hash;
- typedef simple_item_counter item_counter;
- typedef ci::split_list::stat<> stat;
- };
- typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_member_cmpmix_stat_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- struct list_traits :
- public ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- {};
- typedef ci::LazyList< rcu_type, item, list_traits > ord_list;
-
- struct set_traits :
- public ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,co::stat< ci::split_list::stat<> >
- >::type
- {};
- typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPT_base_cmpmix_stat_lazy()
- {
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<>>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_GPT_member_cmpmix_stat_lazy()
- {
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<>>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
- }
-
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/urcu/signal_buffered.h>
-#include <cds/intrusive/michael_list_rcu.h>
-#include <cds/intrusive/split_list_rcu.h>
-
-namespace set {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type;
- }
-#endif
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_base_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_base_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_base_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_member_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_member_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_member_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
-
- // Static bucket table
- void IntrusiveHashSetHdrTest::split_st_RCU_SHB_base_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHB_base_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHB_base_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHB_member_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHB_member_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- ci::split_list::dynamic_bucket_table<false>
- ,co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHB_member_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_base_cmpmix_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
- struct list_traits : public ci::michael_list::traits
- {
- typedef ci::michael_list::base_hook< co::gc<rcu_type> > hook;
- typedef IntrusiveHashSetHdrTest::less<item> less;
- typedef cmp<item> compare;
- typedef faked_disposer disposer;
- };
- typedef ci::MichaelList< rcu_type, item, list_traits > ord_list;
-
- struct set_traits : public ci::split_list::make_traits<ci::split_list::dynamic_bucket_table<true> >::type
- {
- typedef hash_int hash;
- typedef simple_item_counter item_counter;
- typedef ci::split_list::stat<> stat;
- };
- typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set;
-
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_member_cmpmix_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- struct list_traits :
- public ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- {};
- typedef ci::MichaelList< rcu_type, item, list_traits > ord_list;
-
- struct set_traits :
- public ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,co::memory_model<co::v::sequential_consistent>
- ,co::stat< ci::split_list::stat<>>
- >::type
- {};
- typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHB_base_cmpmix_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<>>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHB_member_cmpmix_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<> >
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/urcu/signal_buffered.h>
-#include <cds/intrusive/lazy_list_rcu.h>
-#include <cds/intrusive/split_list_rcu.h>
-
-namespace set {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type;
- }
-#endif
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_base_cmp_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_base_less_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_base_cmpmix_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_member_cmp_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_member_less_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_member_cmpmix_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
-
- // Static bucket table
- void IntrusiveHashSetHdrTest::split_st_RCU_SHB_base_cmp_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHB_base_less_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHB_base_cmpmix_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHB_member_cmp_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHB_member_less_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- ci::split_list::dynamic_bucket_table<false>
- ,co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHB_member_cmpmix_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_base_cmpmix_stat_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<rcu_type> > > item;
- struct list_traits : public ci::lazy_list::traits
- {
- typedef ci::lazy_list::base_hook< co::gc<rcu_type> > hook;
- typedef IntrusiveHashSetHdrTest::less< item > less;
- typedef cmp<item> compare;
- typedef faked_disposer disposer;
- };
- typedef ci::LazyList< rcu_type, item, list_traits > ord_list;
-
- struct set_traits : public ci::split_list::make_traits<ci::split_list::dynamic_bucket_table<true>>::type
- {
- typedef hash_int hash;
- typedef simple_item_counter item_counter;
- typedef ci::split_list::stat<> stat;
- };
- typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_member_cmpmix_stat_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- struct list_traits :
- public ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- {};
- typedef ci::LazyList< rcu_type, item, list_traits > ord_list;
-
- struct set_traits :
- public ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,co::stat< ci::split_list::stat<> >
- >::type
- {};
- typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHB_base_cmpmix_stat_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<>>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHB_member_cmpmix_stat_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<>>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/urcu/signal_threaded.h>
-#include <cds/intrusive/michael_list_rcu.h>
-#include <cds/intrusive/split_list_rcu.h>
-
-namespace set {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type;
- }
-#endif
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_base_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_base_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_base_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_member_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_member_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_member_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
-
- // Static bucket table
- void IntrusiveHashSetHdrTest::split_st_RCU_SHT_base_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHT_base_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHT_base_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHT_member_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHT_member_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- ci::split_list::dynamic_bucket_table<false>
- ,co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHT_member_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_base_cmpmix_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
- struct list_traits : public ci::michael_list::traits
- {
- typedef ci::michael_list::base_hook< co::gc<rcu_type> > hook;
- typedef IntrusiveHashSetHdrTest::less<item> less;
- typedef cmp<item> compare;
- typedef faked_disposer disposer;
- };
- typedef ci::MichaelList< rcu_type, item, list_traits > ord_list;
-
- struct set_traits : public ci::split_list::make_traits<ci::split_list::dynamic_bucket_table<true> >::type
- {
- typedef hash_int hash;
- typedef simple_item_counter item_counter;
- typedef ci::split_list::stat<> stat;
- };
- typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set;
-
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_member_cmpmix_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- struct list_traits :
- public ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- {};
- typedef ci::MichaelList< rcu_type, item, list_traits > ord_list;
-
- struct set_traits :
- public ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,co::memory_model<co::v::sequential_consistent>
- ,co::stat< ci::split_list::stat<>>
- >::type
- {};
- typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHT_base_cmpmix_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node<ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<>>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHT_member_cmpmix_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::michael_list::node<rcu_type> > > item;
- typedef ci::MichaelList< rcu_type
- ,item
- ,ci::michael_list::make_traits<
- ci::opt::hook< ci::michael_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<> >
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int_michael_list<set>();
-#endif
- }
-
-
-} // 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/hdr_intrusive_set.h"
-#include <cds/urcu/signal_threaded.h>
-#include <cds/intrusive/lazy_list_rcu.h>
-#include <cds/intrusive/split_list_rcu.h>
-
-namespace set {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type;
- }
-#endif
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_base_cmp_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<true>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_base_less_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_base_cmpmix_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<true>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_member_cmp_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_member_less_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_member_cmpmix_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
-
- // Static bucket table
- void IntrusiveHashSetHdrTest::split_st_RCU_SHT_base_cmp_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHT_base_less_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHT_base_cmpmix_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHT_member_cmp_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::memory_model<co::v::relaxed_ordering>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHT_member_less_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- ci::split_list::dynamic_bucket_table<false>
- ,co::hash< hash_int >
- ,co::memory_model<co::v::sequential_consistent>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHT_member_cmpmix_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_base_cmpmix_stat_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<rcu_type> > > item;
- struct list_traits : public ci::lazy_list::traits
- {
- typedef ci::lazy_list::base_hook< co::gc<rcu_type> > hook;
- typedef IntrusiveHashSetHdrTest::less< item > less;
- typedef cmp<item> compare;
- typedef faked_disposer disposer;
- };
- typedef ci::LazyList< rcu_type, item, list_traits > ord_list;
-
- struct set_traits : public ci::split_list::make_traits<ci::split_list::dynamic_bucket_table<true>>::type
- {
- typedef hash_int hash;
- typedef simple_item_counter item_counter;
- typedef ci::split_list::stat<> stat;
- };
- typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_member_cmpmix_stat_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- struct list_traits :
- public ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- {};
- typedef ci::LazyList< rcu_type, item, list_traits > ord_list;
-
- struct set_traits :
- public ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,co::stat< ci::split_list::stat<> >
- >::type
- {};
- typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set;
- static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHT_base_cmpmix_stat_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef base_int_item< ci::split_list::node<ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<rcu_type> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<>>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
- void IntrusiveHashSetHdrTest::split_st_RCU_SHT_member_cmpmix_stat_lazy()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef member_int_item< ci::split_list::node< ci::lazy_list::node<rcu_type> > > item;
- typedef ci::LazyList< rcu_type
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::member_hook<
- offsetof( item, hMember ),
- co::gc<rcu_type>
- > >
- ,co::compare< cmp<item> >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > ord_list;
-
- typedef ci::SplitListSet< rcu_type, ord_list,
- ci::split_list::make_traits<
- co::hash< hash_int >
- ,co::item_counter< simple_item_counter >
- ,ci::split_list::dynamic_bucket_table<false>
- ,co::stat< ci::split_list::stat<>>
- >::type
- > set;
- static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" );
-
- test_rcu_int<set>();
-#endif
- }
-
-} // 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/hdr_intrusive_striped_set.h"
-#include <cds/intrusive/striped_set/boost_avl_set.h>
-#include <cds/intrusive/striped_set.h>
-
-namespace set {
- namespace bi = boost::intrusive;
-
- namespace {
- typedef IntrusiveStripedSetHdrTest::base_item< bi::avl_set_base_hook<> > base_item_type;
- typedef IntrusiveStripedSetHdrTest::member_item< bi::avl_set_member_hook<> > member_item_type;
-
- template <typename T, typename Node>
- struct get_key
- {
- typedef T type;
-
- type const& operator()( Node const& v ) const
- {
- return v.nKey;
- }
- };
- }
-
-#if BOOST_VERSION >= 105900
-# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) ,bi::key_of_value< get_key< int, type>>
-#else
-# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type )
-#endif
-
- void IntrusiveStripedSetHdrTest::Striped_avl_set_basehook()
- {
- typedef ci::StripedSet<
- bi::avl_set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::mutex_policy< ci::striped_set::striping<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_avl_set_basehook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::avl_set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<64> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_avl_set_basehook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::avl_set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
- test_with( s );
- }
-
- void IntrusiveStripedSetHdrTest::Striped_avl_set_memberhook()
- {
- typedef ci::StripedSet<
- bi::avl_set<
- member_item_type
- , bi::member_hook< member_item_type, bi::avl_set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_avl_set_memberhook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::avl_set<
- member_item_type
- , bi::member_hook< member_item_type, bi::avl_set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_avl_set_memberhook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::avl_set<
- member_item_type
- , bi::member_hook< member_item_type, bi::avl_set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
- test_with( s );
- }
-
-} // 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/hdr_intrusive_striped_set.h"
-#include <cds/intrusive/striped_set/boost_list.h>
-#include <cds/intrusive/striped_set.h>
-
-#include <type_traits> // std::is_same
-
-namespace set {
- namespace bi = boost::intrusive;
-
- namespace {
- typedef IntrusiveStripedSetHdrTest::base_item< bi::list_base_hook<> > base_item_type;
- typedef IntrusiveStripedSetHdrTest::member_item< bi::list_member_hook<> > member_item_type;
- }
-
- void IntrusiveStripedSetHdrTest::Striped_list_basehook_cmp()
- {
- typedef ci::StripedSet<
- bi::list<base_item_type>
- ,co::mutex_policy< ci::striped_set::striping<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<base_item_type> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<base_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_list_basehook_less()
- {
- typedef ci::StripedSet<
- bi::list<base_item_type>
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<base_item_type> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_list_basehook_cmpmix()
- {
- typedef ci::StripedSet<
- bi::list<base_item_type>
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<base_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<base_item_type> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<base_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_list_basehook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::list<base_item_type>
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<base_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<base_item_type> >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<8> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<base_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_list_basehook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::list<base_item_type>
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<base_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<base_item_type> >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<base_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- set_type s( 128, ci::striped_set::single_bucket_size_threshold<0>(4) );
- test_with( s );
- }
-
- void IntrusiveStripedSetHdrTest::Striped_list_memberhook_cmp()
- {
- typedef ci::StripedSet<
- bi::list<
- member_item_type
- , bi::member_hook< member_item_type, bi::list_member_hook<>, &member_item_type::hMember>
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<member_item_type> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_list_memberhook_less()
- {
- typedef ci::StripedSet<
- bi::list<
- member_item_type
- , bi::member_hook< member_item_type, bi::list_member_hook<>, &member_item_type::hMember>
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<member_item_type> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_list_memberhook_cmpmix()
- {
- typedef ci::StripedSet<
- bi::list<
- member_item_type
- , bi::member_hook< member_item_type, bi::list_member_hook<>, &member_item_type::hMember>
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<member_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<member_item_type> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_list_memberhook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::list<
- member_item_type
- , bi::member_hook< member_item_type, bi::list_member_hook<>, &member_item_type::hMember>
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<member_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<member_item_type> >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<8> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<member_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_list_memberhook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::list<
- member_item_type
- , bi::member_hook< member_item_type, bi::list_member_hook<>, &member_item_type::hMember>
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<member_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<member_item_type> >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<member_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- set_type s( 128, ci::striped_set::single_bucket_size_threshold<0>(4) );
- test_with( s );
- }
-
-} // 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/hdr_intrusive_striped_set.h"
-#include <cds/intrusive/striped_set/boost_set.h>
-#include <cds/intrusive/striped_set.h>
-
-namespace set {
- namespace bi = boost::intrusive;
-
- namespace {
- typedef IntrusiveStripedSetHdrTest::base_item< bi::set_base_hook<> > base_item_type;
- typedef IntrusiveStripedSetHdrTest::member_item< bi::set_member_hook<> > member_item_type;
-
- template <typename T, typename Node>
- struct get_key
- {
- typedef T type;
-
- type const& operator()( Node const& v ) const
- {
- return v.nKey;
- }
- };
- }
-
-#if BOOST_VERSION >= 105900
-# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) ,bi::key_of_value< get_key< int, type>>
-#else
-# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type )
-#endif
-
-
- void IntrusiveStripedSetHdrTest::Striped_set_basehook()
- {
- typedef ci::StripedSet<
- bi::set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::mutex_policy< ci::striped_set::striping<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_set_basehook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<64> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_set_basehook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
- test_with( s );
- }
-
- void IntrusiveStripedSetHdrTest::Striped_set_memberhook()
- {
- typedef ci::StripedSet<
- bi::set<
- member_item_type
- , bi::member_hook< member_item_type, bi::set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_set_memberhook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::set<
- member_item_type
- , bi::member_hook< member_item_type, bi::set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_set_memberhook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::set<
- member_item_type
- , bi::member_hook< member_item_type, bi::set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
- test_with( s );
- }
-
-} // 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/hdr_intrusive_striped_set.h"
-#include <cds/intrusive/striped_set/boost_sg_set.h>
-#include <cds/intrusive/striped_set.h>
-
-namespace set {
- namespace bi = boost::intrusive;
-
- namespace {
- typedef IntrusiveStripedSetHdrTest::base_item< bi::bs_set_base_hook<> > base_item_type;
- typedef IntrusiveStripedSetHdrTest::member_item< bi::bs_set_member_hook<> > member_item_type;
-
- template <typename T, typename Node>
- struct get_key
- {
- typedef T type;
-
- type const& operator()( Node const& v ) const
- {
- return v.nKey;
- }
- };
- }
-
-#if BOOST_VERSION >= 105900
-# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) ,bi::key_of_value< get_key< int, type>>
-#else
-# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type )
-#endif
-
-
- void IntrusiveStripedSetHdrTest::Striped_sg_set_basehook()
- {
- typedef ci::StripedSet<
- bi::sg_set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::mutex_policy< ci::striped_set::striping<> >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_sg_set_basehook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::sg_set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<64> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_sg_set_basehook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::sg_set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
- test_with( s );
- }
-
- void IntrusiveStripedSetHdrTest::Striped_sg_set_memberhook()
- {
- typedef ci::StripedSet<
- bi::sg_set<
- member_item_type
- , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_sg_set_memberhook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::sg_set<
- member_item_type
- , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_sg_set_memberhook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::sg_set<
- member_item_type
- , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
- test_with( s );
- }
-
-} // 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/hdr_intrusive_striped_set.h"
-#include <cds/intrusive/striped_set/boost_slist.h>
-#include <cds/intrusive/striped_set.h>
-
-#include <type_traits> // std::is_same
-
-namespace set {
- namespace bi = boost::intrusive;
-
- namespace {
- typedef IntrusiveStripedSetHdrTest::base_item< bi::slist_base_hook<> > base_item_type;
- typedef IntrusiveStripedSetHdrTest::member_item< bi::slist_member_hook<> > member_item_type;
- }
-
- void IntrusiveStripedSetHdrTest::Striped_slist_basehook_cmp()
- {
- typedef ci::StripedSet<
- bi::slist<base_item_type>
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<base_item_type> >
- ,co::mutex_policy< ci::striped_set::striping<> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<base_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_slist_basehook_less()
- {
- typedef ci::StripedSet<
- bi::slist<base_item_type>
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<base_item_type> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_slist_basehook_cmpmix()
- {
- typedef ci::StripedSet<
- bi::slist<base_item_type>
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<base_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<base_item_type> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<base_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_slist_basehook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::slist<base_item_type>
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<base_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<base_item_type> >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<8> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<base_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_slist_basehook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::slist<base_item_type>
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<base_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<base_item_type> >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<base_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- set_type s( 128, ci::striped_set::single_bucket_size_threshold<0>(4) );
- test_with( s );
- }
-
- void IntrusiveStripedSetHdrTest::Striped_slist_memberhook_cmp()
- {
- typedef ci::StripedSet<
- bi::slist<
- member_item_type
- , bi::member_hook< member_item_type, bi::slist_member_hook<>, &member_item_type::hMember>
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<member_item_type> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_slist_memberhook_less()
- {
- typedef ci::StripedSet<
- bi::slist<
- member_item_type
- , bi::member_hook< member_item_type, bi::slist_member_hook<>, &member_item_type::hMember>
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<member_item_type> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_slist_memberhook_cmpmix()
- {
- typedef ci::StripedSet<
- bi::slist<
- member_item_type
- , bi::member_hook< member_item_type, bi::slist_member_hook<>, &member_item_type::hMember>
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<member_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<member_item_type> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_slist_memberhook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::slist<
- member_item_type
- , bi::member_hook< member_item_type, bi::slist_member_hook<>, &member_item_type::hMember>
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<member_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<member_item_type> >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<8> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<member_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_slist_memberhook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::slist<
- member_item_type
- , bi::member_hook< member_item_type, bi::slist_member_hook<>, &member_item_type::hMember>
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::less< IntrusiveStripedSetHdrTest::less<member_item_type> >
- ,co::compare< IntrusiveStripedSetHdrTest::cmp<member_item_type> >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- static_assert( (std::is_same<
- IntrusiveStripedSetHdrTest::cmp<member_item_type>
- ,set_type::bucket_type::key_comparator
- >::value), "Key compare function selection error" );
-
- set_type s( 128, ci::striped_set::single_bucket_size_threshold<0>(4) );
- test_with( s );
- }
-
-} // 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/hdr_intrusive_striped_set.h"
-#include <cds/intrusive/striped_set/boost_splay_set.h>
-#include <cds/intrusive/striped_set.h>
-#include <boost/version.hpp>
-
-namespace set {
- namespace bi = boost::intrusive;
-
- namespace {
-# if BOOST_VERSION < 105600
- typedef bi::splay_set_member_hook<> splay_set_member_hook;
- typedef bi::splay_set_base_hook<> splay_set_base_hook;
-#else
- typedef bi::bs_set_base_hook<> splay_set_base_hook;
- typedef bi::bs_set_member_hook<> splay_set_member_hook;
-#endif
-
- typedef IntrusiveStripedSetHdrTest::base_item< splay_set_base_hook> base_item_type;
- typedef IntrusiveStripedSetHdrTest::member_item< splay_set_member_hook > member_item_type;
-
- template <typename T, typename Node>
- struct get_key
- {
- typedef T type;
-
- type const& operator()( Node const& v ) const
- {
- return v.nKey;
- }
- };
- }
-
-#if BOOST_VERSION >= 105900
-# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) ,bi::key_of_value< get_key< int, type>>
-#else
-# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type )
-#endif
-
-
- void IntrusiveStripedSetHdrTest::Striped_splay_set_basehook()
- {
- typedef ci::StripedSet<
- bi::splay_set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::mutex_policy< ci::striped_set::striping<> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_splay_set_basehook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::splay_set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<64> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_splay_set_basehook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::splay_set<base_item_type
- , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
- test_with( s );
- }
-
- void IntrusiveStripedSetHdrTest::Striped_splay_set_memberhook()
- {
- typedef ci::StripedSet<
- bi::splay_set<
- member_item_type
- , bi::member_hook< member_item_type, splay_set_member_hook, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_splay_set_memberhook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::splay_set<
- member_item_type
- , bi::member_hook< member_item_type, splay_set_member_hook, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_splay_set_memberhook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::splay_set<
- member_item_type
- , bi::member_hook< member_item_type, splay_set_member_hook, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
- test_with( s );
- }
-
-} // 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/hdr_intrusive_striped_set.h"
-#include <cds/intrusive/striped_set/boost_treap_set.h>
-#include <cds/intrusive/striped_set.h>
-
-namespace set {
- namespace bi = boost::intrusive;
-
- namespace {
- typedef IntrusiveStripedSetHdrTest::base_item< bi::bs_set_base_hook<> > base_item_type;
- typedef IntrusiveStripedSetHdrTest::member_item< bi::bs_set_member_hook<> > member_item_type;
-
- template <typename T>
- struct priority_cmp: private IntrusiveStripedSetHdrTest::less<T>
- {
- typedef IntrusiveStripedSetHdrTest::less<T> base_class;
-
- template <typename A, typename B>
- bool operator()( A const& a, B const& b ) const
- {
- return base_class::operator()( b, a );
- }
- };
-
- template <typename T, typename Node>
- struct get_key
- {
- typedef T type;
-
- type const& operator()( Node const& v ) const
- {
- return v.nKey;
- }
- };
- }
-
-#if BOOST_VERSION >= 105900
-# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) ,bi::key_of_value< get_key< int, type>>
-#else
-# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type )
-#endif
-
- void IntrusiveStripedSetHdrTest::Striped_treap_set_basehook()
- {
- typedef ci::StripedSet<
- bi::treap_set < base_item_type,
- bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>,
- bi::priority<priority_cmp<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::mutex_policy< ci::striped_set::striping<> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_treap_set_basehook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::treap_set<base_item_type,
- bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type> >,
- bi::priority<priority_cmp<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<64> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_treap_set_basehook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::treap_set<base_item_type,
- bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>,
- bi::priority<priority_cmp<base_item_type>>
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
- test_with( s );
- }
-
- void IntrusiveStripedSetHdrTest::Striped_treap_set_memberhook()
- {
- typedef ci::StripedSet<
- bi::treap_set<
- member_item_type
- , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- , bi::priority<priority_cmp<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_treap_set_memberhook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::treap_set<
- member_item_type
- , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- , bi::priority<priority_cmp<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_treap_set_memberhook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::treap_set<
- member_item_type
- , bi::member_hook< member_item_type, bi::bs_set_member_hook<>, &member_item_type::hMember>
- , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
- , bi::priority<priority_cmp<member_item_type> >
- CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
- test_with( s );
- }
-
-} // 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/hdr_intrusive_striped_set.h"
-#include <cds/intrusive/striped_set/boost_unordered_set.h>
-#include <cds/intrusive/striped_set.h>
-
-namespace set {
- namespace bi = boost::intrusive;
-
- namespace {
- typedef IntrusiveStripedSetHdrTest::base_item< bi::unordered_set_base_hook<> > base_item_type;
- typedef IntrusiveStripedSetHdrTest::member_item< bi::unordered_set_member_hook<> > member_item_type;
-
- struct hasher: private IntrusiveStripedSetHdrTest::hash_int
- {
- typedef IntrusiveStripedSetHdrTest::hash_int base_class;
-
- size_t operator()( int i ) const
- {
- return ~( base_class::operator()(i));
- }
- template <typename Item>
- size_t operator()( const Item& i ) const
- {
- return ~( base_class::operator()(i));
- }
- size_t operator()( IntrusiveStripedSetHdrTest::find_key const& i) const
- {
- return ~( base_class::operator()(i));
- }
- };
-
- template <typename T>
- struct is_equal: private IntrusiveStripedSetHdrTest::cmp<T>
- {
- typedef IntrusiveStripedSetHdrTest::cmp<T> base_class;
-
- bool operator ()(const T& v1, const T& v2 ) const
- {
- return base_class::operator()( v1, v2 ) == 0;
- }
-
- template <typename Q>
- bool operator ()(const T& v1, const Q& v2 ) const
- {
- return base_class::operator()( v1, v2 ) == 0;
- }
-
- template <typename Q>
- bool operator ()(const Q& v1, const T& v2 ) const
- {
- return base_class::operator()( v1, v2 ) == 0;
- }
- };
-
- template <size_t Capacity, typename T, class Alloc = CDS_DEFAULT_ALLOCATOR>
- struct dyn_buffer: public co::v::dynamic_buffer< T, Alloc >
- {
- typedef co::v::dynamic_buffer< T, Alloc > base_class;
- public:
- template <typename Q>
- struct rebind {
- typedef dyn_buffer<Capacity, Q, Alloc> other ; ///< Rebinding result type
- };
-
- dyn_buffer()
- : base_class( Capacity )
- {}
- };
- }
-
- void IntrusiveStripedSetHdrTest::Striped_unordered_set_basehook()
- {
- typedef ci::StripedSet<
- bi::unordered_set<base_item_type
- , bi::hash< hasher >
- , bi::equal< is_equal<base_item_type> >
- , bi::power_2_buckets<true>
- , bi::incremental<true>
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_unordered_set_basehook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::unordered_set<base_item_type
- , bi::hash< hasher >
- , bi::equal< is_equal<base_item_type> >
- , bi::power_2_buckets<true>
- , bi::incremental<true>
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::buffer< co::v::static_buffer< cds::any_type, 64 > >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_unordered_set_basehook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::unordered_set<base_item_type
- , bi::hash< hasher >
- , bi::equal< is_equal<base_item_type> >
- , bi::power_2_buckets<true>
- , bi::incremental<true>
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::buffer< dyn_buffer< 256, cds::any_type, std::allocator<int> > >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(512) );
- test_with( s );
- }
-
- void IntrusiveStripedSetHdrTest::Striped_unordered_set_memberhook()
- {
- typedef ci::StripedSet<
- bi::unordered_set<member_item_type
- , bi::member_hook< member_item_type, bi::unordered_set_member_hook<>, &member_item_type::hMember>
- , bi::hash< hasher >
- , bi::equal< is_equal<member_item_type> >
- , bi::power_2_buckets<true>
- , bi::incremental<true>
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_unordered_set_memberhook_bucket_threshold()
- {
- typedef ci::StripedSet<
- bi::unordered_set<member_item_type
- , bi::member_hook< member_item_type, bi::unordered_set_member_hook<>, &member_item_type::hMember>
- , bi::hash< hasher >
- , bi::equal< is_equal<member_item_type> >
- , bi::power_2_buckets<true>
- , bi::incremental<true>
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::buffer< dyn_buffer< 64, cds::any_type, std::allocator<int> > >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> >
- ,co::mutex_policy< ci::striped_set::striping<> >
- > set_type;
-
- test<set_type>();
- }
-
- void IntrusiveStripedSetHdrTest::Striped_unordered_set_memberhook_bucket_threshold_rt()
- {
- typedef ci::StripedSet<
- bi::unordered_set<member_item_type
- , bi::member_hook< member_item_type, bi::unordered_set_member_hook<>, &member_item_type::hMember>
- , bi::hash< hasher >
- , bi::equal< is_equal<member_item_type> >
- , bi::power_2_buckets<true>
- , bi::incremental<true>
- >
- ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
- ,co::buffer< co::v::static_buffer< cds::any_type, 128 > >
- ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
- > set_type;
-
- set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
- test_with( s );
- }
-
-} // 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/hdr_intrusive_striped_set.h"
-CPPUNIT_TEST_SUITE_REGISTRATION(set::IntrusiveStripedSetHdrTest);
+++ /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 CDSTEST_HDR_INTRUSIVE_STRIPED_SET_H
-#define CDSTEST_HDR_INTRUSIVE_STRIPED_SET_H
-
-#include "cppunit/cppunit_proxy.h"
-#include <cds/opt/hash.h>
-
-#include <boost/version.hpp>
-
-// boost 1.59 bug: intrusive containers require implicit conversion from value_type to key_type
-// Fixed in boost 1.60+
-#if BOOST_VERSION == 105900
-# define CDSTEST_BOOST_INTRUSIVE_REQUIRES_IMPLICIT_CONVERSION_WORKAROUND
-#else
-# define CDSTEST_BOOST_INTRUSIVE_REQUIRES_IMPLICIT_CONVERSION_WORKAROUND explicit
-#endif
-
-// cds::intrusive namespace forward declaration
-namespace cds { namespace intrusive {}}
-
-namespace set {
- namespace ci = cds::intrusive;
- namespace co = cds::opt;
-
- template <typename T>
- struct get_int_key
- {
- int operator()( T const & v ) const
- {
- return v.key();
- }
- };
-
- template <>
- struct get_int_key<int>
- {
- int operator()( int i ) const
- {
- return i;
- }
- };
-
- // MichaelHashSet
- class IntrusiveStripedSetHdrTest: public CppUnitMini::TestCase
- {
- public:
- struct stat
- {
- unsigned int nDisposeCount ; // count of disposer calling
- unsigned int nFindCount ; // count of find-functor calling
- unsigned int nFindArgCount;
- unsigned int nInsertCount;
- unsigned int nUpdateNewCount;
- unsigned int nUpdateCount;
- unsigned int nEraseCount;
-
- stat()
- {
- memset( this, 0, sizeof(*this));
- }
-
- stat& operator=( stat const& s)
- {
- memcpy( this, &s, sizeof(*this));
- return *this;
- }
- };
-
- struct item
- {
- int nKey;
- int nVal;
-
- item()
- {}
-
- explicit item( int key )
- : nKey( key )
- , nVal(0)
- {}
-
- item(int key, int val)
- : nKey( key )
- , nVal(val)
- {}
-
- item(const item& v )
- : nKey( v.nKey )
- , nVal( v.nVal )
- {}
-
- int key() const
- {
- return nKey;
- }
-
- int val() const
- {
- return nVal;
- }
- };
-
- template <typename Hook>
- struct base_item
- : public item
- , public Hook
- , public stat
-
- {
- base_item()
- {}
-
- CDSTEST_BOOST_INTRUSIVE_REQUIRES_IMPLICIT_CONVERSION_WORKAROUND
- base_item( int key )
- : item( key )
- {}
-
- base_item(int key, int val)
- : item( key, val )
- {}
-
- base_item(const base_item& v )
- : item( static_cast<item const&>(v) )
- , stat()
- {}
-
- operator int() const
- {
- return key();
- }
- };
-
- template <typename Hook>
- struct member_item
- : public item
- , public stat
- {
- Hook hMember;
-
- member_item()
- {}
-
- CDSTEST_BOOST_INTRUSIVE_REQUIRES_IMPLICIT_CONVERSION_WORKAROUND
- member_item( int key )
- : item( key )
- {}
-
- member_item(int key, int val)
- : item( key, val )
- {}
-
- member_item(const member_item& v )
- : item( static_cast<item const&>(v))
- , stat()
- {}
-
- operator int() const
- {
- return key();
- }
- };
-
- struct find_key {
- int nKey;
-
- find_key( int key )
- : nKey(key)
- {}
- };
-
- struct hash_int {
- size_t operator()( int i ) const
- {
- return co::v::hash<int>()( i );
- }
- template <typename Item>
- size_t operator()( const Item& i ) const
- {
- return (*this)( i.key() );
- }
- size_t operator()( find_key const& i) const
- {
- return co::v::hash<int>()( i.nKey );
- }
- };
-
- template <typename T>
- struct less
- {
- bool operator ()(const T& v1, const T& v2 ) const
- {
- return v1.key() < v2.key();
- }
-
- template <typename Q>
- bool operator ()(const T& v1, const Q& v2 ) const
- {
- return v1.key() < v2;
- }
-
- template <typename Q>
- bool operator ()(const Q& v1, const T& v2 ) const
- {
- return v1 < v2.key();
- }
-
- bool operator()( int i1, int i2 ) const
- {
- return i1 < i2;
- }
- };
-
- template <typename T>
- struct cmp {
- int operator ()(const T& v1, const T& v2 ) const
- {
- if ( v1.key() < v2.key() )
- return -1;
- return v1.key() > v2.key() ? 1 : 0;
- }
-
- template <typename Q>
- int operator ()(const T& v1, const Q& v2 ) const
- {
- if ( v1.key() < v2 )
- return -1;
- return v1.key() > v2 ? 1 : 0;
- }
-
- template <typename Q>
- int operator ()(const Q& v1, const T& v2 ) const
- {
- if ( v1 < v2.key() )
- return -1;
- return v1 > v2.key() ? 1 : 0;
- }
- };
-
- struct faked_disposer
- {
- template <typename T>
- void operator ()( T * p )
- {
- ++p->nDisposeCount;
- }
- };
-
- struct insert_functor {
- template <typename Item>
- void operator()( Item& e)
- {
- ++e.nInsertCount;
- }
- };
-
- struct update_functor {
- template <typename Item>
- void operator()( bool bNew, Item& e, Item& arg )
- {
- if ( bNew ) {
- ++e.nUpdateNewCount;
- CPPUNIT_ASSERT_CURRENT( &e == &arg );
- }
- else
- ++e.nUpdateCount;
- }
- };
-
- struct erase_functor {
- template< typename Item >
- void operator()( Item& e )
- {
- ++e.nEraseCount;
- }
- };
-
- struct find_functor {
- template <typename Item, typename What>
- void operator()( Item& e, What& )
- {
- ++e.nFindCount;
- }
-
- template <typename Item>
- void operator()( Item& e, Item& w )
- {
- ++e.nFindCount;
- ++w.nFindArgCount;
- }
- };
-
- struct less2 {
- template <typename Item>
- bool operator()( Item const& e, find_key const& k ) const
- {
- return get_int_key<Item>()(e) < k.nKey;
- }
- template <typename Item>
- bool operator()( find_key const& k, Item const& e ) const
- {
- return k.nKey < get_int_key<Item>()(e);
- }
- template <typename Item1, typename Item2>
- bool operator()( Item1 const& e, Item2 const& k ) const
- {
- return get_int_key<Item1>()(e) < get_int_key<Item2>()(k);
- }
- };
-
- template <typename T>
- struct auto_dispose {
- T * m_pArr;
- auto_dispose( T * pArr ): m_pArr( pArr ) {}
- ~auto_dispose() { delete[] m_pArr; }
- };
-
- template <class Set>
- void test_with(Set& s)
- {
- typedef typename Set::value_type value_type;
-
- int const k1 = 10;
- int const k2 = 25;
- int const k3 = 51;
-
- int const v1 = 25;
- int const v2 = 56;
- int const v3 = 23;
-
- value_type e1( k1, v1 );
- value_type e2( k2, v2 );
- value_type e3( k3, v3);
-
- stat s1 = e1;
- stat s2 = e2;
- stat s3 = e3;
-
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( s.size() == 0 );
-
- CPPUNIT_ASSERT( !s.contains(k1));
- CPPUNIT_ASSERT( !s.contains(k2));
- CPPUNIT_ASSERT( !s.contains(k3));
-
- CPPUNIT_ASSERT( s.insert(e1));
- CPPUNIT_ASSERT( s.contains(e1));
- CPPUNIT_ASSERT( s.contains(k1));
- CPPUNIT_ASSERT( !s.contains(e2));
- CPPUNIT_ASSERT( !s.contains(e3));
-
- CPPUNIT_ASSERT( e2.nInsertCount == 0 );
- CPPUNIT_ASSERT( s.insert(e2, insert_functor() ));
- CPPUNIT_ASSERT( e2.nInsertCount == 1 );
- CPPUNIT_ASSERT( s.find(e1, find_functor() ));
- CPPUNIT_ASSERT( e1.nFindCount == 1 );
- CPPUNIT_ASSERT( e1.nFindArgCount == 1 );
- CPPUNIT_ASSERT( s.find(k1, find_functor() ));
- CPPUNIT_ASSERT( e1.nFindCount == 2 );
- CPPUNIT_ASSERT( e1.nFindArgCount == 1 );
- CPPUNIT_ASSERT( s.find(k2, find_functor() ));
- CPPUNIT_ASSERT( e2.nFindCount == 1 );
- CPPUNIT_ASSERT( e2.nFindArgCount == 0 );
- CPPUNIT_ASSERT( s.find(e2, find_functor() ));
- CPPUNIT_ASSERT( e2.nFindCount == 2 );
- CPPUNIT_ASSERT( e2.nFindArgCount == 1 );
- CPPUNIT_ASSERT( !s.find(k3, find_functor()));
- CPPUNIT_ASSERT( e3.nFindCount == 0 );
- CPPUNIT_ASSERT( e3.nFindArgCount == 0 );
- CPPUNIT_ASSERT( !s.find(e3, find_functor()));
- CPPUNIT_ASSERT( e3.nFindCount == 0 );
- CPPUNIT_ASSERT( e3.nFindArgCount == 0 );
-
- s1 = e1 ; s2 = e2 ; s3 = e3;
-
- CPPUNIT_ASSERT( e3.nUpdateNewCount == 0 );
- CPPUNIT_ASSERT( e3.nUpdateCount == 0 );
- CPPUNIT_ASSERT(s.update(e3, update_functor(), false) == std::make_pair(false, false));
- CPPUNIT_ASSERT(e3.nUpdateNewCount == 0);
- CPPUNIT_ASSERT(e3.nUpdateCount == 0);
- CPPUNIT_ASSERT( s.update( e3, update_functor() ) == std::make_pair(true, true));
- CPPUNIT_ASSERT( e3.nUpdateNewCount == 1 );
- CPPUNIT_ASSERT( e3.nUpdateCount == 0 );
- CPPUNIT_ASSERT( s.find_with(find_key(k1), less2(), find_functor() ));
- CPPUNIT_ASSERT( e1.nFindCount == s1.nFindCount + 1 );
- CPPUNIT_ASSERT( e1.nFindArgCount == s1.nFindArgCount );
- CPPUNIT_ASSERT( s.find_with(k1, less2(), find_functor() ));
- CPPUNIT_ASSERT( e1.nFindCount == s1.nFindCount + 2 );
- CPPUNIT_ASSERT( e1.nFindArgCount == s1.nFindArgCount );
- CPPUNIT_ASSERT( s.find_with(k2, less2(), find_functor() ));
- CPPUNIT_ASSERT( e2.nFindCount == s2.nFindCount + 1 );
- CPPUNIT_ASSERT( e2.nFindArgCount == s2.nFindArgCount );
- CPPUNIT_ASSERT( s.contains(find_key(k2), less2() ));
- CPPUNIT_ASSERT( e2.nFindCount == s2.nFindCount + 1 ) ; // unchanged, no find_functor
- CPPUNIT_ASSERT( e2.nFindArgCount == s2.nFindArgCount );
- CPPUNIT_ASSERT( s.contains(k3, less2() ));
- CPPUNIT_ASSERT( e3.nFindCount == s3.nFindCount ) ; // unchanged, no find_functor
- CPPUNIT_ASSERT( e3.nFindArgCount == s3.nFindArgCount );
- CPPUNIT_ASSERT( s.find_with(find_key(k3), less2(), find_functor() ));
- CPPUNIT_ASSERT( e3.nFindCount == s3.nFindCount + 1 );
- CPPUNIT_ASSERT( e3.nFindArgCount == s3.nFindArgCount );
-
- s1 = e1 ; s2 = e2 ; s3 = e3;
-
- // insert existing elements
- {
- value_type eu( k2, 1000 );
- CPPUNIT_ASSERT( !s.insert( eu ));
- CPPUNIT_ASSERT( !s.insert( eu, insert_functor() ));
- CPPUNIT_ASSERT( e2.nInsertCount == s2.nInsertCount );
-
- CPPUNIT_ASSERT( s.update( eu, update_functor()) == std::make_pair(true, false));
- CPPUNIT_ASSERT( e2.nInsertCount == s2.nInsertCount );
- CPPUNIT_ASSERT( e2.nUpdateCount == s2.nUpdateCount + 1 );
- CPPUNIT_ASSERT( e2.nUpdateNewCount == s2.nUpdateNewCount );
- }
-
- s1 = e1 ; s2 = e2 ; s3 = e3;
-
- // unlink & erase test
- {
- value_type eu( k2, 10 );
- CPPUNIT_ASSERT( !s.unlink(eu));
- }
-
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( s.size() == 3 );
-
- CPPUNIT_ASSERT( s.unlink( e1 ) );
- CPPUNIT_ASSERT( s.erase_with( k2, less2() ) == &e2 );
- CPPUNIT_ASSERT( s.erase( e2 ) == nullptr );
- CPPUNIT_ASSERT( e3.nEraseCount == 0 );
- CPPUNIT_ASSERT( s.erase_with( k3, less2(), erase_functor()) == &e3 );
- CPPUNIT_ASSERT( e3.nEraseCount == 1 );
- CPPUNIT_ASSERT( s.erase( k3, erase_functor() ) == nullptr );
- CPPUNIT_ASSERT( e3.nEraseCount == 1 );
-
- CPPUNIT_ASSERT( s.insert( e3 ) );
- CPPUNIT_ASSERT( s.erase( e3 ) == &e3 );
- CPPUNIT_ASSERT( e3.nEraseCount == 1 );
-
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( s.size() == 0 );
-
- s1 = e1 ; s2 = e2 ; s3 = e3;
-
- // clear & clear_and_dispose test
- CPPUNIT_ASSERT( s.insert(e1));
- CPPUNIT_ASSERT( s.insert(e2));
- CPPUNIT_ASSERT( s.insert(e3));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( s.size() == 3 );
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( s.size() == 0 );
-
- CPPUNIT_ASSERT( s.insert(e1));
- CPPUNIT_ASSERT( s.insert(e2));
- CPPUNIT_ASSERT( s.insert(e3));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( s.size() == 3 );
-
- CPPUNIT_ASSERT( e1.nDisposeCount == 0 );
- CPPUNIT_ASSERT( e2.nDisposeCount == 0 );
- CPPUNIT_ASSERT( e3.nDisposeCount == 0 );
- s.clear_and_dispose( faked_disposer() );
- CPPUNIT_ASSERT( e1.nDisposeCount == 1 );
- CPPUNIT_ASSERT( e2.nDisposeCount == 1 );
- CPPUNIT_ASSERT( e3.nDisposeCount == 1 );
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( s.size() == 0 );
-
- // resize test (up to 64K elements)
- size_t const nSize = 64 * 1024;
- value_type * arr = new value_type[nSize];
- auto_dispose<value_type> ad(arr);
- for ( size_t i = 0; i < nSize; ++i ) {
- value_type * p = new (arr + i) value_type( (int) i, (int) i * 2 );
- CPPUNIT_ASSERT_EX( s.insert( *p, insert_functor() ), "i=" << i );
- CPPUNIT_ASSERT_EX( p->nInsertCount == 1, "i=" << i );
- //for ( size_t j = 0; j <= i; ++j ) {
- // if ( !s.contains((int) j) ) {
- // CPPUNIT_MSG( "Key " << j << " is not found after inserting key " << i );
- // }
- //}
- }
-
- for ( size_t i = 0; i < nSize; ++i )
- CPPUNIT_ASSERT_EX( s.contains((int) i), "Key " << i << " is not found" );
-
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( s.size() == nSize );
- s.clear_and_dispose( faked_disposer() );
- for ( size_t i = 0; i < nSize; ++i ) {
- CPPUNIT_ASSERT_EX( arr[i].nDisposeCount == 1, "i=" << i );
- }
- }
-
- template <class Set>
- void test()
- {
- // default ctor
- {
- Set s;
- test_with(s);
- }
-
- // ctor with explicit initial capacity
- {
- Set s(256);
- test_with(s);
- }
- }
-
- template <class Set>
- void test_cuckoo()
- {
- unsigned int nProbesetSize = Set::node_type::probeset_size ? Set::node_type::probeset_size : 4;
- Set s( 256, nProbesetSize, nProbesetSize / 2 );
- test_with( s );
- }
-
- // ***********************************************************
- // Striped set
-
- void Striped_list_basehook_cmp();
- void Striped_list_basehook_less();
- void Striped_list_basehook_cmpmix();
- void Striped_list_basehook_bucket_threshold();
- void Striped_list_basehook_bucket_threshold_rt();
- void Striped_list_memberhook_cmp();
- void Striped_list_memberhook_less();
- void Striped_list_memberhook_cmpmix();
- void Striped_list_memberhook_bucket_threshold();
- void Striped_list_memberhook_bucket_threshold_rt();
-
- void Striped_slist_basehook_cmp();
- void Striped_slist_basehook_less();
- void Striped_slist_basehook_cmpmix();
- void Striped_slist_basehook_bucket_threshold();
- void Striped_slist_basehook_bucket_threshold_rt();
- void Striped_slist_memberhook_cmp();
- void Striped_slist_memberhook_less();
- void Striped_slist_memberhook_cmpmix();
- void Striped_slist_memberhook_bucket_threshold();
- void Striped_slist_memberhook_bucket_threshold_rt();
-
- void Striped_set_basehook();
- void Striped_set_basehook_bucket_threshold();
- void Striped_set_basehook_bucket_threshold_rt();
- void Striped_set_memberhook();
- void Striped_set_memberhook_bucket_threshold();
- void Striped_set_memberhook_bucket_threshold_rt();
-
- void Striped_unordered_set_basehook();
- void Striped_unordered_set_basehook_bucket_threshold();
- void Striped_unordered_set_basehook_bucket_threshold_rt();
- void Striped_unordered_set_memberhook();
- void Striped_unordered_set_memberhook_bucket_threshold();
- void Striped_unordered_set_memberhook_bucket_threshold_rt();
-
- void Striped_avl_set_basehook();
- void Striped_avl_set_basehook_bucket_threshold();
- void Striped_avl_set_basehook_bucket_threshold_rt();
- void Striped_avl_set_memberhook();
- void Striped_avl_set_memberhook_bucket_threshold();
- void Striped_avl_set_memberhook_bucket_threshold_rt();
-
- void Striped_sg_set_basehook();
- void Striped_sg_set_basehook_bucket_threshold();
- void Striped_sg_set_basehook_bucket_threshold_rt();
- void Striped_sg_set_memberhook();
- void Striped_sg_set_memberhook_bucket_threshold();
- void Striped_sg_set_memberhook_bucket_threshold_rt();
-
- void Striped_splay_set_basehook();
- void Striped_splay_set_basehook_bucket_threshold();
- void Striped_splay_set_basehook_bucket_threshold_rt();
- void Striped_splay_set_memberhook();
- void Striped_splay_set_memberhook_bucket_threshold();
- void Striped_splay_set_memberhook_bucket_threshold_rt();
-
- void Striped_treap_set_basehook();
- void Striped_treap_set_basehook_bucket_threshold();
- void Striped_treap_set_basehook_bucket_threshold_rt();
- void Striped_treap_set_memberhook();
- void Striped_treap_set_memberhook_bucket_threshold();
- void Striped_treap_set_memberhook_bucket_threshold_rt();
-
- // ***********************************************************
- // Refinable set
-
- void Refinable_list_basehook_cmp();
- void Refinable_list_basehook_less();
- void Refinable_list_basehook_cmpmix();
- void Refinable_list_basehook_bucket_threshold();
- void Refinable_list_basehook_bucket_threshold_rt();
- void Refinable_list_memberhook_cmp();
- void Refinable_list_memberhook_less();
- void Refinable_list_memberhook_cmpmix();
- void Refinable_list_memberhook_bucket_threshold();
- void Refinable_list_memberhook_bucket_threshold_rt();
-
- void Refinable_slist_basehook_cmp();
- void Refinable_slist_basehook_less();
- void Refinable_slist_basehook_cmpmix();
- void Refinable_slist_basehook_bucket_threshold();
- void Refinable_slist_basehook_bucket_threshold_rt();
- void Refinable_slist_memberhook_cmp();
- void Refinable_slist_memberhook_less();
- void Refinable_slist_memberhook_cmpmix();
- void Refinable_slist_memberhook_bucket_threshold();
- void Refinable_slist_memberhook_bucket_threshold_rt();
-
- void Refinable_set_basehook();
- void Refinable_set_basehook_bucket_threshold();
- void Refinable_set_basehook_bucket_threshold_rt();
- void Refinable_set_memberhook();
- void Refinable_set_memberhook_bucket_threshold();
- void Refinable_set_memberhook_bucket_threshold_rt();
-
- void Refinable_unordered_set_basehook();
- void Refinable_unordered_set_basehook_bucket_threshold();
- void Refinable_unordered_set_basehook_bucket_threshold_rt();
- void Refinable_unordered_set_memberhook();
- void Refinable_unordered_set_memberhook_bucket_threshold();
- void Refinable_unordered_set_memberhook_bucket_threshold_rt();
-
- void Refinable_avl_set_basehook();
- void Refinable_avl_set_basehook_bucket_threshold();
- void Refinable_avl_set_basehook_bucket_threshold_rt();
- void Refinable_avl_set_memberhook();
- void Refinable_avl_set_memberhook_bucket_threshold();
- void Refinable_avl_set_memberhook_bucket_threshold_rt();
-
- void Refinable_sg_set_basehook();
- void Refinable_sg_set_basehook_bucket_threshold();
- void Refinable_sg_set_basehook_bucket_threshold_rt();
- void Refinable_sg_set_memberhook();
- void Refinable_sg_set_memberhook_bucket_threshold();
- void Refinable_sg_set_memberhook_bucket_threshold_rt();
-
- void Refinable_splay_set_basehook();
- void Refinable_splay_set_basehook_bucket_threshold();
- void Refinable_splay_set_basehook_bucket_threshold_rt();
- void Refinable_splay_set_memberhook();
- void Refinable_splay_set_memberhook_bucket_threshold();
- void Refinable_splay_set_memberhook_bucket_threshold_rt();
-
- void Refinable_treap_set_basehook();
- void Refinable_treap_set_basehook_bucket_threshold();
- void Refinable_treap_set_basehook_bucket_threshold_rt();
- void Refinable_treap_set_memberhook();
- void Refinable_treap_set_memberhook_bucket_threshold();
- void Refinable_treap_set_memberhook_bucket_threshold_rt();
-
- CPPUNIT_TEST_SUITE(IntrusiveStripedSetHdrTest)
- // ***********************************************************
- // Striped set
-
- CPPUNIT_TEST( Striped_list_basehook_cmp)
- CPPUNIT_TEST( Striped_list_basehook_less)
- CPPUNIT_TEST( Striped_list_basehook_cmpmix)
- CPPUNIT_TEST( Striped_list_basehook_bucket_threshold)
- CPPUNIT_TEST( Striped_list_basehook_bucket_threshold_rt)
- CPPUNIT_TEST( Striped_list_memberhook_cmp)
- CPPUNIT_TEST( Striped_list_memberhook_less)
- CPPUNIT_TEST( Striped_list_memberhook_cmpmix)
- CPPUNIT_TEST( Striped_list_memberhook_bucket_threshold)
- CPPUNIT_TEST( Striped_list_memberhook_bucket_threshold_rt)
-
- CPPUNIT_TEST( Striped_slist_basehook_cmp)
- CPPUNIT_TEST( Striped_slist_basehook_less)
- CPPUNIT_TEST( Striped_slist_basehook_cmpmix)
- CPPUNIT_TEST( Striped_slist_basehook_bucket_threshold)
- CPPUNIT_TEST( Striped_slist_basehook_bucket_threshold_rt)
- CPPUNIT_TEST( Striped_slist_memberhook_cmp)
- CPPUNIT_TEST( Striped_slist_memberhook_less)
- CPPUNIT_TEST( Striped_slist_memberhook_cmpmix)
- CPPUNIT_TEST( Striped_slist_memberhook_bucket_threshold)
- CPPUNIT_TEST( Striped_slist_memberhook_bucket_threshold_rt)
-
- CPPUNIT_TEST( Striped_set_basehook )
- CPPUNIT_TEST( Striped_set_basehook_bucket_threshold )
- CPPUNIT_TEST( Striped_set_basehook_bucket_threshold_rt )
- CPPUNIT_TEST( Striped_set_memberhook)
- CPPUNIT_TEST( Striped_set_memberhook_bucket_threshold )
- CPPUNIT_TEST( Striped_set_memberhook_bucket_threshold_rt )
-
- CPPUNIT_TEST( Striped_unordered_set_basehook )
- CPPUNIT_TEST( Striped_unordered_set_basehook_bucket_threshold )
- CPPUNIT_TEST( Striped_unordered_set_basehook_bucket_threshold_rt )
- CPPUNIT_TEST( Striped_unordered_set_memberhook)
- CPPUNIT_TEST( Striped_unordered_set_memberhook_bucket_threshold )
- CPPUNIT_TEST( Striped_unordered_set_memberhook_bucket_threshold_rt )
-
- CPPUNIT_TEST( Striped_avl_set_basehook )
- CPPUNIT_TEST( Striped_avl_set_basehook_bucket_threshold )
- CPPUNIT_TEST( Striped_avl_set_basehook_bucket_threshold_rt )
- CPPUNIT_TEST( Striped_avl_set_memberhook)
- CPPUNIT_TEST( Striped_avl_set_memberhook_bucket_threshold )
- CPPUNIT_TEST( Striped_avl_set_memberhook_bucket_threshold_rt )
-
- CPPUNIT_TEST( Striped_sg_set_basehook )
- CPPUNIT_TEST( Striped_sg_set_basehook_bucket_threshold )
- CPPUNIT_TEST( Striped_sg_set_basehook_bucket_threshold_rt )
- CPPUNIT_TEST( Striped_sg_set_memberhook)
- CPPUNIT_TEST( Striped_sg_set_memberhook_bucket_threshold )
- CPPUNIT_TEST( Striped_sg_set_memberhook_bucket_threshold_rt )
-
- CPPUNIT_TEST( Striped_splay_set_basehook )
- CPPUNIT_TEST( Striped_splay_set_basehook_bucket_threshold )
- CPPUNIT_TEST( Striped_splay_set_basehook_bucket_threshold_rt )
- CPPUNIT_TEST( Striped_splay_set_memberhook)
- CPPUNIT_TEST( Striped_splay_set_memberhook_bucket_threshold )
- CPPUNIT_TEST( Striped_splay_set_memberhook_bucket_threshold_rt )
-
- CPPUNIT_TEST( Striped_treap_set_basehook )
- CPPUNIT_TEST( Striped_treap_set_basehook_bucket_threshold )
- CPPUNIT_TEST( Striped_treap_set_basehook_bucket_threshold_rt )
- CPPUNIT_TEST( Striped_treap_set_memberhook)
- CPPUNIT_TEST( Striped_treap_set_memberhook_bucket_threshold )
- CPPUNIT_TEST( Striped_treap_set_memberhook_bucket_threshold_rt )
-
- // ***********************************************************
- // Refinable set
-
- CPPUNIT_TEST( Refinable_list_basehook_cmp)
- CPPUNIT_TEST( Refinable_list_basehook_less)
- CPPUNIT_TEST( Refinable_list_basehook_cmpmix)
- CPPUNIT_TEST( Refinable_list_basehook_bucket_threshold)
- CPPUNIT_TEST( Refinable_list_basehook_bucket_threshold_rt)
- CPPUNIT_TEST( Refinable_list_memberhook_cmp)
- CPPUNIT_TEST( Refinable_list_memberhook_less)
- CPPUNIT_TEST( Refinable_list_memberhook_cmpmix)
- CPPUNIT_TEST( Refinable_list_memberhook_bucket_threshold)
- CPPUNIT_TEST( Refinable_list_memberhook_bucket_threshold_rt)
-
- CPPUNIT_TEST( Refinable_slist_basehook_cmp)
- CPPUNIT_TEST( Refinable_slist_basehook_less)
- CPPUNIT_TEST( Refinable_slist_basehook_cmpmix)
- CPPUNIT_TEST( Refinable_slist_basehook_bucket_threshold)
- CPPUNIT_TEST( Refinable_slist_basehook_bucket_threshold_rt)
- CPPUNIT_TEST( Refinable_slist_memberhook_cmp)
- CPPUNIT_TEST( Refinable_slist_memberhook_less)
- CPPUNIT_TEST( Refinable_slist_memberhook_cmpmix)
- CPPUNIT_TEST( Refinable_slist_memberhook_bucket_threshold)
- CPPUNIT_TEST( Refinable_slist_memberhook_bucket_threshold_rt)
-
- CPPUNIT_TEST( Refinable_set_basehook )
- CPPUNIT_TEST( Refinable_set_basehook_bucket_threshold )
- CPPUNIT_TEST( Refinable_set_basehook_bucket_threshold_rt )
- CPPUNIT_TEST( Refinable_set_memberhook)
- CPPUNIT_TEST( Refinable_set_memberhook_bucket_threshold )
- CPPUNIT_TEST( Refinable_set_memberhook_bucket_threshold_rt )
-
- CPPUNIT_TEST( Refinable_unordered_set_basehook )
- CPPUNIT_TEST( Refinable_unordered_set_basehook_bucket_threshold )
- CPPUNIT_TEST( Refinable_unordered_set_basehook_bucket_threshold_rt )
- CPPUNIT_TEST( Refinable_unordered_set_memberhook)
- CPPUNIT_TEST( Refinable_unordered_set_memberhook_bucket_threshold )
- CPPUNIT_TEST( Refinable_unordered_set_memberhook_bucket_threshold_rt )
-
- CPPUNIT_TEST( Refinable_avl_set_basehook )
- CPPUNIT_TEST( Refinable_avl_set_basehook_bucket_threshold )
- CPPUNIT_TEST( Refinable_avl_set_basehook_bucket_threshold_rt )
- CPPUNIT_TEST( Refinable_avl_set_memberhook)
- CPPUNIT_TEST( Refinable_avl_set_memberhook_bucket_threshold )
- CPPUNIT_TEST( Refinable_avl_set_memberhook_bucket_threshold_rt )
-
- CPPUNIT_TEST( Refinable_sg_set_basehook )
- CPPUNIT_TEST( Refinable_sg_set_basehook_bucket_threshold )
- CPPUNIT_TEST( Refinable_sg_set_basehook_bucket_threshold_rt )
- CPPUNIT_TEST( Refinable_sg_set_memberhook)
- CPPUNIT_TEST( Refinable_sg_set_memberhook_bucket_threshold )
- CPPUNIT_TEST( Refinable_sg_set_memberhook_bucket_threshold_rt )
-
- CPPUNIT_TEST( Refinable_splay_set_basehook )
- CPPUNIT_TEST( Refinable_splay_set_basehook_bucket_threshold )
- CPPUNIT_TEST( Refinable_splay_set_basehook_bucket_threshold_rt )
- CPPUNIT_TEST( Refinable_splay_set_memberhook)
- CPPUNIT_TEST( Refinable_splay_set_memberhook_bucket_threshold )
- CPPUNIT_TEST( Refinable_splay_set_memberhook_bucket_threshold_rt )
-
- CPPUNIT_TEST( Refinable_treap_set_basehook )
- CPPUNIT_TEST( Refinable_treap_set_basehook_bucket_threshold )
- CPPUNIT_TEST( Refinable_treap_set_basehook_bucket_threshold_rt )
- CPPUNIT_TEST( Refinable_treap_set_memberhook)
- CPPUNIT_TEST( Refinable_treap_set_memberhook_bucket_threshold )
- CPPUNIT_TEST( Refinable_treap_set_memberhook_bucket_threshold_rt )
- CPPUNIT_TEST_SUITE_END()
- };
-} // namespace set
-
-#endif // #ifndef CDSTEST_HDR_INTRUSIVE_STRIPED_SET_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.
-*/
-
-#include "set/hdr_set.h"
-#include <cds/container/michael_list_dhp.h>
-#include <cds/container/michael_set.h>
-
-namespace set {
-
- namespace {
- struct set_traits: public cc::michael_set::traits
- {
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- };
-
- struct DHP_cmp_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
-
- struct DHP_less_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
-
- struct DHP_cmpmix_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- }
-
- void HashSetHdrTest::Michael_DHP_cmp()
- {
- typedef cc::MichaelList< cds::gc::DHP, item, DHP_cmp_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::DHP, list, set_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::DHP, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Michael_DHP_less()
- {
- typedef cc::MichaelList< cds::gc::DHP, item, DHP_less_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::DHP, list, set_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::DHP, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Michael_DHP_cmpmix()
- {
- typedef cc::MichaelList< cds::gc::DHP, item, DHP_cmpmix_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::DHP, list, set_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::DHP, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
-
-} // 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/hdr_set.h"
-#include <cds/container/michael_list_hp.h>
-#include <cds/container/michael_set.h>
-
-namespace set {
-
- namespace {
- struct set_traits: public cc::michael_set::traits
- {
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- };
-
- struct HP_cmp_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
-
- struct HP_less_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
-
- struct HP_cmpmix_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- }
-
- void HashSetHdrTest::Michael_HP_cmp()
- {
- typedef cc::MichaelList< cds::gc::HP, item, HP_cmp_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::HP, list, set_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::HP, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Michael_HP_less()
- {
- typedef cc::MichaelList< cds::gc::HP, item, HP_less_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::HP, list, set_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::HP, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Michael_HP_cmpmix()
- {
- typedef cc::MichaelList< cds::gc::HP, item, HP_cmpmix_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::HP, list, set_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::HP, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
-
-} // namespace set
-
-CPPUNIT_TEST_SUITE_REGISTRATION(set::HashSetHdrTest);
-
+++ /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/hdr_set.h"
-#include <cds/container/lazy_list_dhp.h>
-#include <cds/container/michael_set.h>
-
-namespace set {
-
- namespace {
- struct set_traits: public cc::michael_set::traits
- {
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- };
-
- struct DHP_cmp_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
-
- struct DHP_less_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
-
- struct DHP_cmpmix_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- }
-
- void HashSetHdrTest::Lazy_DHP_cmp()
- {
- typedef cc::LazyList< cds::gc::DHP, item, DHP_cmp_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::DHP, list, set_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::DHP, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Lazy_DHP_less()
- {
- typedef cc::LazyList< cds::gc::DHP, item, DHP_less_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::DHP, list, set_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::DHP, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Lazy_DHP_cmpmix()
- {
- typedef cc::LazyList< cds::gc::DHP, item, DHP_cmpmix_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::DHP, list, set_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::DHP, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
-
-} // 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/hdr_set.h"
-#include <cds/container/lazy_list_hp.h>
-#include <cds/container/michael_set.h>
-
-namespace set {
-
- namespace {
- struct set_traits: public cc::michael_set::traits
- {
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- };
-
- struct HP_cmp_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
-
- struct HP_less_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
-
- struct HP_cmpmix_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- }
-
- void HashSetHdrTest::Lazy_HP_cmp()
- {
- typedef cc::LazyList< cds::gc::HP, item, HP_cmp_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::HP, list, set_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::HP, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Lazy_HP_less()
- {
- typedef cc::LazyList< cds::gc::HP, item, HP_less_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::HP, list, set_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::HP, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Lazy_HP_cmpmix()
- {
- typedef cc::LazyList< cds::gc::HP, item, HP_cmpmix_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::HP, list, set_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::HP, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
-
-} // 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/hdr_set.h"
-#include <cds/container/lazy_list_nogc.h>
-#include <cds/container/michael_set_nogc.h>
-
-namespace set {
-
- namespace {
- struct set_traits: public cc::michael_set::traits
- {
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- };
-
- struct nogc_cmp_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
-
- struct nogc_less_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
-
- struct nogc_equal_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::equal<HashSetHdrTest::item> equal_to;
- static const bool sort = false;
- };
-
- struct nogc_cmpmix_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- }
-
- void HashSetHdrTest::Lazy_nogc_cmp()
- {
- typedef cc::LazyList< cds::gc::nogc, item, nogc_cmp_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::nogc, list, set_traits > set;
- test_int_nogc< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::nogc, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_nogc< opt_set >();
- }
-
- void HashSetHdrTest::Lazy_nogc_less()
- {
- typedef cc::LazyList< cds::gc::nogc, item, nogc_less_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::nogc, list, set_traits > set;
- test_int_nogc< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::nogc, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_nogc< opt_set >();
- }
-
- void HashSetHdrTest::Lazy_nogc_equal()
- {
- typedef cc::LazyList< cds::gc::nogc, item, nogc_equal_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::nogc, list, set_traits > set;
- test_int_nogc_unordered< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::nogc, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_nogc_unordered< opt_set >();
- }
-
- void HashSetHdrTest::Lazy_nogc_cmpmix()
- {
- typedef cc::LazyList< cds::gc::nogc, item, nogc_cmpmix_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::nogc, list, set_traits > set;
- test_int_nogc< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::nogc, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_nogc< opt_set >();
- }
-
-
-} // 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/hdr_set.h"
-#include <cds/urcu/general_buffered.h>
-#include <cds/container/lazy_list_rcu.h>
-#include <cds/container/michael_set_rcu.h>
-
-namespace set {
-
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type;
-
- struct set_traits: public cc::michael_set::traits
- {
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- };
-
- struct RCU_GPB_cmp_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
-
- struct RCU_GPB_less_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
-
- struct RCU_GPB_cmpmix_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- }
-
- void HashSetHdrTest::Lazy_RCU_GPB_cmp()
- {
- typedef cc::LazyList< rcu_type, item, RCU_GPB_cmp_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
- }
-
- void HashSetHdrTest::Lazy_RCU_GPB_less()
- {
- typedef cc::LazyList< rcu_type, item, RCU_GPB_less_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
- }
-
- void HashSetHdrTest::Lazy_RCU_GPB_cmpmix()
- {
- typedef cc::LazyList< rcu_type, item, RCU_GPB_cmpmix_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
- }
-
-
-} // 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/hdr_set.h"
-#include <cds/urcu/general_instant.h>
-#include <cds/container/lazy_list_rcu.h>
-#include <cds/container/michael_set_rcu.h>
-
-namespace set {
-
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type;
-
- struct set_traits: public cc::michael_set::traits
- {
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- };
-
- struct RCU_GPI_cmp_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
-
- struct RCU_GPI_less_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
-
- struct RCU_GPI_cmpmix_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- }
-
- void HashSetHdrTest::Lazy_RCU_GPI_cmp()
- {
- typedef cc::LazyList< rcu_type, item, RCU_GPI_cmp_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
- }
-
- void HashSetHdrTest::Lazy_RCU_GPI_less()
- {
- typedef cc::LazyList< rcu_type, item, RCU_GPI_less_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
- }
-
- void HashSetHdrTest::Lazy_RCU_GPI_cmpmix()
- {
- typedef cc::LazyList< rcu_type, item, RCU_GPI_cmpmix_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
- }
-
-
-} // 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/hdr_set.h"
-#include <cds/urcu/general_threaded.h>
-#include <cds/container/lazy_list_rcu.h>
-#include <cds/container/michael_set_rcu.h>
-
-namespace set {
-
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type;
-
- struct set_traits: public cc::michael_set::traits
- {
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- };
-
- struct RCU_GPT_cmp_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
-
- struct RCU_GPT_less_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
-
- struct RCU_GPT_cmpmix_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- }
-
- void HashSetHdrTest::Lazy_RCU_GPT_cmp()
- {
- typedef cc::LazyList< rcu_type, item, RCU_GPT_cmp_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
- }
-
- void HashSetHdrTest::Lazy_RCU_GPT_less()
- {
- typedef cc::LazyList< rcu_type, item, RCU_GPT_less_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
- }
-
- void HashSetHdrTest::Lazy_RCU_GPT_cmpmix()
- {
- typedef cc::LazyList< rcu_type, item, RCU_GPT_cmpmix_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
- }
-
-
-} // 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/hdr_set.h"
-#include <cds/urcu/signal_buffered.h>
-#include <cds/container/lazy_list_rcu.h>
-#include <cds/container/michael_set_rcu.h>
-
-namespace set {
-
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type;
-
- struct set_traits: public cc::michael_set::traits
- {
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- };
-
- struct RCU_SHB_cmp_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
-
- struct RCU_SHB_less_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
-
- struct RCU_SHB_cmpmix_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- }
-#endif
-
- void HashSetHdrTest::Lazy_RCU_SHB_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::LazyList< rcu_type, item, RCU_SHB_cmp_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
-#endif
- }
-
- void HashSetHdrTest::Lazy_RCU_SHB_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::LazyList< rcu_type, item, RCU_SHB_less_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
-#endif
- }
-
- void HashSetHdrTest::Lazy_RCU_SHB_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::LazyList< rcu_type, item, RCU_SHB_cmpmix_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
-#endif
- }
-
-} // 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/hdr_set.h"
-#include <cds/urcu/signal_threaded.h>
-#include <cds/container/lazy_list_rcu.h>
-#include <cds/container/michael_set_rcu.h>
-
-namespace set {
-
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type;
-
- struct set_traits: public cc::michael_set::traits
- {
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- };
-
- struct RCU_SHT_cmp_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
-
- struct RCU_SHT_less_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
-
- struct RCU_SHT_cmpmix_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- }
-#endif
-
- void HashSetHdrTest::Lazy_RCU_SHT_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::LazyList< rcu_type, item, RCU_SHT_cmp_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
-#endif
- }
-
- void HashSetHdrTest::Lazy_RCU_SHT_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::LazyList< rcu_type, item, RCU_SHT_less_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
-#endif
- }
-
- void HashSetHdrTest::Lazy_RCU_SHT_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::LazyList< rcu_type, item, RCU_SHT_cmpmix_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
-#endif
- }
-
-} // 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/hdr_set.h"
-#include <cds/container/michael_list_nogc.h>
-#include <cds/container/michael_set_nogc.h>
-
-namespace set {
-
- namespace {
- struct set_traits: public cc::michael_set::traits
- {
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- };
-
- struct nogc_cmp_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
-
- struct nogc_less_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
-
- struct nogc_cmpmix_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- }
-
- void HashSetHdrTest::Michael_nogc_cmp()
- {
- typedef cc::MichaelList< cds::gc::nogc, item, nogc_cmp_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::nogc, list, set_traits > set;
- test_int_nogc< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::nogc, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_nogc< opt_set >();
- }
-
- void HashSetHdrTest::Michael_nogc_less()
- {
- typedef cc::MichaelList< cds::gc::nogc, item, nogc_less_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::nogc, list, set_traits > set;
- test_int_nogc< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::nogc, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_nogc< opt_set >();
- }
-
- void HashSetHdrTest::Michael_nogc_cmpmix()
- {
- typedef cc::MichaelList< cds::gc::nogc, item, nogc_cmpmix_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::nogc, list, set_traits > set;
- test_int_nogc< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::nogc, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_nogc< opt_set >();
- }
-
-
-} // 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/hdr_set.h"
-#include <cds/urcu/general_buffered.h>
-#include <cds/container/michael_list_rcu.h>
-#include <cds/container/michael_set_rcu.h>
-
-namespace set {
-
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type;
-
- struct set_traits: public cc::michael_set::traits
- {
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- };
-
- struct RCU_GPB_cmp_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
-
- struct RCU_GPB_less_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
-
- struct RCU_GPB_cmpmix_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- }
-
- void HashSetHdrTest::Michael_RCU_GPB_cmp()
- {
- typedef cc::MichaelList< rcu_type, item, RCU_GPB_cmp_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
- }
-
- void HashSetHdrTest::Michael_RCU_GPB_less()
- {
- typedef cc::MichaelList< rcu_type, item, RCU_GPB_less_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
- }
-
- void HashSetHdrTest::Michael_RCU_GPB_cmpmix()
- {
- typedef cc::MichaelList< rcu_type, item, RCU_GPB_cmpmix_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
- }
-
-
-} // 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/hdr_set.h"
-#include <cds/urcu/general_instant.h>
-#include <cds/container/michael_list_rcu.h>
-#include <cds/container/michael_set_rcu.h>
-
-namespace set {
-
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type;
-
- struct set_traits: public cc::michael_set::traits
- {
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- };
-
- struct RCU_GPI_cmp_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
-
- struct RCU_GPI_less_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
-
- struct RCU_GPI_cmpmix_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- }
-
- void HashSetHdrTest::Michael_RCU_GPI_cmp()
- {
- typedef cc::MichaelList< rcu_type, item, RCU_GPI_cmp_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
- }
-
- void HashSetHdrTest::Michael_RCU_GPI_less()
- {
- typedef cc::MichaelList< rcu_type, item, RCU_GPI_less_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
- }
-
- void HashSetHdrTest::Michael_RCU_GPI_cmpmix()
- {
- typedef cc::MichaelList< rcu_type, item, RCU_GPI_cmpmix_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
- }
-
-
-} // 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/hdr_set.h"
-#include <cds/urcu/general_threaded.h>
-#include <cds/container/michael_list_rcu.h>
-#include <cds/container/michael_set_rcu.h>
-
-namespace set {
-
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type;
-
- struct set_traits: public cc::michael_set::traits
- {
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- };
-
- struct RCU_GPT_cmp_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
-
- struct RCU_GPT_less_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
-
- struct RCU_GPT_cmpmix_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- }
-
- void HashSetHdrTest::Michael_RCU_GPT_cmp()
- {
- typedef cc::MichaelList< rcu_type, item, RCU_GPT_cmp_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
- }
-
- void HashSetHdrTest::Michael_RCU_GPT_less()
- {
- typedef cc::MichaelList< rcu_type, item, RCU_GPT_less_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
- }
-
- void HashSetHdrTest::Michael_RCU_GPT_cmpmix()
- {
- typedef cc::MichaelList< rcu_type, item, RCU_GPT_cmpmix_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
- }
-
-
-} // 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/hdr_set.h"
-#include <cds/urcu/signal_buffered.h>
-#include <cds/container/michael_list_rcu.h>
-#include <cds/container/michael_set_rcu.h>
-
-namespace set {
-
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type;
-
- struct set_traits: public cc::michael_set::traits
- {
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- };
-
- struct RCU_SHB_cmp_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
-
- struct RCU_SHB_less_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
-
- struct RCU_SHB_cmpmix_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- }
-#endif
-
- void HashSetHdrTest::Michael_RCU_SHB_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::MichaelList< rcu_type, item, RCU_SHB_cmp_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
-#endif
- }
-
- void HashSetHdrTest::Michael_RCU_SHB_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::MichaelList< rcu_type, item, RCU_SHB_less_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
-#endif
- }
-
- void HashSetHdrTest::Michael_RCU_SHB_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::MichaelList< rcu_type, item, RCU_SHB_cmpmix_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
-#endif
- }
-
-} // 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/hdr_set.h"
-#include <cds/urcu/signal_threaded.h>
-#include <cds/container/michael_list_rcu.h>
-#include <cds/container/michael_set_rcu.h>
-
-namespace set {
-
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type;
-
- struct set_traits: public cc::michael_set::traits
- {
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- };
-
- struct RCU_SHT_cmp_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
-
- struct RCU_SHT_less_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
-
- struct RCU_SHT_cmpmix_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- }
-#endif
-
- void HashSetHdrTest::Michael_RCU_SHT_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::MichaelList< rcu_type, item, RCU_SHT_cmp_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
-#endif
- }
-
- void HashSetHdrTest::Michael_RCU_SHT_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::MichaelList< rcu_type, item, RCU_SHT_less_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
-#endif
- }
-
- void HashSetHdrTest::Michael_RCU_SHT_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::MichaelList< rcu_type, item, RCU_SHT_cmpmix_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< rcu_type, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
-#endif
- }
-
-} // 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/hdr_striped_set.h"
-
-#include <boost/version.hpp>
-#include <cds/details/defs.h>
-
-#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500
-namespace set {
- void StripedSetHdrTest::Refinable_boost_flat_set()
- {
- CPPUNIT_MESSAGE( "Skipped; for Microsoft Visual C++ 2013 and boost::container::flat_set you should use boost version 1.56 or above" );
- }
-}
-
-#elif BOOST_VERSION >= 104800
-
-#include <cds/container/striped_set/boost_flat_set.h>
-#include <cds/container/striped_set.h>
-#include <cds/sync/spinlock.h>
-
-namespace set {
-
- namespace {
- typedef boost::container::flat_set< StripedSetHdrTest::item, StripedSetHdrTest::less<StripedSetHdrTest::item> > set_t;
-
- struct my_copy_policy {
- typedef set_t::iterator iterator;
-
- void operator()( set_t& set, iterator itWhat )
- {
- set.insert( *itWhat );
- }
- };
- }
-
- void StripedSetHdrTest::Refinable_boost_flat_set()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- ,co::mutex_policy< cc::striped_set::refinable<> >
- > set_cmp;
- test_striped< set_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_less;
- test_striped< set_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::less< less<item> >
- > set_cmpmix;
- test_striped< set_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedSet< set_t
- , co::mutex_policy< cc::striped_set::refinable<cds::sync::reentrant_spin> >
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_spin;
- test_striped< set_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)");
- {
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > set_less_resizing_lf;
- set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>(1024));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- > set_less_resizing_lf16;
- test_striped< set_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024)");
- {
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > set_less_resizing_sbt;
- set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(1024) );
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> >
- > set_less_resizing_sbt16;
- test_striped< set_less_resizing_sbt16 >();
-
- // Copy policy
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped< set_copy_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped< set_swap_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped< set_move_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_item");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped< set_special_copy_item >();
-
- }
-
-} // namespace set
-
-#else // BOOST_VERSION < 104800
-
-namespace set {
- void StripedSetHdrTest::Refinable_boost_flat_set()
- {
- CPPUNIT_MESSAGE( "Skipped; for boost::container::flat_set you should use boost version 1.48 or above" );
- }
-}
-#endif // BOOST_VERSION
+++ /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/hdr_striped_set.h"
-
-#include <boost/version.hpp>
-#include <cds/details/defs.h>
-#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500
-namespace set {
- void StripedSetHdrTest::Refinable_boost_list()
- {
- CPPUNIT_MESSAGE("Skipped; for Microsoft Visual C++ 2013 and boost::container::list you should use boost version 1.56 or above");
- }
-}
-
-#elif BOOST_VERSION >= 104800
-
-#include <cds/container/striped_set/boost_list.h>
-#include <cds/container/striped_set.h>
-#include <cds/sync/spinlock.h>
-
-namespace set {
-
- namespace {
- struct my_copy_policy {
- typedef boost::container::list<StripedSetHdrTest::item> list_type;
- typedef list_type::iterator iterator;
-
- void operator()( list_type& list, iterator itInsert, iterator itWhat )
- {
- list.insert( itInsert, std::make_pair(itWhat->key(), itWhat->val()) );
- }
- };
-
- typedef boost::container::list<StripedSetHdrTest::item> sequence_t;
- }
-
- void StripedSetHdrTest::Refinable_boost_list()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- > set_cmp;
- test_striped2< set_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_less;
- test_striped2< set_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::less< less<item> >
- > set_cmpmix;
- test_striped2< set_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedSet< sequence_t
- , co::mutex_policy< cc::striped_set::refinable<cds::sync::reentrant_spin> >
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_spin;
- test_striped2< set_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > set_less_resizing_lf;
- set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>(8));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<4>");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<4> >
- > set_less_resizing_lf16;
- test_striped2< set_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > set_less_resizing_sbt;
- set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> >
- > set_less_resizing_sbt16;
- test_striped2< set_less_resizing_sbt16 >();
-
-
- // Copy policy
- CPPUNIT_MESSAGE( "copy_item");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped2< set_copy_item >();
-
- CPPUNIT_MESSAGE( "swap_item");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped2< set_swap_item >();
-
- CPPUNIT_MESSAGE( "move_item");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped2< set_move_item >();
-
- CPPUNIT_MESSAGE( "special copy policy");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped2< set_special_copy_item >();
- }
-
-} // namespace set
-
-#else // BOOST_VERSION < 104800
-
-namespace set {
- void StripedSetHdrTest::Refinable_boost_list()
- {
- CPPUNIT_MESSAGE( "Skipped; for boost::container::list you should use boost version 1.48 or above" );
- }
-}
-#endif // BOOST_VERSION
+++ /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/hdr_striped_set.h"
-
-#include <boost/version.hpp>
-#include <cds/details/defs.h>
-#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500
-namespace set {
- void StripedSetHdrTest::Refinable_boost_set()
- {
- CPPUNIT_MESSAGE("Skipped; for Microsoft Visual C++ 2013 and boost::container::set you should use boost version 1.56 or above");
- }
-}
-
-#elif BOOST_VERSION >= 104800
-
-#include <cds/container/striped_set/boost_set.h>
-#include <cds/container/striped_set.h>
-#include <cds/sync/spinlock.h>
-
-namespace set {
-
- namespace {
- typedef boost::container::set< StripedSetHdrTest::item, StripedSetHdrTest::less<StripedSetHdrTest::item> > set_t;
-
- struct my_copy_policy {
- typedef set_t::iterator iterator;
-
- void operator()( set_t& set, iterator itWhat )
- {
- set.insert( *itWhat );
- }
- };
- }
-
- void StripedSetHdrTest::Refinable_boost_set()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- ,co::mutex_policy< cc::striped_set::refinable<> >
- > set_cmp;
- test_striped< set_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_less;
- test_striped< set_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::less< less<item> >
- > set_cmpmix;
- test_striped< set_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedSet< set_t
- , co::mutex_policy< cc::striped_set::refinable<cds::sync::reentrant_spin> >
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_spin;
- test_striped< set_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)");
- {
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > set_less_resizing_lf;
- set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>(1024));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- > set_less_resizing_lf16;
- test_striped< set_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024)");
- {
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > set_less_resizing_sbt;
- set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(1024) );
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> >
- > set_less_resizing_sbt16;
- test_striped< set_less_resizing_sbt16 >();
-
- // Copy policy
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped< set_copy_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped< set_swap_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped< set_move_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_item");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped< set_special_copy_item >();
- }
-
-} // namespace set
-
-#else // BOOST_VERSION < 104800
-
-namespace set {
- void StripedSetHdrTest::Refinable_boost_set()
- {
- CPPUNIT_MESSAGE( "Skipped; for boost::container::set you should use boost version 1.48 or above" );
- }
-}
-#endif // BOOST_VERSION
+++ /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/hdr_striped_set.h"
-
-#include <boost/version.hpp>
-#include <cds/details/defs.h>
-#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500
-namespace set {
- void StripedSetHdrTest::Refinable_boost_stable_vector()
- {
- CPPUNIT_MESSAGE("Skipped; for Microsoft Visual C++ 2013 and boost::container::stable_vector you should use boost version 1.56 or above");
- }
-}
-
-#elif BOOST_VERSION >= 104800
-
-#include <cds/details/defs.h>
-#include <cds/container/striped_set/boost_stable_vector.h>
-#include <cds/container/striped_set.h>
-#include <cds/sync/spinlock.h>
-
-namespace set {
-
- namespace {
- struct my_copy_policy {
- typedef boost::container::stable_vector<StripedSetHdrTest::item> vector_type;
- typedef vector_type::iterator iterator;
-
- void operator()( vector_type& vec, iterator itInsert, iterator itWhat )
- {
- vec.insert( itInsert, *itWhat );
- }
- };
-
- typedef boost::container::stable_vector<StripedSetHdrTest::item> sequence_t;
- }
-
- void StripedSetHdrTest::Refinable_boost_stable_vector()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- > set_cmp;
- test_striped2< set_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_less;
- test_striped2< set_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::less< less<item> >
- > set_cmpmix;
- test_striped2< set_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedSet< sequence_t
- , co::mutex_policy< cc::striped_set::refinable<cds::sync::reentrant_spin> >
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_spin;
- test_striped2< set_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > set_less_resizing_lf;
- set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>(8));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<4>");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<4> >
- > set_less_resizing_lf16;
- test_striped2< set_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > set_less_resizing_sbt;
- set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> >
- > set_less_resizing_sbt16;
- test_striped2< set_less_resizing_sbt16 >();
-
-
- // Copy policy
- CPPUNIT_MESSAGE( "copy_item");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped2< set_copy_item >();
-
- CPPUNIT_MESSAGE( "swap_item");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped2< set_swap_item >();
-
- CPPUNIT_MESSAGE( "move_item");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped2< set_move_item >();
-
- CPPUNIT_MESSAGE( "special copy policy");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped2< set_special_copy_item >();
- }
-
-} // namespace set
-
-#else // BOOST_VERSION < 104800
-
-namespace set {
- void StripedSetHdrTest::Refinable_boost_stable_vector()
- {
- CPPUNIT_MESSAGE( "Skipped; for boost::container::stable_vector you should use boost version 1.48 or above" );
- }
-}
-#endif // BOOST_VERSION
+++ /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/hdr_striped_set.h"
-#include <cds/container/striped_set/boost_unordered_set.h>
-#include <cds/container/striped_set.h>
-#include <cds/sync/spinlock.h>
-
-namespace set {
-
- namespace {
- struct equal_item
- {
- template <typename T>
- bool operator ()( T const& i1, T const& i2) const
- {
- return i1.key() == i2.key();
- }
- };
-
- typedef boost::unordered_set< StripedSetHdrTest::item, StripedSetHdrTest::hash_int, equal_item > set_t;
-
- struct my_copy_policy {
- typedef set_t::iterator iterator;
-
- void operator()( set_t& set, iterator itWhat )
- {
- set.insert( std::make_pair(itWhat->key(), itWhat->val()) );
- }
- };
- }
-
- void StripedSetHdrTest::Refinable_boost_unordered_set()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- ,co::mutex_policy< cc::striped_set::refinable<> >
- > set_cmp;
- test_striped< set_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_less;
- test_striped< set_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::less< less<item> >
- > set_cmpmix;
- test_striped< set_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedSet< set_t
- , co::mutex_policy< cc::striped_set::refinable<cds::sync::reentrant_spin> >
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_spin;
- test_striped< set_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)");
- {
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > set_less_resizing_lf;
- set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>(1024));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- > set_less_resizing_lf16;
- test_striped< set_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024)");
- {
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > set_less_resizing_sbt;
- set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(1024) );
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> >
- > set_less_resizing_sbt16;
- test_striped< set_less_resizing_sbt16 >();
-
- // Copy policy
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped< set_copy_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped< set_swap_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped< set_move_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_item");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped< set_special_copy_item >();
-
- }
-
-} // 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/hdr_striped_set.h"
-
-#include <boost/version.hpp>
-#include <cds/details/defs.h>
-#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500
-namespace set {
- void StripedSetHdrTest::Refinable_boost_vector()
- {
- CPPUNIT_MESSAGE("Skipped; for Microsoft Visual C++ 2013 and boost::container::vector you should use boost version 1.56 or above");
- }
-}
-
-#elif BOOST_VERSION >= 104800
-
-#include <cds/details/defs.h>
-
-#include <cds/container/striped_set/boost_vector.h>
-#include <cds/container/striped_set.h>
-#include <cds/sync/spinlock.h>
-
-namespace set {
-
- namespace {
- struct my_copy_policy {
- typedef boost::container::vector<StripedSetHdrTest::item> vector_type;
- typedef vector_type::iterator iterator;
-
- void operator()( vector_type& vec, iterator itInsert, iterator itWhat )
- {
- vec.insert( itInsert, std::make_pair(itWhat->key(), itWhat->val()) );
- }
- };
-
- typedef boost::container::vector<StripedSetHdrTest::item> sequence_t;
- }
-
- void StripedSetHdrTest::Refinable_boost_vector()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- > set_cmp;
- test_striped2< set_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_less;
- test_striped2< set_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::less< less<item> >
- > set_cmpmix;
- test_striped2< set_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedSet< sequence_t
- , co::mutex_policy< cc::striped_set::refinable<cds::sync::reentrant_spin> >
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_spin;
- test_striped2< set_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > set_less_resizing_lf;
- set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>(8));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<4>");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<4> >
- > set_less_resizing_lf16;
- test_striped2< set_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > set_less_resizing_sbt;
- set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> >
- > set_less_resizing_sbt16;
- test_striped2< set_less_resizing_sbt16 >();
-
-
- // Copy policy
- CPPUNIT_MESSAGE( "copy_item");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped2< set_copy_item >();
-
- CPPUNIT_MESSAGE( "swap_item");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped2< set_swap_item >();
-
- CPPUNIT_MESSAGE( "move_item");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped2< set_move_item >();
-
- CPPUNIT_MESSAGE( "special copy policy");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped2< set_special_copy_item >();
- }
-
-} // namespace set
-
-#else // BOOST_VERSION < 104800
-
-namespace set {
- void StripedSetHdrTest::Refinable_boost_vector()
- {
- CPPUNIT_MESSAGE( "Skipped; for boost::container::vector you should use boost version 1.48 or above" );
- }
-}
-#endif // BOOST_VERSION
+++ /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/hdr_striped_set.h"
-#include <cds/container/striped_set/std_hash_set.h>
-#include <cds/container/striped_set.h>
-#include <cds/sync/spinlock.h>
-
-namespace set {
-
- namespace {
- struct equal_item
- {
- template <typename T>
- bool operator ()( T const& i1, T const& i2) const
- {
- return i1.key() == i2.key();
- }
- };
-
- typedef std::unordered_set< StripedSetHdrTest::item, StripedSetHdrTest::hash_int, equal_item > set_t;
-
- struct my_copy_policy {
- typedef set_t::iterator iterator;
-
- void operator()( set_t& set, iterator itWhat )
- {
- set.insert( std::make_pair(itWhat->key(), itWhat->val()) );
- }
- };
- }
-
- void StripedSetHdrTest::Refinable_hashset()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- ,co::mutex_policy< cc::striped_set::refinable<> >
- > set_cmp;
- test_striped< set_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_less;
- test_striped< set_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::less< less<item> >
- > set_cmpmix;
- test_striped< set_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedSet< set_t
- , co::mutex_policy< cc::striped_set::refinable<cds::sync::reentrant_spin> >
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_spin;
- test_striped< set_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)");
- {
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > set_less_resizing_lf;
- set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>(1024));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- > set_less_resizing_lf16;
- test_striped< set_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024)");
- {
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > set_less_resizing_sbt;
- set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(1024) );
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> >
- > set_less_resizing_sbt16;
- test_striped< set_less_resizing_sbt16 >();
-
- // Copy policy
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped< set_copy_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped< set_swap_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped< set_move_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_item");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped< set_special_copy_item >();
- }
-
-} // 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/hdr_striped_set.h"
-#include <cds/container/striped_set/std_list.h>
-#include <cds/container/striped_set.h>
-#include <cds/sync/spinlock.h>
-
-namespace set {
-
- namespace {
- struct my_copy_policy {
- typedef std::list<StripedSetHdrTest::item> list_type;
- typedef list_type::iterator iterator;
-
- void operator()( list_type& list, iterator itInsert, iterator itWhat )
- {
- list.insert( itInsert, std::make_pair(itWhat->key(), itWhat->val()) );
- }
- };
-
- typedef std::list<StripedSetHdrTest::item> sequence_t;
- }
-
- void StripedSetHdrTest::Refinable_list()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- > set_cmp;
- test_striped2< set_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_less;
- test_striped2< set_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::less< less<item> >
- > set_cmpmix;
- test_striped2< set_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedSet< sequence_t
- , co::mutex_policy< cc::striped_set::refinable<cds::sync::reentrant_spin> >
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_spin;
- test_striped2< set_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > set_less_resizing_lf;
- set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>(8));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<4>");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<4> >
- > set_less_resizing_lf16;
- test_striped2< set_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > set_less_resizing_sbt;
- set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> >
- > set_less_resizing_sbt16;
- test_striped2< set_less_resizing_sbt16 >();
-
-
- // Copy policy
- CPPUNIT_MESSAGE( "copy_item");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped2< set_copy_item >();
-
- CPPUNIT_MESSAGE( "swap_item");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped2< set_swap_item >();
-
- CPPUNIT_MESSAGE( "move_item");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped2< set_move_item >();
-
- CPPUNIT_MESSAGE( "special copy policy");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped2< set_special_copy_item >();
- }
-
-} // 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/hdr_striped_set.h"
-#include <cds/container/striped_set/std_set.h>
-#include <cds/container/striped_set.h>
-#include <cds/sync/spinlock.h>
-
-namespace set {
-
- namespace {
- struct my_copy_policy {
- typedef std::set<StripedSetHdrTest::item, StripedSetHdrTest::less<StripedSetHdrTest::item> > set_type;
- typedef set_type::iterator iterator;
-
- void operator()( set_type& set, iterator itWhat )
- {
- set.insert( std::make_pair(itWhat->key(), itWhat->val()) );
- }
- };
-
- typedef std::set<StripedSetHdrTest::item, StripedSetHdrTest::less<StripedSetHdrTest::item> > set_t;
- }
-
- void StripedSetHdrTest::Refinable_set()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- ,co::mutex_policy< cc::striped_set::refinable<> >
- > set_cmp;
- test_striped< set_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_less;
- test_striped< set_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::less< less<item> >
- > set_cmpmix;
- test_striped< set_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedSet< set_t
- , co::mutex_policy< cc::striped_set::refinable<cds::sync::reentrant_spin> >
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_spin;
- test_striped< set_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)");
- {
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > set_less_resizing_lf;
- set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>(1024));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- > set_less_resizing_lf16;
- test_striped< set_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024)");
- {
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > set_less_resizing_sbt;
- set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(1024) );
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> >
- > set_less_resizing_sbt16;
- test_striped< set_less_resizing_sbt16 >();
-
- // Copy policy
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped< set_copy_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped< set_swap_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped< set_move_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_item");
- typedef cc::StripedSet< set_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped< set_special_copy_item >();
- }
-} // 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/hdr_striped_set.h"
-#include <boost/version.hpp>
-#include <cds/details/defs.h>
-#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500
-namespace set {
- void StripedSetHdrTest::Refinable_slist()
- {
- CPPUNIT_MESSAGE("Skipped; for Microsoft Visual C++ 2013 and boost::container::slist you should use boost version 1.56 or above");
- }
-}
-
-#elif BOOST_VERSION >= 104800
-
-#include <cds/container/striped_set/boost_slist.h>
-#include <cds/container/striped_set.h>
-#include <cds/sync/spinlock.h>
-
-namespace set {
-
- namespace {
- struct my_copy_policy {
- typedef boost::container::slist<StripedSetHdrTest::item> list_type;
- typedef list_type::iterator iterator;
-
- void operator()( list_type& list, iterator itInsert, iterator itWhat )
- {
- list.insert_after( itInsert, StripedSetHdrTest::item(std::make_pair(itWhat->key(), itWhat->val())) );
- }
- };
-
- typedef boost::container::slist<StripedSetHdrTest::item> sequence_t;
- }
-
- void StripedSetHdrTest::Refinable_slist()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- > set_cmp;
- test_striped2< set_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_less;
- test_striped2< set_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::less< less<item> >
- > set_cmpmix;
- test_striped2< set_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedSet< sequence_t
- , co::mutex_policy< cc::striped_set::refinable<cds::sync::reentrant_spin> >
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_spin;
- test_striped2< set_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > set_less_resizing_lf;
- set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>(8));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<4>");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<4> >
- > set_less_resizing_lf16;
- test_striped2< set_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > set_less_resizing_sbt;
- set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> >
- > set_less_resizing_sbt16;
- test_striped2< set_less_resizing_sbt16 >();
-
-
- // Copy policy
- CPPUNIT_MESSAGE( "copy_item");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped2< set_copy_item >();
-
- CPPUNIT_MESSAGE( "swap_item");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped2< set_swap_item >();
-
- CPPUNIT_MESSAGE( "move_item");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped2< set_move_item >();
-
- CPPUNIT_MESSAGE( "special copy policy");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped2< set_special_copy_item >();
- }
-
-} // namespace set
-
-#else
-
-namespace set {
- void StripedSetHdrTest::Refinable_slist()
- {
- CPPUNIT_MESSAGE("Skipped; for boost::container::slist you should use boost version 1.48 or above");
- }
-} // namespace set
-
-#endif
+++ /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/hdr_striped_set.h"
-#include <cds/container/striped_set/std_vector.h>
-#include <cds/container/striped_set.h>
-#include <cds/sync/spinlock.h>
-
-namespace set {
-
- namespace {
- struct my_copy_policy {
- typedef std::vector<StripedSetHdrTest::item> vector_type;
- typedef vector_type::iterator iterator;
-
- void operator()( vector_type& vec, iterator itInsert, iterator itWhat )
- {
- vec.insert( itInsert, std::make_pair(itWhat->key(), itWhat->val()) );
- }
- };
-
- typedef std::vector<StripedSetHdrTest::item> sequence_t;
- }
-
- void StripedSetHdrTest::Refinable_vector()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- > set_cmp;
- test_striped2< set_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_less;
- test_striped2< set_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::less< less<item> >
- > set_cmpmix;
- test_striped2< set_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedSet< sequence_t
- , co::mutex_policy< cc::striped_set::refinable<cds::sync::reentrant_spin> >
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_spin;
- test_striped2< set_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > set_less_resizing_lf;
- set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>(8));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<4>");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<4> >
- > set_less_resizing_lf16;
- test_striped2< set_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > set_less_resizing_sbt;
- set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> >
- > set_less_resizing_sbt16;
- test_striped2< set_less_resizing_sbt16 >();
-
-
- // Copy policy
- CPPUNIT_MESSAGE( "copy_item");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped2< set_copy_item >();
-
- CPPUNIT_MESSAGE( "swap_item");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped2< set_swap_item >();
-
- CPPUNIT_MESSAGE( "move_item");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped2< set_move_item >();
-
- CPPUNIT_MESSAGE( "special copy policy");
- typedef cc::StripedSet< sequence_t
- ,co::mutex_policy< cc::striped_set::refinable<> >
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped2< set_special_copy_item >();
- }
-
-} // 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.
-*/
-
-#ifndef CDSTEST_HDR_SET_H
-#define CDSTEST_HDR_SET_H
-
-#include "cppunit/cppunit_proxy.h"
-#include "size_check.h"
-
-#include <cds/opt/hash.h>
-#include <cds/os/timer.h>
-#include <functional> // ref
-
-// forward namespace declaration
-namespace cds {
- namespace container {}
- namespace opt {}
-}
-
-namespace set {
- using misc::check_size;
-
- namespace cc = cds::container;
- namespace co = cds::opt;
-
-
- class HashSetHdrTest: public CppUnitMini::TestCase
- {
- public:
- struct stat
- {
- unsigned int nFindCount ; // count of find-functor calling
- unsigned int nUpdateNewCount;
- unsigned int nUpdateCount;
-
- stat()
- {
- memset( this, 0, sizeof(*this));
- }
-
- void copy( stat const& s )
- {
- nFindCount = s.nFindCount;
- nUpdateCount = s.nUpdateCount;
- nUpdateNewCount = s.nUpdateNewCount;
- }
- };
-
- struct item: public stat
- {
- int nKey;
- int nVal;
-
- item()
- {}
-
- item( int key )
- : nKey( key )
- , nVal( key )
- {}
-
- item (int key, int val )
- : nKey(key)
- , nVal( val )
- {}
-
- item( std::pair<int,int> const& p )
- : nKey( p.first )
- , nVal( p.second )
- {}
-
- item( item const& i )
- : nKey( i.nKey )
- , nVal( i.nVal )
- {}
-
- item& operator=(item const& i)
- {
- nKey = i.nKey;
- nVal = i.nVal;
- stat::copy(i);
-
- return *this;
- }
-
- item( item&& i )
- : nKey( i.nKey )
- , nVal( i.nVal )
- {}
-
- //item& operator=(item&& i)
- //{
- // nKey = i.nKey;
- // nVal = i.nVal;
- // return *this;
- //}
-
- int key() const
- {
- return nKey;
- }
-
- int val() const
- {
- return nVal;
- }
- };
-
- struct hash_int {
- size_t operator()( int i ) const
- {
- return co::v::hash<int>()( i );
- }
-
- size_t operator()( std::pair<int,int> const& i ) const
- {
- return co::v::hash<int>()( i.first );
- }
-
- template <typename Item>
- size_t operator()( Item const& i ) const
- {
- return (*this)( i.key() );
- }
- };
-
- struct simple_item_counter {
- size_t m_nCount;
-
- simple_item_counter()
- : m_nCount(0)
- {}
-
- size_t operator ++()
- {
- return ++m_nCount;
- }
-
- size_t operator --()
- {
- return --m_nCount;
- }
-
- void reset()
- {
- m_nCount = 0;
- }
-
- operator size_t() const
- {
- return m_nCount;
- }
- };
-
- template <typename T>
- struct less
- {
- bool operator ()(const T& v1, const T& v2 ) const
- {
- return v1.key() < v2.key();
- }
-
- template <typename Q>
- bool operator ()(const T& v1, const Q& v2 ) const
- {
- return v1.key() < v2;
- }
-
- template <typename Q>
- bool operator ()(const Q& v1, const T& v2 ) const
- {
- return v1 < v2.key();
- }
-
- bool operator ()( std::pair<int, int> const& v1, const T& v2 ) const
- {
- return v1.first < v2.key();
- }
-
- bool operator ()(const T& v1, std::pair<int, int> const& v2 ) const
- {
- return v1.key() < v2.first;
- }
- };
-
- struct other_item {
- int nKey;
-
- other_item( int key )
- : nKey(key)
- {}
-
- int key() const
- {
- return nKey;
- }
- };
-
- struct other_less
- {
- template <typename T>
- bool operator ()(T const& v1, other_item const& v2 ) const
- {
- return v1.key() < v2.nKey;
- }
- template <typename T>
- bool operator ()(other_item const& v1, T const& v2 ) const
- {
- return v1.nKey < v2.key();
- }
- };
-
- template <typename T>
- struct cmp {
- int operator ()(const T& v1, const T& v2 ) const
- {
- if ( v1.key() < v2.key() )
- return -1;
- return v1.key() > v2.key() ? 1 : 0;
- }
-
- template <typename Q>
- int operator ()(const T& v1, const Q& v2 ) const
- {
- if ( v1.key() < v2 )
- return -1;
- return v1.key() > v2 ? 1 : 0;
- }
-
- template <typename Q>
- int operator ()(const Q& v1, const T& v2 ) const
- {
- if ( v1 < v2.key() )
- return -1;
- return v1 > v2.key() ? 1 : 0;
- }
-
- int operator()( std::pair<int,int> const& v1, T const& v2 ) const
- {
- if ( v1.first < v2.key() )
- return -1;
- return v1.first > v2.key() ? 1 : 0;
- }
-
- int operator()( T const& v1, std::pair<int,int> const& v2 ) const
- {
- if ( v1.key() < v2.first )
- return -1;
- return v1.key() > v2.first ? 1 : 0;
- }
- };
-
- template <typename T>
- struct equal
- {
- bool operator ()(const T& v1, const T& v2 ) const
- {
- return v1.key() == v2.key();
- }
-
- template <typename Q>
- bool operator ()(const T& v1, const Q& v2 ) const
- {
- return v1.key() == v2;
- }
-
- template <typename Q>
- bool operator ()(const Q& v1, const T& v2 ) const
- {
- return v1 == v2.key();
- }
-
- bool operator ()( std::pair<int, int> const& v1, const T& v2 ) const
- {
- return v1.first == v2.key();
- }
-
- bool operator ()(const T& v1, std::pair<int, int> const& v2 ) const
- {
- return v1.key() == v2.first;
- }
- };
-
- struct find_functor
- {
- template <typename Item, typename T>
- void operator()( Item& i, T& /*val*/ ) const
- {
- ++i.nFindCount;
- }
- template <typename Item, typename T>
- void operator()( Item& i, T const& /*val*/ ) const
- {
- ++i.nFindCount;
- }
- };
-
- template <typename Item>
- struct copy_found
- {
- Item m_found;
-
- template <typename T>
- void operator()( Item& i, T& /*val*/ )
- {
- m_found = i;
- }
-
- void operator()( Item const& i )
- {
- m_found = i;
- }
- };
-
- struct insert_functor
- {
- template <typename Item>
- void operator()(Item& i )
- {
- i.nVal = i.nKey * 100;
- }
- };
-
- template <typename Item, typename Q>
- static void udate_func( bool bNew, Item& i, Q& /*val*/ )
- {
- if ( bNew )
- ++i.nUpdateNewCount;
- else
- ++i.nUpdateCount;
- }
-
- struct udate_functor
- {
- template <typename Item, typename Q>
- void operator()( bool bNew, Item& i, Q& val )
- {
- udate_func( bNew, i, val );
- }
- };
-
- template <class Set>
- void test_int()
- {
- Set s( 100, 4 );
- test_int_with( s );
-
- // extract/get test
- CPPUNIT_ASSERT( s.empty() );
- {
- const int nLimit = 100;
- typename Set::guarded_ptr gp;
- int arrRandom[nLimit];
- for ( int i = 0; i < nLimit; ++i )
- arrRandom[i] = i;
- shuffle( arrRandom, arrRandom + nLimit );
-
- for ( int i = 0; i < nLimit; ++i )
- CPPUNIT_ASSERT( s.insert( arrRandom[i] ));
-
- for ( int i = 0; i < nLimit; ++i ) {
- int nKey = arrRandom[i];
- gp = s.get( nKey );
- CPPUNIT_ASSERT( gp );
- CPPUNIT_ASSERT( !gp.empty());
- CPPUNIT_CHECK( gp->nKey == nKey );
- CPPUNIT_CHECK( gp->nVal == nKey );
- gp.release();
-
- gp = s.extract( nKey );
- CPPUNIT_ASSERT( gp );
- CPPUNIT_ASSERT( !gp.empty());
- CPPUNIT_CHECK( gp->nKey == nKey );
- CPPUNIT_CHECK( gp->nVal == nKey );
- gp.release();
- CPPUNIT_CHECK( !s.get( nKey ) );
-
- gp = s.extract( nKey );
- CPPUNIT_CHECK( !gp );
- CPPUNIT_CHECK( gp.empty());
- }
- CPPUNIT_ASSERT( s.empty() );
-
-
- for ( int i = 0; i < nLimit; ++i )
- CPPUNIT_ASSERT( s.insert( arrRandom[i] ));
-
- for ( int i = 0; i < nLimit; ++i ) {
- int nKey = arrRandom[i];
- gp = s.get_with( other_item( nKey ), other_less() );
- CPPUNIT_ASSERT( gp );
- CPPUNIT_ASSERT( !gp.empty());
- CPPUNIT_CHECK( gp->nKey == nKey );
- CPPUNIT_CHECK( gp->nVal == nKey );
- gp.release();
-
- gp = s.extract_with( other_item( nKey ), other_less() );
- CPPUNIT_ASSERT( gp );
- CPPUNIT_ASSERT( !gp.empty());
- CPPUNIT_CHECK( gp->nKey == nKey );
- CPPUNIT_CHECK( gp->nVal == nKey );
- gp.release();
-
- gp = s.get_with( other_item( nKey ), other_less() );
- CPPUNIT_CHECK( !gp );
-
- CPPUNIT_CHECK( !s.extract_with(other_item(nKey), other_less() ));
- CPPUNIT_CHECK( gp.empty());
- }
- CPPUNIT_ASSERT( s.empty() );
- }
-
- // iterator test
- test_iter<Set>();
- }
-
- template <class Set>
- void test_int_rcu()
- {
- Set s( 100, 4 );
- test_int_with( s );
-
- // extract/get test
- {
- typedef typename Set::gc rcu;
- typedef typename Set::rcu_lock rcu_lock;
- typedef typename Set::value_type value_type;
- typename Set::exempt_ptr ep;
-
- static size_t const nLimit = 100;
- int arr[nLimit];
- for ( size_t i = 0; i < nLimit; ++i )
- arr[i] = (int) i;
- shuffle( arr, arr + nLimit );
-
- for ( size_t i = 0; i < nLimit; ++i )
- CPPUNIT_ASSERT( s.insert( arr[i] ));
-
- for ( size_t i = 0; i < nLimit; i += 2 ) {
- value_type * pVal;
- int nKey = arr[i];
- {
- rcu_lock l;
- pVal = s.get( nKey );
- CPPUNIT_ASSERT( pVal != nullptr );
- CPPUNIT_CHECK( pVal->nKey == nKey );
- CPPUNIT_CHECK( pVal->nVal == nKey );
-
- ep = s.extract( nKey );
- CPPUNIT_ASSERT( ep );
- CPPUNIT_ASSERT( !ep.empty() );
- CPPUNIT_CHECK( pVal->nKey == ep->nKey );
- CPPUNIT_CHECK( pVal->nVal == (*ep).nVal );
- }
- ep.release();
- {
- rcu_lock l;
- CPPUNIT_CHECK( s.get( nKey ) == nullptr );
- ep = s.extract( nKey );
- CPPUNIT_CHECK( !ep );
- CPPUNIT_CHECK( ep.empty() );
-
- nKey = arr[i+1];
- pVal = s.get_with( other_item(nKey), other_less() );
- CPPUNIT_ASSERT( pVal != nullptr );
- CPPUNIT_CHECK( pVal->nKey == nKey );
- CPPUNIT_CHECK( pVal->nVal == nKey );
-
- ep = s.extract_with( other_item( nKey ), other_less() );
- CPPUNIT_ASSERT( ep );
- CPPUNIT_ASSERT( !ep.empty() );
- CPPUNIT_CHECK( pVal->nKey == ep->nKey );
- CPPUNIT_CHECK( pVal->nVal == (*ep).nVal );
- }
- ep.release();
- {
- rcu_lock l;
- CPPUNIT_CHECK( s.get_with( other_item( nKey ), other_less() ) == nullptr );
- CPPUNIT_CHECK( !s.extract_with( other_item(nKey), other_less() ));
- CPPUNIT_CHECK( ep.empty() );
- }
- }
- CPPUNIT_CHECK( s.empty() );
- CPPUNIT_CHECK( check_size( s, 0 ));
- {
- rcu_lock l;
- CPPUNIT_CHECK( s.get( int( nLimit / 2 ) ) == nullptr );
- ep = s.extract( int( nLimit / 2 ) );
- CPPUNIT_CHECK( !ep );
- CPPUNIT_CHECK( ep.empty() );
- }
- }
-
- // iterator test
- test_iter<Set>();
- }
-
- template <class Set>
- void test_int_rcu_michael_list()
- {
- Set s( 100, 4 );
- test_int_with( s );
-
- // extract/get test
- {
- typedef typename Set::gc rcu;
- typedef typename Set::rcu_lock rcu_lock;
- typedef typename Set::value_type value_type;
- typename Set::exempt_ptr ep;
- typename Set::raw_ptr gp;
-
- static size_t const nLimit = 100;
- int arr[nLimit];
- for ( size_t i = 0; i < nLimit; ++i )
- arr[i] = (int) i;
- shuffle( arr, arr + nLimit );
-
- for ( size_t i = 0; i < nLimit; ++i )
- CPPUNIT_ASSERT( s.insert( arr[i] ));
-
- for ( size_t i = 0; i < nLimit; i += 2 ) {
- int nKey = arr[i];
- {
- rcu_lock l;
- gp = s.get( nKey );
- CPPUNIT_ASSERT( gp );
- CPPUNIT_CHECK( gp->nKey == nKey );
- CPPUNIT_CHECK( gp->nVal == nKey );
- }
- gp.release();
-
- ep = s.extract( nKey );
- CPPUNIT_ASSERT( ep );
- CPPUNIT_ASSERT( !ep.empty() );
- CPPUNIT_CHECK( nKey == ep->nKey );
- CPPUNIT_CHECK( nKey == (*ep).nVal );
- ep.release();
-
- {
- rcu_lock l;
- CPPUNIT_CHECK( !s.get( nKey ));
- }
- ep = s.extract( nKey );
- CPPUNIT_CHECK( !ep );
- CPPUNIT_CHECK( ep.empty() );
-
- {
- rcu_lock l;
- nKey = arr[i+1];
- gp = s.get_with( other_item(nKey), other_less() );
- CPPUNIT_ASSERT( gp );
- CPPUNIT_CHECK( gp->nKey == nKey );
- CPPUNIT_CHECK( gp->nVal == nKey );
- }
- gp.release();
-
- ep = s.extract_with( other_item( nKey ), other_less() );
- CPPUNIT_ASSERT( ep );
- CPPUNIT_ASSERT( !ep.empty() );
- CPPUNIT_CHECK( nKey == ep->nKey );
- CPPUNIT_CHECK( nKey == (*ep).nVal );
- ep.release();
-
- {
- rcu_lock l;
- CPPUNIT_CHECK( !s.get_with( other_item( nKey ), other_less()));
- }
- CPPUNIT_CHECK( !s.extract_with( other_item(nKey), other_less() ));
- CPPUNIT_CHECK( ep.empty() );
- }
- CPPUNIT_CHECK( s.empty() );
- CPPUNIT_CHECK( check_size( s, 0 ));
-
- {
- rcu_lock l;
- CPPUNIT_CHECK( !s.get( int( nLimit / 2 )));
- }
-
- ep = s.extract( int( nLimit / 2 ) );
- CPPUNIT_CHECK( !ep );
- CPPUNIT_CHECK( ep.empty() );
- }
-
- // iterator test
- test_iter<Set>();
- }
-
-
- template <class Set>
- void test_int_with( Set& s)
- {
- typedef typename Set::value_type value_type;
-
- item itm;
- int key;
-
- // insert/find test
- CPPUNIT_ASSERT( !s.contains( 10 ) );
- CPPUNIT_ASSERT( s.insert( 10 ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 1 ));
- CPPUNIT_ASSERT( s.contains( 10 ) );
-
- CPPUNIT_ASSERT( !s.insert( 10 ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 1 ));
-
- CPPUNIT_ASSERT( !s.contains( 20, less<value_type>() ) );
- CPPUNIT_ASSERT( s.insert( std::make_pair(20, 25) ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 2 ));
- CPPUNIT_ASSERT( s.contains( 10, less<value_type>() ) );
- CPPUNIT_ASSERT( s.contains( key = 20 ) );
- CPPUNIT_ASSERT( s.find_with( key, less<value_type>(), find_functor() ) );
- {
- copy_found<item> f;
- key = 20;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 20 );
- CPPUNIT_ASSERT( f.m_found.nVal == 25 );
- CPPUNIT_ASSERT( f.m_found.nFindCount == 1 );
- }
- CPPUNIT_ASSERT( s.find( key, find_functor() ) );
- {
- copy_found<item> f;
- key = 20;
- CPPUNIT_ASSERT( s.find_with( key, less<value_type>(), std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 20 );
- CPPUNIT_ASSERT( f.m_found.nVal == 25 );
- CPPUNIT_ASSERT( f.m_found.nFindCount == 2 );
- }
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 2 ));
-
- CPPUNIT_ASSERT( !s.contains( 25 ) );
- CPPUNIT_ASSERT( s.insert( std::make_pair(25, -1), insert_functor() ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
- {
- copy_found<item> f;
- key = 25;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 25 );
- CPPUNIT_ASSERT( f.m_found.nVal == 2500 );
- }
-
- // update test
- key = 10;
- {
- copy_found<item> f;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 10 );
- CPPUNIT_ASSERT( f.m_found.nVal == 10 );
- CPPUNIT_ASSERT( f.m_found.nUpdateCount == 0 );
- CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 0 );
- }
- std::pair<bool, bool> updateResult = s.update( key, udate_functor() );
- CPPUNIT_ASSERT( updateResult.first && !updateResult.second );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
- {
- copy_found<item> f;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 10 );
- CPPUNIT_ASSERT( f.m_found.nVal == 10 );
- CPPUNIT_ASSERT( f.m_found.nUpdateCount == 1 );
- CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 0 );
- }
-
- updateResult = s.update(std::make_pair(13, 1300), udate_functor(), false);
- CPPUNIT_ASSERT(!updateResult.first && !updateResult.second);
- CPPUNIT_ASSERT(check_size(s, 3));
-
- updateResult = s.update( std::make_pair(13, 1300), udate_functor() );
- CPPUNIT_ASSERT( updateResult.first && updateResult.second );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 4 ));
- {
- copy_found<item> f;
- key = 13;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 13 );
- CPPUNIT_ASSERT( f.m_found.nVal == 1300 );
- CPPUNIT_ASSERT( f.m_found.nUpdateCount == 0 );
- CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 1 );
- }
-
- // erase test
- CPPUNIT_ASSERT( s.erase(13) );
- CPPUNIT_ASSERT( !s.contains( 13 ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
- CPPUNIT_ASSERT( !s.erase(13) );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- CPPUNIT_ASSERT( s.contains( 10 ));
- CPPUNIT_ASSERT( s.erase_with( 10, less<value_type>() ));
- CPPUNIT_ASSERT( !s.contains( 10 ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 2 ));
- CPPUNIT_ASSERT( !s.erase_with(10, less<value_type>()) );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 2 ));
-
- CPPUNIT_ASSERT( s.contains(20) );
- {
- copy_found<item> f;
- CPPUNIT_ASSERT( s.erase( 20, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 20 );
- CPPUNIT_ASSERT( f.m_found.nVal == 25 );
-
- CPPUNIT_ASSERT( s.insert(235))
- CPPUNIT_ASSERT( s.erase_with( 235, less<value_type>(), std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 235 );
- CPPUNIT_ASSERT( f.m_found.nVal == 235 );
- }
- CPPUNIT_ASSERT( !s.contains( 20 ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 1 ));
-
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
-
- // emplace test
- CPPUNIT_ASSERT( s.emplace( 151 )) ; // key = 151, val = 151
- CPPUNIT_ASSERT( s.emplace( 174, 471 )) ; // key = 174, val = 471
- CPPUNIT_ASSERT( s.emplace( std::make_pair( 190, 91 ) )) ; // key == 190, val = 91
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- CPPUNIT_ASSERT( s.contains(151));
- CPPUNIT_ASSERT( s.contains(174, less<value_type>()));
- CPPUNIT_ASSERT( s.contains(190));
-
- {
- copy_found<item> f;
- key = 151;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 151 );
- CPPUNIT_ASSERT( f.m_found.nVal == 151 );
-
- key = 174;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 174 );
- CPPUNIT_ASSERT( f.m_found.nVal == 471 );
-
- key = 190;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 190 );
- CPPUNIT_ASSERT( f.m_found.nVal == 91 );
- }
-
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
- }
-
-
- template <class Set>
- void test_int_nogc()
- {
- typedef typename Set::value_type value_type;
- typedef typename Set::iterator iterator;
- typedef typename Set::const_iterator const_iterator;
-
- {
- Set s( 52, 4 );
- iterator it;
-
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
-
- // insert
- it = s.insert( 10 );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 10 );
- CPPUNIT_ASSERT( it->val() == 10 );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 1 ));
- CPPUNIT_ASSERT( s.insert( 10 ) == s.end() );
-
- it = s.insert( std::make_pair( 50, 25 ));
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 50 );
- CPPUNIT_ASSERT( it->val() == 25 );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 2 ));
- CPPUNIT_ASSERT( s.insert( 50 ) == s.end() );
-
- // update
- std::pair< iterator, bool> updateResult;
- updateResult = s.update(20, false);
- CPPUNIT_ASSERT(updateResult.first == s.end());
- CPPUNIT_ASSERT(!updateResult.second);
- CPPUNIT_ASSERT(check_size(s, 2));
-
- updateResult = s.update( 20 );
- CPPUNIT_ASSERT( updateResult.first != s.end() );
- CPPUNIT_ASSERT( updateResult.second );
- CPPUNIT_ASSERT( updateResult.first->key() == 20 );
- CPPUNIT_ASSERT( updateResult.first->val() == 20 );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- updateResult = s.update( std::make_pair( 20, 200 ));
- CPPUNIT_ASSERT( updateResult.first != s.end() );
- CPPUNIT_ASSERT( !updateResult.second );
- CPPUNIT_ASSERT( updateResult.first->key() == 20 );
- CPPUNIT_ASSERT( updateResult.first->val() == 20 );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
- updateResult.first->nVal = 22;
-
- updateResult = s.update( std::make_pair( 30, 33 ));
- CPPUNIT_ASSERT( updateResult.first != s.end() );
- CPPUNIT_ASSERT( updateResult.second );
- CPPUNIT_ASSERT( updateResult.first->key() == 30 );
- CPPUNIT_ASSERT( updateResult.first->val() == 33 );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 4 ));
-
- // find
- it = s.contains( 10 );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 10 );
- CPPUNIT_ASSERT( it->val() == 10 );
-
- it = s.contains( 20, less<value_type>() );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 20 );
- CPPUNIT_ASSERT( it->val() == 22 );
-
- it = s.contains( 30 );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 30 );
- CPPUNIT_ASSERT( it->val() == 33 );
-
- it = s.contains( 40 );
- CPPUNIT_ASSERT( it == s.end() );
-
- it = s.contains( 50 );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 50 );
- CPPUNIT_ASSERT( it->val() == 25 );
-
- // emplace test
- it = s.emplace( 151 ) ; // key = 151, val = 151
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 151 );
- CPPUNIT_ASSERT( it->val() == 151 );
-
- it = s.emplace( 174, 471 ) ; // key == 174, val = 471
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 174 );
- CPPUNIT_ASSERT( it->val() == 471 );
-
- it = s.emplace( std::make_pair( 190, 91 )) ; // key == 190, val = 91
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 190 );
- CPPUNIT_ASSERT( it->val() == 91 );
-
- it = s.contains( 174 );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 174 );
- CPPUNIT_ASSERT( it->val() == 471 );
-
- it = s.contains( 190, less<value_type>() );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 190 );
- CPPUNIT_ASSERT( it->val() == 91 );
-
- it = s.contains( 151 );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 151 );
- CPPUNIT_ASSERT( it->val() == 151 );
-
- //s.clear();
- //CPPUNIT_ASSERT( s.empty() );
- //CPPUNIT_ASSERT( check_size( s, 0 ));
- }
-
- {
- Set s( 52, 4 );
-
- // iterator test
- for ( int i = 0; i < 500; ++i ) {
- CPPUNIT_ASSERT( s.insert( std::make_pair( i, i * 2) ) != s.end() );
- }
- for ( iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- iterator it2 = it;
- CPPUNIT_CHECK( it2 == it );
- CPPUNIT_CHECK( it2 != itEnd );
- CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal );
- it->nVal = (*it).nKey;
- }
-
- Set const& refSet = s;
- for ( const_iterator it = refSet.begin(), itEnd = refSet.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey == it->nVal );
- }
- }
- }
-
- template <class Set>
- void test_int_nogc_unordered()
- {
- typedef typename Set::value_type value_type;
- typedef typename Set::iterator iterator;
- typedef typename Set::const_iterator const_iterator;
-
- {
- Set s( 52, 4 );
- iterator it;
-
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
-
- // insert
- it = s.insert( 10 );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 10 );
- CPPUNIT_ASSERT( it->val() == 10 );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 1 ));
- CPPUNIT_ASSERT( s.insert( 10 ) == s.end() );
-
- it = s.insert( std::make_pair( 50, 25 ));
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 50 );
- CPPUNIT_ASSERT( it->val() == 25 );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 2 ));
- CPPUNIT_ASSERT( s.insert( 50 ) == s.end() );
-
- // update
- std::pair< iterator, bool> updateResult;
- updateResult = s.update(20, false);
- CPPUNIT_ASSERT(updateResult.first == s.end());
- CPPUNIT_ASSERT(!updateResult.second);
- CPPUNIT_ASSERT(check_size(s, 2));
-
- updateResult = s.update( 20 );
- CPPUNIT_ASSERT( updateResult.first != s.end() );
- CPPUNIT_ASSERT( updateResult.second );
- CPPUNIT_ASSERT( updateResult.first->key() == 20 );
- CPPUNIT_ASSERT( updateResult.first->val() == 20 );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- updateResult = s.update( std::make_pair( 20, 200 ));
- CPPUNIT_ASSERT( updateResult.first != s.end() );
- CPPUNIT_ASSERT( !updateResult.second );
- CPPUNIT_ASSERT( updateResult.first->key() == 20 );
- CPPUNIT_ASSERT( updateResult.first->val() == 20 );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
- updateResult.first->nVal = 22;
-
- updateResult = s.update( std::make_pair( 30, 33 ));
- CPPUNIT_ASSERT( updateResult.first != s.end() );
- CPPUNIT_ASSERT( updateResult.second );
- CPPUNIT_ASSERT( updateResult.first->key() == 30 );
- CPPUNIT_ASSERT( updateResult.first->val() == 33 );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 4 ));
-
- // find
- it = s.contains( 10 );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 10 );
- CPPUNIT_ASSERT( it->val() == 10 );
-
- it = s.contains( 20, equal<value_type>() );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 20 );
- CPPUNIT_ASSERT( it->val() == 22 );
-
- it = s.contains( 30 );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 30 );
- CPPUNIT_ASSERT( it->val() == 33 );
-
- it = s.contains( 40 );
- CPPUNIT_ASSERT( it == s.end() );
-
- it = s.contains( 50 );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 50 );
- CPPUNIT_ASSERT( it->val() == 25 );
-
- // emplace test
- it = s.emplace( 151 ) ; // key = 151, val = 151
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 151 );
- CPPUNIT_ASSERT( it->val() == 151 );
-
- it = s.emplace( 174, 471 ) ; // key == 174, val = 471
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 174 );
- CPPUNIT_ASSERT( it->val() == 471 );
-
- it = s.emplace( std::make_pair( 190, 91 )) ; // key == 190, val = 91
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 190 );
- CPPUNIT_ASSERT( it->val() == 91 );
-
- it = s.contains( 174 );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 174 );
- CPPUNIT_ASSERT( it->val() == 471 );
-
- it = s.contains( 190, equal<value_type>() );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 190 );
- CPPUNIT_ASSERT( it->val() == 91 );
-
- it = s.contains( 151 );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 151 );
- CPPUNIT_ASSERT( it->val() == 151 );
-
- //s.clear();
- //CPPUNIT_ASSERT( s.empty() );
- //CPPUNIT_ASSERT( check_size( s, 0 ));
- }
-
- {
- Set s( 52, 4 );
-
- // iterator test
- for ( int i = 0; i < 500; ++i ) {
- CPPUNIT_ASSERT( s.insert( std::make_pair( i, i * 2) ) != s.end() );
- }
- for ( iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- iterator it2 = it;
- CPPUNIT_CHECK( it2 == it );
- CPPUNIT_CHECK( it2 != itEnd );
- CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal );
- it->nVal = (*it).nKey;
- }
-
- Set const& refSet = s;
- for ( const_iterator it = refSet.begin(), itEnd = refSet.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey == it->nVal );
- }
- }
- }
- template <class Set>
- void test_iter()
- {
- typedef typename Set::value_type value_type;
- typedef typename Set::iterator iterator;
- typedef typename Set::const_iterator const_iterator;
-
- Set s( 100, 4 );
-
- const size_t nMaxCount = 500;
- for ( int i = 0; size_t(i) < nMaxCount; ++i ) {
- CPPUNIT_ASSERT( s.insert( std::make_pair( i, i * 2) ));
- }
-
- {
- typename Set::iterator it( s.begin() );
- typename Set::const_iterator cit( s.cbegin() );
- CPPUNIT_CHECK( it == cit );
- CPPUNIT_CHECK( it != s.end() );
- CPPUNIT_CHECK( it != s.cend() );
- CPPUNIT_CHECK( cit != s.end() );
- CPPUNIT_CHECK( cit != s.cend() );
- ++it;
- CPPUNIT_CHECK( it != cit );
- CPPUNIT_CHECK( it != s.end() );
- CPPUNIT_CHECK( it != s.cend() );
- CPPUNIT_CHECK( cit != s.end() );
- CPPUNIT_CHECK( cit != s.cend() );
- ++cit;
- CPPUNIT_CHECK( it == cit );
- CPPUNIT_CHECK( it != s.end() );
- CPPUNIT_CHECK( it != s.cend() );
- CPPUNIT_CHECK( cit != s.end() );
- CPPUNIT_CHECK( cit != s.cend() );
- }
-
- size_t nCount = 0;
- for ( iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT_EX( (*it).nKey * 2 == it->nVal,
- "Step " << nCount << ": Iterator key=" << it->nKey << ", value expected=" << it->nKey * 2 << ", value real=" << it->nVal
- );
- it->nVal = (*it).nKey;
- ++nCount;
- }
- CPPUNIT_ASSERT( nCount == nMaxCount );
-
- nCount = 0;
- Set const& refSet = s;
- for ( const_iterator it = refSet.begin(), itEnd = refSet.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT_EX( (*it).nKey == it->nVal,
- "Step " << nCount << ": Iterator key=" << it->nKey << ", value expected=" << it->nKey << ", value real=" << it->nVal
- );
- ++nCount;
- }
- CPPUNIT_ASSERT( nCount == nMaxCount );
- }
-
- void Michael_HP_cmp();
- void Michael_HP_less();
- void Michael_HP_cmpmix();
-
- void Michael_DHP_cmp();
- void Michael_DHP_less();
- void Michael_DHP_cmpmix();
-
- void Michael_RCU_GPI_cmp();
- void Michael_RCU_GPI_less();
- void Michael_RCU_GPI_cmpmix();
-
- void Michael_RCU_GPT_cmp();
- void Michael_RCU_GPT_less();
- void Michael_RCU_GPT_cmpmix();
-
- void Michael_RCU_GPB_cmp();
- void Michael_RCU_GPB_less();
- void Michael_RCU_GPB_cmpmix();
-
- void Michael_RCU_SHT_cmp();
- void Michael_RCU_SHT_less();
- void Michael_RCU_SHT_cmpmix();
-
- void Michael_RCU_SHB_cmp();
- void Michael_RCU_SHB_less();
- void Michael_RCU_SHB_cmpmix();
-
- void Michael_nogc_cmp();
- void Michael_nogc_less();
- void Michael_nogc_cmpmix();
-
- void Lazy_HP_cmp();
- void Lazy_HP_less();
- void Lazy_HP_cmpmix();
-
- void Lazy_DHP_cmp();
- void Lazy_DHP_less();
- void Lazy_DHP_cmpmix();
-
- void Lazy_RCU_GPI_cmp();
- void Lazy_RCU_GPI_less();
- void Lazy_RCU_GPI_cmpmix();
-
- void Lazy_RCU_GPB_cmp();
- void Lazy_RCU_GPB_less();
- void Lazy_RCU_GPB_cmpmix();
-
- void Lazy_RCU_GPT_cmp();
- void Lazy_RCU_GPT_less();
- void Lazy_RCU_GPT_cmpmix();
-
- void Lazy_RCU_SHB_cmp();
- void Lazy_RCU_SHB_less();
- void Lazy_RCU_SHB_cmpmix();
-
- void Lazy_RCU_SHT_cmp();
- void Lazy_RCU_SHT_less();
- void Lazy_RCU_SHT_cmpmix();
-
- void Lazy_nogc_cmp();
- void Lazy_nogc_less();
- void Lazy_nogc_equal();
- void Lazy_nogc_cmpmix();
-
- void Split_HP_cmp();
- void Split_HP_less();
- void Split_HP_cmpmix();
- void Split_HP_cmpmix_stat();
-
- void Split_DHP_cmp();
- void Split_DHP_less();
- void Split_DHP_cmpmix();
- void Split_DHP_cmpmix_stat();
-
- void Split_RCU_GPI_cmp();
- void Split_RCU_GPI_less();
- void Split_RCU_GPI_cmpmix();
- void Split_RCU_GPI_cmpmix_stat();
-
- void Split_RCU_GPB_cmp();
- void Split_RCU_GPB_less();
- void Split_RCU_GPB_cmpmix();
- void Split_RCU_GPB_cmpmix_stat();
-
- void Split_RCU_GPT_cmp();
- void Split_RCU_GPT_less();
- void Split_RCU_GPT_cmpmix();
- void Split_RCU_GPT_cmpmix_stat();
-
- void Split_RCU_SHB_cmp();
- void Split_RCU_SHB_less();
- void Split_RCU_SHB_cmpmix();
- void Split_RCU_SHB_cmpmix_stat();
-
- void Split_RCU_SHT_cmp();
- void Split_RCU_SHT_less();
- void Split_RCU_SHT_cmpmix();
- void Split_RCU_SHT_cmpmix_stat();
-
- void Split_nogc_cmp();
- void Split_nogc_less();
- void Split_nogc_cmpmix();
- void Split_nogc_cmpmix_stat();
-
-
- void Split_Lazy_HP_cmp();
- void Split_Lazy_HP_less();
- void Split_Lazy_HP_cmpmix();
- void Split_Lazy_HP_cmpmix_stat();
-
- void Split_Lazy_DHP_cmp();
- void Split_Lazy_DHP_less();
- void Split_Lazy_DHP_cmpmix();
- void Split_Lazy_DHP_cmpmix_stat();
-
- void Split_Lazy_RCU_GPI_cmp();
- void Split_Lazy_RCU_GPI_less();
- void Split_Lazy_RCU_GPI_cmpmix();
- void Split_Lazy_RCU_GPI_cmpmix_stat();
-
- void Split_Lazy_RCU_GPB_cmp();
- void Split_Lazy_RCU_GPB_less();
- void Split_Lazy_RCU_GPB_cmpmix();
- void Split_Lazy_RCU_GPB_cmpmix_stat();
-
- void Split_Lazy_RCU_GPT_cmp();
- void Split_Lazy_RCU_GPT_less();
- void Split_Lazy_RCU_GPT_cmpmix();
- void Split_Lazy_RCU_GPT_cmpmix_stat();
-
- void Split_Lazy_RCU_SHB_cmp();
- void Split_Lazy_RCU_SHB_less();
- void Split_Lazy_RCU_SHB_cmpmix();
- void Split_Lazy_RCU_SHB_cmpmix_stat();
-
- void Split_Lazy_RCU_SHT_cmp();
- void Split_Lazy_RCU_SHT_less();
- void Split_Lazy_RCU_SHT_cmpmix();
- void Split_Lazy_RCU_SHT_cmpmix_stat();
-
- void Split_Lazy_nogc_cmp();
- void Split_Lazy_nogc_less();
- void Split_Lazy_nogc_cmpmix();
- void Split_Lazy_nogc_cmpmix_stat();
-
- CPPUNIT_TEST_SUITE(HashSetHdrTest)
- CPPUNIT_TEST(Michael_HP_cmp)
- CPPUNIT_TEST(Michael_HP_less)
- CPPUNIT_TEST(Michael_HP_cmpmix)
-
- CPPUNIT_TEST(Michael_DHP_cmp)
- CPPUNIT_TEST(Michael_DHP_less)
- CPPUNIT_TEST(Michael_DHP_cmpmix)
-
- CPPUNIT_TEST(Michael_RCU_GPI_cmp)
- CPPUNIT_TEST(Michael_RCU_GPI_less)
- CPPUNIT_TEST(Michael_RCU_GPI_cmpmix)
-
- CPPUNIT_TEST(Michael_RCU_GPB_cmp)
- CPPUNIT_TEST(Michael_RCU_GPB_less)
- CPPUNIT_TEST(Michael_RCU_GPB_cmpmix)
-
- CPPUNIT_TEST(Michael_RCU_GPT_cmp)
- CPPUNIT_TEST(Michael_RCU_GPT_less)
- CPPUNIT_TEST(Michael_RCU_GPT_cmpmix)
-
- CPPUNIT_TEST(Michael_RCU_SHB_cmp)
- CPPUNIT_TEST(Michael_RCU_SHB_less)
- CPPUNIT_TEST(Michael_RCU_SHB_cmpmix)
-
- CPPUNIT_TEST(Michael_RCU_SHT_cmp)
- CPPUNIT_TEST(Michael_RCU_SHT_less)
- CPPUNIT_TEST(Michael_RCU_SHT_cmpmix)
-
- CPPUNIT_TEST(Michael_nogc_cmp)
- CPPUNIT_TEST(Michael_nogc_less)
- CPPUNIT_TEST(Michael_nogc_cmpmix)
-
- CPPUNIT_TEST(Lazy_HP_cmp)
- CPPUNIT_TEST(Lazy_HP_less)
- CPPUNIT_TEST(Lazy_HP_cmpmix)
-
- CPPUNIT_TEST(Lazy_DHP_cmp)
- CPPUNIT_TEST(Lazy_DHP_less)
- CPPUNIT_TEST(Lazy_DHP_cmpmix)
-
- CPPUNIT_TEST(Lazy_RCU_GPI_cmp)
- CPPUNIT_TEST(Lazy_RCU_GPI_less)
- CPPUNIT_TEST(Lazy_RCU_GPI_cmpmix)
-
- CPPUNIT_TEST(Lazy_RCU_GPB_cmp)
- CPPUNIT_TEST(Lazy_RCU_GPB_less)
- CPPUNIT_TEST(Lazy_RCU_GPB_cmpmix)
-
- CPPUNIT_TEST(Lazy_RCU_GPT_cmp)
- CPPUNIT_TEST(Lazy_RCU_GPT_less)
- CPPUNIT_TEST(Lazy_RCU_GPT_cmpmix)
-
- CPPUNIT_TEST(Lazy_RCU_SHB_cmp)
- CPPUNIT_TEST(Lazy_RCU_SHB_less)
- CPPUNIT_TEST(Lazy_RCU_SHB_cmpmix)
-
- CPPUNIT_TEST(Lazy_RCU_SHT_cmp)
- CPPUNIT_TEST(Lazy_RCU_SHT_less)
- CPPUNIT_TEST(Lazy_RCU_SHT_cmpmix)
-
- CPPUNIT_TEST(Lazy_nogc_cmp)
- CPPUNIT_TEST(Lazy_nogc_less)
- CPPUNIT_TEST(Lazy_nogc_equal)
- CPPUNIT_TEST(Lazy_nogc_cmpmix)
-
- CPPUNIT_TEST(Split_HP_cmp)
- CPPUNIT_TEST(Split_HP_less)
- CPPUNIT_TEST(Split_HP_cmpmix)
- CPPUNIT_TEST( Split_HP_cmpmix_stat )
-
- CPPUNIT_TEST(Split_DHP_cmp)
- CPPUNIT_TEST(Split_DHP_less)
- CPPUNIT_TEST(Split_DHP_cmpmix)
- CPPUNIT_TEST( Split_DHP_cmpmix_stat )
-
- CPPUNIT_TEST(Split_RCU_GPI_cmp)
- CPPUNIT_TEST(Split_RCU_GPI_less)
- CPPUNIT_TEST(Split_RCU_GPI_cmpmix)
- CPPUNIT_TEST( Split_RCU_GPI_cmpmix_stat )
-
- CPPUNIT_TEST(Split_RCU_GPB_cmp)
- CPPUNIT_TEST(Split_RCU_GPB_less)
- CPPUNIT_TEST(Split_RCU_GPB_cmpmix)
- CPPUNIT_TEST( Split_RCU_GPB_cmpmix_stat )
-
- CPPUNIT_TEST(Split_RCU_GPT_cmp)
- CPPUNIT_TEST(Split_RCU_GPT_less)
- CPPUNIT_TEST(Split_RCU_GPT_cmpmix)
- CPPUNIT_TEST( Split_RCU_GPT_cmpmix_stat )
-
- CPPUNIT_TEST(Split_RCU_SHB_cmp)
- CPPUNIT_TEST(Split_RCU_SHB_less)
- CPPUNIT_TEST(Split_RCU_SHB_cmpmix)
- CPPUNIT_TEST( Split_RCU_SHB_cmpmix_stat )
-
- CPPUNIT_TEST(Split_RCU_SHT_cmp)
- CPPUNIT_TEST(Split_RCU_SHT_less)
- CPPUNIT_TEST(Split_RCU_SHT_cmpmix)
- CPPUNIT_TEST( Split_RCU_SHT_cmpmix_stat )
-
- CPPUNIT_TEST(Split_nogc_cmp)
- CPPUNIT_TEST(Split_nogc_less)
- CPPUNIT_TEST(Split_nogc_cmpmix)
- CPPUNIT_TEST( Split_nogc_cmpmix_stat )
-
- CPPUNIT_TEST(Split_Lazy_HP_cmp)
- CPPUNIT_TEST(Split_Lazy_HP_less)
- CPPUNIT_TEST(Split_Lazy_HP_cmpmix)
- CPPUNIT_TEST( Split_Lazy_HP_cmpmix_stat )
-
- CPPUNIT_TEST(Split_Lazy_DHP_cmp)
- CPPUNIT_TEST(Split_Lazy_DHP_less)
- CPPUNIT_TEST(Split_Lazy_DHP_cmpmix)
- CPPUNIT_TEST( Split_Lazy_DHP_cmpmix_stat )
-
- CPPUNIT_TEST(Split_Lazy_RCU_GPI_cmp)
- CPPUNIT_TEST(Split_Lazy_RCU_GPI_less)
- CPPUNIT_TEST(Split_Lazy_RCU_GPI_cmpmix)
- CPPUNIT_TEST( Split_Lazy_RCU_GPI_cmpmix_stat )
-
- CPPUNIT_TEST(Split_Lazy_RCU_GPB_cmp)
- CPPUNIT_TEST(Split_Lazy_RCU_GPB_less)
- CPPUNIT_TEST(Split_Lazy_RCU_GPB_cmpmix)
- CPPUNIT_TEST( Split_Lazy_RCU_GPB_cmpmix_stat )
-
- CPPUNIT_TEST(Split_Lazy_RCU_GPT_cmp)
- CPPUNIT_TEST(Split_Lazy_RCU_GPT_less)
- CPPUNIT_TEST(Split_Lazy_RCU_GPT_cmpmix)
- CPPUNIT_TEST( Split_Lazy_RCU_GPT_cmpmix_stat )
-
- CPPUNIT_TEST(Split_Lazy_RCU_SHB_cmp)
- CPPUNIT_TEST(Split_Lazy_RCU_SHB_less)
- CPPUNIT_TEST(Split_Lazy_RCU_SHB_cmpmix)
- CPPUNIT_TEST( Split_Lazy_RCU_SHB_cmpmix_stat )
-
- CPPUNIT_TEST(Split_Lazy_RCU_SHT_cmp)
- CPPUNIT_TEST(Split_Lazy_RCU_SHT_less)
- CPPUNIT_TEST(Split_Lazy_RCU_SHT_cmpmix)
- CPPUNIT_TEST( Split_Lazy_RCU_SHT_cmpmix_stat )
-
- CPPUNIT_TEST(Split_Lazy_nogc_cmp)
- CPPUNIT_TEST(Split_Lazy_nogc_less)
- CPPUNIT_TEST(Split_Lazy_nogc_cmpmix)
- CPPUNIT_TEST( Split_Lazy_nogc_cmpmix_stat )
-
- CPPUNIT_TEST_SUITE_END()
-
- };
-
-} // namespace set
-
-#endif // CDSTEST_HDR_SET_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 CDSTEST_HDR_SKIPLIST_SET_H
-#define CDSTEST_HDR_SKIPLIST_SET_H
-
-#include "set/hdr_set.h"
-
-namespace set {
-
- class SkipListSetHdrTest: public HashSetHdrTest
- {
- typedef HashSetHdrTest base_class;
-
- typedef base_class::other_item wrapped_item;
- typedef base_class::other_less wrapped_less;
-
- template <class Set, typename PrintStat >
- void test()
- {
- Set s;
- base_class::test_int_with( s );
-
- static int const nLimit = 10000;
- typedef typename Set::iterator set_iterator;
- typedef typename Set::const_iterator const_set_iterator;
- typedef typename Set::guarded_ptr guarded_ptr;
-
- int nCount = 0;
- int nPrevKey = 0;
- guarded_ptr gp;
- int arrRandom[nLimit];
- for ( int i = 0; i < nLimit; ++i )
- arrRandom[i] = i;
- shuffle( arrRandom, arrRandom + nLimit );
-
-
- // Test iterator - ascending order
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
-
- for ( int i = 0; i < nLimit; ++i ) {
- gp = s.get( i );
- CPPUNIT_CHECK( !gp );
- CPPUNIT_CHECK( gp.empty() );
-
- CPPUNIT_ASSERT( s.insert(i) );
-
- gp = s.get( i );
- CPPUNIT_CHECK( gp );
- CPPUNIT_ASSERT( !gp.empty());
- CPPUNIT_CHECK( gp->nKey == i );
- CPPUNIT_CHECK( gp->nVal == i );
- gp.release();
- }
- CPPUNIT_MSG( PrintStat()(s, "Iterator test, ascending insert order") );
-
- nCount = 0;
- nPrevKey = 0;
- for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey == it->nVal );
- CPPUNIT_ASSERT( s.contains( it->nKey ));
- it->nVal = (*it).nKey * 2;
- ++nCount;
- if ( it != s.begin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
-
- // get
- gp = s.get( it->nKey );
- CPPUNIT_CHECK( gp );
- CPPUNIT_ASSERT( !gp.empty() );
- CPPUNIT_CHECK( gp->nKey == it->nKey );
- CPPUNIT_CHECK( gp->nVal == it->nKey * 2 );
- gp.release();
- }
- CPPUNIT_ASSERT( nCount == nLimit );
-
- nCount = 0;
- for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal );
- ++nCount;
- if ( it != s.cbegin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- CPPUNIT_ASSERT( nCount == nLimit );
-
- // Test iterator - descending order
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
-
- for ( int i = nLimit; i > 0; --i ) {
- gp = s.get_with( i - 1, base_class::less<typename Set::value_type>());
- CPPUNIT_CHECK( !gp );
- CPPUNIT_CHECK( gp.empty() );
-
- CPPUNIT_ASSERT( s.insert( std::make_pair(i - 1, (i-1) * 2) ));
-
- // get_with
- gp = s.get_with( i - 1, base_class::less<typename Set::value_type>());
- CPPUNIT_CHECK( gp );
- CPPUNIT_ASSERT( !gp.empty());
- CPPUNIT_CHECK( gp->nKey == i-1 );
- CPPUNIT_CHECK( gp->nVal == (i-1) * 2 );
- gp.release();
- }
- CPPUNIT_MSG( PrintStat()(s, "Iterator test, descending insert order") );
-
- nCount = 0;
- nPrevKey = 0;
- for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal );
- CPPUNIT_ASSERT( s.contains( it->nKey ));
- it->nVal = (*it).nKey;
- ++nCount;
- if ( it != s.begin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- CPPUNIT_ASSERT( nCount == nLimit );
-
- nCount = 0;
- for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey == it->nVal );
- ++nCount;
- if ( it != s.cbegin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- CPPUNIT_ASSERT( nCount == nLimit );
-
- // Test iterator - random order
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- {
- for ( int i = 0; i < nLimit; ++i )
- CPPUNIT_ASSERT( s.insert( arrRandom[i]) );
- CPPUNIT_MSG( PrintStat()(s, "Iterator test, random insert order") );
- }
-
- nCount = 0;
- nPrevKey = 0;
- for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey == it->nVal );
- CPPUNIT_ASSERT( s.contains( it->nKey ));
- it->nVal = (*it).nKey * 2;
- ++nCount;
- if ( it != s.begin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- CPPUNIT_ASSERT( nCount == nLimit );
-
- nCount = 0;
- for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal );
- ++nCount;
- if ( it != s.cbegin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- CPPUNIT_ASSERT( nCount == nLimit );
-
- // extract test
- {
- typedef typename base_class::less<typename Set::value_type> less_predicate;
- typename Set::guarded_ptr gp;
-
- // extract/get
- for ( int i = 0; i < nLimit; ++i ) {
- int nKey = arrRandom[i];
- gp = s.get( nKey );
- CPPUNIT_ASSERT( gp );
- CPPUNIT_ASSERT( !gp.empty());
- CPPUNIT_CHECK( gp->nKey == nKey );
- CPPUNIT_CHECK( gp->nVal == nKey * 2);
- gp.release();
-
- gp = s.extract( nKey );
- CPPUNIT_ASSERT( gp );
- CPPUNIT_ASSERT( !gp.empty());
- CPPUNIT_CHECK( gp->nKey == nKey );
- CPPUNIT_CHECK( gp->nVal == nKey * 2);
- gp.release();
-
- gp = s.get( nKey );
- CPPUNIT_CHECK( !gp );
- CPPUNIT_ASSERT( gp.empty());
- CPPUNIT_ASSERT( !s.extract(nKey));
- }
- CPPUNIT_ASSERT( s.empty() );
-
- // extract_with/get_with
- for ( int i = 0; i < nLimit; ++i )
- CPPUNIT_ASSERT( s.insert( arrRandom[i]) );
-
- for ( int i = 0; i < nLimit; ++i ) {
- int nKey = arrRandom[i];
- gp = s.get_with( wrapped_item( nKey ), wrapped_less());
- CPPUNIT_ASSERT( gp );
- CPPUNIT_ASSERT( !gp.empty());
- CPPUNIT_CHECK( gp->nKey == nKey );
- CPPUNIT_CHECK( gp->nVal == nKey );
- gp.release();
-
- gp = s.extract_with( wrapped_item( nKey ), wrapped_less());
- CPPUNIT_ASSERT( gp );
- CPPUNIT_ASSERT( !gp.empty());
- CPPUNIT_CHECK( gp->nKey == nKey );
- CPPUNIT_CHECK( gp->nVal == nKey );
- gp.release();
-
- gp = s.get_with( wrapped_item( nKey ), wrapped_less());
- CPPUNIT_CHECK( !gp );
- CPPUNIT_ASSERT( !s.extract_with( wrapped_item(nKey), wrapped_less() ));
- }
- CPPUNIT_ASSERT( s.empty() );
-
- // extract_min
- for ( int i = 0; i < nLimit; ++i )
- CPPUNIT_ASSERT( s.insert( arrRandom[i]) );
-
- for ( int i = 0; i < nLimit; ++i ) {
- gp = s.extract_min();
- CPPUNIT_ASSERT( gp );
- CPPUNIT_ASSERT( !gp.empty());
- CPPUNIT_CHECK( gp->nKey == i );
- CPPUNIT_CHECK( gp->nVal == i );
- gp.release();
-
- gp = s.get( i );
- CPPUNIT_CHECK( !gp );
- }
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_CHECK( !s.extract_min());
- CPPUNIT_CHECK( !s.extract_max());
-
- // extract_max
- for ( int i = 0; i < nLimit; ++i )
- CPPUNIT_ASSERT( s.insert( arrRandom[i]) );
-
- for ( int i = nLimit-1; i >= 0; --i ) {
- gp = s.extract_max();
- CPPUNIT_ASSERT( gp );
- CPPUNIT_ASSERT( !gp.empty());
- CPPUNIT_CHECK( gp->nKey == i );
- CPPUNIT_CHECK( gp->nVal == i );
- gp.release();
-
- gp = s.get( i );
- CPPUNIT_CHECK( !gp );
- }
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_CHECK( !s.extract_min());
- CPPUNIT_CHECK( !s.extract_max());
- }
-
- CPPUNIT_MSG( PrintStat()(s, nullptr) );
- }
-
- template <class Set, typename PrintStat >
- void test_nogc()
- {
- typedef typename Set::value_type value_type;
- typedef typename Set::iterator iterator;
- typedef typename Set::const_iterator const_iterator;
-
- Set s;
- iterator it;
-
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
-
- // insert
- it = s.insert( 10 );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 10 );
- CPPUNIT_ASSERT( it->val() == 10 );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 1 ));
- CPPUNIT_ASSERT( s.insert( 10 ) == s.end() );
-
- it = s.insert( std::make_pair( 50, 25 ));
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 50 );
- CPPUNIT_ASSERT( it->val() == 25 );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 2 ));
- CPPUNIT_ASSERT( s.insert( 50 ) == s.end() );
-
- // update
- std::pair< iterator, bool> updateResult;
- updateResult = s.update(20, false);
- CPPUNIT_ASSERT(updateResult.first == s.end());
- CPPUNIT_ASSERT(!updateResult.second);
- CPPUNIT_ASSERT(check_size(s, 2));
-
- updateResult = s.update( 20 );
- CPPUNIT_ASSERT( updateResult.first != s.end() );
- CPPUNIT_ASSERT( updateResult.second );
- CPPUNIT_ASSERT( updateResult.first->key() == 20 );
- CPPUNIT_ASSERT( updateResult.first->val() == 20 );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- updateResult = s.update( std::make_pair( 20, 200 ));
- CPPUNIT_ASSERT( updateResult.first != s.end() );
- CPPUNIT_ASSERT( !updateResult.second );
- CPPUNIT_ASSERT( updateResult.first->key() == 20 );
- CPPUNIT_ASSERT( updateResult.first->val() == 20 );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
- updateResult.first->nVal = 22;
-
- updateResult = s.update( std::make_pair( 30, 33 ));
- CPPUNIT_ASSERT( updateResult.first != s.end() );
- CPPUNIT_ASSERT( updateResult.second );
- CPPUNIT_ASSERT( updateResult.first->key() == 30 );
- CPPUNIT_ASSERT( updateResult.first->val() == 33 );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 4 ));
-
- // find
- it = s.contains( 10 );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 10 );
- CPPUNIT_ASSERT( it->val() == 10 );
-
- it = s.contains( 20 );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 20 );
- CPPUNIT_ASSERT( it->val() == 22 );
-
- it = s.contains( 30, base_class::less<value_type>() );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 30 );
- CPPUNIT_ASSERT( it->val() == 33 );
-
- it = s.contains( 40 );
- CPPUNIT_ASSERT( it == s.end() );
-
- it = s.contains( 50 );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 50 );
- CPPUNIT_ASSERT( it->val() == 25 );
-
- // emplace test
- it = s.emplace( 151 ) ; // key = 151, val = 151
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 151 );
- CPPUNIT_ASSERT( it->val() == 151 );
-
- it = s.emplace( 174, 471 ) ; // key == 174, val = 471
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 174 );
- CPPUNIT_ASSERT( it->val() == 471 );
-
- it = s.emplace( std::make_pair( 190, 91 )) ; // key == 190, val = 91
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 190 );
- CPPUNIT_ASSERT( it->val() == 91 );
-
- it = s.contains( 174 );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 174 );
- CPPUNIT_ASSERT( it->val() == 471 );
-
- it = s.contains( 190 );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 190 );
- CPPUNIT_ASSERT( it->val() == 91 );
-
- it = s.contains( 151 );
- CPPUNIT_ASSERT( it != s.end() );
- CPPUNIT_ASSERT( it->key() == 151 );
- CPPUNIT_ASSERT( it->val() == 151 );
-
- CPPUNIT_ASSERT( !s.empty() );
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
-
- // get_min test
- for ( int i = 500; i > 0; --i ) {
- CPPUNIT_ASSERT( s.insert( std::make_pair( i, i * 2) ) != s.end() );
-
- typename Set::value_type * pVal = s.get_min();
- CPPUNIT_ASSERT( pVal != nullptr );
- CPPUNIT_CHECK( pVal->nKey == i );
- CPPUNIT_CHECK( pVal->nVal == i * 2 );
- }
- CPPUNIT_ASSERT( !s.empty() );
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
-
- CPPUNIT_CHECK( s.get_min() == nullptr );
- CPPUNIT_CHECK( s.get_max() == nullptr );
-
- // iterator test
- for ( int i = 0; i < 500; ++i ) {
- CPPUNIT_ASSERT( s.insert( std::make_pair( i, i * 2) ) != s.end() );
-
- typename Set::value_type * pVal = s.get_max();
- CPPUNIT_ASSERT( pVal != nullptr );
- CPPUNIT_CHECK( pVal->nKey == i );
- CPPUNIT_CHECK( pVal->nVal == i * 2 );
- }
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 500 ));
-
- for ( iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal );
- it->nVal = (*it).nKey;
- }
-
- Set const& refSet = s;
- for ( const_iterator it = refSet.begin(), itEnd = refSet.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey == it->nVal );
- }
- }
-
- public:
- void SkipList_HP_less();
- void SkipList_HP_cmp();
- void SkipList_HP_cmpless();
- void SkipList_HP_less_stat();
- void SkipList_HP_cmp_stat();
- void SkipList_HP_cmpless_stat();
- void SkipList_HP_xorshift_less();
- void SkipList_HP_xorshift_cmp();
- void SkipList_HP_xorshift_cmpless();
- void SkipList_HP_xorshift_less_stat();
- void SkipList_HP_xorshift_cmp_stat();
- void SkipList_HP_xorshift_cmpless_stat();
- void SkipList_HP_turbopas_less();
- void SkipList_HP_turbopas_cmp();
- void SkipList_HP_turbopas_cmpless();
- void SkipList_HP_turbopas_less_stat();
- void SkipList_HP_turbopas_cmp_stat();
- void SkipList_HP_turbopas_cmpless_stat();
- void SkipList_HP_michaelalloc_less();
- void SkipList_HP_michaelalloc_cmp();
- void SkipList_HP_michaelalloc_cmpless();
- void SkipList_HP_michaelalloc_less_stat();
- void SkipList_HP_michaelalloc_cmp_stat();
- void SkipList_HP_michaelalloc_cmpless_stat();
-
- void SkipList_DHP_less();
- void SkipList_DHP_cmp();
- void SkipList_DHP_cmpless();
- void SkipList_DHP_less_stat();
- void SkipList_DHP_cmp_stat();
- void SkipList_DHP_cmpless_stat();
- void SkipList_DHP_xorshift_less();
- void SkipList_DHP_xorshift_cmp();
- void SkipList_DHP_xorshift_cmpless();
- void SkipList_DHP_xorshift_less_stat();
- void SkipList_DHP_xorshift_cmp_stat();
- void SkipList_DHP_xorshift_cmpless_stat();
- void SkipList_DHP_turbopas_less();
- void SkipList_DHP_turbopas_cmp();
- void SkipList_DHP_turbopas_cmpless();
- void SkipList_DHP_turbopas_less_stat();
- void SkipList_DHP_turbopas_cmp_stat();
- void SkipList_DHP_turbopas_cmpless_stat();
- void SkipList_DHP_michaelalloc_less();
- void SkipList_DHP_michaelalloc_cmp();
- void SkipList_DHP_michaelalloc_cmpless();
- void SkipList_DHP_michaelalloc_less_stat();
- void SkipList_DHP_michaelalloc_cmp_stat();
- void SkipList_DHP_michaelalloc_cmpless_stat();
-
- void SkipList_NOGC_less();
- void SkipList_NOGC_cmp();
- void SkipList_NOGC_cmpless();
- void SkipList_NOGC_less_stat();
- void SkipList_NOGC_cmp_stat();
- void SkipList_NOGC_cmpless_stat();
- void SkipList_NOGC_xorshift_less();
- void SkipList_NOGC_xorshift_cmp();
- void SkipList_NOGC_xorshift_cmpless();
- void SkipList_NOGC_xorshift_less_stat();
- void SkipList_NOGC_xorshift_cmp_stat();
- void SkipList_NOGC_xorshift_cmpless_stat();
- void SkipList_NOGC_turbopas_less();
- void SkipList_NOGC_turbopas_cmp();
- void SkipList_NOGC_turbopas_cmpless();
- void SkipList_NOGC_turbopas_less_stat();
- void SkipList_NOGC_turbopas_cmp_stat();
- void SkipList_NOGC_turbopas_cmpless_stat();
- void SkipList_NOGC_michaelalloc_less();
- void SkipList_NOGC_michaelalloc_cmp();
- void SkipList_NOGC_michaelalloc_cmpless();
- void SkipList_NOGC_michaelalloc_less_stat();
- void SkipList_NOGC_michaelalloc_cmp_stat();
- void SkipList_NOGC_michaelalloc_cmpless_stat();
-
- CPPUNIT_TEST_SUITE(SkipListSetHdrTest)
- CPPUNIT_TEST(SkipList_HP_less)
- CPPUNIT_TEST(SkipList_HP_cmp)
- CPPUNIT_TEST(SkipList_HP_cmpless)
- CPPUNIT_TEST(SkipList_HP_less_stat)
- CPPUNIT_TEST(SkipList_HP_cmp_stat)
- CPPUNIT_TEST(SkipList_HP_cmpless_stat)
- CPPUNIT_TEST(SkipList_HP_xorshift_less)
- CPPUNIT_TEST(SkipList_HP_xorshift_cmp)
- CPPUNIT_TEST(SkipList_HP_xorshift_cmpless)
- CPPUNIT_TEST(SkipList_HP_xorshift_less_stat)
- CPPUNIT_TEST(SkipList_HP_xorshift_cmp_stat)
- CPPUNIT_TEST(SkipList_HP_xorshift_cmpless_stat)
- CPPUNIT_TEST(SkipList_HP_turbopas_less)
- CPPUNIT_TEST(SkipList_HP_turbopas_cmp)
- CPPUNIT_TEST(SkipList_HP_turbopas_cmpless)
- CPPUNIT_TEST(SkipList_HP_turbopas_less_stat)
- CPPUNIT_TEST(SkipList_HP_turbopas_cmp_stat)
- CPPUNIT_TEST(SkipList_HP_turbopas_cmpless_stat)
- CPPUNIT_TEST(SkipList_HP_michaelalloc_less)
- CPPUNIT_TEST(SkipList_HP_michaelalloc_cmp)
- CPPUNIT_TEST(SkipList_HP_michaelalloc_cmpless)
- CPPUNIT_TEST(SkipList_HP_michaelalloc_less_stat)
- CPPUNIT_TEST(SkipList_HP_michaelalloc_cmp_stat)
- CPPUNIT_TEST(SkipList_HP_michaelalloc_cmpless_stat)
-
- CPPUNIT_TEST(SkipList_DHP_less)
- CPPUNIT_TEST(SkipList_DHP_cmp)
- CPPUNIT_TEST(SkipList_DHP_cmpless)
- CPPUNIT_TEST(SkipList_DHP_less_stat)
- CPPUNIT_TEST(SkipList_DHP_cmp_stat)
- CPPUNIT_TEST(SkipList_DHP_cmpless_stat)
- CPPUNIT_TEST(SkipList_DHP_xorshift_less)
- CPPUNIT_TEST(SkipList_DHP_xorshift_cmp)
- CPPUNIT_TEST(SkipList_DHP_xorshift_cmpless)
- CPPUNIT_TEST(SkipList_DHP_xorshift_less_stat)
- CPPUNIT_TEST(SkipList_DHP_xorshift_cmp_stat)
- CPPUNIT_TEST(SkipList_DHP_xorshift_cmpless_stat)
- CPPUNIT_TEST(SkipList_DHP_turbopas_less)
- CPPUNIT_TEST(SkipList_DHP_turbopas_cmp)
- CPPUNIT_TEST(SkipList_DHP_turbopas_cmpless)
- CPPUNIT_TEST(SkipList_DHP_turbopas_less_stat)
- CPPUNIT_TEST(SkipList_DHP_turbopas_cmp_stat)
- CPPUNIT_TEST(SkipList_DHP_turbopas_cmpless_stat)
- CPPUNIT_TEST(SkipList_DHP_michaelalloc_less)
- CPPUNIT_TEST(SkipList_DHP_michaelalloc_cmp)
- CPPUNIT_TEST(SkipList_DHP_michaelalloc_cmpless)
- CPPUNIT_TEST(SkipList_DHP_michaelalloc_less_stat)
- CPPUNIT_TEST(SkipList_DHP_michaelalloc_cmp_stat)
- CPPUNIT_TEST(SkipList_DHP_michaelalloc_cmpless_stat)
-
- CPPUNIT_TEST(SkipList_NOGC_less)
- CPPUNIT_TEST(SkipList_NOGC_cmp)
- CPPUNIT_TEST(SkipList_NOGC_cmpless)
- CPPUNIT_TEST(SkipList_NOGC_less_stat)
- CPPUNIT_TEST(SkipList_NOGC_cmp_stat)
- CPPUNIT_TEST(SkipList_NOGC_cmpless_stat)
- CPPUNIT_TEST(SkipList_NOGC_xorshift_less)
- CPPUNIT_TEST(SkipList_NOGC_xorshift_cmp)
- CPPUNIT_TEST(SkipList_NOGC_xorshift_cmpless)
- CPPUNIT_TEST(SkipList_NOGC_xorshift_less_stat)
- CPPUNIT_TEST(SkipList_NOGC_xorshift_cmp_stat)
- CPPUNIT_TEST(SkipList_NOGC_xorshift_cmpless_stat)
- CPPUNIT_TEST(SkipList_NOGC_turbopas_less)
- CPPUNIT_TEST(SkipList_NOGC_turbopas_cmp)
- CPPUNIT_TEST(SkipList_NOGC_turbopas_cmpless)
- CPPUNIT_TEST(SkipList_NOGC_turbopas_less_stat)
- CPPUNIT_TEST(SkipList_NOGC_turbopas_cmp_stat)
- CPPUNIT_TEST(SkipList_NOGC_turbopas_cmpless_stat)
- CPPUNIT_TEST(SkipList_NOGC_michaelalloc_less)
- CPPUNIT_TEST(SkipList_NOGC_michaelalloc_cmp)
- CPPUNIT_TEST(SkipList_NOGC_michaelalloc_cmpless)
- CPPUNIT_TEST(SkipList_NOGC_michaelalloc_less_stat)
- CPPUNIT_TEST(SkipList_NOGC_michaelalloc_cmp_stat)
- CPPUNIT_TEST(SkipList_NOGC_michaelalloc_cmpless_stat)
-
- CPPUNIT_TEST_SUITE_END()
-
- };
-}
-
-#endif // #ifndef CDSTEST_HDR_SKIPLIST_SET_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.
-*/
-
-#include "set/hdr_skiplist_set.h"
-#include <cds/container/skip_list_set_dhp.h>
-#include "unit/michael_alloc.h"
-#include "map/print_skiplist_stat.h"
-
-namespace set {
-
- void SkipListSetHdrTest::SkipList_DHP_less()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_cmp()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_cmpless()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_less_stat()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_cmp_stat()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_cmpless_stat()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_xorshift_less()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_xorshift_cmp()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_xorshift_cmpless()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_xorshift_less_stat()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_xorshift_cmp_stat()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_xorshift_cmpless_stat()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_turbopas_less()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_turbopas_cmp()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_turbopas_cmpless()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_turbopas_less_stat()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_turbopas_cmp_stat()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_turbopas_cmpless_stat()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_michaelalloc_less()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_michaelalloc_cmp()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_michaelalloc_cmpless()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_michaelalloc_less_stat()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_michaelalloc_cmp_stat()
- {
- typedef cc::SkipListSet< cds::gc::DHP, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_DHP_michaelalloc_cmpless_stat()
- {
- struct set_traits : public cc::skip_list::traits
- {
- typedef SkipListSetHdrTest::less<item> less;
- typedef cmp<item> compare;
- typedef simple_item_counter item_counter;
- typedef cc::skip_list::stat<> stat;
- typedef memory::MichaelAllocator<int> allocator;
- };
-
- typedef cc::SkipListSet< cds::gc::DHP, item, set_traits > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-} // 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/hdr_skiplist_set.h"
-#include <cds/container/skip_list_set_hp.h>
-#include "unit/michael_alloc.h"
-#include "map/print_skiplist_stat.h"
-
-namespace set {
-
- void SkipListSetHdrTest::SkipList_HP_less()
- {
- struct set_traits : public cc::skip_list::traits
- {
- typedef SkipListSetHdrTest::less<item > less;
- typedef simple_item_counter item_counter;
- };
- typedef cc::SkipListSet< cds::gc::HP, item, set_traits > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_cmp()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_cmpless()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_less_stat()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_cmp_stat()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_cmpless_stat()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_xorshift_less()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_xorshift_cmp()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_xorshift_cmpless()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_xorshift_less_stat()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_xorshift_cmp_stat()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_xorshift_cmpless_stat()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_turbopas_less()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_turbopas_cmp()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_turbopas_cmpless()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_turbopas_less_stat()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_turbopas_cmp_stat()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_turbopas_cmpless_stat()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_michaelalloc_less()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_michaelalloc_cmp()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_michaelalloc_cmpless()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_michaelalloc_less_stat()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_michaelalloc_cmp_stat()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HP_michaelalloc_cmpless_stat()
- {
- typedef cc::SkipListSet< cds::gc::HP, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-} // namespace set
-
-CPPUNIT_TEST_SUITE_REGISTRATION(set::SkipListSetHdrTest);
+++ /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/hdr_skiplist_set.h"
-#include <cds/container/skip_list_set_nogc.h>
-#include "unit/michael_alloc.h"
-#include "map/print_skiplist_stat.h"
-
-namespace set {
-
- void SkipListSetHdrTest::SkipList_NOGC_less()
- {
- struct set_traits : public cc::skip_list::traits
- {
- typedef SkipListSetHdrTest::less<item> less;
- typedef simple_item_counter item_counter;
- };
- typedef cc::SkipListSet< cds::gc::nogc, item, set_traits > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_cmp()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_cmpless()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_less_stat()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_cmp_stat()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_cmpless_stat()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_xorshift_less()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_xorshift_cmp()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_xorshift_cmpless()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_xorshift_less_stat()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_xorshift_cmp_stat()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_xorshift_cmpless_stat()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_turbopas_less()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_turbopas_cmp()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_turbopas_cmpless()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_turbopas_less_stat()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_turbopas_cmp_stat()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_turbopas_cmpless_stat()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_michaelalloc_less()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_michaelalloc_cmp()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_michaelalloc_cmpless()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_michaelalloc_less_stat()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_michaelalloc_cmp_stat()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_NOGC_michaelalloc_cmpless_stat()
- {
- typedef cc::SkipListSet< cds::gc::nogc, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test_nogc< set, misc::print_skiplist_stat<set::stat> >();
- }
-} // 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.
-*/
-
-#ifndef CDSTEST_HDR_SKIPLIST_SET_RCU_H
-#define CDSTEST_HDR_SKIPLIST_SET_RCU_H
-
-#include "set/hdr_set.h"
-
-namespace set {
-
- class SkipListSetRCUHdrTest: public HashSetHdrTest
- {
- typedef HashSetHdrTest base_class;
-
- typedef base_class::other_item wrapped_item;
- typedef base_class::other_less wrapped_less;
-
- template <class Set, typename PrintStat >
- void test()
- {
- Set s;
- base_class::test_int_with( s );
-
- static int const nLimit = 10000;
- typedef typename Set::iterator set_iterator;
- typedef typename Set::const_iterator const_set_iterator;
- typedef typename Set::gc::scoped_lock rcu_lock;
-
- int nCount = 0;
- int nPrevKey = 0;
-
- int arrRandom[nLimit];
- for ( int i = 0; i < nLimit; ++i )
- arrRandom[i] = i;
- shuffle( arrRandom, arrRandom + nLimit );
-
- // Test iterator - ascending order
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
-
- for ( int i = 0; i < nLimit; ++i ) {
- CPPUNIT_ASSERT( s.insert(i) );
- }
- CPPUNIT_MSG( PrintStat()(s, "Iterator test, ascending insert order") );
-
- nCount = 0;
- nPrevKey = 0;
- {
- rcu_lock l;
- for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey == it->nVal );
- CPPUNIT_ASSERT( s.contains( it->nKey ));
- it->nVal = (*it).nKey * 2;
- ++nCount;
- if ( it != s.begin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- }
- CPPUNIT_ASSERT( nCount == nLimit );
-
- nCount = 0;
- {
- rcu_lock l;
- for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal );
- ++nCount;
- if ( it != s.cbegin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- }
- CPPUNIT_ASSERT( nCount == nLimit );
-
- // Test iterator - descending order
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
-
- for ( int i = nLimit; i > 0; --i ) {
- CPPUNIT_ASSERT( s.insert( std::make_pair(i - 1, (i-1) * 2) ));
- }
- CPPUNIT_MSG( PrintStat()(s, "Iterator test, descending insert order") );
-
- nCount = 0;
- nPrevKey = 0;
- {
- rcu_lock l;
- for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal );
- CPPUNIT_ASSERT( s.contains( it->nKey ));
- it->nVal = (*it).nKey;
- ++nCount;
- if ( it != s.begin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- }
- CPPUNIT_ASSERT( nCount == nLimit );
-
- nCount = 0;
- {
- rcu_lock l;
- for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey == it->nVal );
- ++nCount;
- if ( it != s.cbegin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- }
- CPPUNIT_ASSERT( nCount == nLimit );
-
- // Test iterator - random order
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- {
- for ( int i = 0; i < nLimit; ++i ) {
- CPPUNIT_ASSERT( s.insert( arrRandom[i] ) );
- }
- CPPUNIT_MSG( PrintStat()(s, "Iterator test, random insert order") );
- }
-
- nCount = 0;
- nPrevKey = 0;
- {
- rcu_lock l;
- for ( set_iterator it = s.begin(), itEnd = s.end(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey == it->nVal );
- CPPUNIT_ASSERT( s.contains( it->nKey ));
- it->nVal = (*it).nKey * 2;
- ++nCount;
- if ( it != s.begin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- }
- CPPUNIT_ASSERT( nCount == nLimit );
-
- nCount = 0;
- {
- rcu_lock l;
- for ( const_set_iterator it = s.cbegin(), itEnd = s.cend(); it != itEnd; ++it ) {
- CPPUNIT_ASSERT( (*it).nKey * 2 == it->nVal );
- ++nCount;
- if ( it != s.cbegin() ) {
- CPPUNIT_ASSERT( nPrevKey + 1 == it->nKey );
- }
- nPrevKey = it->nKey;
- }
- }
- CPPUNIT_ASSERT( nCount == nLimit );
-
- // extract/get tests
- {
- typedef typename base_class::less<typename Set::value_type> less_predicate;
- typename Set::exempt_ptr ep;
- typename Set::raw_ptr rp;
-
- // extract/get
- for ( int i = 0; i < nLimit; ++i ) {
- int nKey = arrRandom[i];
- {
- rcu_lock l;
- rp = s.get( nKey );
- CPPUNIT_ASSERT( rp );
- CPPUNIT_CHECK( rp->nKey == nKey );
- CPPUNIT_CHECK( rp->nVal == nKey * 2 );
- }
- rp.release();
-
- ep = s.extract( nKey );
- CPPUNIT_ASSERT( ep );
- CPPUNIT_ASSERT( !ep.empty() );
- CPPUNIT_CHECK( ep->nKey == nKey );
- CPPUNIT_CHECK( ep->nVal == nKey * 2 );
- ep.release();
-
- {
- rcu_lock l;
- CPPUNIT_CHECK( !s.get( nKey ));
- }
- ep = s.extract( nKey );
- CPPUNIT_CHECK( !ep );
- }
- CPPUNIT_CHECK( s.empty());
-
- // extract_with/get_with
- for ( int i = 0; i < nLimit; ++i )
- CPPUNIT_ASSERT( s.insert( arrRandom[i]) );
-
- for ( int i = 0; i < nLimit; ++i ) {
- int nKey = arrRandom[i];
- {
- rcu_lock l;
- rp = s.get_with( wrapped_item(nKey), wrapped_less() );
- CPPUNIT_ASSERT( rp );
- CPPUNIT_CHECK( rp->nKey == nKey );
- CPPUNIT_CHECK( rp->nVal == nKey );
- }
- rp.release();
-
- ep = s.extract_with( wrapped_item( nKey ), wrapped_less() );
- CPPUNIT_ASSERT( ep );
- CPPUNIT_ASSERT( !ep.empty() );
- CPPUNIT_CHECK( ep->nKey == nKey );
- CPPUNIT_CHECK( ep->nVal == nKey );
- ep.release();
-
- {
- rcu_lock l;
- CPPUNIT_CHECK( !s.get_with( wrapped_item( nKey ), wrapped_less() ));
- }
- ep = s.extract_with( wrapped_item( nKey ), wrapped_less() );
- CPPUNIT_CHECK( !ep );
- }
- CPPUNIT_CHECK( s.empty());
-
- // extract_min
- for ( int i = 0; i < nLimit; ++i )
- CPPUNIT_ASSERT( s.insert( arrRandom[i]) );
-
- for ( int i = 0; i < nLimit; ++i ) {
- ep = s.extract_min();
- CPPUNIT_ASSERT( ep );
- CPPUNIT_ASSERT( !ep.empty() );
- CPPUNIT_CHECK( ep->nKey == i );
- CPPUNIT_CHECK( ep->nVal == i );
- CPPUNIT_CHECK( !s.contains(i) );
- ep.release();
- }
- CPPUNIT_CHECK( s.empty());
-
- // extract_max
- for ( int i = 0; i < nLimit; ++i )
- CPPUNIT_ASSERT( s.insert( arrRandom[i]) );
-
- for ( int i = nLimit-1; i >= 0; --i ) {
- ep = s.extract_max();
- CPPUNIT_ASSERT( ep );
- CPPUNIT_ASSERT( !ep.empty() );
- CPPUNIT_CHECK( ep->nKey == i );
- CPPUNIT_CHECK( ep->nVal == i );
- CPPUNIT_CHECK( !s.contains(i) );
- ep.release();
- }
- CPPUNIT_CHECK( s.empty());
- ep = s.extract_min();
- CPPUNIT_CHECK( !ep );
- CPPUNIT_CHECK( !s.extract_max() );
- }
-
- CPPUNIT_MSG( PrintStat()(s, nullptr) );
- }
-
- public:
- void SkipList_RCU_GPI_less();
- void SkipList_RCU_GPI_cmp();
- void SkipList_RCU_GPI_cmpless();
- void SkipList_RCU_GPI_less_stat();
- void SkipList_RCU_GPI_cmp_stat();
- void SkipList_RCU_GPI_cmpless_stat();
- void SkipList_RCU_GPI_xorshift_less();
- void SkipList_RCU_GPI_xorshift_cmp();
- void SkipList_RCU_GPI_xorshift_cmpless();
- void SkipList_RCU_GPI_xorshift_less_stat();
- void SkipList_RCU_GPI_xorshift_cmp_stat();
- void SkipList_RCU_GPI_xorshift_cmpless_stat();
- void SkipList_RCU_GPI_turbopas_less();
- void SkipList_RCU_GPI_turbopas_cmp();
- void SkipList_RCU_GPI_turbopas_cmpless();
- void SkipList_RCU_GPI_turbopas_less_stat();
- void SkipList_RCU_GPI_turbopas_cmp_stat();
- void SkipList_RCU_GPI_turbopas_cmpless_stat();
- void SkipList_RCU_GPI_michaelalloc_less();
- void SkipList_RCU_GPI_michaelalloc_cmp();
- void SkipList_RCU_GPI_michaelalloc_cmpless();
- void SkipList_RCU_GPI_michaelalloc_less_stat();
- void SkipList_RCU_GPI_michaelalloc_cmp_stat();
- void SkipList_RCU_GPI_michaelalloc_cmpless_stat();
-
- void SkipList_RCU_GPB_less();
- void SkipList_RCU_GPB_cmp();
- void SkipList_RCU_GPB_cmpless();
- void SkipList_RCU_GPB_less_stat();
- void SkipList_RCU_GPB_cmp_stat();
- void SkipList_RCU_GPB_cmpless_stat();
- void SkipList_RCU_GPB_xorshift_less();
- void SkipList_RCU_GPB_xorshift_cmp();
- void SkipList_RCU_GPB_xorshift_cmpless();
- void SkipList_RCU_GPB_xorshift_less_stat();
- void SkipList_RCU_GPB_xorshift_cmp_stat();
- void SkipList_RCU_GPB_xorshift_cmpless_stat();
- void SkipList_RCU_GPB_turbopas_less();
- void SkipList_RCU_GPB_turbopas_cmp();
- void SkipList_RCU_GPB_turbopas_cmpless();
- void SkipList_RCU_GPB_turbopas_less_stat();
- void SkipList_RCU_GPB_turbopas_cmp_stat();
- void SkipList_RCU_GPB_turbopas_cmpless_stat();
- void SkipList_RCU_GPB_michaelalloc_less();
- void SkipList_RCU_GPB_michaelalloc_cmp();
- void SkipList_RCU_GPB_michaelalloc_cmpless();
- void SkipList_RCU_GPB_michaelalloc_less_stat();
- void SkipList_RCU_GPB_michaelalloc_cmp_stat();
- void SkipList_RCU_GPB_michaelalloc_cmpless_stat();
-
- void SkipList_RCU_GPT_less();
- void SkipList_RCU_GPT_cmp();
- void SkipList_RCU_GPT_cmpless();
- void SkipList_RCU_GPT_less_stat();
- void SkipList_RCU_GPT_cmp_stat();
- void SkipList_RCU_GPT_cmpless_stat();
- void SkipList_RCU_GPT_xorshift_less();
- void SkipList_RCU_GPT_xorshift_cmp();
- void SkipList_RCU_GPT_xorshift_cmpless();
- void SkipList_RCU_GPT_xorshift_less_stat();
- void SkipList_RCU_GPT_xorshift_cmp_stat();
- void SkipList_RCU_GPT_xorshift_cmpless_stat();
- void SkipList_RCU_GPT_turbopas_less();
- void SkipList_RCU_GPT_turbopas_cmp();
- void SkipList_RCU_GPT_turbopas_cmpless();
- void SkipList_RCU_GPT_turbopas_less_stat();
- void SkipList_RCU_GPT_turbopas_cmp_stat();
- void SkipList_RCU_GPT_turbopas_cmpless_stat();
- void SkipList_RCU_GPT_michaelalloc_less();
- void SkipList_RCU_GPT_michaelalloc_cmp();
- void SkipList_RCU_GPT_michaelalloc_cmpless();
- void SkipList_RCU_GPT_michaelalloc_less_stat();
- void SkipList_RCU_GPT_michaelalloc_cmp_stat();
- void SkipList_RCU_GPT_michaelalloc_cmpless_stat();
-
- void SkipList_RCU_SHB_less();
- void SkipList_RCU_SHB_cmp();
- void SkipList_RCU_SHB_cmpless();
- void SkipList_RCU_SHB_less_stat();
- void SkipList_RCU_SHB_cmp_stat();
- void SkipList_RCU_SHB_cmpless_stat();
- void SkipList_RCU_SHB_xorshift_less();
- void SkipList_RCU_SHB_xorshift_cmp();
- void SkipList_RCU_SHB_xorshift_cmpless();
- void SkipList_RCU_SHB_xorshift_less_stat();
- void SkipList_RCU_SHB_xorshift_cmp_stat();
- void SkipList_RCU_SHB_xorshift_cmpless_stat();
- void SkipList_RCU_SHB_turbopas_less();
- void SkipList_RCU_SHB_turbopas_cmp();
- void SkipList_RCU_SHB_turbopas_cmpless();
- void SkipList_RCU_SHB_turbopas_less_stat();
- void SkipList_RCU_SHB_turbopas_cmp_stat();
- void SkipList_RCU_SHB_turbopas_cmpless_stat();
- void SkipList_RCU_SHB_michaelalloc_less();
- void SkipList_RCU_SHB_michaelalloc_cmp();
- void SkipList_RCU_SHB_michaelalloc_cmpless();
- void SkipList_RCU_SHB_michaelalloc_less_stat();
- void SkipList_RCU_SHB_michaelalloc_cmp_stat();
- void SkipList_RCU_SHB_michaelalloc_cmpless_stat();
-
- void SkipList_RCU_SHT_less();
- void SkipList_RCU_SHT_cmp();
- void SkipList_RCU_SHT_cmpless();
- void SkipList_RCU_SHT_less_stat();
- void SkipList_RCU_SHT_cmp_stat();
- void SkipList_RCU_SHT_cmpless_stat();
- void SkipList_RCU_SHT_xorshift_less();
- void SkipList_RCU_SHT_xorshift_cmp();
- void SkipList_RCU_SHT_xorshift_cmpless();
- void SkipList_RCU_SHT_xorshift_less_stat();
- void SkipList_RCU_SHT_xorshift_cmp_stat();
- void SkipList_RCU_SHT_xorshift_cmpless_stat();
- void SkipList_RCU_SHT_turbopas_less();
- void SkipList_RCU_SHT_turbopas_cmp();
- void SkipList_RCU_SHT_turbopas_cmpless();
- void SkipList_RCU_SHT_turbopas_less_stat();
- void SkipList_RCU_SHT_turbopas_cmp_stat();
- void SkipList_RCU_SHT_turbopas_cmpless_stat();
- void SkipList_RCU_SHT_michaelalloc_less();
- void SkipList_RCU_SHT_michaelalloc_cmp();
- void SkipList_RCU_SHT_michaelalloc_cmpless();
- void SkipList_RCU_SHT_michaelalloc_less_stat();
- void SkipList_RCU_SHT_michaelalloc_cmp_stat();
- void SkipList_RCU_SHT_michaelalloc_cmpless_stat();
-
- CPPUNIT_TEST_SUITE(SkipListSetRCUHdrTest)
- CPPUNIT_TEST(SkipList_RCU_GPI_less)
- CPPUNIT_TEST(SkipList_RCU_GPI_cmp)
- CPPUNIT_TEST(SkipList_RCU_GPI_cmpless)
- CPPUNIT_TEST(SkipList_RCU_GPI_less_stat)
- CPPUNIT_TEST(SkipList_RCU_GPI_cmp_stat)
- CPPUNIT_TEST(SkipList_RCU_GPI_cmpless_stat)
- CPPUNIT_TEST(SkipList_RCU_GPI_xorshift_less)
- CPPUNIT_TEST(SkipList_RCU_GPI_xorshift_cmp)
- CPPUNIT_TEST(SkipList_RCU_GPI_xorshift_cmpless)
- CPPUNIT_TEST(SkipList_RCU_GPI_xorshift_less_stat)
- CPPUNIT_TEST(SkipList_RCU_GPI_xorshift_cmp_stat)
- CPPUNIT_TEST(SkipList_RCU_GPI_xorshift_cmpless_stat)
- CPPUNIT_TEST(SkipList_RCU_GPI_turbopas_less)
- CPPUNIT_TEST(SkipList_RCU_GPI_turbopas_cmp)
- CPPUNIT_TEST(SkipList_RCU_GPI_turbopas_cmpless)
- CPPUNIT_TEST(SkipList_RCU_GPI_turbopas_less_stat)
- CPPUNIT_TEST(SkipList_RCU_GPI_turbopas_cmp_stat)
- CPPUNIT_TEST(SkipList_RCU_GPI_turbopas_cmpless_stat)
- CPPUNIT_TEST(SkipList_RCU_GPI_michaelalloc_less)
- CPPUNIT_TEST(SkipList_RCU_GPI_michaelalloc_cmp)
- CPPUNIT_TEST(SkipList_RCU_GPI_michaelalloc_cmpless)
- CPPUNIT_TEST(SkipList_RCU_GPI_michaelalloc_less_stat)
- CPPUNIT_TEST(SkipList_RCU_GPI_michaelalloc_cmp_stat)
- CPPUNIT_TEST(SkipList_RCU_GPI_michaelalloc_cmpless_stat)
-
- CPPUNIT_TEST(SkipList_RCU_GPB_less)
- CPPUNIT_TEST(SkipList_RCU_GPB_cmp)
- CPPUNIT_TEST(SkipList_RCU_GPB_cmpless)
- CPPUNIT_TEST(SkipList_RCU_GPB_less_stat)
- CPPUNIT_TEST(SkipList_RCU_GPB_cmp_stat)
- CPPUNIT_TEST(SkipList_RCU_GPB_cmpless_stat)
- CPPUNIT_TEST(SkipList_RCU_GPB_xorshift_less)
- CPPUNIT_TEST(SkipList_RCU_GPB_xorshift_cmp)
- CPPUNIT_TEST(SkipList_RCU_GPB_xorshift_cmpless)
- CPPUNIT_TEST(SkipList_RCU_GPB_xorshift_less_stat)
- CPPUNIT_TEST(SkipList_RCU_GPB_xorshift_cmp_stat)
- CPPUNIT_TEST(SkipList_RCU_GPB_xorshift_cmpless_stat)
- CPPUNIT_TEST(SkipList_RCU_GPB_turbopas_less)
- CPPUNIT_TEST(SkipList_RCU_GPB_turbopas_cmp)
- CPPUNIT_TEST(SkipList_RCU_GPB_turbopas_cmpless)
- CPPUNIT_TEST(SkipList_RCU_GPB_turbopas_less_stat)
- CPPUNIT_TEST(SkipList_RCU_GPB_turbopas_cmp_stat)
- CPPUNIT_TEST(SkipList_RCU_GPB_turbopas_cmpless_stat)
- CPPUNIT_TEST(SkipList_RCU_GPB_michaelalloc_less)
- CPPUNIT_TEST(SkipList_RCU_GPB_michaelalloc_cmp)
- CPPUNIT_TEST(SkipList_RCU_GPB_michaelalloc_cmpless)
- CPPUNIT_TEST(SkipList_RCU_GPB_michaelalloc_less_stat)
- CPPUNIT_TEST(SkipList_RCU_GPB_michaelalloc_cmp_stat)
- CPPUNIT_TEST(SkipList_RCU_GPB_michaelalloc_cmpless_stat)
-
- CPPUNIT_TEST(SkipList_RCU_GPT_less)
- CPPUNIT_TEST(SkipList_RCU_GPT_cmp)
- CPPUNIT_TEST(SkipList_RCU_GPT_cmpless)
- CPPUNIT_TEST(SkipList_RCU_GPT_less_stat)
- CPPUNIT_TEST(SkipList_RCU_GPT_cmp_stat)
- CPPUNIT_TEST(SkipList_RCU_GPT_cmpless_stat)
- CPPUNIT_TEST(SkipList_RCU_GPT_xorshift_less)
- CPPUNIT_TEST(SkipList_RCU_GPT_xorshift_cmp)
- CPPUNIT_TEST(SkipList_RCU_GPT_xorshift_cmpless)
- CPPUNIT_TEST(SkipList_RCU_GPT_xorshift_less_stat)
- CPPUNIT_TEST(SkipList_RCU_GPT_xorshift_cmp_stat)
- CPPUNIT_TEST(SkipList_RCU_GPT_xorshift_cmpless_stat)
- CPPUNIT_TEST(SkipList_RCU_GPT_turbopas_less)
- CPPUNIT_TEST(SkipList_RCU_GPT_turbopas_cmp)
- CPPUNIT_TEST(SkipList_RCU_GPT_turbopas_cmpless)
- CPPUNIT_TEST(SkipList_RCU_GPT_turbopas_less_stat)
- CPPUNIT_TEST(SkipList_RCU_GPT_turbopas_cmp_stat)
- CPPUNIT_TEST(SkipList_RCU_GPT_turbopas_cmpless_stat)
- CPPUNIT_TEST(SkipList_RCU_GPT_michaelalloc_less)
- CPPUNIT_TEST(SkipList_RCU_GPT_michaelalloc_cmp)
- CPPUNIT_TEST(SkipList_RCU_GPT_michaelalloc_cmpless)
- CPPUNIT_TEST(SkipList_RCU_GPT_michaelalloc_less_stat)
- CPPUNIT_TEST(SkipList_RCU_GPT_michaelalloc_cmp_stat)
- CPPUNIT_TEST(SkipList_RCU_GPT_michaelalloc_cmpless_stat)
-
- CPPUNIT_TEST(SkipList_RCU_SHB_less)
- CPPUNIT_TEST(SkipList_RCU_SHB_cmp)
- CPPUNIT_TEST(SkipList_RCU_SHB_cmpless)
- CPPUNIT_TEST(SkipList_RCU_SHB_less_stat)
- CPPUNIT_TEST(SkipList_RCU_SHB_cmp_stat)
- CPPUNIT_TEST(SkipList_RCU_SHB_cmpless_stat)
- CPPUNIT_TEST(SkipList_RCU_SHB_xorshift_less)
- CPPUNIT_TEST(SkipList_RCU_SHB_xorshift_cmp)
- CPPUNIT_TEST(SkipList_RCU_SHB_xorshift_cmpless)
- CPPUNIT_TEST(SkipList_RCU_SHB_xorshift_less_stat)
- CPPUNIT_TEST(SkipList_RCU_SHB_xorshift_cmp_stat)
- CPPUNIT_TEST(SkipList_RCU_SHB_xorshift_cmpless_stat)
- CPPUNIT_TEST(SkipList_RCU_SHB_turbopas_less)
- CPPUNIT_TEST(SkipList_RCU_SHB_turbopas_cmp)
- CPPUNIT_TEST(SkipList_RCU_SHB_turbopas_cmpless)
- CPPUNIT_TEST(SkipList_RCU_SHB_turbopas_less_stat)
- CPPUNIT_TEST(SkipList_RCU_SHB_turbopas_cmp_stat)
- CPPUNIT_TEST(SkipList_RCU_SHB_turbopas_cmpless_stat)
- CPPUNIT_TEST(SkipList_RCU_SHB_michaelalloc_less)
- CPPUNIT_TEST(SkipList_RCU_SHB_michaelalloc_cmp)
- CPPUNIT_TEST(SkipList_RCU_SHB_michaelalloc_cmpless)
- CPPUNIT_TEST(SkipList_RCU_SHB_michaelalloc_less_stat)
- CPPUNIT_TEST(SkipList_RCU_SHB_michaelalloc_cmp_stat)
- CPPUNIT_TEST(SkipList_RCU_SHB_michaelalloc_cmpless_stat)
-
- CPPUNIT_TEST(SkipList_RCU_SHT_less)
- CPPUNIT_TEST(SkipList_RCU_SHT_cmp)
- CPPUNIT_TEST(SkipList_RCU_SHT_cmpless)
- CPPUNIT_TEST(SkipList_RCU_SHT_less_stat)
- CPPUNIT_TEST(SkipList_RCU_SHT_cmp_stat)
- CPPUNIT_TEST(SkipList_RCU_SHT_cmpless_stat)
- CPPUNIT_TEST(SkipList_RCU_SHT_xorshift_less)
- CPPUNIT_TEST(SkipList_RCU_SHT_xorshift_cmp)
- CPPUNIT_TEST(SkipList_RCU_SHT_xorshift_cmpless)
- CPPUNIT_TEST(SkipList_RCU_SHT_xorshift_less_stat)
- CPPUNIT_TEST(SkipList_RCU_SHT_xorshift_cmp_stat)
- CPPUNIT_TEST(SkipList_RCU_SHT_xorshift_cmpless_stat)
- CPPUNIT_TEST(SkipList_RCU_SHT_turbopas_less)
- CPPUNIT_TEST(SkipList_RCU_SHT_turbopas_cmp)
- CPPUNIT_TEST(SkipList_RCU_SHT_turbopas_cmpless)
- CPPUNIT_TEST(SkipList_RCU_SHT_turbopas_less_stat)
- CPPUNIT_TEST(SkipList_RCU_SHT_turbopas_cmp_stat)
- CPPUNIT_TEST(SkipList_RCU_SHT_turbopas_cmpless_stat)
- CPPUNIT_TEST(SkipList_RCU_SHT_michaelalloc_less)
- CPPUNIT_TEST(SkipList_RCU_SHT_michaelalloc_cmp)
- CPPUNIT_TEST(SkipList_RCU_SHT_michaelalloc_cmpless)
- CPPUNIT_TEST(SkipList_RCU_SHT_michaelalloc_less_stat)
- CPPUNIT_TEST(SkipList_RCU_SHT_michaelalloc_cmp_stat)
- CPPUNIT_TEST(SkipList_RCU_SHT_michaelalloc_cmpless_stat)
-
- CPPUNIT_TEST_SUITE_END()
-
- };
-}
-
-#endif // #ifndef CDSTEST_HDR_SKIPLIST_SET_RCU_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.
-*/
-
-#include "set/hdr_skiplist_set_rcu.h"
-
-#include <cds/urcu/general_buffered.h>
-#include <cds/container/skip_list_set_rcu.h>
-
-#include "unit/michael_alloc.h"
-#include "map/print_skiplist_stat.h"
-
-namespace set {
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type;
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_less()
- {
- struct set_traits : public cc::skip_list::traits
- {
- typedef SkipListSetRCUHdrTest::less<item> less;
- typedef simple_item_counter item_counter;
- };
- typedef cc::SkipListSet< rcu_type, item, set_traits > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_cmp()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_cmpless()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_less_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_cmp_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_cmpless_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_xorshift_less()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_xorshift_cmp()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_xorshift_cmpless()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_xorshift_less_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_xorshift_cmp_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_xorshift_cmpless_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_turbopas_less()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_turbopas_cmp()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_turbopas_cmpless()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_turbopas_less_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_turbopas_cmp_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_turbopas_cmpless_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_michaelalloc_less()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_michaelalloc_cmp()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_michaelalloc_cmpless()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_michaelalloc_less_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_michaelalloc_cmp_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPB_michaelalloc_cmpless_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-} // 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/hdr_skiplist_set_rcu.h"
-
-#include <cds/urcu/general_instant.h>
-#include <cds/container/skip_list_set_rcu.h>
-
-#include "unit/michael_alloc.h"
-#include "map/print_skiplist_stat.h"
-
-namespace set {
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type;
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_less()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_cmp()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_cmpless()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_less_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_cmp_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_cmpless_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_xorshift_less()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_xorshift_cmp()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_xorshift_cmpless()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_xorshift_less_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_xorshift_cmp_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_xorshift_cmpless_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_turbopas_less()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_turbopas_cmp()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_turbopas_cmpless()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_turbopas_less_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_turbopas_cmp_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_turbopas_cmpless_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_michaelalloc_less()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_michaelalloc_cmp()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_michaelalloc_cmpless()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_michaelalloc_less_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_michaelalloc_cmp_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPI_michaelalloc_cmpless_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-} // namespace set
-
-CPPUNIT_TEST_SUITE_REGISTRATION(set::SkipListSetRCUHdrTest);
+++ /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/hdr_skiplist_set_rcu.h"
-
-#include <cds/urcu/general_threaded.h>
-#include <cds/container/skip_list_set_rcu.h>
-
-#include "unit/michael_alloc.h"
-#include "map/print_skiplist_stat.h"
-
-namespace set {
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type;
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_less()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_cmp()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_cmpless()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_less_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_cmp_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_cmpless_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_xorshift_less()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_xorshift_cmp()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_xorshift_cmpless()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_xorshift_less_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_xorshift_cmp_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_xorshift_cmpless_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_turbopas_less()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_turbopas_cmp()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_turbopas_cmpless()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_turbopas_less_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_turbopas_cmp_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_turbopas_cmpless_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_michaelalloc_less()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_michaelalloc_cmp()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_michaelalloc_cmpless()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_michaelalloc_less_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_michaelalloc_cmp_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_GPT_michaelalloc_cmpless_stat()
- {
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-} // 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/hdr_skiplist_set_rcu.h"
-
-#include <cds/urcu/signal_buffered.h>
-#include <cds/container/skip_list_set_rcu.h>
-
-#include "unit/michael_alloc.h"
-#include "map/print_skiplist_stat.h"
-
-namespace set {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type;
- }
-#endif
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_cmpless()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_less_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_cmp_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_cmpless_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_xorshift_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_xorshift_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_xorshift_cmpless()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_xorshift_less_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_xorshift_cmp_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_xorshift_cmpless_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_turbopas_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_turbopas_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_turbopas_cmpless()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_turbopas_less_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_turbopas_cmp_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_turbopas_cmpless_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_michaelalloc_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_michaelalloc_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_michaelalloc_cmpless()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_michaelalloc_less_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_michaelalloc_cmp_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHB_michaelalloc_cmpless_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
-} // 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/hdr_skiplist_set_rcu.h"
-
-#include <cds/urcu/signal_threaded.h>
-#include <cds/container/skip_list_set_rcu.h>
-
-#include "unit/michael_alloc.h"
-#include "map/print_skiplist_stat.h"
-
-namespace set {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type;
- }
-#endif
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_cmpless()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_less_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_cmp_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_cmpless_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_xorshift_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_xorshift_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_xorshift_cmpless()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_xorshift_less_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_xorshift_cmp_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_xorshift_cmpless_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_turbopas_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_turbopas_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_turbopas_cmpless()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_turbopas_less_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_turbopas_cmp_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_turbopas_cmpless_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_michaelalloc_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_michaelalloc_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_michaelalloc_cmpless()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_michaelalloc_less_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_michaelalloc_cmp_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
- void SkipListSetRCUHdrTest::SkipList_RCU_SHT_michaelalloc_cmpless_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef cc::SkipListSet< rcu_type, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
-#endif
- }
-
-} // 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/hdr_set.h"
-#include <cds/container/michael_list_dhp.h>
-#include <cds/container/split_list_set.h>
-
-namespace set {
-
- namespace {
- struct DHP_cmp_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::relaxed_ordering memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
- };
-
- struct DHP_less_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::sequential_consistent memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct DHP_cmpmix_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct DHP_cmpmix_stat_traits : public DHP_cmpmix_traits
- {
- typedef cc::split_list::stat<> stat;
- };
- }
-
- void HashSetHdrTest::Split_DHP_cmp()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::DHP, item, DHP_cmp_traits > set;
-
- test_int< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::DHP, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::relaxed_ordering >
- ,cc::split_list::dynamic_bucket_table< true >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Split_DHP_less()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::DHP, item, DHP_less_traits > set;
-
- test_int< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::DHP, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::sequential_consistent >
- ,cc::split_list::dynamic_bucket_table< false >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Split_DHP_cmpmix()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::DHP, item, DHP_cmpmix_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::DHP, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Split_DHP_cmpmix_stat()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::DHP, item, DHP_cmpmix_stat_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::DHP, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- ,cds::opt::stat< cc::split_list::stat<> >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
-
-} // 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/hdr_set.h"
-#include <cds/container/michael_list_hp.h>
-#include <cds/container/split_list_set.h>
-
-namespace set {
-
- namespace {
- struct HP_cmp_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::relaxed_ordering memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
- };
-
- struct HP_less_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::sequential_consistent memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct HP_cmpmix_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct HP_cmpmix_stat_traits : public HP_cmpmix_traits
- {
- typedef cc::split_list::stat<> stat;
- };
- }
-
- void HashSetHdrTest::Split_HP_cmp()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::HP, item, HP_cmp_traits > set;
-
- test_int< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::HP, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::relaxed_ordering >
- ,cc::split_list::dynamic_bucket_table< true >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Split_HP_less()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::HP, item, HP_less_traits > set;
-
- test_int< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::HP, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::sequential_consistent >
- ,cc::split_list::dynamic_bucket_table< false >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Split_HP_cmpmix()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::HP, item, HP_cmpmix_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::HP, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Split_HP_cmpmix_stat()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::HP, item, HP_cmpmix_stat_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::HP, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- ,cds::opt::stat< cc::split_list::stat<> >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
-} // 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/hdr_set.h"
-#include <cds/container/lazy_list_dhp.h>
-#include <cds/container/split_list_set.h>
-
-namespace set {
-
- namespace {
- struct DHP_cmp_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::relaxed_ordering memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
- };
-
- struct DHP_less_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::sequential_consistent memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct DHP_cmpmix_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct DHP_cmpmix_stat_traits : public DHP_cmpmix_traits
- {
- typedef cc::split_list::stat<> stat;
- };
- }
-
- void HashSetHdrTest::Split_Lazy_DHP_cmp()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::DHP, item, DHP_cmp_traits > set;
-
- test_int< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::DHP, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::relaxed_ordering >
- ,cc::split_list::dynamic_bucket_table< true >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Split_Lazy_DHP_less()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::DHP, item, DHP_less_traits > set;
-
- test_int< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::DHP, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::sequential_consistent >
- ,cc::split_list::dynamic_bucket_table< false >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Split_Lazy_DHP_cmpmix()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::DHP, item, DHP_cmpmix_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::DHP, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Split_Lazy_DHP_cmpmix_stat()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::DHP, item, DHP_cmpmix_stat_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::DHP, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- ,cds::opt::stat< cc::split_list::stat<> >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
-} // 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/hdr_set.h"
-#include <cds/container/lazy_list_hp.h>
-#include <cds/container/split_list_set.h>
-
-namespace set {
-
- namespace {
- struct HP_cmp_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::relaxed_ordering memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
- };
-
- struct HP_less_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::sequential_consistent memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct HP_cmpmix_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct HP_cmpmix_stat_traits : public HP_cmpmix_traits
- {
- typedef cc::split_list::stat<> stat;
- };
- }
-
- void HashSetHdrTest::Split_Lazy_HP_cmp()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::HP, item, HP_cmp_traits > set;
-
- test_int< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::HP, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::relaxed_ordering >
- ,cc::split_list::dynamic_bucket_table< true >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Split_Lazy_HP_less()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::HP, item, HP_less_traits > set;
-
- test_int< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::HP, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::sequential_consistent >
- ,cc::split_list::dynamic_bucket_table< false >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Split_Lazy_HP_cmpmix()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::HP, item, HP_cmpmix_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::HP, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Split_Lazy_HP_cmpmix_stat()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::HP, item, HP_cmpmix_stat_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::HP, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cds::opt::stat< cc::split_list::stat<> >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
-} // 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/hdr_set.h"
-#include <cds/container/lazy_list_nogc.h>
-#include <cds/container/split_list_set_nogc.h>
-
-namespace set {
-
- namespace {
- struct nogc_cmp_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::relaxed_ordering memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
- };
-
- struct nogc_less_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::sequential_consistent memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct nogc_cmpmix_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct nogc_cmpmix_stat_traits : public nogc_cmpmix_traits
- {
- typedef cc::split_list::stat<> stat;
- };
- }
-
- void HashSetHdrTest::Split_Lazy_nogc_cmp()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::nogc, item, nogc_cmp_traits > set;
-
- test_int_nogc< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::nogc, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::relaxed_ordering >
- ,cc::split_list::dynamic_bucket_table< true >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_nogc< opt_set >();
- }
-
- void HashSetHdrTest::Split_Lazy_nogc_less()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::nogc, item, nogc_less_traits > set;
-
- test_int_nogc< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::nogc, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::sequential_consistent >
- ,cc::split_list::dynamic_bucket_table< false >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_nogc< opt_set >();
- }
-
- void HashSetHdrTest::Split_Lazy_nogc_cmpmix()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::nogc, item, nogc_cmpmix_traits > set;
- test_int_nogc< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::nogc, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_nogc< opt_set >();
- }
-
- void HashSetHdrTest::Split_Lazy_nogc_cmpmix_stat()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::nogc, item, nogc_cmpmix_stat_traits > set;
- test_int_nogc< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::nogc, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cds::opt::stat< cc::split_list::stat<>>
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_nogc< opt_set >();
- }
-
-} // 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/hdr_set.h"
-#include <cds/urcu/general_buffered.h>
-#include <cds/container/lazy_list_rcu.h>
-#include <cds/container/split_list_set_rcu.h>
-
-namespace set {
-
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type;
-
- struct RCU_GPB_cmp_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::relaxed_ordering memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
- };
-
- struct RCU_GPB_less_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::sequential_consistent memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct RCU_cmpmix_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits
- {
- typedef cc::split_list::stat<> stat;
- };
- }
-
- void HashSetHdrTest::Split_Lazy_RCU_GPB_cmp()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_GPB_cmp_traits > set;
-
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::relaxed_ordering >
- ,cc::split_list::dynamic_bucket_table< true >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
- }
-
- void HashSetHdrTest::Split_Lazy_RCU_GPB_less()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_GPB_less_traits > set;
-
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::sequential_consistent >
- ,cc::split_list::dynamic_bucket_table< false >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
- }
-
- void HashSetHdrTest::Split_Lazy_RCU_GPB_cmpmix()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
- }
-
- void HashSetHdrTest::Split_Lazy_RCU_GPB_cmpmix_stat()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::stat< cc::split_list::stat<>>
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
- }
-
-} // 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/hdr_set.h"
-#include <cds/urcu/general_instant.h>
-#include <cds/container/lazy_list_rcu.h>
-#include <cds/container/split_list_set_rcu.h>
-
-namespace set {
-
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type;
-
- struct RCU_GPI_cmp_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::relaxed_ordering memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
- };
-
- struct RCU_GPI_less_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::sequential_consistent memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct RCU_cmpmix_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits
- {
- typedef cc::split_list::stat<> stat;
- };
-
- }
-
- void HashSetHdrTest::Split_Lazy_RCU_GPI_cmp()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_GPI_cmp_traits > set;
-
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::relaxed_ordering >
- ,cc::split_list::dynamic_bucket_table< true >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
- }
-
- void HashSetHdrTest::Split_Lazy_RCU_GPI_less()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_GPI_less_traits > set;
-
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::sequential_consistent >
- ,cc::split_list::dynamic_bucket_table< false >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
- }
-
- void HashSetHdrTest::Split_Lazy_RCU_GPI_cmpmix()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
- }
-
- void HashSetHdrTest::Split_Lazy_RCU_GPI_cmpmix_stat()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- , cc::opt::stat< cc::split_list::stat<>>
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
- }
-
-} // 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/hdr_set.h"
-#include <cds/urcu/general_threaded.h>
-#include <cds/container/lazy_list_rcu.h>
-#include <cds/container/split_list_set_rcu.h>
-
-namespace set {
-
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type;
-
- struct RCU_GPT_cmp_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::relaxed_ordering memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
- };
-
- struct RCU_GPT_less_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::sequential_consistent memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct RCU_cmpmix_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits
- {
- typedef cc::split_list::stat<> stat;
- };
- }
-
- void HashSetHdrTest::Split_Lazy_RCU_GPT_cmp()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_GPT_cmp_traits > set;
-
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::relaxed_ordering >
- ,cc::split_list::dynamic_bucket_table< true >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
- }
-
- void HashSetHdrTest::Split_Lazy_RCU_GPT_less()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_GPT_less_traits > set;
-
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::sequential_consistent >
- ,cc::split_list::dynamic_bucket_table< false >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
- }
-
- void HashSetHdrTest::Split_Lazy_RCU_GPT_cmpmix()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
- }
-
- void HashSetHdrTest::Split_Lazy_RCU_GPT_cmpmix_stat()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- , cc::opt::stat< cc::split_list::stat<>>
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
- }
-
-} // 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/hdr_set.h"
-#include <cds/urcu/signal_buffered.h>
-#include <cds/container/lazy_list_rcu.h>
-#include <cds/container/split_list_set_rcu.h>
-
-namespace set {
-
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type;
-
- struct RCU_SHB_cmp_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::relaxed_ordering memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
- };
-
- struct RCU_SHB_less_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::sequential_consistent memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct RCU_cmpmix_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits
- {
- typedef cc::split_list::stat<> stat;
- };
-
- }
-#endif
-
- void HashSetHdrTest::Split_Lazy_RCU_SHB_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_SHB_cmp_traits > set;
-
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::relaxed_ordering >
- ,cc::split_list::dynamic_bucket_table< true >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
-#endif
- }
-
- void HashSetHdrTest::Split_Lazy_RCU_SHB_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_SHB_less_traits > set;
-
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::sequential_consistent >
- ,cc::split_list::dynamic_bucket_table< false >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
-#endif
- }
-
- void HashSetHdrTest::Split_Lazy_RCU_SHB_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
-#endif
- }
-
- void HashSetHdrTest::Split_Lazy_RCU_SHB_cmpmix_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- ,cc::opt::stat< cc::split_list::stat<>>
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
-#endif
- }
-
-} // 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/hdr_set.h"
-#include <cds/urcu/signal_threaded.h>
-#include <cds/container/lazy_list_rcu.h>
-#include <cds/container/split_list_set_rcu.h>
-
-namespace set {
-
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type;
-
- struct RCU_SHT_cmp_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::relaxed_ordering memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
- };
-
- struct RCU_SHT_less_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::sequential_consistent memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct RCU_cmpmix_traits: public cc::split_list::traits
- {
- typedef cc::lazy_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
-
- struct ordered_list_traits: public cc::lazy_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits
- {
- typedef cc::split_list::stat<> stat;
- };
-
- }
-#endif
-
- void HashSetHdrTest::Split_Lazy_RCU_SHT_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_SHT_cmp_traits > set;
-
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::relaxed_ordering >
- ,cc::split_list::dynamic_bucket_table< true >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
-#endif
- }
-
- void HashSetHdrTest::Split_Lazy_RCU_SHT_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_SHT_less_traits > set;
-
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::sequential_consistent >
- ,cc::split_list::dynamic_bucket_table< false >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
-#endif
- }
-
- void HashSetHdrTest::Split_Lazy_RCU_SHT_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
-#endif
- }
-
- void HashSetHdrTest::Split_Lazy_RCU_SHT_cmpmix_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set;
- test_int_rcu< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::lazy_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::lazy_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- ,cc::opt::stat< cc::split_list::stat<>>
- >::type
- > opt_set;
- test_int_rcu< opt_set >();
-#endif
- }
-
-} // 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/hdr_set.h"
-#include <cds/container/michael_list_nogc.h>
-#include <cds/container/split_list_set_nogc.h>
-
-namespace set {
-
- namespace {
- struct nogc_cmp_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::relaxed_ordering memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
- };
-
- struct nogc_less_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::sequential_consistent memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct nogc_cmpmix_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct nogc_cmpmix_stat_traits : public nogc_cmpmix_traits
- {
- typedef cc::split_list::stat<> stat;
- };
- }
-
- void HashSetHdrTest::Split_nogc_cmp()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::nogc, item, nogc_cmp_traits > set;
-
- test_int_nogc< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::nogc, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::relaxed_ordering >
- ,cc::split_list::dynamic_bucket_table< true >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_nogc< opt_set >();
- }
-
- void HashSetHdrTest::Split_nogc_less()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::nogc, item, nogc_less_traits > set;
-
- test_int_nogc< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::nogc, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::sequential_consistent >
- ,cc::split_list::dynamic_bucket_table< false >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_nogc< opt_set >();
- }
-
- void HashSetHdrTest::Split_nogc_cmpmix()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::nogc, item, nogc_cmpmix_traits > set;
- test_int_nogc< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::nogc, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_nogc< opt_set >();
- }
-
- void HashSetHdrTest::Split_nogc_cmpmix_stat()
- {
- // traits-based version
- typedef cc::SplitListSet< cds::gc::nogc, item, nogc_cmpmix_stat_traits > set;
- test_int_nogc< set >();
-
- // option-based version
- typedef cc::SplitListSet< cds::gc::nogc, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::stat< cc::split_list::stat<>>
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_nogc< opt_set >();
- }
-
-} // 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/hdr_set.h"
-#include <cds/urcu/general_buffered.h>
-#include <cds/container/michael_list_rcu.h>
-#include <cds/container/split_list_set_rcu.h>
-
-namespace set {
-
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type;
-
- struct RCU_GPB_cmp_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::relaxed_ordering memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
- };
-
- struct RCU_GPB_less_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::sequential_consistent memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct RCU_cmpmix_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits
- {
- typedef cc::split_list::stat<> stat;
- };
-
- }
-
- void HashSetHdrTest::Split_RCU_GPB_cmp()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_GPB_cmp_traits > set;
-
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::relaxed_ordering >
- ,cc::split_list::dynamic_bucket_table< true >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
- }
-
- void HashSetHdrTest::Split_RCU_GPB_less()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_GPB_less_traits > set;
-
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::sequential_consistent >
- ,cc::split_list::dynamic_bucket_table< false >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
- }
-
- void HashSetHdrTest::Split_RCU_GPB_cmpmix()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
- }
-
- void HashSetHdrTest::Split_RCU_GPB_cmpmix_stat()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- , cc::opt::stat< cc::split_list::stat<>>
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
- }
-
-} // 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/hdr_set.h"
-#include <cds/urcu/general_instant.h>
-#include <cds/container/michael_list_rcu.h>
-#include <cds/container/split_list_set_rcu.h>
-
-namespace set {
-
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type;
-
- struct RCU_GPI_cmp_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::relaxed_ordering memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
- };
-
- struct RCU_GPI_less_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::sequential_consistent memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct RCU_cmpmix_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits
- {
- typedef cc::split_list::stat<> stat;
- };
- }
-
- void HashSetHdrTest::Split_RCU_GPI_cmp()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_GPI_cmp_traits > set;
-
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::relaxed_ordering >
- ,cc::split_list::dynamic_bucket_table< true >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
- }
-
- void HashSetHdrTest::Split_RCU_GPI_less()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_GPI_less_traits > set;
-
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::sequential_consistent >
- ,cc::split_list::dynamic_bucket_table< false >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
- }
-
- void HashSetHdrTest::Split_RCU_GPI_cmpmix()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
- }
-
- void HashSetHdrTest::Split_RCU_GPI_cmpmix_stat()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- , cc::opt::stat< cc::split_list::stat<>>
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
- }
-
-} // 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/hdr_set.h"
-#include <cds/urcu/general_threaded.h>
-#include <cds/container/michael_list_rcu.h>
-#include <cds/container/split_list_set_rcu.h>
-
-namespace set {
-
- namespace {
- typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type;
-
- struct RCU_GPT_cmp_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::relaxed_ordering memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
- };
-
- struct RCU_GPT_less_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::sequential_consistent memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct RCU_cmpmix_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits
- {
- typedef cc::split_list::stat<> stat;
- };
-
- }
-
- void HashSetHdrTest::Split_RCU_GPT_cmp()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_GPT_cmp_traits > set;
-
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::relaxed_ordering >
- ,cc::split_list::dynamic_bucket_table< true >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
- }
-
- void HashSetHdrTest::Split_RCU_GPT_less()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_GPT_less_traits > set;
-
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::sequential_consistent >
- ,cc::split_list::dynamic_bucket_table< false >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
- }
-
- void HashSetHdrTest::Split_RCU_GPT_cmpmix()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
- }
-
- void HashSetHdrTest::Split_RCU_GPT_cmpmix_stat()
- {
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- , cc::opt::stat< cc::split_list::stat<>>
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
- }
-
-} // 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/hdr_set.h"
-#include <cds/urcu/signal_buffered.h>
-#include <cds/container/michael_list_rcu.h>
-#include <cds/container/split_list_set_rcu.h>
-
-namespace set {
-
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type;
-
- struct RCU_SHB_cmp_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::relaxed_ordering memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
- };
-
- struct RCU_SHB_less_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::sequential_consistent memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct RCU_cmpmix_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits
- {
- typedef cc::split_list::stat<> stat;
- };
-
- }
-#endif
-
- void HashSetHdrTest::Split_RCU_SHB_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_SHB_cmp_traits > set;
-
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::relaxed_ordering >
- ,cc::split_list::dynamic_bucket_table< true >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
-#endif
- }
-
- void HashSetHdrTest::Split_RCU_SHB_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_SHB_less_traits > set;
-
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::sequential_consistent >
- ,cc::split_list::dynamic_bucket_table< false >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
-#endif
- }
-
- void HashSetHdrTest::Split_RCU_SHB_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
-#endif
- }
-
- void HashSetHdrTest::Split_RCU_SHB_cmpmix_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- ,cc::opt::stat< cc::split_list::stat<>>
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
-#endif
- }
-
-} // 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/hdr_set.h"
-#include <cds/urcu/signal_threaded.h>
-#include <cds/container/michael_list_rcu.h>
-#include <cds/container/split_list_set_rcu.h>
-
-namespace set {
-
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- namespace {
- typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type;
-
- struct RCU_SHT_cmp_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::relaxed_ordering memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
- };
-
- struct RCU_SHT_less_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- typedef cc::opt::v::sequential_consistent memory_model;
- enum { dynamic_bucket_table = false };
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct RCU_cmpmix_traits: public cc::split_list::traits
- {
- typedef cc::michael_list_tag ordered_list;
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
-
- struct ordered_list_traits: public cc::michael_list::traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- };
-
- struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits
- {
- typedef cc::split_list::stat<> stat;
- };
-
- }
-#endif
-
- void HashSetHdrTest::Split_RCU_SHT_cmp()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_SHT_cmp_traits > set;
-
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::relaxed_ordering >
- ,cc::split_list::dynamic_bucket_table< true >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
-#endif
- }
-
- void HashSetHdrTest::Split_RCU_SHT_less()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_SHT_less_traits > set;
-
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::memory_model< cc::opt::v::sequential_consistent >
- ,cc::split_list::dynamic_bucket_table< false >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
-#endif
- }
-
- void HashSetHdrTest::Split_RCU_SHT_cmpmix()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
-#endif
- }
-
- void HashSetHdrTest::Split_RCU_SHT_cmpmix_stat()
- {
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- // traits-based version
- typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set;
- test_int_rcu_michael_list< set >();
-
- // option-based version
- typedef cc::SplitListSet< rcu_type, item,
- cc::split_list::make_traits<
- cc::split_list::ordered_list<cc::michael_list_tag>
- ,cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- ,cc::opt::stat< cc::split_list::stat<>>
- ,cc::split_list::ordered_list_traits<
- cc::michael_list::make_traits<
- cc::opt::less< less<item> >
- ,cc::opt::compare< cmp<item> >
- >::type
- >
- >::type
- > opt_set;
- test_int_rcu_michael_list< opt_set >();
-#endif
- }
-
-} // 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/hdr_striped_set.h"
-
-#include <boost/version.hpp>
-#include <cds/details/defs.h>
-#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500
-namespace set {
- void StripedSetHdrTest::Striped_boost_flat_set()
- {
- CPPUNIT_MESSAGE("Skipped; for Microsoft Visual C++ 2013 and boost::container::flat_set you should use boost version 1.56 or above");
- }
-}
-
-#elif BOOST_VERSION >= 104800
-
-#include <cds/container/striped_set/boost_flat_set.h>
-#include <cds/container/striped_set.h>
-#include <cds/sync/spinlock.h>
-
-namespace set {
-
- namespace {
- typedef boost::container::flat_set< StripedSetHdrTest::item, StripedSetHdrTest::less<StripedSetHdrTest::item> > set_t;
-
- struct my_copy_policy {
- typedef set_t::iterator iterator;
-
- void operator()( set_t& set, iterator itWhat )
- {
- set.insert( *itWhat );
- }
- };
- }
-
- void StripedSetHdrTest::Striped_boost_flat_set()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- > set_cmp;
- test_striped< set_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_less;
- test_striped< set_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::less< less<item> >
- > set_cmpmix;
- test_striped< set_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- ,co::mutex_policy< cc::striped_set::striping< cds::sync::spin> >
- > set_spin;
- test_striped< set_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)");
- {
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > set_less_resizing_lf;
-
- set_less_resizing_lf s( 30, cc::striped_set::load_factor_resizing<0>( 1024 ) );
- test_striped_with( s );
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- > set_less_resizing_lf16;
- test_striped< set_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024)");
- {
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > set_less_resizing_sbt;
-
- set_less_resizing_sbt s( 30, cc::striped_set::single_bucket_size_threshold<0>( 1024 ) );
- test_striped_with( s );
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> >
- > set_less_resizing_sbt16;
- test_striped< set_less_resizing_sbt16 >();
-
- // Copy policy
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped< set_copy_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped< set_swap_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped< set_move_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_policy");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped< set_special_copy_item >();
-
- }
-
-} // namespace set
-
-/*
-#else
- namespace set {
- void StripedSetHdrTest::Striped_boost_flat_set()
- {
- CPPUNIT_MESSAGE( "Skipped; boost::container::flat_set is not compatible with MS VC++ 11" );
- }
- }
-#endif
-*/
-
-#else // BOOST_VERSION < 104800
-
-namespace set {
- void StripedSetHdrTest::Striped_boost_flat_set()
- {
- CPPUNIT_MESSAGE( "Skipped; for boost::container::flat_set you should use boost version 1.48 or above" );
- }
-}
-#endif // BOOST_VERSION
+++ /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/hdr_striped_set.h"
-
-#include <boost/version.hpp>
-#include <cds/details/defs.h>
-#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500
-namespace set {
- void StripedSetHdrTest::Striped_boost_list()
- {
- CPPUNIT_MESSAGE("Skipped; for Microsoft Visual C++ 2013 and boost::container::list you should use boost version 1.56 or above");
- }
-}
-
-#elif BOOST_VERSION >= 104800
-
-#include <cds/container/striped_set/boost_list.h>
-#include <cds/container/striped_set.h>
-#include <cds/sync/spinlock.h>
-
-namespace set {
-
- namespace {
- struct my_copy_policy {
- typedef boost::container::list<StripedSetHdrTest::item> list_type;
- typedef list_type::iterator iterator;
-
- void operator()( list_type& list, iterator itInsert, iterator itWhat )
- {
- list.insert( itInsert, std::make_pair(itWhat->key(), itWhat->val()) );
- }
- };
- typedef boost::container::list<StripedSetHdrTest::item> sequence_t;
- }
-
- void StripedSetHdrTest::Striped_boost_list()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- > set_cmp;
- test_striped2< set_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- > set_less;
- test_striped2< set_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::less< less<item> >
- > set_cmpmix;
- test_striped2< set_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::mutex_policy< cc::striped_set::striping< cds::sync::spin> >
- > set_spin;
- test_striped2< set_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > set_less_resizing_lf;
- set_less_resizing_lf s( 30, cc::striped_set::load_factor_resizing<0>(8));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<4>");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<4> >
- > set_less_resizing_lf16;
- test_striped2< set_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > set_less_resizing_sbt;
- set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8) );
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> >
- > set_less_resizing_sbt6;
- test_striped2< set_less_resizing_sbt6 >();
-
-
- // Copy policy
- CPPUNIT_MESSAGE( "copy_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped2< set_copy_item >();
-
- CPPUNIT_MESSAGE( "swap_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped2< set_swap_item >();
-
- CPPUNIT_MESSAGE( "move_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped2< set_move_item >();
-
- CPPUNIT_MESSAGE( "special copy policy");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped2< set_special_copy_item >();
- }
-
-} // namespace set
-
-#else // BOOST_VERSION < 104800
-
-namespace set {
- void StripedSetHdrTest::Striped_boost_list()
- {
- CPPUNIT_MESSAGE( "Skipped; for boost::container::list you should use boost version 1.48 or above" );
- }
-}
-#endif // BOOST_VERSION
+++ /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/hdr_striped_set.h"
-
-#include <boost/version.hpp>
-#include <cds/details/defs.h>
-#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500
-namespace set {
- void StripedSetHdrTest::Striped_boost_set()
- {
- CPPUNIT_MESSAGE("Skipped; for Microsoft Visual C++ 2013 and boost::container::set you should use boost version 1.56 or above");
- }
-}
-
-#elif BOOST_VERSION >= 104800
-
-#include <cds/container/striped_set/boost_set.h>
-#include <cds/container/striped_set.h>
-#include <cds/sync/spinlock.h>
-
-namespace set {
-
- namespace {
- typedef boost::container::set< StripedSetHdrTest::item, StripedSetHdrTest::less<StripedSetHdrTest::item> > set_t;
-
- struct my_copy_policy {
- typedef set_t::iterator iterator;
-
- void operator()( set_t& set, iterator itWhat )
- {
- set.insert( *itWhat );
- }
- };
- }
-
- void StripedSetHdrTest::Striped_boost_set()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- > set_cmp;
- test_striped< set_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- > set_less;
- test_striped< set_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::less< less<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- > set_cmpmix;
- test_striped< set_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::mutex_policy< cc::striped_set::striping< cds::sync::spin> >
- > set_spin;
- test_striped< set_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)");
- {
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > set_less_resizing_lf;
- set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>( 1024 ));
- test_striped_with( s );
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- > set_less_resizing_lf16;
- test_striped< set_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024");
- {
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > set_less_resizing_sbt;
- set_less_resizing_sbt s( 30, cc::striped_set::single_bucket_size_threshold<0>(1024));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> >
- > set_less_resizing_sbt16;
- test_striped< set_less_resizing_sbt16 >();
-
- // Copy policy
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped< set_copy_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped< set_swap_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped< set_move_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_item");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped< set_special_copy_item >();
- }
-
-} // namespace set
-
-#else // BOOST_VERSION < 104800
-
-namespace set {
- void StripedSetHdrTest::Striped_boost_set()
- {
- CPPUNIT_MESSAGE( "Skipped; for boost::container::set you should use boost version 1.48 or above" );
- }
-}
-#endif // BOOST_VERSION
+++ /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/hdr_striped_set.h"
-
-#include <boost/version.hpp>
-#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500
-namespace set {
- void StripedSetHdrTest::Striped_boost_stable_vector()
- {
- CPPUNIT_MESSAGE("Skipped; for Microsoft Visual C++ 2013 and boost::container::stable_vector you should use boost version 1.56 or above");
- }
-}
-
-#elif BOOST_VERSION >= 104800
-
-#include <cds/details/defs.h>
-
-#include <cds/container/striped_set/boost_stable_vector.h>
-#include <cds/container/striped_set.h>
-#include <cds/sync/spinlock.h>
-
-namespace set {
-
- namespace {
- struct my_copy_policy {
- typedef boost::container::stable_vector<StripedSetHdrTest::item> vector_type;
- typedef vector_type::iterator iterator;
-
- void operator()( vector_type& vec, iterator itInsert, iterator itWhat )
- {
- vec.insert( itInsert, *itWhat );
- }
- };
-
- typedef boost::container::stable_vector<StripedSetHdrTest::item> sequence_t;
- }
-
- void StripedSetHdrTest::Striped_boost_stable_vector()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- > set_cmp;
- test_striped2< set_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- ,co::mutex_policy< cc::striped_set::striping<> >
- , co::less< less<item> >
- > set_less;
- test_striped2< set_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- , co::less< less<item> >
- > set_cmpmix;
- test_striped2< set_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::mutex_policy< cc::striped_set::striping< cds::sync::spin> >
- > set_spin;
- test_striped2< set_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > set_less_resizing_lf;
- set_less_resizing_lf s( 30, cc::striped_set::load_factor_resizing<0>(8));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<4>");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<4> >
- > set_less_resizing_lf16;
- test_striped2< set_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > set_less_resizing_sbt;
- set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8) );
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> >
- > set_less_resizing_sbt6;
- test_striped2< set_less_resizing_sbt6 >();
-
- // Copy policy
- CPPUNIT_MESSAGE( "copy_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped2< set_copy_item >();
-
- CPPUNIT_MESSAGE( "swap_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped2< set_swap_item >();
-
- CPPUNIT_MESSAGE( "move_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped2< set_move_item >();
-
- CPPUNIT_MESSAGE( "special copy_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped2< set_special_copy_item >();
- }
-} // namespace set
-
-#else // BOOST_VERSION < 104800
-
-namespace set {
- void StripedSetHdrTest::Striped_boost_stable_vector()
- {
- CPPUNIT_MESSAGE( "Skipped; for boost::container::stable_vector you should use boost version 1.48 or above" );
- }
-}
-#endif // BOOST_VERSION
+++ /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/hdr_striped_set.h"
-#include <cds/container/striped_set/boost_unordered_set.h>
-#include <cds/container/striped_set.h>
-#include <cds/sync/spinlock.h>
-
-namespace set {
-
- namespace {
- struct equal_item
- {
- template <typename T>
- bool operator ()( T const& i1, T const& i2) const
- {
- return i1.key() == i2.key();
- }
- };
-
- typedef boost::unordered_set< StripedSetHdrTest::item, StripedSetHdrTest::hash_int, equal_item > set_t;
-
- struct my_copy_policy {
- typedef set_t::iterator iterator;
-
- void operator()( set_t& set, iterator itWhat )
- {
- set.insert( std::make_pair(itWhat->key(), itWhat->val()) );
- }
- };
- }
-
- void StripedSetHdrTest::Striped_boost_unordered_set()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- > set_cmp;
- test_striped< set_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- > set_less;
- test_striped< set_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::less< less<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- > set_cmpmix;
- test_striped< set_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::mutex_policy< cc::striped_set::striping< cds::sync::spin> >
- > set_spin;
- test_striped< set_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)");
- {
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > set_less_resizing_lf;
- set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>( 1024 ));
- test_striped_with( s );
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- > set_less_resizing_lf16;
- test_striped< set_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024");
- {
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > set_less_resizing_sbt;
- set_less_resizing_sbt s( 30, cc::striped_set::single_bucket_size_threshold<0>(1024));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> >
- > set_less_resizing_sbt16;
- test_striped< set_less_resizing_sbt16 >();
-
- // Copy policy
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped< set_copy_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped< set_swap_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped< set_move_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_item");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped< set_special_copy_item >();
- }
-
-} // 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/hdr_striped_set.h"
-
-#include <boost/version.hpp>
-#include <cds/details/defs.h>
-#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500
-namespace set {
- void StripedSetHdrTest::Striped_boost_vector()
- {
- CPPUNIT_MESSAGE("Skipped; for Microsoft Visual C++ 2013 and boost::container::vector you should use boost version 1.56 or above");
- }
-}
-
-#elif BOOST_VERSION >= 104800
-
-#include <cds/container/striped_set/boost_vector.h>
-#include <cds/container/striped_set.h>
-#include <cds/sync/spinlock.h>
-
-namespace set {
-
- namespace {
- struct my_copy_policy {
- typedef boost::container::vector<StripedSetHdrTest::item> vector_type;
- typedef vector_type::iterator iterator;
-
- void operator()( vector_type& vec, iterator itInsert, iterator itWhat )
- {
- vec.insert( itInsert, *itWhat );
- }
- };
-
- typedef boost::container::vector<StripedSetHdrTest::item> sequence_t;
- }
-
- void StripedSetHdrTest::Striped_boost_vector()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- > set_cmp;
- test_striped2< set_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- ,co::mutex_policy< cc::striped_set::striping<> >
- , co::less< less<item> >
- > set_less;
- test_striped2< set_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- , co::less< less<item> >
- > set_cmpmix;
- test_striped2< set_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::mutex_policy< cc::striped_set::striping< cds::sync::spin> >
- > set_spin;
- test_striped2< set_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > set_less_resizing_lf;
- set_less_resizing_lf s( 30, cc::striped_set::load_factor_resizing<0>(8));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<4>");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<4> >
- > set_less_resizing_lf16;
- test_striped2< set_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > set_less_resizing_sbt;
- set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8) );
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> >
- > set_less_resizing_sbt6;
- test_striped2< set_less_resizing_sbt6 >();
-
- // Copy policy
- CPPUNIT_MESSAGE( "copy_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped2< set_copy_item >();
-
- CPPUNIT_MESSAGE( "swap_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped2< set_swap_item >();
-
- CPPUNIT_MESSAGE( "move_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped2< set_move_item >();
-
- CPPUNIT_MESSAGE( "special copy_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped2< set_special_copy_item >();
- }
-
-} // namespace set
-
-#else // BOOST_VERSION < 104800
-
-namespace set {
- void StripedSetHdrTest::Striped_boost_vector()
- {
- CPPUNIT_MESSAGE( "Skipped; for boost::container::vector you should use boost version 1.48 or above" );
- }
-}
-#endif // BOOST_VERSION
+++ /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/hdr_striped_set.h"
-#include <cds/container/striped_set/std_hash_set.h>
-#include <cds/container/striped_set.h>
-#include <cds/sync/spinlock.h>
-
-namespace set {
-
- namespace {
- struct equal_item
- {
- template <typename T>
- bool operator ()( T const& i1, T const& i2) const
- {
- return i1.key() == i2.key();
- }
- };
-
- typedef std::unordered_set< StripedSetHdrTest::item, StripedSetHdrTest::hash_int, equal_item > set_t;
-
- struct my_copy_policy {
- typedef set_t::iterator iterator;
-
- void operator()( set_t& set, iterator itWhat )
- {
- set.insert( std::make_pair(itWhat->key(), itWhat->val()) );
- }
- };
- }
-
- void StripedSetHdrTest::Striped_hashset()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- > set_cmp;
- test_striped< set_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- > set_less;
- test_striped< set_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::less< less<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- > set_cmpmix;
- test_striped< set_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::mutex_policy< cc::striped_set::striping< cds::sync::spin> >
- > set_spin;
- test_striped< set_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)");
- {
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > set_less_resizing_lf;
- set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>( 1024 ));
- test_striped_with( s );
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- > set_less_resizing_lf16;
- test_striped< set_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024");
- {
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > set_less_resizing_sbt;
- set_less_resizing_sbt s( 30, cc::striped_set::single_bucket_size_threshold<0>(1024));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> >
- > set_less_resizing_sbt16;
- test_striped< set_less_resizing_sbt16 >();
-
- // Copy policy
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped< set_copy_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped< set_swap_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped< set_move_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_item");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped< set_special_copy_item >();
-
- }
-
-} // 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/hdr_striped_set.h"
-#include <cds/container/striped_set/std_list.h>
-#include <cds/container/striped_set.h>
-#include <cds/sync/spinlock.h>
-
-namespace set {
-
- namespace {
- struct my_copy_policy {
- typedef std::list<StripedSetHdrTest::item> list_type;
- typedef list_type::iterator iterator;
-
- void operator()( list_type& list, iterator itInsert, iterator itWhat )
- {
- list.insert( itInsert, std::make_pair(itWhat->key(), itWhat->val()) );
- }
- };
-
- typedef std::list<StripedSetHdrTest::item> sequence_t;
- }
-
- void StripedSetHdrTest::Striped_list()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- > set_cmp;
- test_striped2< set_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- ,co::mutex_policy< cc::striped_set::striping<> >
- , co::less< less<item> >
- > set_less;
- test_striped2< set_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- , co::less< less<item> >
- > set_cmpmix;
- test_striped2< set_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::mutex_policy< cc::striped_set::striping< cds::sync::spin> >
- > set_spin;
- test_striped2< set_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > set_less_resizing_lf;
- set_less_resizing_lf s( 30, cc::striped_set::load_factor_resizing<0>(8));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<4>");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<4> >
- > set_less_resizing_lf16;
- test_striped2< set_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > set_less_resizing_sbt;
- set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8) );
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> >
- > set_less_resizing_sbt6;
- test_striped2< set_less_resizing_sbt6 >();
-
- // Copy policy
- CPPUNIT_MESSAGE( "copy_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped2< set_copy_item >();
-
- CPPUNIT_MESSAGE( "swap_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped2< set_swap_item >();
-
- CPPUNIT_MESSAGE( "move_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped2< set_move_item >();
-
- CPPUNIT_MESSAGE( "special copy_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped2< set_special_copy_item >();
-
- }
-
-} // 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/hdr_striped_set.h"
-#include <cds/container/striped_set/std_set.h>
-#include <cds/container/striped_set.h>
-#include <cds/sync/spinlock.h>
-
-namespace set {
-
- namespace {
- struct my_copy_policy {
- typedef std::set<StripedSetHdrTest::item, StripedSetHdrTest::less<StripedSetHdrTest::item> > set_type;
- typedef set_type::iterator iterator;
-
- void operator()( set_type& set, iterator itWhat )
- {
- set.insert( std::make_pair(itWhat->key(), itWhat->val()) );
- }
- };
-
- typedef std::set<StripedSetHdrTest::item, StripedSetHdrTest::less<StripedSetHdrTest::item> > set_t;
- }
-
- void StripedSetHdrTest::Striped_set()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- > set_cmp;
- test_striped< set_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- > set_less;
- test_striped< set_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::less< less<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- > set_cmpmix;
- test_striped< set_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::mutex_policy< cc::striped_set::striping< cds::sync::spin> >
- > set_spin;
- test_striped< set_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)");
- {
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > set_less_resizing_lf;
- set_less_resizing_lf s(30, cc::striped_set::load_factor_resizing<0>( 1024 ));
- test_striped_with( s );
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- > set_less_resizing_lf16;
- test_striped< set_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024");
- {
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > set_less_resizing_sbt;
- set_less_resizing_sbt s( 30, cc::striped_set::single_bucket_size_threshold<0>(1024));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> >
- > set_less_resizing_sbt16;
- test_striped< set_less_resizing_sbt16 >();
-
- // Copy policy
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped< set_copy_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped< set_swap_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped< set_move_item >();
-
- CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_item");
- typedef cc::StripedSet< set_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<256> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped< set_special_copy_item >();
- }
-
-} // 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/hdr_striped_set.h"
-#include <boost/version.hpp>
-#include <cds/details/defs.h>
-#if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION == CDS_COMPILER_MSVC12 && BOOST_VERSION <= 105500
-namespace set {
- void StripedSetHdrTest::Striped_slist()
- {
- CPPUNIT_MESSAGE("Skipped; for Microsoft Visual C++ 2013 and boost::container::slist you should use boost version 1.56 or above");
- }
-}
-
-#elif BOOST_VERSION >= 104800
-
-#include <cds/container/striped_set/boost_slist.h>
-#include <cds/container/striped_set.h>
-#include <cds/sync/spinlock.h>
-
-namespace set {
-
- namespace {
- struct my_copy_policy {
- typedef boost::container::slist<StripedSetHdrTest::item> list_type;
- typedef list_type::iterator iterator;
-
- void operator()( list_type& list, iterator itInsert, iterator itWhat )
- {
- list.insert_after( itInsert, StripedSetHdrTest::item(std::make_pair(itWhat->key(), itWhat->val())) );
- }
- };
-
- typedef boost::container::slist<StripedSetHdrTest::item> sequence_t;
- }
-
- void StripedSetHdrTest::Striped_slist()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- > set_cmp;
- test_striped2< set_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- ,co::mutex_policy< cc::striped_set::striping<> >
- , co::less< less<item> >
- > set_less;
- test_striped2< set_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- , co::less< less<item> >
- > set_cmpmix;
- test_striped2< set_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::mutex_policy< cc::striped_set::striping< cds::sync::spin> >
- > set_spin;
- test_striped2< set_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > set_less_resizing_lf;
- set_less_resizing_lf s( 30, cc::striped_set::load_factor_resizing<0>(8));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<4>");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<4> >
- > set_less_resizing_lf16;
- test_striped2< set_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > set_less_resizing_sbt;
- set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8) );
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> >
- > set_less_resizing_sbt6;
- test_striped2< set_less_resizing_sbt6 >();
-
- // Copy policy
- CPPUNIT_MESSAGE( "copy_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped2< set_copy_item >();
-
- CPPUNIT_MESSAGE( "swap_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped2< set_swap_item >();
-
- CPPUNIT_MESSAGE( "move_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped2< set_move_item >();
-
- CPPUNIT_MESSAGE( "special copy_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped2< set_special_copy_item >();
- }
-
-} // namespace set
-
-
-#else
-
-namespace set {
- void StripedSetHdrTest::Striped_slist()
- {
- CPPUNIT_MESSAGE("Skipped; for boost::container::slist you should use boost version 1.48 or above");
- }
-} // namespace set
-
-#endif // BOOST_VERSION
-
+++ /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/hdr_striped_set.h"
-#include <cds/container/striped_set/std_vector.h>
-#include <cds/container/striped_set.h>
-#include <cds/sync/spinlock.h>
-
-namespace set {
-
- namespace {
- struct my_copy_policy {
- typedef std::vector<StripedSetHdrTest::item> vector_type;
- typedef vector_type::iterator iterator;
-
- void operator()( vector_type& vec, iterator itInsert, iterator itWhat )
- {
- vec.insert( itInsert, std::make_pair(itWhat->key(), itWhat->val()) );
- }
- };
-
- typedef std::vector<StripedSetHdrTest::item> sequence_t;
- }
-
- void StripedSetHdrTest::Striped_vector()
- {
- CPPUNIT_MESSAGE( "cmp");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- > set_cmp;
- test_striped2< set_cmp >();
-
- CPPUNIT_MESSAGE( "less");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- ,co::mutex_policy< cc::striped_set::striping<> >
- , co::less< less<item> >
- > set_less;
- test_striped2< set_less >();
-
- CPPUNIT_MESSAGE( "cmpmix");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- ,co::mutex_policy< cc::striped_set::striping<> >
- , co::less< less<item> >
- > set_cmpmix;
- test_striped2< set_cmpmix >();
-
- // Spinlock as lock policy
- CPPUNIT_MESSAGE( "spinlock");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::mutex_policy< cc::striped_set::striping< cds::sync::spin> >
- > set_spin;
- test_striped2< set_spin >();
-
- // Resizing policy
- CPPUNIT_MESSAGE( "load_factor_resizing<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<0> >
- > set_less_resizing_lf;
- set_less_resizing_lf s( 30, cc::striped_set::load_factor_resizing<0>(8));
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "load_factor_resizing<4>");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::load_factor_resizing<4> >
- > set_less_resizing_lf16;
- test_striped2< set_less_resizing_lf16 >();
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(8)");
- {
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> >
- > set_less_resizing_sbt;
- set_less_resizing_sbt s(30, cc::striped_set::single_bucket_size_threshold<0>(8) );
- test_striped_with(s);
- }
-
- CPPUNIT_MESSAGE( "single_bucket_size_threshold<6>");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::less< less<item> >
- , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<6> >
- > set_less_resizing_sbt6;
- test_striped2< set_less_resizing_sbt6 >();
-
- // Copy policy
- CPPUNIT_MESSAGE( "copy_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::copy_item >
- > set_copy_item;
- test_striped2< set_copy_item >();
-
- CPPUNIT_MESSAGE( "swap_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::swap_item >
- > set_swap_item;
- test_striped2< set_swap_item >();
-
- CPPUNIT_MESSAGE( "move_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< cc::striped_set::move_item >
- > set_move_item;
- test_striped2< set_move_item >();
-
- CPPUNIT_MESSAGE( "special copy_item");
- typedef cc::StripedSet< sequence_t
- , co::hash< hash_int >
- , co::compare< cmp<item> >
- , co::copy_policy< my_copy_policy >
- > set_special_copy_item;
- test_striped2< set_special_copy_item >();
- }
-
-} // namespace set
-
-CPPUNIT_TEST_SUITE_REGISTRATION(set::StripedSetHdrTest);
+++ /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 CDSTEST_HDR_STRIPED_SET_H
-#define CDSTEST_HDR_STRIPED_SET_H
-
-#include "cppunit/cppunit_proxy.h"
-#include "size_check.h"
-
-#include <cds/opt/hash.h>
-#include <cds/os/timer.h>
-#include <functional> // ref
-
-// forward namespace declaration
-namespace cds {
- namespace container {}
- namespace opt {}
-}
-
-namespace set {
- using misc::check_size;
-
- namespace cc = cds::container;
- namespace co = cds::opt;
-
-
- class StripedSetHdrTest: public CppUnitMini::TestCase
- {
- public:
- struct stat
- {
- unsigned int nFindCount ; // count of find-functor calling
- unsigned int nUpdateNewCount;
- unsigned int nUpdateCount;
-
- stat()
- {
- memset( this, 0, sizeof(*this));
- }
-
- void copy( stat const& s )
- {
- nFindCount = s.nFindCount;
- nUpdateCount = s.nUpdateCount;
- nUpdateNewCount = s.nUpdateNewCount;
- }
- };
-
- struct item: public stat
- {
- int nKey;
- int nVal;
-
- item()
- {}
-
- item( int key )
- : nKey( key )
- , nVal( key )
- {}
-
- item (int key, int val )
- : nKey(key)
- , nVal( val )
- {}
-
- item( std::pair<int,int> const& p )
- : nKey( p.first )
- , nVal( p.second )
- {}
-
- item( item const& i )
- : nKey( i.nKey )
- , nVal( i.nVal )
- {}
-
- item& operator=(item const& i)
- {
- nKey = i.nKey;
- nVal = i.nVal;
- stat::copy(i);
-
- return *this;
- }
-
- item( item&& i )
- : nKey( i.nKey )
- , nVal( i.nVal )
- {}
-
- //item& operator=(item&& i)
- //{
- // nKey = i.nKey;
- // nVal = i.nVal;
- // return *this;
- //}
-
- int key() const
- {
- return nKey;
- }
-
- int val() const
- {
- return nVal;
- }
- };
-
- struct hash_int {
- size_t operator()( int i ) const
- {
- return co::v::hash<int>()( i );
- }
-
- size_t operator()( std::pair<int,int> const& i ) const
- {
- return co::v::hash<int>()( i.first );
- }
-
- template <typename Item>
- size_t operator()( Item const& i ) const
- {
- return (*this)( i.key() );
- }
- };
-
- struct simple_item_counter {
- size_t m_nCount;
-
- simple_item_counter()
- : m_nCount(0)
- {}
-
- size_t operator ++()
- {
- return ++m_nCount;
- }
-
- size_t operator --()
- {
- return --m_nCount;
- }
-
- void reset()
- {
- m_nCount = 0;
- }
-
- operator size_t() const
- {
- return m_nCount;
- }
- };
-
- template <typename T>
- struct less
- {
- bool operator ()(const T& v1, const T& v2 ) const
- {
- return v1.key() < v2.key();
- }
-
- template <typename Q>
- bool operator ()(const T& v1, const Q& v2 ) const
- {
- return v1.key() < v2;
- }
-
- template <typename Q>
- bool operator ()(const Q& v1, const T& v2 ) const
- {
- return v1 < v2.key();
- }
-
- bool operator ()( std::pair<int, int> const& v1, const T& v2 ) const
- {
- return v1.first < v2.key();
- }
-
- bool operator ()(const T& v1, std::pair<int, int> const& v2 ) const
- {
- return v1.key() < v2.first;
- }
- };
-
- template <typename T>
- struct cmp {
- int operator ()(const T& v1, const T& v2 ) const
- {
- if ( v1.key() < v2.key() )
- return -1;
- return v1.key() > v2.key() ? 1 : 0;
- }
-
- template <typename Q>
- int operator ()(const T& v1, const Q& v2 ) const
- {
- if ( v1.key() < v2 )
- return -1;
- return v1.key() > v2 ? 1 : 0;
- }
-
- template <typename Q>
- int operator ()(const Q& v1, const T& v2 ) const
- {
- if ( v1 < v2.key() )
- return -1;
- return v1 > v2.key() ? 1 : 0;
- }
-
- int operator()( std::pair<int,int> const& v1, T const& v2 ) const
- {
- if ( v1.first < v2.key() )
- return -1;
- return v1.first > v2.key() ? 1 : 0;
- }
-
- int operator()( T const& v1, std::pair<int,int> const& v2 ) const
- {
- if ( v1.key() < v2.first )
- return -1;
- return v1.key() > v2.first ? 1 : 0;
- }
- };
-
- template <typename T>
- struct equal
- {
- bool operator ()(const T& v1, const T& v2 ) const
- {
- return v1.key() == v2.key();
- }
-
- template <typename Q>
- bool operator ()(const T& v1, const Q& v2 ) const
- {
- return v1.key() == v2;
- }
-
- template <typename Q>
- bool operator ()(const Q& v1, const T& v2 ) const
- {
- return v1 == v2.key();
- }
-
- bool operator ()( std::pair<int, int> const& v1, const T& v2 ) const
- {
- return v1.first == v2.key();
- }
-
- bool operator ()(const T& v1, std::pair<int, int> const& v2 ) const
- {
- return v1.key() == v2.first;
- }
- };
-
- struct find_functor
- {
- template <typename Item, typename T>
- void operator()( Item& i, T& /*val*/ ) const
- {
- ++i.nFindCount;
- }
- template <typename Item, typename T>
- void operator()( Item& i, T const& /*val*/ ) const
- {
- ++i.nFindCount;
- }
- };
-
- template <typename Item>
- struct copy_found
- {
- Item m_found;
-
- template <typename T>
- void operator()( Item& i, T& /*val*/ )
- {
- m_found = i;
- }
-
- void operator()( Item const& i )
- {
- m_found = i;
- }
- };
-
- struct insert_functor
- {
- template <typename Item>
- void operator()(Item& i )
- {
- i.nVal = i.nKey * 100;
- }
- };
-
- template <typename Item, typename Q>
- static void update_func( bool bNew, Item& i, Q& /*val*/ )
- {
- if ( bNew )
- ++i.nUpdateNewCount;
- else
- ++i.nUpdateCount;
- }
-
- struct update_functor
- {
- template <typename Item, typename Q>
- void operator()( bool bNew, Item& i, Q& val )
- {
- update_func( bNew, i, val );
- }
- };
-
- public:
- template <class Set>
- void test_striped()
- {
- Set s( 30 );
- CPPUNIT_ASSERT( s.bucket_count() == 32 );
- CPPUNIT_ASSERT( s.lock_count() == 32 );
-
- test_striped_with( s );
- }
-
- template <class Set>
- void test_striped_with( Set& s )
- {
- cds::OS::Timer timer;
-
- test_int_with( s );
-
- // Resizing test
- for ( int i = 0; i < 10000; i++ ) {
- s.insert( i );
- }
-
- CPPUNIT_MSG( " Duration=" << timer.duration() );
- }
-
- template <class Set>
- void test_int_with( Set& s)
- {
- typedef typename Set::value_type value_type;
-
- item itm;
- int key;
-
- // insert/find test
- CPPUNIT_ASSERT( !s.contains( 10 ) );
- CPPUNIT_ASSERT( s.insert( 10 ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 1 ));
- CPPUNIT_ASSERT( s.contains( 10 ) );
-
- CPPUNIT_ASSERT( !s.insert( 10 ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 1 ));
-
- CPPUNIT_ASSERT( !s.contains( 20 ) );
- CPPUNIT_ASSERT( s.insert( std::make_pair(20, 25) ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 2 ));
- CPPUNIT_ASSERT( s.contains( 10 ) );
- CPPUNIT_ASSERT( s.contains( key = 20 ) );
- CPPUNIT_ASSERT( s.find( key, find_functor() ) );
- {
- copy_found<item> f;
- key = 20;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 20 );
- CPPUNIT_ASSERT( f.m_found.nVal == 25 );
- CPPUNIT_ASSERT( f.m_found.nFindCount == 1 );
- }
- {
- copy_found<item> f;
- key = 20;
- CPPUNIT_ASSERT( s.find( key, find_functor() ) );
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 20 );
- CPPUNIT_ASSERT( f.m_found.nVal == 25 );
- CPPUNIT_ASSERT( f.m_found.nFindCount == 2 );
- }
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 2 ));
-
- CPPUNIT_ASSERT( !s.contains( 25 ) );
- CPPUNIT_ASSERT( s.insert( std::make_pair(25, -1), insert_functor() ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
- {
- copy_found<item> f;
- key = 25;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 25 );
- CPPUNIT_ASSERT( f.m_found.nVal == 2500 );
- }
-
- // update() test
- key = 10;
- {
- copy_found<item> f;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 10 );
- CPPUNIT_ASSERT( f.m_found.nVal == 10 );
- CPPUNIT_ASSERT( f.m_found.nUpdateCount == 0 );
- CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 0 );
- }
- std::pair<bool, bool> updateResult = s.update( key, update_functor() );
- CPPUNIT_ASSERT( updateResult.first && !updateResult.second );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
- {
- copy_found<item> f;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 10 );
- CPPUNIT_ASSERT( f.m_found.nVal == 10 );
- CPPUNIT_ASSERT( f.m_found.nUpdateCount == 1 );
- CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 0 );
- }
-
- updateResult = s.update(std::make_pair(13, 1300), update_functor(), false);
- CPPUNIT_ASSERT(!updateResult.first && !updateResult.second);
- updateResult = s.update( std::make_pair(13, 1300), update_functor() );
- CPPUNIT_ASSERT( updateResult.first && updateResult.second );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 4 ));
- {
- copy_found<item> f;
- key = 13;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 13 );
- CPPUNIT_ASSERT( f.m_found.nVal == 1300 );
- CPPUNIT_ASSERT( f.m_found.nUpdateCount == 0 );
- CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 1 );
- }
-
- // erase test
- CPPUNIT_ASSERT( s.erase(13) );
- CPPUNIT_ASSERT( !s.contains( 13 ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
- CPPUNIT_ASSERT( !s.erase(13) );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- CPPUNIT_ASSERT( s.contains( 10 ));
- CPPUNIT_ASSERT( s.erase( 10 ));
- CPPUNIT_ASSERT( !s.contains( 10 ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 2 ));
- CPPUNIT_ASSERT( !s.erase(10) );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 2 ));
-
- CPPUNIT_ASSERT( s.contains(20) );
- {
- copy_found<item> f;
- CPPUNIT_ASSERT( s.erase( 20, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 20 );
- CPPUNIT_ASSERT( f.m_found.nVal == 25 );
-
- CPPUNIT_ASSERT( s.insert(235))
- CPPUNIT_ASSERT( s.erase( 235, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 235 );
- CPPUNIT_ASSERT( f.m_found.nVal == 235 );
- }
- CPPUNIT_ASSERT( !s.contains( 20 ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 1 ));
-
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
-
- // emplace test
- CPPUNIT_ASSERT( s.emplace( 151 )) ; // key = 151, val = 151
- CPPUNIT_ASSERT( s.emplace( 174, 471 )) ; // key = 174, val = 471
- CPPUNIT_ASSERT( s.emplace( std::make_pair( 190, 91 ) )) ; // key == 190, val = 91
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- CPPUNIT_ASSERT( s.contains(151));
- CPPUNIT_ASSERT( s.contains(174));
- CPPUNIT_ASSERT( s.contains(190));
-
- {
- copy_found<item> f;
- key = 151;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 151 );
- CPPUNIT_ASSERT( f.m_found.nVal == 151 );
-
- key = 174;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 174 );
- CPPUNIT_ASSERT( f.m_found.nVal == 471 );
-
- key = 190;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 190 );
- CPPUNIT_ASSERT( f.m_found.nVal == 91 );
- }
-
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
- }
-
- template <class Set>
- void test_striped2()
- {
- Set s( 30 );
- CPPUNIT_ASSERT( s.bucket_count() == 32 );
- CPPUNIT_ASSERT( s.lock_count() == 32 );
-
- test_striped_with2( s );
- }
-
- template <class Set>
- void test_striped_with2( Set& s )
- {
- cds::OS::Timer timer;
-
- test_int_with2( s );
-
- // Resizing test
- for ( int i = 0; i < 10000; i++ ) {
- s.insert( i );
- }
-
- CPPUNIT_MSG( " Duration=" << timer.duration() );
- }
-
- template <class Set>
- void test_int_with2( Set& s)
- {
- typedef typename Set::value_type value_type;
-
- item itm;
- int key;
-
- // insert/find test
- CPPUNIT_ASSERT( !s.contains( 10 ) );
- CPPUNIT_ASSERT( s.insert( 10 ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 1 ));
- CPPUNIT_ASSERT( s.contains( 10 ) );
-
- CPPUNIT_ASSERT( !s.insert( 10 ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 1 ));
-
- CPPUNIT_ASSERT( !s.contains( 20, less<value_type>() ) );
- CPPUNIT_ASSERT( s.insert( std::make_pair(20, 25) ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 2 ));
- CPPUNIT_ASSERT( s.contains( 10 ) );
- CPPUNIT_ASSERT( s.contains( key = 20, less<value_type>() ) );
- CPPUNIT_ASSERT( s.find_with( key, less<value_type>(), find_functor() ) );
- {
- copy_found<item> f;
- key = 20;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 20 );
- CPPUNIT_ASSERT( f.m_found.nVal == 25 );
- CPPUNIT_ASSERT( f.m_found.nFindCount == 1 );
- }
- {
- copy_found<item> f;
- key = 20;
- CPPUNIT_ASSERT( s.find_with( 20, less<value_type>(), find_functor() ) );
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 20 );
- CPPUNIT_ASSERT( f.m_found.nVal == 25 );
- CPPUNIT_ASSERT( f.m_found.nFindCount == 2 );
- }
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 2 ));
-
- CPPUNIT_ASSERT( !s.contains( 25 ) );
- CPPUNIT_ASSERT( s.insert( std::make_pair(25, -1), insert_functor() ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
- {
- copy_found<item> f;
- key = 25;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 25 );
- CPPUNIT_ASSERT( f.m_found.nVal == 2500 );
- }
-
- // update() test
- key = 10;
- {
- copy_found<item> f;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 10 );
- CPPUNIT_ASSERT( f.m_found.nVal == 10 );
- CPPUNIT_ASSERT( f.m_found.nUpdateCount == 0 );
- CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 0 );
- }
- std::pair<bool, bool> updateResult = s.update( key, update_functor() );
- CPPUNIT_ASSERT( updateResult.first && !updateResult.second );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
- {
- copy_found<item> f;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 10 );
- CPPUNIT_ASSERT( f.m_found.nVal == 10 );
- CPPUNIT_ASSERT( f.m_found.nUpdateCount == 1 );
- CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 0 );
- }
-
- updateResult = s.update(std::make_pair(13, 1300), update_functor(), false);
- CPPUNIT_ASSERT(!updateResult.first && !updateResult.second);
- updateResult = s.update( std::make_pair(13, 1300), update_functor() );
- CPPUNIT_ASSERT( updateResult.first && updateResult.second );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 4 ));
- {
- copy_found<item> f;
- key = 13;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 13 );
- CPPUNIT_ASSERT( f.m_found.nVal == 1300 );
- CPPUNIT_ASSERT( f.m_found.nUpdateCount == 0 );
- CPPUNIT_ASSERT( f.m_found.nUpdateNewCount == 1 );
- }
-
- // erase test
- CPPUNIT_ASSERT( s.erase(13) );
- CPPUNIT_ASSERT( !s.contains( 13 ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
- CPPUNIT_ASSERT( !s.erase(13) );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- CPPUNIT_ASSERT( s.contains( 10 ));
- CPPUNIT_ASSERT( s.erase_with( 10, less<value_type>() ));
- CPPUNIT_ASSERT( !s.contains( 10 ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 2 ));
- CPPUNIT_ASSERT( !s.erase_with( 10, less<value_type>() ) );
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 2 ));
-
- CPPUNIT_ASSERT( s.contains(20) );
- {
- copy_found<item> f;
- CPPUNIT_ASSERT( s.erase( 20, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 20 );
- CPPUNIT_ASSERT( f.m_found.nVal == 25 );
-
- CPPUNIT_ASSERT( s.insert(235))
- CPPUNIT_ASSERT( s.erase_with( 235, less<value_type>(), std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 235 );
- CPPUNIT_ASSERT( f.m_found.nVal == 235 );
- }
- CPPUNIT_ASSERT( !s.contains( 20 ));
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 1 ));
-
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
-
- // emplace test
- CPPUNIT_ASSERT( s.emplace( 151 )) ; // key = 151, val = 151
- CPPUNIT_ASSERT( s.emplace( 174, 471 )) ; // key = 174, val = 471
- CPPUNIT_ASSERT( s.emplace( std::make_pair( 190, 91 ) )) ; // key == 190, val = 91
- CPPUNIT_ASSERT( !s.empty() );
- CPPUNIT_ASSERT( check_size( s, 3 ));
-
- CPPUNIT_ASSERT( s.contains(151));
- CPPUNIT_ASSERT( s.contains(174));
- CPPUNIT_ASSERT( s.contains(190));
-
- {
- copy_found<item> f;
- key = 151;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 151 );
- CPPUNIT_ASSERT( f.m_found.nVal == 151 );
-
- key = 174;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 174 );
- CPPUNIT_ASSERT( f.m_found.nVal == 471 );
-
- key = 190;
- CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
- CPPUNIT_ASSERT( f.m_found.nKey == 190 );
- CPPUNIT_ASSERT( f.m_found.nVal == 91 );
- }
-
- s.clear();
- CPPUNIT_ASSERT( s.empty() );
- CPPUNIT_ASSERT( check_size( s, 0 ));
- }
-
- void Striped_list();
- void Striped_vector();
- void Striped_set();
- void Striped_hashset();
- void Striped_slist();
- void Striped_boost_list();
- void Striped_boost_vector();
- void Striped_boost_stable_vector();
- void Striped_boost_flat_set();
- void Striped_boost_set();
- void Striped_boost_unordered_set();
-
- void Refinable_list();
- void Refinable_vector();
- void Refinable_set();
- void Refinable_hashset();
- void Refinable_slist();
- void Refinable_boost_list();
- void Refinable_boost_vector();
- void Refinable_boost_stable_vector();
- void Refinable_boost_flat_set();
- void Refinable_boost_set();
- void Refinable_boost_unordered_set();
-
- CPPUNIT_TEST_SUITE(StripedSetHdrTest)
- CPPUNIT_TEST(Striped_list)
- CPPUNIT_TEST(Striped_vector)
- CPPUNIT_TEST(Striped_set)
- CPPUNIT_TEST(Striped_hashset)
- CPPUNIT_TEST(Striped_slist)
- CPPUNIT_TEST(Striped_boost_list)
- CPPUNIT_TEST(Striped_boost_vector)
- CPPUNIT_TEST(Striped_boost_stable_vector)
- CPPUNIT_TEST(Striped_boost_flat_set)
- CPPUNIT_TEST(Striped_boost_set)
- CPPUNIT_TEST(Striped_boost_unordered_set)
-
- CPPUNIT_TEST(Refinable_list)
- CPPUNIT_TEST(Refinable_vector)
- CPPUNIT_TEST(Refinable_set)
- CPPUNIT_TEST(Refinable_hashset)
- CPPUNIT_TEST(Refinable_slist)
- CPPUNIT_TEST(Refinable_boost_list)
- CPPUNIT_TEST(Refinable_boost_vector)
- CPPUNIT_TEST(Refinable_boost_stable_vector)
- CPPUNIT_TEST(Refinable_boost_flat_set)
- CPPUNIT_TEST(Refinable_boost_set)
- CPPUNIT_TEST(Refinable_boost_unordered_set)
-
- CPPUNIT_TEST_SUITE_END()
- };
-} // namespace set
-
-#endif // #ifndef CDSTEST_HDR_STRIPED_SET_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 CDSTEST_HDR_INTRUSIVE_CUCKOO_SET_COMMON_H
-#define CDSTEST_HDR_INTRUSIVE_CUCKOO_SET_COMMON_H
-
-namespace set {
- namespace {
-
- typedef IntrusiveCuckooSetHdrTest::hash_int hash1;
- struct hash2: private hash1
- {
- typedef hash1 base_class;
-
- size_t operator()( int i ) const
- {
- size_t h = ~( base_class::operator()(i));
- return ~h + 0x9e3779b9 + (h << 6) + (h >> 2);
- }
- template <typename Item>
- size_t operator()( const Item& i ) const
- {
- size_t h = ~( base_class::operator()(i));
- return ~h + 0x9e3779b9 + (h << 6) + (h >> 2);
- }
- size_t operator()( IntrusiveCuckooSetHdrTest::find_key const& i) const
- {
- size_t h = ~( base_class::operator()(i));
- return ~h + 0x9e3779b9 + (h << 6) + (h >> 2);
- }
- };
-
- template <typename T>
- struct equal_to
- {
- bool operator ()(const T& v1, const T& v2 ) const
- {
- return v1.key() == v2.key();
- }
-
- template <typename Q>
- bool operator ()(const T& v1, const Q& v2 ) const
- {
- return v1.key() == v2;
- }
-
- template <typename Q>
- bool operator ()(const Q& v1, const T& v2 ) const
- {
- return v1 == v2.key();
- }
- };
-
- }
-} // namespace set
-
-#endif // #ifndef CDSTEST_HDR_INTRUSIVE_CUCKOO_SET_COMMON_H