BronsonAVLTreeMap:
authorkhizmax <libcds.dev@gmail.com>
Sun, 30 Aug 2015 10:13:04 +0000 (13:13 +0300)
committerkhizmax <libcds.dev@gmail.com>
Sun, 30 Aug 2015 10:13:04 +0000 (13:13 +0300)
- replaced ensure() with update()
- replaced find( key ) with contains( key )

MapDelOdd MT-test was refactored for BronsonAVLTreeMap

cds/container/bronson_avltree_map_rcu.h
cds/container/ellen_bintree_set_rcu.h
cds/container/impl/bronson_avltree_map_rcu.h
projects/Win/vc12/cds.vcxproj
projects/Win/vc12/cds.vcxproj.filters
projects/Win/vc12/unit-map-delodd.vcxproj
tests/test-hdr/tree/hdr_bronson_avltree_map.h
tests/unit/map2/map_defs.h
tests/unit/map2/map_delodd.h
tests/unit/map2/map_delodd_bronsonavltree.cpp
tests/unit/map2/map_type_bronson_avltree.h

index 50725ec2d8f4a57bc413ee27d4cf7147ead4c344..51a94da30ac511d073941dfd6aa6b98ea46f3e69 100644 (file)
@@ -276,15 +276,15 @@ namespace cds { namespace container {
 #       endif
         }
 
-        /// Ensures that the \p key exists in the map
+        /// Updates the value for \p key
         /**
             The operation performs inserting or changing data with lock-free manner.
 
             If the \p key not found in the map, then the new item created from \p key
-            will be inserted into the map (note that in this case the \ref key_type should be
-            constructible from type \p K).
+            will be inserted into the map iff \p bAllowInsert is \p true 
+            (note that in this case the \ref key_type should be constructible from type \p K).
             Otherwise, the functor \p func is called with item found.
-            The functor \p Func may be a functor:
+            The functor \p Func signature is:
             \code
                 struct my_functor {
                     void operator()( bool bNew, key_type const& key, mapped_type& item );
@@ -295,7 +295,8 @@ namespace cds { namespace container {
             - \p bNew - \p true if the item has been inserted, \p false otherwise
             - \p item - value
 
-            The functor may change any fields of the \p item. The functor is called under the node lock.
+            The functor may change any fields of the \p item. The functor is called under the node lock,
+            the caller can change any field of \p item.
 
             RCU \p synchronize() method can be called. RCU should not be locked.
 
@@ -304,7 +305,7 @@ namespace cds { namespace container {
             already exists.
         */
         template <typename K, typename Func>
-        std::pair<bool, bool> update( K const& key, Func func )
+        std::pair<bool, bool> update( K const& key, Func func, bool bAllowInsert = true )
         {
             int result = base_class::do_update( key, key_comparator(),
                 [&func]( node_type * pNode ) -> mapped_type*
@@ -318,19 +319,11 @@ namespace cds { namespace container {
                         func( false, pNode->m_key, *pVal );
                     return pVal;
                 },
-                update_flags::allow_insert | update_flags::allow_update
+                (bAllowInsert ? update_flags::allow_insert : 0) | update_flags::allow_update
             );
             return std::make_pair( result != 0, (result & update_flags::result_inserted) != 0 );
         }
 
-        //@cond
-        template <typename K, typename Func>
-        std::pair<bool, bool> ensure( K const& key, Func func )
-        {
-            return update( key, func );
-        }
-        //@endcond
-
 
         /// Delete \p key from the map
         /**
@@ -600,7 +593,7 @@ namespace cds { namespace container {
             return base_class::find_with( key, pred, f );
         }
 
-        /// Find the key \p key
+        /// Checks whether the map contains \p key
         /**
             The function searches the item with key equal to \p key
             and returns \p true if it is found, and \p false otherwise.
@@ -608,22 +601,21 @@ namespace cds { namespace container {
             The function applies RCU lock internally.
         */
         template <typename K>
-        bool find( K const& key )
+        bool contains( K const& key )
         {
-            return base_class::find( key );
+            return base_class::contains( key );
         }
 
-        /// Finds the key \p val using \p pred predicate for searching
+        /// Checks whether the map contains \p key using \p pred predicate for searching
         /**
-            The function is an analog of \p find(K const&)
-            but \p pred is used for key comparing.
+            The function is similar to <tt>contains( key )</tt> but \p pred is used for key comparing.
             \p Less functor has the interface like \p std::less.
-            \p Less must imply the same element order as the comparator used for building the map.
+            \p Less must imply the same element order as the comparator used for building the set.
         */
         template <typename K, typename Less>
-        bool find_with( K const& key, Less pred )
+        bool contains( K const& key, Less pred )
         {
-            return base_class::find_with( key, pred );
+            return base_class::contains( key, pred );
         }
 
         /// Clears the map
index e9ac66f21a15c949a7b3c8ae54cef4c9289ef6bb..73e80434a308138e03f59a6b618c1b2cd172a0b2 100644 (file)
@@ -259,7 +259,7 @@ namespace cds { namespace container {
         template <typename Q, typename Func>
         std::pair<bool, bool> ensure( const Q& val, Func func )
         {
-            return update( val, func true );
+            return update( val, func, true );
         }
         //@endcond
 
index 4451ad8ce46b1f27e5665098f20b0b41523f50a5..4b362d3fd8c42ee38781c17ef0aef568c28ca052 100644 (file)
@@ -295,13 +295,6 @@ namespace cds { namespace container {
             return std::make_pair( result != 0, (result & update_flags::result_inserted) != 0 );
         }
 
-        //@cond
-        template <typename K>
-        std::pair<bool, bool> ensure( K const& key, mapped_type pVal )
-        {
-            return update( key, pVal, true );
-        }
-
         //@endcond
 
         /// Delete \p key from the map
@@ -621,7 +614,7 @@ namespace cds { namespace container {
             );
         }
 
-        /// Find the key \p key
+        /// Checks whether the map contains \p key
         /**
             The function searches the item with key equal to \p key
             and returns \p true if it is found, and \p false otherwise.
@@ -629,20 +622,19 @@ namespace cds { namespace container {
             The function applies RCU lock internally.
         */
         template <typename K>
-        bool find( K const& key )
+        bool contains( K const& key )
         {
             return do_find( key, key_comparator(), []( node_type * ) -> bool { return true; });
         }
 
-        /// Finds the key \p val using \p pred predicate for searching
+        /// Checks whether the map contains \p key using \p pred predicate for searching
         /**
-            The function is an analog of \p find(K const&)
-            but \p pred is used for key comparing.
+            The function is similar to <tt>contains( key )</tt> but \p pred is used for key comparing.
             \p Less functor has the interface like \p std::less.
-            \p Less must imply the same element order as the comparator used for building the map.
+            \p Less must imply the same element order as the comparator used for building the set.
         */
         template <typename K, typename Less>
-        bool find_with( K const& key, Less pred )
+        bool contains( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
             return do_find( key, cds::opt::details::make_comparator_from_less<Less>(), []( node_type * ) -> bool { return true; } );
index ee2a355b87d58174b722888fb4d37b288c438fa4..245555c06a2fdb2b9a9bb24dc0055fbdf031c9d1 100644 (file)
     <ClInclude Include="..\..\..\cds\gc\impl\hp_decl.h" />\r
     <ClInclude Include="..\..\..\cds\gc\impl\hp_impl.h" />\r
     <ClInclude Include="..\..\..\cds\intrusive\basket_queue.h" />\r
-    <ClInclude Include="..\..\..\cds\intrusive\bronson_avltree_rcu.h" />\r
     <ClInclude Include="..\..\..\cds\intrusive\cuckoo_set.h" />\r
     <ClInclude Include="..\..\..\cds\intrusive\details\base.h" />\r
     <ClInclude Include="..\..\..\cds\intrusive\details\ellen_bintree_base.h" />\r
index e5928da43dd47448a3b6c1f2139c6f90aae97c85..fe212fb040ba85d8f163f96837ddaf18251be05f 100644 (file)
     <ClInclude Include="..\..\..\cds\algo\atomic.h">\r
       <Filter>Header Files\cds\algo</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="..\..\..\cds\intrusive\bronson_avltree_rcu.h">\r
-      <Filter>Header Files\cds\intrusive</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="..\..\..\cds\container\details\bronson_avltree_base.h">\r
       <Filter>Header Files\cds\container\details</Filter>\r
     </ClInclude>\r
index 8ae26e0eeb8540763abbdab7404886ebbcc3fb6e..fae5da4bf1037df702554f5d952afd54c5275d12 100644 (file)
@@ -45,7 +45,7 @@
   <ItemGroup>\r
     <ClCompile Include="..\..\..\tests\unit\map2\map_delodd.cpp" />\r
     <ClCompile Include="..\..\..\tests\unit\map2\map_delodd_bronsonavltree.cpp">\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">true</ExcludedFromBuild>\r
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">false</ExcludedFromBuild>\r
     </ClCompile>\r
     <ClCompile Include="..\..\..\tests\unit\map2\map_delodd_cuckoo.cpp">\r
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">true</ExcludedFromBuild>\r
index 785256c16552c05889d44fde9ffdeca452299730..15618f98c28c5d61543406ff40f692dbcd49e390 100644 (file)
@@ -120,7 +120,7 @@ namespace tree {
         };
 
         template <typename Q>
-        static void ensure_func( bool bNew, Q key, value_type& i )
+        static void update_func( bool bNew, Q key, value_type& i )
         {
             i.nVal = key * 100;
             if ( bNew )
@@ -129,12 +129,12 @@ namespace tree {
                 ++i.stat.nEnsureExistFuncCall;
         }
 
-        struct ensure_functor
+        struct update_functor
         {
             template <typename Q>
             void operator()( bool bNew, Q key, value_type& i )
             {
-                ensure_func( bNew, key, i );
+                update_func( bNew, key, i );
             }
         };
 
@@ -155,22 +155,22 @@ namespace tree {
             typedef typename Set::exempt_ptr exempt_ptr;
 
             // insert/find test
-            CPPUNIT_ASSERT( !s.find( 10 ) );
+            CPPUNIT_ASSERT( !s.contains( 10 ) );
             CPPUNIT_ASSERT( s.insert( 10 ) );
             CPPUNIT_ASSERT( !s.empty() );
             CPPUNIT_ASSERT( check_size( s, 1 ) );
-            CPPUNIT_ASSERT( s.find( 10 ) );
+            CPPUNIT_ASSERT( s.contains( 10 ) );
 
             CPPUNIT_ASSERT( !s.insert( 10 ) );
             CPPUNIT_ASSERT( !s.empty() );
             CPPUNIT_ASSERT( check_size( s, 1 ) );
 
-            CPPUNIT_ASSERT( !s.find_with( 20, std::less<key_type>() ) );
+            CPPUNIT_ASSERT( !s.contains( 20, std::less<key_type>() ) );
             CPPUNIT_ASSERT( s.insert( 20, 25 ) );
             CPPUNIT_ASSERT( !s.empty() );
             CPPUNIT_ASSERT( check_size( s, 2 ) );
-            CPPUNIT_ASSERT( s.find_with( 10, std::less<key_type>() ) );
-            CPPUNIT_ASSERT( s.find( key = 20 ) );
+            CPPUNIT_ASSERT( s.contains( 10, std::less<key_type>() ) );
+            CPPUNIT_ASSERT( s.contains( key = 20 ) );
             CPPUNIT_ASSERT( s.find_with( key, std::less<key_type>(), find_functor() ) );
             {
                 copy_found<value_type> f;
@@ -198,7 +198,7 @@ namespace tree {
             CPPUNIT_ASSERT( !s.empty() );
             CPPUNIT_ASSERT( check_size( s, 2 ) );
 
-            CPPUNIT_ASSERT( !s.find( 25 ) );
+            CPPUNIT_ASSERT( !s.contains( 25 ) );
             CPPUNIT_ASSERT( s.insert_with( 25, insert_functor() ) );
             CPPUNIT_ASSERT( !s.empty() );
             CPPUNIT_ASSERT( check_size( s, 3 ) );
@@ -219,8 +219,8 @@ namespace tree {
                 CPPUNIT_ASSERT( f.m_found.stat.nEnsureExistFuncCall == 0 );
                 CPPUNIT_ASSERT( f.m_found.stat.nEnsureNewFuncCall == 0 );
             }
-            std::pair<bool, bool> ensureResult = s.update( key, ensure_functor() );
-            CPPUNIT_ASSERT( ensureResult.first && !ensureResult.second );
+            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 ) );
             {
@@ -231,12 +231,12 @@ namespace tree {
                 CPPUNIT_ASSERT( f.m_found.stat.nEnsureNewFuncCall == 0 );
             }
 
-            ensureResult = s.update( 13, []( bool /*bNew*/, key_type key, value_type& v )
+            updateResult = s.update( 13, []( bool /*bNew*/, key_type key, value_type& v )
                 {
                     v.nVal = key * 1000;
                     ++v.stat.nEnsureNewFuncCall;
                 });
-            CPPUNIT_ASSERT( ensureResult.first && ensureResult.second );
+            CPPUNIT_ASSERT( updateResult.first && updateResult.second );
             CPPUNIT_ASSERT( !s.empty() );
             CPPUNIT_ASSERT( check_size( s, 4 ) );
             {
@@ -250,23 +250,23 @@ namespace tree {
 
             // erase test
             CPPUNIT_ASSERT( s.erase( 13 ) );
-            CPPUNIT_ASSERT( !s.find( 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.find( 10 ) );
+            CPPUNIT_ASSERT( s.contains( 10 ) );
             CPPUNIT_ASSERT( s.erase_with( 10, std::less<key_type>() ) );
-            CPPUNIT_ASSERT( !s.find( 10 ) );
+            CPPUNIT_ASSERT( !s.contains( 10 ) );
             CPPUNIT_ASSERT( !s.empty() );
             CPPUNIT_ASSERT( check_size( s, 2 ) );
             CPPUNIT_ASSERT( !s.erase_with( 10, std::less<key_type>() ) );
             CPPUNIT_ASSERT( !s.empty() );
             CPPUNIT_ASSERT( check_size( s, 2 ) );
 
-            CPPUNIT_ASSERT( s.find( 20 ) );
+            CPPUNIT_ASSERT( s.contains( 20 ) );
             {
                 copy_found<value_type> f;
                 CPPUNIT_ASSERT( s.erase( 20, std::ref( f ) ) );
@@ -276,7 +276,7 @@ namespace tree {
                 CPPUNIT_ASSERT( s.erase_with( 235, std::less<key_type>(), std::ref( f ) ) );
                 CPPUNIT_ASSERT( f.m_found.nVal == 2350 );
             }
-            CPPUNIT_ASSERT( !s.find( 20 ) );
+            CPPUNIT_ASSERT( !s.contains( 20 ) );
             CPPUNIT_ASSERT( !s.empty() );
             CPPUNIT_ASSERT( check_size( s, 1 ) );
 
@@ -290,18 +290,18 @@ namespace tree {
             CPPUNIT_ASSERT( !s.empty() );
             CPPUNIT_ASSERT( check_size( s, 2 ) );
 
-            CPPUNIT_ASSERT( s.find( 151 ) );
-            CPPUNIT_ASSERT( s.find_with( 174, std::less<key_type>() ) );
-            CPPUNIT_ASSERT( !s.find( 190 ) );
+            CPPUNIT_ASSERT( s.contains( 151 ) );
+            CPPUNIT_ASSERT( s.contains( 174, std::less<key_type>() ) );
+            CPPUNIT_ASSERT( !s.contains( 190 ) );
 
             {
                 copy_found<value_type> f;
                 key = 151;
-                CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
+                CPPUNIT_ASSERT( s.find( key, std::ref( f )));
                 CPPUNIT_ASSERT( f.m_found.nVal == 0 );
 
                 key = 174;
-                CPPUNIT_ASSERT( s.find( key, std::ref( f ) ) );
+                CPPUNIT_ASSERT( s.find( key, std::ref( f )));
                 CPPUNIT_ASSERT( f.m_found.nVal == 471 );
             }
 
index 9adc9845eed39602e4bbd2312f5001abc4d20d97..f8559b3096edf97d05266cb61fa693a2a380a7ab 100644 (file)
 
 
 // **************************************************************************************
-// BronsonACLTreeMap
+// BronsonAVLTreeMap
 
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
 #   define CDSUNIT_DECLARE_BronsonAVLTreeMap_RCU_signal \
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_shb_less) \
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_sht_less) \
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_shb_cmp_stat) \
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_sht_cmp_stat) \
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_shb_less_pool_simple) \
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_sht_less_pool_simple) \
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_shb_less_pool_simple_stat) \
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_sht_less_pool_simple_stat) \
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_shb_less_pool_lazy) \
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_sht_less_pool_lazy) \
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_shb_less_pool_lazy_stat) \
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_sht_less_pool_lazy_stat) \
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_shb_less_pool_bounded) \
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_sht_less_pool_bounded) \
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_shb_less_pool_bounded_stat) \
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_sht_less_pool_bounded_stat) \
-
-#   define CDSUNIT_DEFINE_BronsonAVLTreeMap_RCU_signal(IMPL, C) \
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_shb_less) \
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_sht_less) \
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_shb_cmp_stat) \
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_sht_cmp_stat) \
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_shb_less_pool_simple) \
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_sht_less_pool_simple) \
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_shb_less_pool_simple_stat) \
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_sht_less_pool_simple_stat) \
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_shb_less_pool_lazy) \
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_sht_less_pool_lazy) \
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_shb_less_pool_lazy_stat) \
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_sht_less_pool_lazy_stat) \
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_shb_less_pool_bounded) \
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_sht_less_pool_bounded) \
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_shb_less_pool_bounded_stat) \
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_sht_less_pool_bounded_stat) \
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_shb_less) \
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_sht_less) \
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_shb_cmp_stat) \
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_sht_cmp_stat) \
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_shb_less_pool_simple) \
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_sht_less_pool_simple) \
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_shb_less_pool_simple_stat) \
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_sht_less_pool_simple_stat) \
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_shb_less_pool_lazy) \
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_sht_less_pool_lazy) \
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_shb_less_pool_lazy_stat) \
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_sht_less_pool_lazy_stat) \
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_shb_less_pool_bounded) \
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_sht_less_pool_bounded) \
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_shb_less_pool_bounded_stat) \
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_sht_less_pool_bounded_stat) \
 
 #   define CDSUNIT_TEST_BronsonAVLTreeMap_RCU_signal \
     CPPUNIT_TEST(BronsonAVLTreeMap_rcu_shb_less) \
 
 #else
 #   define CDSUNIT_DECLARE_BronsonAVLTreeMap_RCU_signal
