# 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 );
- \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.
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*
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
/**
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.
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
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
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
);
}
- /// 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.
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; } );
<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
<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
<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
};
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 )
++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 );
}
};
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;
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 ) );
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 ) );
{
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 ) );
{
// 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 ) ) );
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 ) );
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 );
}
// **************************************************************************************
-// 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)\
CDSUNIT_DECLARE_SplitList
CDSUNIT_DECLARE_SkipListMap
CDSUNIT_DECLARE_EllenBinTreeMap
+ CDSUNIT_DECLARE_BronsonAVLTreeMap
// This test is not suitable for MultiLevelHashMap
//CDSUNIT_DECLARE_MultiLevelHashMap
CDSUNIT_TEST_SplitList
CDSUNIT_TEST_SkipListMap
CDSUNIT_TEST_EllenBinTreeMap
+ CDSUNIT_TEST_BronsonAVLTreeMap
//CDSUNIT_TEST_MultiLevelHashMap // the test is not suitable
CPPUNIT_TEST_SUITE_END();
////CDSUNIT_DECLARE_StripedMap
////CDSUNIT_DECLARE_RefinableMap
//CDSUNIT_DECLARE_CuckooMap
- //CDSUNIT_DECLARE_BronsonAVLTreeMap
//CDSUNIT_DECLARE_MultiLevelHashMap
////CDSUNIT_DECLARE_StdMap
};
#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
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;
,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<
,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
{
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
{
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 )