</ItemGroup>\r
<ItemGroup>\r
<ClCompile Include="..\..\..\test\unit\main.cpp" />\r
+ <ClCompile Include="..\..\..\test\unit\striped-set\intrusive_boost_avl_set.cpp" />\r
+ <ClCompile Include="..\..\..\test\unit\striped-set\intrusive_boost_list.cpp" />\r
+ <ClCompile Include="..\..\..\test\unit\striped-set\intrusive_boost_set.cpp" />\r
+ <ClCompile Include="..\..\..\test\unit\striped-set\intrusive_boost_sg_set.cpp" />\r
+ <ClCompile Include="..\..\..\test\unit\striped-set\intrusive_boost_slist.cpp" />\r
+ <ClCompile Include="..\..\..\test\unit\striped-set\intrusive_boost_splay_set.cpp" />\r
+ <ClCompile Include="..\..\..\test\unit\striped-set\intrusive_boost_treap_set.cpp" />\r
<ClCompile Include="..\..\..\test\unit\striped-set\intrusive_cuckoo_set.cpp">\r
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
</ClCompile>\r
</ItemGroup>\r
<ItemGroup>\r
+ <ClInclude Include="..\..\..\test\unit\striped-set\test_intrusive_striped_set.h" />\r
<ClInclude Include="..\..\..\test\unit\striped-set\test_intrusive_set.h" />\r
</ItemGroup>\r
<PropertyGroup Label="Globals">\r
<PrecompiledHeader>NotUsing</PrecompiledHeader>\r
<WarningLevel>Level3</WarningLevel>\r
<Optimization>Disabled</Optimization>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions>CDSUNIT_ENABLE_BOOST_CONTAINER;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r
</ClCompile>\r
<PrecompiledHeader>NotUsing</PrecompiledHeader>\r
<WarningLevel>Level3</WarningLevel>\r
<Optimization>Disabled</Optimization>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions>CDSUNIT_ENABLE_BOOST_CONTAINER;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r
</ClCompile>\r
<PrecompiledHeader>NotUsing</PrecompiledHeader>\r
<WarningLevel>Level3</WarningLevel>\r
<Optimization>Disabled</Optimization>\r
- <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions>CDSUNIT_ENABLE_BOOST_CONTAINER;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r
</ClCompile>\r
<PrecompiledHeader>NotUsing</PrecompiledHeader>\r
<WarningLevel>Level3</WarningLevel>\r
<Optimization>Disabled</Optimization>\r
- <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions>CDSUNIT_ENABLE_BOOST_CONTAINER;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r
</ClCompile>\r
<Optimization>MaxSpeed</Optimization>\r
<FunctionLevelLinking>true</FunctionLevelLinking>\r
<IntrinsicFunctions>true</IntrinsicFunctions>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions>CDSUNIT_ENABLE_BOOST_CONTAINER;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r
</ClCompile>\r
<Optimization>MaxSpeed</Optimization>\r
<FunctionLevelLinking>true</FunctionLevelLinking>\r
<IntrinsicFunctions>true</IntrinsicFunctions>\r
- <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PreprocessorDefinitions>CDSUNIT_ENABLE_BOOST_CONTAINER;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
<AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>\r
</ClCompile>\r
<ClCompile Include="..\..\..\test\unit\striped-set\intrusive_cuckoo_set.cpp">\r
<Filter>Source Files</Filter>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\test\unit\striped-set\intrusive_boost_slist.cpp">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\test\unit\striped-set\intrusive_boost_list.cpp">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\test\unit\striped-set\intrusive_boost_set.cpp">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\test\unit\striped-set\intrusive_boost_avl_set.cpp">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\test\unit\striped-set\intrusive_boost_sg_set.cpp">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\test\unit\striped-set\intrusive_boost_splay_set.cpp">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\test\unit\striped-set\intrusive_boost_treap_set.cpp">\r
+ <Filter>Source Files</Filter>\r
+ </ClCompile>\r
</ItemGroup>\r
<ItemGroup>\r
<ClInclude Include="..\..\..\test\unit\striped-set\test_intrusive_set.h">\r
<Filter>Header Files</Filter>\r
</ClInclude>\r
+ <ClInclude Include="..\..\..\test\unit\striped-set\test_intrusive_striped_set.h">\r
+ <Filter>Header Files</Filter>\r
+ </ClInclude>\r
</ItemGroup>\r
</Project>
\ No newline at end of file
set(CDSGTEST_SET_SOURCES
../main.cpp
+ intrusive_boost_avl_set.cpp
+ intrusive_boost_list.cpp
+ intrusive_boost_set.cpp
+ intrusive_boost_sg_set.cpp
+ intrusive_boost_slist.cpp
intrusive_cuckoo_set.cpp
+ intrusive_boost_splay_set.cpp
+ intrusive_boost_treap_set.cpp
)
include_directories(
--- /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.
+*/
+
+#ifdef CDSUNIT_ENABLE_BOOST_CONTAINER
+
+#include <boost/version.hpp>
+#if BOOST_VERSION >= 105900 && BOOST_VERSION < 106100
+# define CDSTEST_REQUIRES_IMPLICIT_CONVERSION_WORKAROUND
+#endif
+
+#include "test_intrusive_striped_set.h"
+#include <cds/intrusive/striped_set/boost_avl_set.h>
+
+namespace {
+ namespace ci = cds::intrusive;
+ namespace bi = boost::intrusive;
+
+ struct test_traits
+ {
+ typedef cds_test::intrusive_set::base_int_item< bi::avl_set_base_hook<> > base_item;
+ typedef cds_test::intrusive_set::member_int_item< bi::avl_set_member_hook<> > member_item;
+
+ typedef bi::avl_set< base_item,
+ bi::compare< cds_test::intrusive_set::less< base_item >>
+ > base_hook_container;
+
+ typedef bi::avl_set< member_item,
+ bi::member_hook< member_item, bi::avl_set_member_hook<>, &member_item::hMember>,
+ bi::compare< cds_test::intrusive_set::less< member_item >>
+ > member_hook_container;
+ };
+
+ INSTANTIATE_TYPED_TEST_CASE_P( BoostAvlSet, IntrusiveStripedSet, test_traits );
+
+} // namespace
+
+#endif // CDSUNIT_ENABLE_BOOST_CONTAINER
--- /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.
+*/
+
+#ifdef CDSUNIT_ENABLE_BOOST_CONTAINER
+
+#include <cds/intrusive/striped_set/boost_list.h>
+#include "test_intrusive_striped_set.h"
+
+namespace {
+ namespace ci = cds::intrusive;
+ namespace bi = boost::intrusive;
+
+ struct test_traits
+ {
+ typedef cds_test::intrusive_set::base_int_item< bi::list_base_hook<> > base_item;
+ typedef cds_test::intrusive_set::member_int_item< bi::list_member_hook<> > member_item;
+
+ typedef bi::list< base_item, bi::constant_time_size<true>> base_hook_container;
+
+ typedef bi::list< member_item,
+ bi::member_hook< member_item, bi::list_member_hook<>, &member_item::hMember>,
+ bi::constant_time_size<true>
+ > member_hook_container;
+ };
+
+ INSTANTIATE_TYPED_TEST_CASE_P( BoostList, IntrusiveStripedSet, test_traits );
+
+} // namespace
+
+#endif // CDSUNIT_ENABLE_BOOST_CONTAINER
--- /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.
+*/
+
+#ifdef CDSUNIT_ENABLE_BOOST_CONTAINER
+
+#include <boost/version.hpp>
+#if BOOST_VERSION >= 105900 && BOOST_VERSION < 106100
+# define CDSTEST_REQUIRES_IMPLICIT_CONVERSION_WORKAROUND
+#endif
+
+#include "test_intrusive_striped_set.h"
+#include <cds/intrusive/striped_set/boost_set.h>
+
+#if 0 //BOOST_VERSION >= 105900
+# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) ,bi::key_of_value< get_key< type >>
+#else
+# define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type )
+#endif
+
+namespace {
+ namespace ci = cds::intrusive;
+ namespace bi = boost::intrusive;
+
+ template <typename Node>
+ struct get_key
+ {
+ typedef int type;
+
+ int operator()( Node const& v ) const
+ {
+ return v.key();
+ }
+ };
+
+ struct test_traits
+ {
+ typedef cds_test::intrusive_set::base_int_item< bi::set_base_hook<> > base_item;
+ typedef cds_test::intrusive_set::member_int_item< bi::set_member_hook<> > member_item;
+
+ typedef bi::set< base_item,
+ bi::compare< cds_test::intrusive_set::less< base_item >>
+ CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item )
+ > base_hook_container;
+
+ typedef bi::set< member_item,
+ bi::member_hook< member_item, bi::set_member_hook<>, &member_item::hMember>,
+ bi::compare< cds_test::intrusive_set::less< member_item >>
+ CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item )
+ > member_hook_container;
+ };
+
+ INSTANTIATE_TYPED_TEST_CASE_P( BoostSet, IntrusiveStripedSet, test_traits );
+
+} // namespace
+
+#endif // CDSUNIT_ENABLE_BOOST_CONTAINER
--- /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.
+*/
+
+#ifdef CDSUNIT_ENABLE_BOOST_CONTAINER
+
+#include <boost/version.hpp>
+
+#if BOOST_VERSION >= 105900 && BOOST_VERSION < 106100
+# define CDSTEST_REQUIRES_IMPLICIT_CONVERSION_WORKAROUND
+#endif
+
+#include <cds/details/defs.h>
+#if ( CDS_COMPILER == CDS_COMPILER_GCC || CDS_COMPILER == CDS_COMPILER_CLANG ) && BOOST_VERSION >= 105900 && BOOST_VERSION < 106100
+# pragma message("boost 1.59 - 1.60 has a bug in boost::intrusive::sg_set, test skipped")
+#else
+
+#include "test_intrusive_striped_set.h"
+#include <cds/intrusive/striped_set/boost_sg_set.h>
+
+namespace {
+ namespace ci = cds::intrusive;
+ namespace bi = boost::intrusive;
+
+ struct test_traits
+ {
+ typedef cds_test::intrusive_set::base_int_item< bi::bs_set_base_hook<> > base_item;
+ typedef cds_test::intrusive_set::member_int_item< bi::bs_set_member_hook<> > member_item;
+
+ typedef bi::sg_set< base_item,
+ bi::compare< cds_test::intrusive_set::less< base_item >>
+ > base_hook_container;
+
+ typedef bi::sg_set< member_item,
+ bi::member_hook< member_item, bi::bs_set_member_hook<>, &member_item::hMember>,
+ bi::compare< cds_test::intrusive_set::less< member_item >>
+ > member_hook_container;
+ };
+
+ INSTANTIATE_TYPED_TEST_CASE_P( BoostSgSet, IntrusiveStripedSet, test_traits );
+
+} // namespace
+
+#endif
+#endif // CDSUNIT_ENABLE_BOOST_CONTAINER
--- /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.
+*/
+
+#ifdef CDSUNIT_ENABLE_BOOST_CONTAINER
+
+#include <cds/intrusive/striped_set/boost_slist.h>
+#include "test_intrusive_striped_set.h"
+
+namespace {
+ namespace ci = cds::intrusive;
+ namespace bi = boost::intrusive;
+
+ struct test_traits
+ {
+ typedef cds_test::intrusive_set::base_int_item< bi::slist_base_hook<> > base_item;
+ typedef cds_test::intrusive_set::member_int_item< bi::slist_member_hook<> > member_item;
+
+ typedef bi::slist< base_item, bi::constant_time_size<true>> base_hook_container;
+
+ typedef bi::slist< member_item,
+ bi::member_hook< member_item, bi::slist_member_hook<>, &member_item::hMember>,
+ bi::constant_time_size<true>
+ > member_hook_container;
+ };
+
+ INSTANTIATE_TYPED_TEST_CASE_P( BoostSList, IntrusiveStripedSet, test_traits );
+
+} // namespace
+
+#endif // CDSUNIT_ENABLE_BOOST_CONTAINER
--- /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.
+*/
+
+#ifdef CDSUNIT_ENABLE_BOOST_CONTAINER
+
+#include <boost/version.hpp>
+#if BOOST_VERSION >= 105900 && BOOST_VERSION < 106100
+# define CDSTEST_REQUIRES_IMPLICIT_CONVERSION_WORKAROUND
+#endif
+
+#include <cds/details/defs.h>
+#if ( CDS_COMPILER == CDS_COMPILER_GCC || CDS_COMPILER == CDS_COMPILER_CLANG ) && BOOST_VERSION >= 105900 && BOOST_VERSION < 106100
+# pragma message("boost 1.59 - 1.60 has a bug in boost::intrusive::splay_set, test skipped")
+#else
+
+#include "test_intrusive_striped_set.h"
+#include <cds/intrusive/striped_set/boost_splay_set.h>
+
+namespace {
+ namespace ci = cds::intrusive;
+ namespace bi = boost::intrusive;
+
+ struct test_traits
+ {
+# 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 cds_test::intrusive_set::base_int_item< splay_set_base_hook > base_item;
+ typedef cds_test::intrusive_set::member_int_item< splay_set_member_hook > member_item;
+
+ typedef bi::splay_set< base_item,
+ bi::compare< cds_test::intrusive_set::less< base_item >>
+ > base_hook_container;
+
+ typedef bi::splay_set< member_item,
+ bi::member_hook< member_item, splay_set_member_hook, &member_item::hMember>,
+ bi::compare< cds_test::intrusive_set::less< member_item >>
+ > member_hook_container;
+ };
+
+ INSTANTIATE_TYPED_TEST_CASE_P( BoostSplaySet, IntrusiveStripedSet, test_traits );
+
+} // namespace
+
+#endif
+#endif // CDSUNIT_ENABLE_BOOST_CONTAINER
--- /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.
+*/
+
+#ifdef CDSUNIT_ENABLE_BOOST_CONTAINER
+
+#include <boost/version.hpp>
+
+#if BOOST_VERSION >= 105900 && BOOST_VERSION < 106100
+# define CDSTEST_REQUIRES_IMPLICIT_CONVERSION_WORKAROUND
+#endif
+
+#include <cds/details/defs.h>
+#if ( CDS_COMPILER == CDS_COMPILER_GCC || CDS_COMPILER == CDS_COMPILER_CLANG ) && BOOST_VERSION >= 105900 && BOOST_VERSION < 106100
+# pragma message("boost 1.59 - 1.60 has a bug in boost::intrusive::treap_set, test skipped")
+#else
+
+#include "test_intrusive_striped_set.h"
+#include <cds/intrusive/striped_set/boost_treap_set.h>
+
+namespace {
+ namespace ci = cds::intrusive;
+ namespace bi = boost::intrusive;
+
+ template <typename T>
+ struct priority_cmp: private cds_test::intrusive_set::less<T>
+ {
+ typedef cds_test::intrusive_set::less<T> base_class;
+
+ template <typename A, typename B>
+ bool operator()( A const& a, B const& b ) const
+ {
+ return base_class::operator()( b, a );
+ }
+ };
+
+ struct test_traits
+ {
+ typedef cds_test::intrusive_set::base_int_item< bi::bs_set_base_hook<> > base_item;
+ typedef cds_test::intrusive_set::member_int_item< bi::bs_set_member_hook<> > member_item;
+
+ typedef bi::treap_set< base_item,
+ bi::compare< cds_test::intrusive_set::less< base_item >>,
+ bi::priority<priority_cmp< base_item >>
+ > base_hook_container;
+
+ typedef bi::treap_set< member_item,
+ bi::member_hook< member_item, bi::bs_set_member_hook<>, &member_item::hMember>,
+ bi::compare< cds_test::intrusive_set::less< member_item >>,
+ bi::priority<priority_cmp< member_item >>
+ > member_hook_container;
+ };
+
+ INSTANTIATE_TYPED_TEST_CASE_P( BoostTreapSet, IntrusiveStripedSet, test_traits );
+
+} // namespace
+
+#endif
+#endif // CDSUNIT_ENABLE_BOOST_CONTAINER
typedef base_class::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);
- }
- };
-
- struct disposer2
- {
- template <typename T>
- void operator ()( T * p )
- {
- ++p->nEraseCount;
- }
- };
template <typename Set>
void test( Set& s )
base_class::test_< Set::c_isSorted>( s );
- ASSERT_TRUE( s.empty() );
- ASSERT_CONTAINER_SIZE( s, 0 );
-
typedef typename Set::value_type value_type;
+ size_t const nSetSize = base_class::kSize;
std::vector< value_type > data;
- std::vector< size_t> indices;
- data.reserve( kSize );
- indices.reserve( kSize );
- size_t const nSetSize = kSize;
- for ( size_t key = 0; key < kSize; ++key ) {
+ data.reserve( nSetSize );
+ for ( size_t key = 0; key < nSetSize; ++key )
data.push_back( value_type( static_cast<int>(key) ) );
- indices.push_back( key );
- }
- shuffle( indices.begin(), indices.end() );
- // clear_and_dispose
+ // clear
for ( auto& i : data ) {
i.clear_stat();
ASSERT_TRUE( s.insert( i ) );
ASSERT_FALSE( s.empty() );
ASSERT_CONTAINER_SIZE( s, nSetSize );
- s.clear_and_dispose( disposer2());
+ s.clear();
ASSERT_TRUE( s.empty() );
ASSERT_CONTAINER_SIZE( s, 0 );
for ( auto& i : data ) {
- EXPECT_EQ( i.nDisposeCount, 0 );
- EXPECT_EQ( i.nEraseCount, 1 );
+ EXPECT_EQ( i.nDisposeCount, 1 );
}
}
#include <cds/opt/hash.h>
+#ifdef CDSTEST_REQUIRES_IMPLICIT_CONVERSION_WORKAROUND
+# define CDSTEST_EXPLICIT
+#else
+# define CDSTEST_EXPLICIT explicit
+#endif
+
// forward declaration
namespace cds { namespace intrusive {}}
base_int_item()
{}
- explicit base_int_item( int key )
+ CDSTEST_EXPLICIT base_int_item( int key )
: nKey( key )
, nVal( key )
{}
member_int_item()
{}
- explicit member_int_item( int key )
+ CDSTEST_EXPLICIT member_int_item( int key )
: nKey( key )
, nVal( key )
{}
return (*this)( i.key() );
}
};
+ typedef 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);
+ }
+ };
struct simple_item_counter {
size_t m_nCount;
return v1.key() < v2.key();
}
- template <typename Q>
- bool operator ()(const T& v1, const Q& v2 ) const
+ bool operator ()(const T& v1, int v2 ) const
{
return v1.key() < v2;
}
- template <typename Q>
- bool operator ()(const Q& v1, const T& v2 ) const
+ bool operator ()(int v1, const T& v2 ) const
{
return v1 < v2.key();
}
+
+ bool operator()( int v1, int v2 ) const
+ {
+ return v1 < v2;
+ }
};
template <typename T>
};
struct other_less {
- template <typename Q, typename T>
- bool operator()( Q const& lhs, T const& rhs ) const
+ template <typename T>
+ bool operator()( other_item const& lhs, T const& rhs ) const
+ {
+ return lhs.key() < rhs.key();
+ }
+
+ template <typename T>
+ bool operator()( T const& lhs, other_item const& rhs ) const
{
return lhs.key() < rhs.key();
}
+
+ bool operator()( other_item const& lhs, int rhs ) const
+ {
+ return lhs.key() < rhs;
+ }
+
+ bool operator()( int lhs, other_item const& rhs ) const
+ {
+ return lhs < rhs.key();
+ }
};
struct other_equal_to {
s.clear();
+ ASSERT_TRUE( s.empty() );
+ ASSERT_CONTAINER_SIZE( s, 0 );
+
+ // clear_and_dispose
+ for ( auto& i : data ) {
+ i.clear_stat();
+ ASSERT_TRUE( s.insert( i ) );
+ }
+ ASSERT_FALSE( s.empty() );
+ ASSERT_CONTAINER_SIZE( s, nSetSize );
+
+ s.clear_and_dispose( mock_disposer() );
+
ASSERT_TRUE( s.empty() );
ASSERT_CONTAINER_SIZE( s, 0 );
for ( auto& i : data ) {
EXPECT_EQ( i.nDisposeCount, 1 );
}
+
}
};
--- /dev/null
+/*
+ This file is a part of libcds - Concurrent Data Structures library
+
+ (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+
+ Source code repo: http://github.com/khizmax/libcds/
+ Download: http://sourceforge.net/projects/libcds/files/
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef CDSUNIT_SET_TEST_INTRUSIVE_STRIPED_SET_H
+#define CDSUNIT_SET_TEST_INTRUSIVE_STRIPED_SET_H
+
+#include "test_intrusive_set.h"
+
+#include <cds/intrusive/striped_set.h>
+
+namespace {
+ namespace ci = cds::intrusive;
+
+ template <typename ContainerPair>
+ class IntrusiveStripedSet : public cds_test::intrusive_set
+ {
+ protected:
+ typedef cds_test::intrusive_set base_class;
+
+ typedef typename ContainerPair::base_item base_item;
+ typedef typename ContainerPair::member_item member_item;
+
+ typedef typename ContainerPair::base_hook_container base_hook_container;
+ typedef typename ContainerPair::member_hook_container member_hook_container;
+
+ //void SetUp()
+ //{}
+
+ //void TearDown()
+ //{}
+ };
+
+ TYPED_TEST_CASE_P( IntrusiveStripedSet );
+
+// ****************************************************************
+// striped base hook
+
+ TYPED_TEST_P( IntrusiveStripedSet, striped_basehook_compare )
+ {
+ typedef ci::StripedSet<
+ typename TestFixture::base_hook_container,
+ ci::opt::hash< typename TestFixture::hash1 >,
+ ci::opt::compare< typename TestFixture::template cmp< typename TestFixture::base_item >>
+ > set_type;
+
+ set_type s;
+ this->test( s );
+ }
+
+ TYPED_TEST_P( IntrusiveStripedSet, striped_basehook_less )
+ {
+ typedef ci::StripedSet<
+ typename TestFixture::base_hook_container,
+ ci::opt::hash< typename TestFixture::hash1 >,
+ ci::opt::less< typename TestFixture::template less< typename TestFixture::base_item >>
+ > set_type;
+
+ set_type s( 32 );
+ this->test( s );
+ }
+
+ TYPED_TEST_P( IntrusiveStripedSet, striped_basehook_cmpmix )
+ {
+ typedef ci::StripedSet<
+ typename TestFixture::base_hook_container,
+ ci::opt::hash< typename TestFixture::hash1 >,
+ ci::opt::less< typename TestFixture::template less< typename TestFixture::base_item >>,
+ ci::opt::compare< typename TestFixture::template cmp< typename TestFixture::base_item >>,
+ ci::opt::resizing_policy< ci::striped_set::load_factor_resizing< 8 >>
+ > set_type;
+
+ set_type s( 64 );
+ this->test( s );
+ }
+
+ TYPED_TEST_P( IntrusiveStripedSet, striped_basehook_resizing_threshold )
+ {
+ typedef ci::StripedSet<
+ typename TestFixture::base_hook_container,
+ ci::opt::hash< typename TestFixture::hash1 >,
+ ci::opt::less< typename TestFixture::template less< typename TestFixture::base_item >>,
+ ci::opt::compare< typename TestFixture::template cmp< typename TestFixture::base_item >>,
+ ci::opt::resizing_policy< ci::striped_set::single_bucket_size_threshold<8>>
+ > set_type;
+
+ set_type s;
+ this->test( s );
+ }
+
+ TYPED_TEST_P( IntrusiveStripedSet, striped_basehook_resizing_threshold_rt )
+ {
+ typedef ci::StripedSet<
+ typename TestFixture::base_hook_container,
+ ci::opt::hash< typename TestFixture::hash2 >,
+ ci::opt::less< typename TestFixture::template less< typename TestFixture::base_item >>,
+ ci::opt::compare< typename TestFixture::template cmp< typename TestFixture::base_item >>,
+ ci::opt::resizing_policy< ci::striped_set::single_bucket_size_threshold<0>>
+ > set_type;
+
+ set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>( 4 ));
+ this->test( s );
+ }
+
+// ****************************************************************
+// striped member hook
+
+ TYPED_TEST_P( IntrusiveStripedSet, striped_memberhook_compare )
+ {
+ typedef ci::StripedSet<
+ typename TestFixture::member_hook_container,
+ ci::opt::hash< typename TestFixture::hash1 >,
+ ci::opt::compare< typename TestFixture::template cmp< typename TestFixture::member_item >>
+ > set_type;
+
+ set_type s;
+ this->test( s );
+ }
+
+ TYPED_TEST_P( IntrusiveStripedSet, striped_memberhook_less )
+ {
+ typedef ci::StripedSet<
+ typename TestFixture::member_hook_container,
+ ci::opt::hash< typename TestFixture::hash1 >,
+ ci::opt::less< typename TestFixture::template less< typename TestFixture::member_item >>
+ > set_type;
+
+ set_type s( 32 );
+ this->test( s );
+ }
+
+ TYPED_TEST_P( IntrusiveStripedSet, striped_memberhook_cmpmix )
+ {
+ typedef ci::StripedSet<
+ typename TestFixture::member_hook_container,
+ ci::opt::hash< typename TestFixture::hash1 >,
+ ci::opt::less< typename TestFixture::template less< typename TestFixture::member_item >>,
+ ci::opt::compare< typename TestFixture::template cmp< typename TestFixture::member_item >>,
+ ci::opt::resizing_policy< ci::striped_set::load_factor_resizing< 8 >>
+ > set_type;
+
+ set_type s( 64 );
+ this->test( s );
+ }
+
+ TYPED_TEST_P( IntrusiveStripedSet, striped_memberhook_resizing_threshold )
+ {
+ typedef ci::StripedSet<
+ typename TestFixture::member_hook_container,
+ ci::opt::hash< typename TestFixture::hash1 >,
+ ci::opt::less< typename TestFixture::template less< typename TestFixture::member_item >>,
+ ci::opt::compare< typename TestFixture::template cmp< typename TestFixture::member_item >>,
+ ci::opt::resizing_policy< ci::striped_set::single_bucket_size_threshold<8>>
+ > set_type;
+
+ set_type s;
+ this->test( s );
+ }
+
+ TYPED_TEST_P( IntrusiveStripedSet, striped_memberhook_resizing_threshold_rt )
+ {
+ typedef ci::StripedSet<
+ typename TestFixture::member_hook_container,
+ ci::opt::hash< typename TestFixture::hash2 >,
+ ci::opt::less< typename TestFixture::template less< typename TestFixture::member_item >>,
+ ci::opt::compare< typename TestFixture::template cmp< typename TestFixture::member_item >>,
+ ci::opt::resizing_policy< ci::striped_set::single_bucket_size_threshold<0>>
+ > set_type;
+
+ set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>( 4 ) );
+ this->test( s );
+ }
+
+
+// ****************************************************************
+// refinable base hook
+
+ TYPED_TEST_P( IntrusiveStripedSet, refinable_basehook_compare )
+ {
+ typedef ci::StripedSet<
+ typename TestFixture::base_hook_container,
+ ci::opt::hash< typename TestFixture::hash1 >,
+ ci::opt::compare< typename TestFixture::template cmp< typename TestFixture::base_item >>
+ > set_type;
+
+ set_type s;
+ this->test( s );
+ }
+
+ TYPED_TEST_P( IntrusiveStripedSet, refinable_basehook_less )
+ {
+ typedef ci::StripedSet<
+ typename TestFixture::base_hook_container,
+ ci::opt::hash< typename TestFixture::hash1 >,
+ ci::opt::less< typename TestFixture::template less< typename TestFixture::base_item >>
+ > set_type;
+
+ set_type s( 32 );
+ this->test( s );
+ }
+
+ TYPED_TEST_P( IntrusiveStripedSet, refinable_basehook_cmpmix )
+ {
+ typedef ci::StripedSet<
+ typename TestFixture::base_hook_container,
+ ci::opt::hash< typename TestFixture::hash1 >,
+ ci::opt::less< typename TestFixture::template less< typename TestFixture::base_item >>,
+ ci::opt::compare< typename TestFixture::template cmp< typename TestFixture::base_item >>,
+ ci::opt::resizing_policy< ci::striped_set::load_factor_resizing< 8 >>
+ > set_type;
+
+ set_type s( 64 );
+ this->test( s );
+ }
+
+ TYPED_TEST_P( IntrusiveStripedSet, refinable_basehook_resizing_threshold )
+ {
+ typedef ci::StripedSet<
+ typename TestFixture::base_hook_container,
+ ci::opt::hash< typename TestFixture::hash1 >,
+ ci::opt::less< typename TestFixture::template less< typename TestFixture::base_item >>,
+ ci::opt::compare< typename TestFixture::template cmp< typename TestFixture::base_item >>,
+ ci::opt::resizing_policy< ci::striped_set::single_bucket_size_threshold<8>>
+ > set_type;
+
+ set_type s;
+ this->test( s );
+ }
+
+ TYPED_TEST_P( IntrusiveStripedSet, refinable_basehook_resizing_threshold_rt )
+ {
+ typedef ci::StripedSet<
+ typename TestFixture::base_hook_container,
+ ci::opt::hash< typename TestFixture::hash2 >,
+ ci::opt::less< typename TestFixture::template less< typename TestFixture::base_item >>,
+ ci::opt::compare< typename TestFixture::template cmp< typename TestFixture::base_item >>,
+ ci::opt::resizing_policy< ci::striped_set::single_bucket_size_threshold<0>>
+ > set_type;
+
+ set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>( 4 ));
+ this->test( s );
+ }
+
+// ****************************************************************
+// refinable member hook
+
+ TYPED_TEST_P( IntrusiveStripedSet, refinable_memberhook_compare )
+ {
+ typedef ci::StripedSet<
+ typename TestFixture::member_hook_container,
+ ci::opt::hash< typename TestFixture::hash1 >,
+ ci::opt::compare< typename TestFixture::template cmp< typename TestFixture::member_item >>
+ > set_type;
+
+ set_type s;
+ this->test( s );
+ }
+
+ TYPED_TEST_P( IntrusiveStripedSet, refinable_memberhook_less )
+ {
+ typedef ci::StripedSet<
+ typename TestFixture::member_hook_container,
+ ci::opt::hash< typename TestFixture::hash1 >,
+ ci::opt::less< typename TestFixture::template less< typename TestFixture::member_item >>
+ > set_type;
+
+ set_type s( 32 );
+ this->test( s );
+ }
+
+ TYPED_TEST_P( IntrusiveStripedSet, refinable_memberhook_cmpmix )
+ {
+ typedef ci::StripedSet<
+ typename TestFixture::member_hook_container,
+ ci::opt::hash< typename TestFixture::hash1 >,
+ ci::opt::less< typename TestFixture::template less< typename TestFixture::member_item >>,
+ ci::opt::compare< typename TestFixture::template cmp< typename TestFixture::member_item >>,
+ ci::opt::resizing_policy< ci::striped_set::load_factor_resizing< 8 >>
+ > set_type;
+
+ set_type s( 64 );
+ this->test( s );
+ }
+
+ TYPED_TEST_P( IntrusiveStripedSet, refinable_memberhook_resizing_threshold )
+ {
+ typedef ci::StripedSet<
+ typename TestFixture::member_hook_container,
+ ci::opt::hash< typename TestFixture::hash1 >,
+ ci::opt::less< typename TestFixture::template less< typename TestFixture::member_item >>,
+ ci::opt::compare< typename TestFixture::template cmp< typename TestFixture::member_item >>,
+ ci::opt::resizing_policy< ci::striped_set::single_bucket_size_threshold<8>>
+ > set_type;
+
+ set_type s;
+ this->test( s );
+ }
+
+ TYPED_TEST_P( IntrusiveStripedSet, refinable_memberhook_resizing_threshold_rt )
+ {
+ typedef ci::StripedSet<
+ typename TestFixture::member_hook_container,
+ ci::opt::hash< typename TestFixture::hash2 >,
+ ci::opt::less< typename TestFixture::template less< typename TestFixture::member_item >>,
+ ci::opt::compare< typename TestFixture::template cmp< typename TestFixture::member_item >>,
+ ci::opt::resizing_policy< ci::striped_set::single_bucket_size_threshold<0>>
+ > set_type;
+
+ set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>( 4 ) );
+ this->test( s );
+ }
+
+ REGISTER_TYPED_TEST_CASE_P( IntrusiveStripedSet,
+ striped_basehook_compare, striped_basehook_less, striped_basehook_cmpmix, striped_basehook_resizing_threshold, striped_basehook_resizing_threshold_rt, striped_memberhook_compare, striped_memberhook_less, striped_memberhook_cmpmix, striped_memberhook_resizing_threshold, striped_memberhook_resizing_threshold_rt, refinable_basehook_compare, refinable_basehook_less, refinable_basehook_cmpmix, refinable_basehook_resizing_threshold, refinable_basehook_resizing_threshold_rt, refinable_memberhook_compare, refinable_memberhook_less, refinable_memberhook_cmpmix, refinable_memberhook_resizing_threshold, refinable_memberhook_resizing_threshold_rt
+ );
+
+} // namespace
+
+#endif // CDSUNIT_SET_TEST_INTRUSIVE_STRIPED_SET_H