-#   define CDSUNIT_DEFINE_BronsonAVLTreeMap_RCU_signal(IMPL, C)
 #   define CDSUNIT_TEST_BronsonAVLTreeMap_RCU_signal
 #endif
 
 #define CDSUNIT_DECLARE_BronsonAVLTreeMap \
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpi_less)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpb_less)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpt_less)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpi_cmp_stat)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpb_cmp_stat)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpt_cmp_stat)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpi_less_pool_simple)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpb_less_pool_simple)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpt_less_pool_simple)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpi_less_pool_simple_stat)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpb_less_pool_simple_stat)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpt_less_pool_simple_stat)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpi_less_pool_lazy)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpb_less_pool_lazy)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpt_less_pool_lazy)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpi_less_pool_lazy_stat)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpb_less_pool_lazy_stat)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpt_less_pool_lazy_stat)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpi_less_pool_bounded)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpb_less_pool_bounded)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpt_less_pool_bounded)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpi_less_pool_bounded_stat)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpb_less_pool_bounded_stat)\
-    CDSUNIT_DECLARE_TEST(BronsonAVLTreeMap_rcu_gpt_less_pool_bounded_stat)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpi_less)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpb_less)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpt_less)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpi_cmp_stat)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpb_cmp_stat)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpt_cmp_stat)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpi_less_pool_simple)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpb_less_pool_simple)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpt_less_pool_simple)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpi_less_pool_simple_stat)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpb_less_pool_simple_stat)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpt_less_pool_simple_stat)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpi_less_pool_lazy)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpb_less_pool_lazy)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpt_less_pool_lazy)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpi_less_pool_lazy_stat)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpb_less_pool_lazy_stat)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpt_less_pool_lazy_stat)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpi_less_pool_bounded)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpb_less_pool_bounded)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpt_less_pool_bounded)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpi_less_pool_bounded_stat)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpb_less_pool_bounded_stat)\
+    TEST_CASE(tag_BronsonAVLTreeMap, BronsonAVLTreeMap_rcu_gpt_less_pool_bounded_stat)\
     CDSUNIT_DECLARE_BronsonAVLTreeMap_RCU_signal
 
