Refactored Set_InsDelFind MT-test
authorkhizmax <libcds.dev@gmail.com>
Sun, 13 Sep 2015 13:58:11 +0000 (16:58 +0300)
committerkhizmax <libcds.dev@gmail.com>
Sun, 13 Sep 2015 13:58:11 +0000 (16:58 +0300)
17 files changed:
projects/Win/vc12/unit-prerequisites.vcxproj
projects/Win/vc12/unit-set-insdelfind.vcxproj
projects/source.unit.set.mk
tests/unit/set2/CMakeLists.txt
tests/unit/set2/set_insdelfind.cpp
tests/unit/set2/set_insdelfind.h
tests/unit/set2/set_insdelfind_cuckoo.cpp
tests/unit/set2/set_insdelfind_ellentree.cpp
tests/unit/set2/set_insdelfind_michael.cpp
tests/unit/set2/set_insdelfind_multilevelhashset.cpp [new file with mode: 0644]
tests/unit/set2/set_insdelfind_refinable.cpp [deleted file]
tests/unit/set2/set_insdelfind_skip.cpp
tests/unit/set2/set_insdelfind_split.cpp
tests/unit/set2/set_insdelfind_std.cpp
tests/unit/set2/set_insdelfind_striped.cpp
tests/unit/set2/set_type_multilevel_hashset.h
tests/unit/set2/set_type_std.h

index 7c1bc845e9401c3bf5d45ff3dde0a14df20f40e3..d0c0011583a55cfdd12e8e2b662927493026e386 100644 (file)
     <ClInclude Include="..\..\..\tests\cppunit\thread.h" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <ClCompile Include="..\..\..\tests\hashing\city.cpp" />\r
+    <ClCompile Include="..\..\..\tests\hashing\city.cpp">\r
+      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Level2</WarningLevel>\r
+      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">Level2</WarningLevel>\r
+      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='ICL-Release|Win32'">Level2</WarningLevel>\r
+      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='ICL-Debug|Win32'">Level2</WarningLevel>\r
+      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Level2</WarningLevel>\r
+      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Level2</WarningLevel>\r
+      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">Level2</WarningLevel>\r
+      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='ICL-Release|x64'">Level2</WarningLevel>\r
+      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='ICL-Debug|x64'">Level2</WarningLevel>\r
+      <WarningLevel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Level2</WarningLevel>\r
+    </ClCompile>\r
     <ClCompile Include="..\..\..\tests\hashing\md5.cpp" />\r
     <ClCompile Include="..\..\..\tests\hashing\sha256.cpp" />\r
     <ClCompile Include="..\..\..\tests\unit\ellen_bintree_update_desc_pool.cpp" />\r
index b26853778a7f843a9c3953932b9e69a01329d5fd..1bcaba079d7001e9400fd5fab9d6043960ad9f3d 100644 (file)
@@ -47,7 +47,7 @@
     <ClCompile Include="..\..\..\tests\unit\set2\set_insdelfind_cuckoo.cpp" />\r
     <ClCompile Include="..\..\..\tests\unit\set2\set_insdelfind_ellentree.cpp" />\r
     <ClCompile Include="..\..\..\tests\unit\set2\set_insdelfind_michael.cpp" />\r
-    <ClCompile Include="..\..\..\tests\unit\set2\set_insdelfind_refinable.cpp" />\r
+    <ClCompile Include="..\..\..\tests\unit\set2\set_insdelfind_multilevelhashset.cpp" />\r
     <ClCompile Include="..\..\..\tests\unit\set2\set_insdelfind_skip.cpp" />\r
     <ClCompile Include="..\..\..\tests\unit\set2\set_insdelfind_split.cpp" />\r
     <ClCompile Include="..\..\..\tests\unit\set2\set_insdelfind_std.cpp" />\r
index abbdd95d0118bb0bae124ed413e689a55efd0b5b..ee11421ede6692f8515997bc3b99075f6319938c 100644 (file)
@@ -18,10 +18,10 @@ CDSUNIT_SET_SOURCES := \
        tests/unit/set2/set_insdel_string_striped.cpp \
     tests/unit/set2/set_insdel_string_std.cpp \
        tests/unit/set2/set_insdelfind.cpp \