-#define CDSUNIT_DEFINE_BronsonAVLTreeMap( IMPL, C ) \
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpi_less)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpb_less)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpt_less)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpi_cmp_stat)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpb_cmp_stat)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpt_cmp_stat)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpi_less_pool_simple)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpb_less_pool_simple)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpt_less_pool_simple)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpi_less_pool_simple_stat)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpb_less_pool_simple_stat)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpt_less_pool_simple_stat)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpi_less_pool_lazy)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpb_less_pool_lazy)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpt_less_pool_lazy)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpi_less_pool_lazy_stat)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpb_less_pool_lazy_stat)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpt_less_pool_lazy_stat)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpi_less_pool_bounded)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpb_less_pool_bounded)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpt_less_pool_bounded)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpi_less_pool_bounded_stat)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpb_less_pool_bounded_stat)\
-    TEST_MAP_NOLF_EXTRACT(IMPL, C, BronsonAVLTreeMap_rcu_gpt_less_pool_bounded_stat)\
-    CDSUNIT_DEFINE_BronsonAVLTreeMap_RCU_signal( IMPL, C )
-
 #define CDSUNIT_TEST_BronsonAVLTreeMap \
     CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpi_less)\
     CPPUNIT_TEST(BronsonAVLTreeMap_rcu_gpi_cmp_stat)\
index fe45c6786e6f1599fff7a0fb1deddfa25b37a67a..57a6db6f8257fe2c364eb8ff7cf8cfc24b4bd5eb 100644 (file)
@@ -693,6 +693,7 @@ namespace map2 {
         CDSUNIT_DECLARE_SplitList
         CDSUNIT_DECLARE_SkipListMap
         CDSUNIT_DECLARE_EllenBinTreeMap
+        CDSUNIT_DECLARE_BronsonAVLTreeMap
 
         // This test is not suitable for MultiLevelHashMap
         //CDSUNIT_DECLARE_MultiLevelHashMap
@@ -702,6 +703,7 @@ namespace map2 {
             CDSUNIT_TEST_SplitList
             CDSUNIT_TEST_SkipListMap
             CDSUNIT_TEST_EllenBinTreeMap
+            CDSUNIT_TEST_BronsonAVLTreeMap
 
             //CDSUNIT_TEST_MultiLevelHashMap // the test is not suitable
         CPPUNIT_TEST_SUITE_END();
@@ -709,7 +711,6 @@ namespace map2 {
         ////CDSUNIT_DECLARE_StripedMap
         ////CDSUNIT_DECLARE_RefinableMap
         //CDSUNIT_DECLARE_CuckooMap
-        //CDSUNIT_DECLARE_BronsonAVLTreeMap
         //CDSUNIT_DECLARE_MultiLevelHashMap
         ////CDSUNIT_DECLARE_StdMap
     };
index 2d2df6ad56f2a0d311965733dbce94044e4bf49c..3c5f7942f3f44a7bb0e42e426c5bdff4d5208b62 100644 (file)
@@ -3,10 +3,10 @@
 #include "map2/map_delodd.h"
 #include "map2/map_type_bronson_avltree.h"
 
-namespace map2 {
-    CDSUNIT_DEFINE_BronsonAVLTreeMap( cc::bronson_avltree::implementation_tag, Map_DelOdd)
+#undef TEST_CASE
+#define TEST_CASE(TAG, X)  void Map_DelOdd::X() { run_test<typename map_type< TAG, key_type, value_type>::X>(); }
+#include "map2/map_defs.h"
 
-    CPPUNIT_TEST_SUITE_PART( Map_DelOdd, run_BronsonAVLTreeMap )
-        CDSUNIT_TEST_BronsonAVLTreeMap
-    CPPUNIT_TEST_SUITE_END_PART()
+namespace map2 {
+    CDSUNIT_DECLARE_BronsonAVLTreeMap
 } // namespace map2
index 5296dfbdf006ba4f0e8edfe1761b95604e45868e..2fee7d8a38d4bf52840182f02b2e04516264dbcf 100644 (file)
 
 namespace map2 {
 
+    template <class GC, typename Key, typename T, typename Traits = cc::bronson_avltree::traits >
+    class BronsonAVLTreeMap : public cc::BronsonAVLTreeMap< GC, Key, T, Traits >
+    {
+        typedef cc::BronsonAVLTreeMap< GC, Key, T, Traits > base_class;
+    public:
+        template <typename Config>
+        BronsonAVLTreeMap( Config const& /*cfg*/)
+            : base_class()
+        {}
+
+        // for testing
+        static CDS_CONSTEXPR bool const c_bExtractSupported = true;
+        static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
+    };
+
+    struct tag_BronsonAVLTreeMap;
+
     template <typename Key, typename Value>
-    struct map_type< cc::bronson_avltree::implementation_tag, Key, Value >: public map_type_base< Key, Value >
+    struct map_type< tag_BronsonAVLTreeMap, Key, Value >: public map_type_base< Key, Value >
     {
         typedef map_type_base< Key, Value > base_class;
         typedef typename base_class::compare    compare;
@@ -32,12 +49,12 @@ namespace map2 {
                 ,co::item_counter< cds::atomicity::item_counter >
             >::type
         {};
-        typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_gpi_less;
-        typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_gpb_less;
-        typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_gpt_less;
+        typedef BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_gpi_less;
+        typedef BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_gpb_less;
+        typedef BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_gpt_less;
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-        typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_shb_less;
-        typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_sht_less;
+        typedef BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_shb_less;
+        typedef BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less > BronsonAVLTreeMap_rcu_sht_less;
 #endif
         struct BronsonAVLTreeMap_cmp_stat: public
             cc::bronson_avltree::make_traits<
@@ -47,48 +64,48 @@ namespace map2 {
                 ,co::stat< cc::bronson_avltree::stat<>>
             >::type
         {};
-        typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_gpi_cmp_stat;
-        typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_gpb_cmp_stat;
-        typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_gpt_cmp_stat;
+        typedef BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_gpi_cmp_stat;
+        typedef BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_gpb_cmp_stat;
+        typedef BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_gpt_cmp_stat;
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-        typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_shb_cmp_stat;
-        typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_sht_cmp_stat;
+        typedef BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_shb_cmp_stat;
+        typedef BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_cmp_stat > BronsonAVLTreeMap_rcu_sht_cmp_stat;
 #endif
 
         struct BronsonAVLTreeMap_less_pool_simple: public BronsonAVLTreeMap_less
         {
             typedef cds::sync::pool_monitor<BronsonAVLTreeMap_simple_pool> sync_monitor;
         };
-        typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_gpi_less_pool_simple;
-        typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_gpb_less_pool_simple;
-        typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_gpt_less_pool_simple;
+        typedef BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_gpi_less_pool_simple;
+        typedef BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_gpb_less_pool_simple;
+        typedef BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_gpt_less_pool_simple;
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-        typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_shb_less_pool_simple;
-        typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_sht_less_pool_simple;
+        typedef BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_shb_less_pool_simple;
+        typedef BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_simple > BronsonAVLTreeMap_rcu_sht_less_pool_simple;
 #endif
         struct BronsonAVLTreeMap_less_pool_simple_stat : public BronsonAVLTreeMap_less
         {
             typedef cc::bronson_avltree::stat<> stat;
             typedef cds::sync::pool_monitor<BronsonAVLTreeMap_simple_pool, cds::opt::none, true > sync_monitor;
         };
-        typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_gpi_less_pool_simple_stat;
-        typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_gpb_less_pool_simple_stat;
-        typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_gpt_less_pool_simple_stat;
+        typedef BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_gpi_less_pool_simple_stat;
+        typedef BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_gpb_less_pool_simple_stat;
+        typedef BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_gpt_less_pool_simple_stat;
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-        typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_shb_less_pool_simple_stat;
-        typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_sht_less_pool_simple_stat;
+        typedef BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_shb_less_pool_simple_stat;
+        typedef BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_simple_stat > BronsonAVLTreeMap_rcu_sht_less_pool_simple_stat;
 #endif
         struct BronsonAVLTreeMap_less_pool_lazy: public BronsonAVLTreeMap_less
         {
             typedef cds::sync::pool_monitor<BronsonAVLTreeMap_lazy_pool> sync_monitor;
             static CDS_CONSTEXPR bool const relaxed_insert = true;
         };
-        typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_gpi_less_pool_lazy;
-        typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_gpb_less_pool_lazy;
-        typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_gpt_less_pool_lazy;
+        typedef BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_gpi_less_pool_lazy;
+        typedef BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_gpb_less_pool_lazy;
+        typedef BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_gpt_less_pool_lazy;
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-        typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_shb_less_pool_lazy;
-        typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_sht_less_pool_lazy;
+        typedef BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_shb_less_pool_lazy;
+        typedef BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_lazy > BronsonAVLTreeMap_rcu_sht_less_pool_lazy;
 #endif
         struct BronsonAVLTreeMap_less_pool_lazy_stat : public BronsonAVLTreeMap_less
         {
@@ -96,24 +113,24 @@ namespace map2 {
             typedef cds::sync::pool_monitor<BronsonAVLTreeMap_lazy_pool, cds::opt::none, true > sync_monitor;
             static CDS_CONSTEXPR bool const relaxed_insert = true;
         };
-        typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_gpi_less_pool_lazy_stat;
-        typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_gpb_less_pool_lazy_stat;
-        typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_gpt_less_pool_lazy_stat;
+        typedef BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_gpi_less_pool_lazy_stat;
+        typedef BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_gpb_less_pool_lazy_stat;
+        typedef BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_gpt_less_pool_lazy_stat;
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-        typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_shb_less_pool_lazy_stat;
-        typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_sht_less_pool_lazy_stat;
+        typedef BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_shb_less_pool_lazy_stat;
+        typedef BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_lazy_stat > BronsonAVLTreeMap_rcu_sht_less_pool_lazy_stat;
 #endif
         struct BronsonAVLTreeMap_less_pool_bounded: public BronsonAVLTreeMap_less
         {
             typedef cds::sync::pool_monitor<BronsonAVLTreeMap_bounded_pool> sync_monitor;
             static CDS_CONSTEXPR bool const relaxed_insert = true;
         };
-        typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_gpi_less_pool_bounded;
-        typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_gpb_less_pool_bounded;
-        typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_gpt_less_pool_bounded;
+        typedef BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_gpi_less_pool_bounded;
+        typedef BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_gpb_less_pool_bounded;
+        typedef BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_gpt_less_pool_bounded;
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-        typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_shb_less_pool_bounded;
-        typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_sht_less_pool_bounded;
+        typedef BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_shb_less_pool_bounded;
+        typedef BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_bounded > BronsonAVLTreeMap_rcu_sht_less_pool_bounded;
 #endif
         struct BronsonAVLTreeMap_less_pool_bounded_stat : public BronsonAVLTreeMap_less
         {
@@ -121,24 +138,24 @@ namespace map2 {
             typedef cds::sync::pool_monitor<BronsonAVLTreeMap_bounded_pool, cds::opt::none, true > sync_monitor;
             static CDS_CONSTEXPR bool const relaxed_insert = true;
         };
-        typedef cc::BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_gpi_less_pool_bounded_stat;
-        typedef cc::BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_gpb_less_pool_bounded_stat;
-        typedef cc::BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_gpt_less_pool_bounded_stat;
+        typedef BronsonAVLTreeMap< rcu_gpi, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_gpi_less_pool_bounded_stat;
+        typedef BronsonAVLTreeMap< rcu_gpb, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_gpb_less_pool_bounded_stat;
+        typedef BronsonAVLTreeMap< rcu_gpt, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_gpt_less_pool_bounded_stat;
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-        typedef cc::BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_shb_less_pool_bounded_stat;
-        typedef cc::BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_sht_less_pool_bounded_stat;
+        typedef BronsonAVLTreeMap< rcu_shb, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_shb_less_pool_bounded_stat;
+        typedef BronsonAVLTreeMap< rcu_sht, Key, Value, BronsonAVLTreeMap_less_pool_bounded_stat > BronsonAVLTreeMap_rcu_sht_less_pool_bounded_stat;
 #endif
     };
 
     template <typename GC, typename Key, typename T, typename Traits>
-    static inline void print_stat( cc::BronsonAVLTreeMap<GC, Key, T, Traits> const& m )
+    static inline void print_stat( BronsonAVLTreeMap<GC, Key, T, Traits> const& m )
     {
         CPPUNIT_MSG( m.statistics() );
         CPPUNIT_MSG( m.monitor().statistics() );
     }
 
     template <typename GC, typename Key, typename T, typename Traits>
-    static inline void check_before_cleanup( cc::BronsonAVLTreeMap<GC, Key, T, Traits>& m )
+    static inline void check_before_cleanup( BronsonAVLTreeMap<GC, Key, T, Traits>& m )
     {
         CPPUNIT_MSG( "  Check internal consistency (single-threaded)..." );
         bool bOk = m.check_consistency([]( size_t nLevel, size_t hLeft, size_t hRight )