-    tests/unit/set2/set_insdelfind_michael.cpp \
        tests/unit/set2/set_insdelfind_cuckoo.cpp \
        tests/unit/set2/set_insdelfind_ellentree.cpp \
-       tests/unit/set2/set_insdelfind_refinable.cpp \
+    tests/unit/set2/set_insdelfind_michael.cpp \
+    tests/unit/set2/set_insdelfind_multilevelhashset.cpp \
        tests/unit/set2/set_insdelfind_skip.cpp \
        tests/unit/set2/set_insdelfind_split.cpp \
        tests/unit/set2/set_insdelfind_striped.cpp \
index 408b5f79d6e95456d18ea4bc0d24d0b9c464d606..15d99ae370102538808bbdda4136ea993759499e 100644 (file)
@@ -19,10 +19,10 @@ set(CDSUNIT_SET_SOURCES
     set_insdel_string_striped.cpp
     set_insdel_string_std.cpp
     set_insdelfind.cpp
-    set_insdelfind_michael.cpp
     set_insdelfind_cuckoo.cpp
     set_insdelfind_ellentree.cpp
-    set_insdelfind_refinable.cpp
+    set_insdelfind_michael.cpp
+    set_insdelfind_multilevelhashset.cpp
     set_insdelfind_skip.cpp
     set_insdelfind_split.cpp
     set_insdelfind_striped.cpp
index 56df57c7aed1a74b0a696e54b18262821412fce2..3330b2785f6e64a5d5f44e3d0f9bf5d2a5f7a8b1 100644 (file)
@@ -5,17 +5,9 @@
 namespace set2 {
     CPPUNIT_TEST_SUITE_REGISTRATION( Set_InsDelFind );
 
-    size_t Set_InsDelFind::c_nInitialMapSize = 500000;
-    size_t Set_InsDelFind::c_nThreadCount = 8;
-    size_t Set_InsDelFind::c_nMaxLoadFactor = 8;
-    unsigned int Set_InsDelFind::c_nInsertPercentage = 5;
-    unsigned int Set_InsDelFind::c_nDeletePercentage = 5;
-    unsigned int Set_InsDelFind::c_nDuration = 30;
-    bool Set_InsDelFind::c_bPrintGCState = true;
-
     void Set_InsDelFind::setUpParams( const CppUnitMini::TestCfg& cfg )
     {
-        c_nInitialMapSize = cfg.getSizeT("InitialMapSize", c_nInitialMapSize );
+        c_nSetSize = cfg.getSizeT("InitialMapSize", c_nSetSize );
         c_nThreadCount = cfg.getSizeT("ThreadCount", c_nThreadCount );
         c_nMaxLoadFactor = cfg.getSizeT("MaxLoadFactor", c_nMaxLoadFactor );
         c_nInsertPercentage = cfg.getUInt("InsertPercentage", c_nInsertPercentage );
@@ -23,8 +15,12 @@ namespace set2 {
         c_nDuration = cfg.getUInt("Duration", c_nDuration );
         c_bPrintGCState = cfg.getBool("PrintGCStateFlag", c_bPrintGCState );
 
+        c_nCuckooInitialSize = cfg.getSizeT("CuckooInitialSize", c_nCuckooInitialSize );
+        c_nCuckooProbesetSize = cfg.getSizeT("CuckooProbesetSize", c_nCuckooProbesetSize );
+        c_nCuckooProbesetThreshold = cfg.getSizeT("CuckooProbesetThreshold", c_nCuckooProbesetThreshold );
+
         if ( c_nThreadCount == 0 )
-            c_nThreadCount = cds::OS::topology::processor_count() * 2;
+            c_nThreadCount = std::thread::hardware_concurrency();
 
         CPPUNIT_ASSERT( c_nInsertPercentage + c_nDeletePercentage <= 100 );
 
@@ -39,20 +35,4 @@ namespace set2 {
         std::fill( pFirst, pLast, do_find );
         shuffle( m_arrShuffle, pLast );
     }
-
-    void Set_InsDelFind::myRun(const char *in_name, bool invert /*= false*/)
-    {
-        setUpParams( m_Cfg.get( "Map_InsDelFind" ));
-
-        run_MichaelSet(in_name, invert);
-        run_SplitList(in_name, invert);
-        run_SkipListSet(in_name, invert);
-        run_EllenBinTreeSet(in_name, invert);
-        run_StripedSet(in_name, invert);
-        run_RefinableSet(in_name, invert);
-        run_CuckooSet(in_name, invert);
-        run_StdSet(in_name, invert);
-
-        endTestCase();
-    }
 } // namespace set2
index bee344dfa075858414d3b94963176be1fa68a1f9..97f54de8fd9e93ba91a7917684dd35fc8e0d1e93 100644 (file)
@@ -5,20 +5,24 @@
 
 namespace set2 {
 
-#   define TEST_SET(IMPL, C, X)          void C::X() { test<set_type<IMPL, key_type, value_type>::X >()    ; }
-#   define TEST_SET_EXTRACT(IMPL, C, X)  TEST_SET(IMPL, C, X)
-#   define TEST_SET_NOLF(IMPL, C, X)     void C::X() { test_nolf<set_type<IMPL, key_type, value_type>::X >()    ; }
-#   define TEST_SET_NOLF_EXTRACT(IMPL, C, X) TEST_SET_NOLF(IMPL, C, X)
+#define TEST_CASE(TAG, X)  void X();
 
     class Set_InsDelFind: public CppUnitMini::TestCase
     {
-        static size_t c_nInitialMapSize;    // initial map size
-        static size_t c_nThreadCount;       // thread count
-        static size_t c_nMaxLoadFactor;     // maximum load factor
-        static unsigned int c_nInsertPercentage;
-        static unsigned int c_nDeletePercentage;
-        static unsigned int c_nDuration;    // test duration, seconds
-        static bool c_bPrintGCState;
+    public:
+        size_t c_nSetSize = 500000;      // initial set size
+        size_t c_nThreadCount = 8;       // thread count
+        size_t c_nMaxLoadFactor = 8;     // maximum load factor
+        unsigned int c_nInsertPercentage = 5;
+        unsigned int c_nDeletePercentage = 5;
+        unsigned int c_nDuration = 30;   // test duration, seconds
+        bool c_bPrintGCState = true;
+
+        size_t  c_nCuckooInitialSize = 1024;// initial size for CuckooSet
+        size_t  c_nCuckooProbesetSize = 16; // CuckooSet probeset size (only for list-based probeset)
+        size_t  c_nCuckooProbesetThreshold = 0; // CUckooSet probeset threshold (0 - use default)
+
+        size_t c_nLoadFactor = 2;
 
     public:
         enum actions
@@ -83,7 +87,7 @@ namespace set2 {
 
                 actions * pAct = getTest().m_arrShuffle;
                 unsigned int i = 0;
-                size_t const nNormalize = size_t(-1) / (c_nInitialMapSize * 2);
+                size_t const nNormalize = size_t(-1) / ( getTest().c_nSetSize * 2);
 
                 size_t nRand = 0;
                 while ( !time_elapsed() ) {
@@ -91,7 +95,7 @@ namespace set2 {
                     size_t n = nRand / nNormalize;
                     switch ( pAct[i] ) {
                     case do_find:
-                        if ( rMap.find( n ))
+                        if ( rMap.contains( n ))
                             ++m_nFindSuccess;
                         else
                             ++m_nFindFailed;
@@ -118,24 +122,15 @@ namespace set2 {
 
     protected:
         template <class Set>
-        void do_test( size_t nLoadFactor )
-        {
-            CPPUNIT_MSG( "Load factor=" << nLoadFactor );
-
-            Set  testSet( c_nInitialMapSize, nLoadFactor );
-            do_test_with( testSet );
-        }
-
-        template <class Set>
-        void do_test_with( Set& testSet )
+        void do_test( Set& testSet )
         {
             typedef WorkThread<Set> work_thread;
 
             // fill map - only odd number
             {
-                size_t * pInitArr = new size_t[ c_nInitialMapSize ];
-                size_t * pEnd = pInitArr + c_nInitialMapSize;
-                for ( size_t i = 0; i < c_nInitialMapSize; ++i )
+                size_t * pInitArr = new size_t[ c_nSetSize ];
+                size_t * pEnd = pInitArr + c_nSetSize;
+                for ( size_t i = 0; i < c_nSetSize; ++i )
                     pInitArr[i] = i * 2 + 1;
                 shuffle( pInitArr, pEnd );
                 for ( size_t * p = pInitArr; p < pEnd; ++p )
@@ -193,52 +188,34 @@ namespace set2 {
         }
 
         template <class Set>
-        void test()
+        void run_test()
         {
             CPPUNIT_MSG( "Thread count=" << c_nThreadCount
-                << " initial map size=" << c_nInitialMapSize
+                << " initial map size=" << c_nSetSize
                 << " insert=" << c_nInsertPercentage << '%'
                 << " delete=" << c_nDeletePercentage << '%'
                 << " duration=" << c_nDuration << "s"
                 );
 
-            for ( size_t nLoadFactor = 1; nLoadFactor <= c_nMaxLoadFactor; nLoadFactor *= 2 ) {
-                do_test<Set>( nLoadFactor );
+            if ( Set::c_bLoadFactorDepended ) {
+                for ( c_nLoadFactor = 1; c_nLoadFactor <= c_nMaxLoadFactor; c_nLoadFactor *= 2 ) {
+                    CPPUNIT_MSG("  LoadFactor = " << c_nLoadFactor );
+                    Set s( *this );
+                    do_test( s );
+                    if ( c_bPrintGCState )
+                        print_gc_state();
+                }
+            }
+            else {
+                Set s( *this );
+                do_test( s );
                 if ( c_bPrintGCState )
                     print_gc_state();
             }
         }
 
-        template <class Set>
-        void test_nolf()
-        {
-            CPPUNIT_MSG( "Thread count=" << c_nThreadCount
-                << " initial map size=" << c_nInitialMapSize
-                << " insert=" << c_nInsertPercentage << '%'
-                << " delete=" << c_nDeletePercentage << '%'
-                << " duration=" << c_nDuration << "s"
-                );
-
-            Set s;
-            do_test_with( s );
-            //CPPUNIT_MSG( s.statistics() );
-            if ( c_bPrintGCState )
-                print_gc_state();
-        }
-
         void setUpParams( const CppUnitMini::TestCfg& cfg );
 
-        void run_MichaelSet(const char *in_name, bool invert = false);
-        void run_SplitList(const char *in_name, bool invert = false);
-        void run_SkipListSet(const char *in_name, bool invert = false);
-        void run_CuckooSet(const char *in_name, bool invert = false);
-        void run_StripedSet(const char *in_name, bool invert = false);
-        void run_RefinableSet(const char *in_name, bool invert = false);
-        void run_EllenBinTreeSet(const char *in_name, bool invert = false);
-        void run_StdSet(const char *in_name, bool invert = false);
-
-        virtual void myRun(const char *in_name, bool invert = false);
-
 #   include "set2/set_defs.h"
         CDSUNIT_DECLARE_MichaelSet
         CDSUNIT_DECLARE_SplitList
@@ -247,6 +224,20 @@ namespace set2 {
         CDSUNIT_DECLARE_CuckooSet
         CDSUNIT_DECLARE_SkipListSet
         CDSUNIT_DECLARE_EllenBinTreeSet
+        CDSUNIT_DECLARE_MultiLevelHashSet
         CDSUNIT_DECLARE_StdSet
+
+        CPPUNIT_TEST_SUITE_(Set_InsDelFind, "Map_InsDelFind")
+            CDSUNIT_TEST_MichaelSet
+            CDSUNIT_TEST_SplitList
+            CDSUNIT_TEST_SkipListSet
+            CDSUNIT_TEST_MultiLevelHashSet
+            CDSUNIT_TEST_EllenBinTreeSet
+            CDSUNIT_TEST_StripedSet
+            CDSUNIT_TEST_RefinableSet
+            CDSUNIT_TEST_CuckooSet
+            CDSUNIT_TEST_StdSet
+        CPPUNIT_TEST_SUITE_END();
+
     };
 } // namespace set2
index fee46ea3fb677043cfdebba7ab838b06864b1cbf..48069d26f3e368ad339368b22e6e35868d5991f1 100644 (file)
@@ -3,10 +3,10 @@
 #include "set2/set_insdelfind.h"
 #include "set2/set_type_cuckoo.h"
 
-namespace set2 {
-    CDSUNIT_DEFINE_CuckooSet( cc::cuckoo::implementation_tag, Set_InsDelFind )
+#undef TEST_CASE
+#define TEST_CASE(TAG, X)  void Set_InsDelFind::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
+#include "set2/set_defs.h"
 
-    CPPUNIT_TEST_SUITE_PART( Set_InsDelFind, run_CuckooSet )
-        CDSUNIT_TEST_CuckooSet
-    CPPUNIT_TEST_SUITE_END_PART()
+namespace set2 {
+    CDSUNIT_DECLARE_CuckooSet
 } // namespace set2
index 5501237065fedbc992a8eddc7605f66372987855..89cb2d96141757db34bdf171f5cf1c979c2c6209 100644 (file)
@@ -3,10 +3,10 @@
 #include "set2/set_insdelfind.h"
 #include "set2/set_type_ellen_bintree.h"
 
-namespace set2 {
-    CDSUNIT_DEFINE_EllenBinTreeSet( cc::ellen_bintree::implementation_tag, Set_InsDelFind )
+#undef TEST_CASE
+#define TEST_CASE(TAG, X)  void Set_InsDelFind::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
+#include "set2/set_defs.h"
 
-    CPPUNIT_TEST_SUITE_PART( Set_InsDelFind, run_EllenBinTreeSet )
-        CDSUNIT_TEST_EllenBinTreeSet
-    CPPUNIT_TEST_SUITE_END_PART()
+namespace set2 {
+    CDSUNIT_DECLARE_EllenBinTreeSet
 } // namespace set2
index dc4ca5649e9dacf16a3e5015f92c14278ab26d93..225933b8ec76abc34cd694d7f66eb2fb7a32e60e 100644 (file)
@@ -3,11 +3,10 @@
 #include "set2/set_insdelfind.h"
 #include "set2/set_type_michael.h"
 
+#undef TEST_CASE
+#define TEST_CASE(TAG, X)  void Set_InsDelFind::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
+#include "set2/set_defs.h"
 
 namespace set2 {
-    CDSUNIT_DEFINE_MichaelSet( cc::michael_set::implementation_tag, Set_InsDelFind )
-
-    CPPUNIT_TEST_SUITE_PART( Set_InsDelFind, run_MichaelSet )
-        CDSUNIT_TEST_MichaelSet
-    CPPUNIT_TEST_SUITE_END_PART()
+    CDSUNIT_DECLARE_MichaelSet
 } // namespace set2
diff --git a/tests/unit/set2/set_insdelfind_multilevelhashset.cpp b/tests/unit/set2/set_insdelfind_multilevelhashset.cpp
new file mode 100644 (file)
index 0000000..0a37482
--- /dev/null
@@ -0,0 +1,12 @@
+//$$CDS-header$$
+
+#include "set2/set_insdelfind.h"
+#include "set2/set_type_multilevel_hashset.h"
+
+#undef TEST_CASE
+#define TEST_CASE(TAG, X)  void Set_InsDelFind::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
+#include "set2/set_defs.h"
+
+namespace set2 {
+    CDSUNIT_DECLARE_MultiLevelHashSet
+} // namespace set2
diff --git a/tests/unit/set2/set_insdelfind_refinable.cpp b/tests/unit/set2/set_insdelfind_refinable.cpp
deleted file mode 100644 (file)
index ac969d4..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-//$$CDS-header$$
-
-#include "set2/set_insdelfind.h"
-#include "set2/set_type_striped.h"
-
-namespace set2 {
-    CDSUNIT_DEFINE_RefinableSet( cc::striped_set::implementation_tag, Set_InsDelFind )
-
-    CPPUNIT_TEST_SUITE_PART( Set_InsDelFind, run_RefinableSet )
-        CDSUNIT_TEST_RefinableSet
-    CPPUNIT_TEST_SUITE_END_PART()
-} // namespace set2
index 102c51d3b8ef60d91bd421abd5697daf5dd53875..0883424b26921a26f8755694b4c5bfa95da54fee 100644 (file)
@@ -3,10 +3,10 @@
 #include "set2/set_insdelfind.h"
 #include "set2/set_type_skip_list.h"
 
-namespace set2 {
-    CDSUNIT_DEFINE_SkipListSet(cc::skip_list::implementation_tag, Set_InsDelFind)
+#undef TEST_CASE
+#define TEST_CASE(TAG, X)  void Set_InsDelFind::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
+#include "set2/set_defs.h"
 
-    CPPUNIT_TEST_SUITE_PART( Set_InsDelFind, run_SkipListSet )
-        CDSUNIT_TEST_SkipListSet
-    CPPUNIT_TEST_SUITE_END_PART()
+namespace set2 {
+    CDSUNIT_DECLARE_SkipListSet
 } // namespace set2
index 4c393df3e4016741ed8ba225a7e232c30894a030..f6c602db1a28fa26ad70beca4a21b684a6fb858f 100644 (file)
@@ -3,10 +3,10 @@
 #include "set2/set_insdelfind.h"
 #include "set2/set_type_split_list.h"
 
-namespace set2 {
-    CDSUNIT_DEFINE_SplitList(cc::split_list::implementation_tag, Set_InsDelFind)
+#undef TEST_CASE
+#define TEST_CASE(TAG, X)  void Set_InsDelFind::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
+#include "set2/set_defs.h"
 
-    CPPUNIT_TEST_SUITE_PART( Set_InsDelFind, run_SplitList )
-        CDSUNIT_TEST_SplitList
-    CPPUNIT_TEST_SUITE_END_PART()
+namespace set2 {
+    CDSUNIT_DECLARE_SplitList
 } // namespace set2
index d5e999d91397122440bdbe88616a7dd91c980bda..548f16cd94cd78ad4dadc643d346880b33b07e48 100644 (file)
@@ -3,10 +3,10 @@
 #include "set2/set_insdelfind.h"
 #include "set2/set_type_std.h"
 
-namespace set2 {
-    CDSUNIT_DEFINE_StdSet(std_implementation_tag, Set_InsDelFind)
+#undef TEST_CASE
+#define TEST_CASE(TAG, X)  void Set_InsDelFind::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
+#include "set2/set_defs.h"
 
-    CPPUNIT_TEST_SUITE_PART( Set_InsDelFind, run_StdSet )
-        CDSUNIT_TEST_StdSet
-    CPPUNIT_TEST_SUITE_END_PART()
+namespace set2 {
+    CDSUNIT_DECLARE_StdSet
 } // namespace set2
index 15bb78883ecca9c645f120ae518a05a080533055..d4de96749367b1f57e6d57be8e5b7c308d4ca774 100644 (file)
@@ -3,10 +3,11 @@
 #include "set2/set_insdelfind.h"
 #include "set2/set_type_striped.h"
 
-namespace set2 {
-    CDSUNIT_DEFINE_StripedSet( cc::striped_set::implementation_tag, Set_InsDelFind )
+#undef TEST_CASE
+#define TEST_CASE(TAG, X)  void Set_InsDelFind::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
+#include "set2/set_defs.h"
 
-    CPPUNIT_TEST_SUITE_PART( Set_InsDelFind, run_StripedSet )
-        CDSUNIT_TEST_StripedSet
-    CPPUNIT_TEST_SUITE_END_PART()
+namespace set2 {
+    CDSUNIT_DECLARE_StripedSet
+    CDSUNIT_DECLARE_RefinableSet
 } // namespace set2
index c13d1fc44ec7ee8b8bb464e6f8033c9a2903a283..45b3bcc38c44b89b9b7279bfff7ba4e86b271344 100644 (file)
@@ -42,6 +42,12 @@ namespace set2 {
             return base_class::extract( hasher()(key) );
         }
 
+        template <typename Q>
+        bool contains( Q const& key )
+        {
+            return base_class::contains( hasher()(key) );
+        }
+
         // for testing
         static CDS_CONSTEXPR bool const c_bExtractSupported = true;
         static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
index d359537b51872b31ae041688819d2166d2cc1a79..927334db76efd948207a7710fc2d2ba6d796c600 100644 (file)
@@ -42,7 +42,7 @@ namespace set2 {
         {}
 
         template <typename Key>
-        bool find( const Key& key )
+        bool contains( const Key& key )
         {
             scoped_lock al( m_lock );
             return base_class::find( value_type(key) ) != base_class::end();
@@ -125,7 +125,7 @@ namespace set2 {
         {}
 
         template <typename Key>
-        bool find( const Key& key )
+        bool contains( const Key& key )
         {
             value_type v( key );
             scoped_lock al( m_lock );