From a71f8061c63cb815e66e92cf8765233b8928e689 Mon Sep 17 00:00:00 2001 From: khizmax Date: Sat, 29 Aug 2015 20:30:50 +0300 Subject: [PATCH] * SkipListMap, SkipListSet: - replaced ensure() with update() - replaced find( key ) with contains( key ) MapDelOdd MT-test is refactored for SkipListMap --- cds/container/impl/skip_list_map.h | 35 +++-- cds/container/impl/skip_list_set.h | 36 +++-- cds/container/skip_list_map_nogc.h | 33 +++-- cds/container/skip_list_map_rcu.h | 35 +++-- cds/container/skip_list_set_nogc.h | 38 +++-- cds/container/skip_list_set_rcu.h | 40 ++++-- cds/intrusive/impl/skip_list.h | 38 +++-- cds/intrusive/skip_list_nogc.h | 39 +++-- cds/intrusive/skip_list_rcu.h | 32 +++-- projects/Win/vc12/unit-map-delodd.vcxproj | 2 +- tests/unit/map2/map_defs.h | 105 +++++--------- tests/unit/map2/map_delodd.cpp | 7 - tests/unit/map2/map_delodd.h | 4 +- tests/unit/map2/map_delodd_skip.cpp | 10 +- tests/unit/map2/map_type_skip_list.h | 165 ++++++++++++---------- 15 files changed, 348 insertions(+), 271 deletions(-) diff --git a/cds/container/impl/skip_list_map.h b/cds/container/impl/skip_list_map.h index 3192918b..ccd14ad9 100644 --- a/cds/container/impl/skip_list_map.h +++ b/cds/container/impl/skip_list_map.h @@ -332,7 +332,6 @@ namespace cds { namespace container { pNode.release(); return res; } - //@cond // Deprecated, use update() template @@ -558,31 +557,45 @@ namespace cds { namespace container { [&f](node_type& item, K const& ) { f( item.m_Value );}); } - /// Find the key \p key - /** \anchor cds_nonintrusive_SkipListMap_find_val - + /// 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. */ template + bool contains( K const& key ) + { + return base_class::contains( key ); + } + //@cond + // Deprecated, use contains() + template bool find( K const& key ) { - return base_class::find( key ); + return contains( key ); } + //@endcond - /// Finds the key \p val using \p pred predicate for searching + /// Checks whether the set contains \p key using \p pred predicate for searching /** - The function is an analog of \ref cds_nonintrusive_SkipListMap_find_val "find(K const&)" - but \p pred is used for key comparing. + The function is similar to contains( key ) 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 - bool find_with( K const& key, Less pred ) + bool contains( K const& key, Less pred ) { CDS_UNUSED( pred ); - return base_class::find_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >() ); + return base_class::contains( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >() ); } + //@cond + // Deprecated, use contains() + template + bool find_with( K const& key, Less pred ) + { + return contains( key, pred ); + } + //@endcond /// Finds the key \p key and return the item found /** \anchor cds_nonintrusive_SkipListMap_hp_get diff --git a/cds/container/impl/skip_list_set.h b/cds/container/impl/skip_list_set.h index 9754e997..4365e043 100644 --- a/cds/container/impl/skip_list_set.h +++ b/cds/container/impl/skip_list_set.h @@ -290,7 +290,6 @@ namespace cds { namespace container { sp.release(); return bRes; } - //@cond // Deprecated, use update() template @@ -559,34 +558,45 @@ namespace cds { namespace container { } //@endcond - /// Find \p key - /** \anchor cds_nonintrusive_SkipListSet_find_val - + /// Checks whether the set 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. - - Note the hash functor specified for class \p Traits template parameter - should accept a parameter of type \p Q that may be not the same as \ref value_type. */ template + bool contains( Q const& key ) + { + return base_class::contains( key ); + } + //@cond + // Deprecated, use contains() + template bool find( Q const& key ) { - return base_class::find( key ); + return contains( key ); } + //@endcond - /// Finds \p key using \p pred predicate for searching + /// Checks whether the set contains \p key using \p pred predicate for searching /** - The function is an analog of \ref cds_nonintrusive_SkipListSet_find_val "find(Q const&)" - but \p pred is used for key comparing. + The function is similar to contains( key ) 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 set. */ template - bool find_with( Q const& key, Less pred ) + bool contains( Q const& key, Less pred ) { CDS_UNUSED( pred ); - return base_class::find_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >()); + return base_class::contains( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >()); } + //@cond + // Deprecated, use contains() + template + bool find_with( Q const& key, Less pred ) + { + return contains( key, pred ); + } + //@endcond /// Finds \p key and return the item found /** \anchor cds_nonintrusive_SkipListSet_hp_get diff --git a/cds/container/skip_list_map_nogc.h b/cds/container/skip_list_map_nogc.h index 79ef6769..2136e4ce 100644 --- a/cds/container/skip_list_map_nogc.h +++ b/cds/container/skip_list_map_nogc.h @@ -250,7 +250,6 @@ namespace cds { namespace container { //TODO: pass arguments by reference (make_pair makes copy) return base_class::update( std::make_pair( key, mapped_type() ), bInsert ); } - //@cond // Deprecated, use update() template @@ -260,31 +259,45 @@ namespace cds { namespace container { } //@endcond - /// Finds the key \p key - /** \anchor cds_nonintrusive_SkipListMap_nogc_find_val - + /// Checks whether the map contains \p key + /** The function searches the item with key equal to \p key and returns an iterator pointed to item found if the key is found, and \ref end() otherwise */ template + iterator contains( K const& key ) + { + return base_class::contains( key ); + } + //@cond + // Deprecated, use contains() + template iterator find( K const& key ) { - return base_class::find( key ); + return contains( key ); } + //@endcond - /// Finds the key \p key with comparing functor \p cmp + /// Checks whether the map contains \p key using \p pred predicate for searching /** - The function is an analog of \ref cds_nonintrusive_SkipListMap_nogc_find_val "find(K const&)" - but \p pred is used for key comparing. + The function is similar to contains( key ) 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 set. + \p Less must imply the same element order as the comparator used for building the map. */ template + iterator contains( K const& key, Less pred ) const + { + return base_class::contains( key, pred ); + } + //@cond + // Deprecated, use contains() + template iterator find_with( K const& key, Less pred ) const { - return base_class::find_with( key, pred ); + return contains( key, pred ); } + //@endcond /// Gets minimum key from the map /** diff --git a/cds/container/skip_list_map_rcu.h b/cds/container/skip_list_map_rcu.h index 70185d7f..07080a77 100644 --- a/cds/container/skip_list_map_rcu.h +++ b/cds/container/skip_list_map_rcu.h @@ -365,7 +365,6 @@ namespace cds { namespace container { pNode.release(); return res; } - //@cond // Deprecated, use update() template @@ -547,33 +546,47 @@ namespace cds { namespace container { [&f](node_type& item, K const& ) { f( item.m_Value );}); } - /// Find the key \p key - /** \anchor cds_nonintrusive_SkipListMap_rcu_find_val - + /// 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 + bool contains( K const& key ) + { + return base_class::contains( key ); + } + //@cond + // Deprecated, use contains() + template bool find( K const& key ) { - return base_class::find( key ); + return contains( key ); } + //@endcond - /// 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 \ref cds_nonintrusive_SkipListMap_rcu_find_val "find(K const&)" - but \p pred is used for key comparing. + The function is similar to contains( key ) 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 - bool find_with( K const& key, Less pred ) + bool contains( K const& key, Less pred ) { CDS_UNUSED( pred ); - return base_class::find_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >() ); + return base_class::contains( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >() ); } + //@cond + // Deprecated, use contains() + template + bool find_with( K const& key, Less pred ) + { + return contains( key, pred ); + } + //@endcond /// Finds the key \p key and return the item found /** \anchor cds_nonintrusive_SkipListMap_rcu_get diff --git a/cds/container/skip_list_set_nogc.h b/cds/container/skip_list_set_nogc.h index 0d6f8850..e569c37f 100644 --- a/cds/container/skip_list_set_nogc.h +++ b/cds/container/skip_list_set_nogc.h @@ -290,7 +290,6 @@ namespace cds { namespace container { assert( pNode ); return std::make_pair( node_to_iterator( pNode ), bRes.second ); } - //@cond // Deprecated, use update() template @@ -300,38 +299,51 @@ namespace cds { namespace container { } //@endcond - /// Searches \p key - /** \anchor cds_nonintrusive_SkipListSet_nogc_find_val - + /// Checks whether the set contains \p key + /** The function searches the item with key equal to \p key - and returns an iterator pointed to item found if the key is found, - and \ref end() otherwise + and returns an iterator to item found or \p end() if the key is not fund */ template - iterator find( Q const& key ) const + iterator contains( Q const& key ) const { - node_type * pNode = base_class::find( key ); + node_type * pNode = base_class::contains( key ); if ( pNode ) return node_to_iterator( pNode ); return base_class::nonconst_end(); } + //@cond + // Deprecated, use contains() + template + iterator find( Q const& key ) const + { + return contains( key ); + } + //@edncond - /// Finds the key \p val using \p pred predicate for searching + /// Checks whether the set contains \p key using \p pred predicate for searching /** - The function is an analog of \ref cds_nonintrusive_SkipListSet_nogc_find_val "find(Q const&)" - but \p pred is used for key comparing. + The function is similar to contains( key ) 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 set. */ template - iterator find_with( Q const& key, Less pred ) const + iterator contains( Q const& key, Less pred ) const { CDS_UNUSED( pred ); - node_type * pNode = base_class::find_with( key, cds::details::predicate_wrapper< node_type, Less, key_accessor>() ); + node_type * pNode = base_class::contains( key, cds::details::predicate_wrapper< node_type, Less, key_accessor>() ); if ( pNode ) return node_to_iterator( pNode ); return base_class::nonconst_end(); } + //@cond + // Deprecated, use contains() + template + iterator find_with( Q const& key, Less pred ) const + { + return contains( key, pred ); + } + //@endcond /// Gets minimum key from the set /** diff --git a/cds/container/skip_list_set_rcu.h b/cds/container/skip_list_set_rcu.h index 32453bfa..22bccb31 100644 --- a/cds/container/skip_list_set_rcu.h +++ b/cds/container/skip_list_set_rcu.h @@ -367,7 +367,6 @@ namespace cds { namespace container { sp.release(); return bRes; } - //@cond // Deprecated, use update() template @@ -602,36 +601,47 @@ namespace cds { namespace container { } //@endcond - /// Find the key \p val - /** @anchor cds_nonintrusive_SkipListSet_rcu_find_val - - The function searches the item with key equal to \p val + /// Checks whether the set 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. - Note the hash functor specified for class \p Traits template parameter - should accept a parameter of type \p Q that may be not the same as \ref value_type. - The function applies RCU lock internally. */ template - bool find( Q const & val ) + bool contains( Q const & key ) + { + return base_class::contains( key ); + } + //@cond + // Deprecated, use contains() + template + bool find( Q const & key ) { - return base_class::find( val ); + return contains( key ); } + //@endcond - /// Finds the key \p val using \p pred predicate for searching + /// Checks whether the set contains \p key using \p pred predicate for searching /** - The function is an analog of \ref cds_nonintrusive_SkipListSet_rcu_find_val "find(Q const&)" - but \p pred is used for key comparing. + The function is similar to contains( key ) 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 set. */ template - bool find_with( Q const& val, Less pred ) + bool contains( Q const& key, Less pred ) { CDS_UNUSED( pred ); - return base_class::find_with( val, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >()); + return base_class::contains( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >()); } + //@cond + // Deprecated, use contains() + template + bool find_with( Q const& key, Less pred ) + { + return contains( key, pred ); + } + //@endcond /// Finds \p key and return the item found /** \anchor cds_nonintrusive_SkipListSet_rcu_get diff --git a/cds/intrusive/impl/skip_list.h b/cds/intrusive/impl/skip_list.h index 3574937a..2f2da4c4 100644 --- a/cds/intrusive/impl/skip_list.h +++ b/cds/intrusive/impl/skip_list.h @@ -1156,7 +1156,6 @@ namespace cds { namespace intrusive { return std::make_pair( true, true ); } } - //@cond // Deprecated, use update() instead template @@ -1465,34 +1464,45 @@ namespace cds { namespace intrusive { } //@endcond - /// Finds \p key - /** \anchor cds_intrusive_SkipListSet_hp_find_val + /// Checks whether the set 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. - - Note the compare functor specified for class \p Traits template parameter - should accept a parameter of type \p Q that can be not the same as \p value_type. */ template - bool find( Q const& key ) + bool contains( Q const& key ) { return find_with_( key, key_comparator(), [](value_type& , Q const& ) {} ); } + //@cond + // Deprecated, use contains() + template + bool find( Q const& key ) + { + return contains( key ); + } + //@endcond - /// Finds \p key with comparing functor \p pred + /// Checks whether the set contains \p key using \p pred predicate for searching /** - The function is an analog of \ref cds_intrusive_SkipListSet_hp_find_val "find(Q const&)" - but \p pred is used for comparing the keys. - \p Less functor has the semantics like \p std::less but should take arguments of type \ref value_type and \p Q - in any order. - \p pred must imply the same element order as the comparator used for building the set. + The function is similar to contains( key ) 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 set. */ template - bool find_with( Q const& key, Less pred ) + bool contains( Q const& key, Less pred ) { CDS_UNUSED( pred ); return find_with_( key, cds::opt::details::make_comparator_from_less(), [](value_type& , Q const& ) {} ); } + //@cond + // Deprecated, use contains() + template + bool find_with( Q const& key, Less pred ) + { + return contains( key, pred ); + } + //@endcond /// Finds \p key and return the item found /** \anchor cds_intrusive_SkipListSet_hp_get diff --git a/cds/intrusive/skip_list_nogc.h b/cds/intrusive/skip_list_nogc.h index 1d4503f4..13a0e76f 100644 --- a/cds/intrusive/skip_list_nogc.h +++ b/cds/intrusive/skip_list_nogc.h @@ -754,7 +754,6 @@ namespace cds { namespace intrusive { return std::make_pair( true, true ); } } - //@cond // Deprecated, use update() instead template @@ -823,32 +822,36 @@ namespace cds { namespace intrusive { } //@endcond - /// Finds \p key - /** \anchor cds_intrusive_SkipListSet_nogc_find_val + /// Checks whether the set 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. - - Note the hash functor specified for class \p Traits template parameter - should accept a parameter of type \p Q that can be not the same as \p value_type. + and returns pointer to item found or \p nullptr. */ template - value_type * find( Q const& key ) const + value_type * contains( Q const& key ) const { node_type * pNode = find_with_( key, key_comparator(), [](value_type& , Q const& ) {} ); if ( pNode ) return node_traits::to_value_ptr( pNode ); return nullptr; } + //@cond + // Deprecated, use contains() + template + value_type * find( Q const& key ) const + { + return contains( key ); + } + //@endcond - /// Finds \p key using \p pred predicate for comparing + /// Checks whether the set contains \p key using \p pred predicate for searching /** - The function is an analog of \ref cds_intrusive_SkipListSet_nogc_find_val "find(Q const&)" - but \p pred predicate is used for key compare. - \p Less has the interface like \p std::less. - \p pred must imply the same element order as the comparator used for building the set. + The function is similar to contains( key ) 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 set. */ template - value_type * find_with( Q const& key, Less pred ) const + value_type * contains( Q const& key, Less pred ) const { CDS_UNUSED( pred ); node_type * pNode = find_with_( key, cds::opt::details::make_comparator_from_less(), [](value_type& , Q const& ) {} ); @@ -856,6 +859,14 @@ namespace cds { namespace intrusive { return node_traits::to_value_ptr( pNode ); return nullptr; } + //@cond + // Deprecated, use contains() + template + value_type * find_with( Q const& key, Less pred ) const + { + return contains( key, pred ); + } + //@endcond /// Gets minimum key from the set /** diff --git a/cds/intrusive/skip_list_rcu.h b/cds/intrusive/skip_list_rcu.h index 95d9f592..1e311295 100644 --- a/cds/intrusive/skip_list_rcu.h +++ b/cds/intrusive/skip_list_rcu.h @@ -1528,7 +1528,6 @@ namespace cds { namespace intrusive { return bRet; } - //@cond // Deprecated, use update(). template @@ -1833,32 +1832,47 @@ namespace cds { namespace intrusive { } //@endcond - /// Finds \p key - /** @anchor cds_intrusive_SkipListSet_rcu_find_val + /// Checks whether the set 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 - bool find( Q const& key ) + bool contains( Q const& key ) { return do_find_with( key, key_comparator(), [](value_type& , Q const& ) {} ); } + //@cond + // Deprecated, use contains() + template + bool find( Q const& key ) + { + return contains( key ); + } + //@endcond - /// Finds \p key with comparing functor \p pred + /// Checks whether the set contains \p key using \p pred predicate for searching /** - The function is an analog of \ref cds_intrusive_SkipListSet_rcu_find_val "find(Q const&)" - but \p pred is used for key compare. + The function is similar to contains( key ) but \p pred is used for key comparing. \p Less functor has the interface like \p std::less. - \p pred must imply the same element order as the comparator used for building the set. + \p Less must imply the same element order as the comparator used for building the set. */ template - bool find_with( Q const& key, Less pred ) + bool contains( Q const& key, Less pred ) { CDS_UNUSED( pred ); return do_find_with( key, cds::opt::details::make_comparator_from_less(), [](value_type& , Q const& ) {} ); } + //@cond + // Deprecated, use contains() + template + bool find_with( Q const& key, Less pred ) + { + return contains( key, pred ); + } + //@endcond /// Finds \p key and return the item found /** \anchor cds_intrusive_SkipListSet_rcu_get diff --git a/projects/Win/vc12/unit-map-delodd.vcxproj b/projects/Win/vc12/unit-map-delodd.vcxproj index 9aeb7eaa..6888626c 100644 --- a/projects/Win/vc12/unit-map-delodd.vcxproj +++ b/projects/Win/vc12/unit-map-delodd.vcxproj @@ -57,7 +57,7 @@ false - true + false false diff --git a/tests/unit/map2/map_defs.h b/tests/unit/map2/map_defs.h index d94b68d7..b7ecd466 100644 --- a/tests/unit/map2/map_defs.h +++ b/tests/unit/map2/map_defs.h @@ -166,7 +166,6 @@ #else # define CDSUNIT_DECLARE_SplitList_RCU_signal -# define CDSUNIT_DEFINE_SplitList_RCU_signal( IMPL, C ) # define CDSUNIT_TEST_SplitList_RCU_signal #endif @@ -322,24 +321,14 @@ #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED # define CDSUNIT_DECLARE_SkipListMap_RCU_signal \ - CDSUNIT_DECLARE_TEST(SkipListMap_rcu_shb_less_pascal)\ - CDSUNIT_DECLARE_TEST(SkipListMap_rcu_shb_cmp_pascal_stat)\ - CDSUNIT_DECLARE_TEST(SkipListMap_rcu_shb_less_xorshift)\ - CDSUNIT_DECLARE_TEST(SkipListMap_rcu_shb_cmp_xorshift_stat)\ - CDSUNIT_DECLARE_TEST(SkipListMap_rcu_sht_less_pascal)\ - CDSUNIT_DECLARE_TEST(SkipListMap_rcu_sht_cmp_pascal_stat)\ - CDSUNIT_DECLARE_TEST(SkipListMap_rcu_sht_less_xorshift)\ - CDSUNIT_DECLARE_TEST(SkipListMap_rcu_sht_cmp_xorshift_stat) - -# define CDSUNIT_DEFINE_SkipListMap_RCU_signal( IMPL, C ) \ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_shb_less_pascal)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_shb_cmp_pascal_stat)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_shb_less_xorshift)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_shb_cmp_xorshift_stat)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_sht_less_pascal)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_sht_cmp_pascal_stat)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_sht_less_xorshift)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_sht_cmp_xorshift_stat) + TEST_CASE(tag_SkipListMap, SkipListMap_rcu_shb_less_pascal)\ + TEST_CASE(tag_SkipListMap, SkipListMap_rcu_shb_cmp_pascal_stat)\ + TEST_CASE(tag_SkipListMap, SkipListMap_rcu_shb_less_xorshift)\ + TEST_CASE(tag_SkipListMap, SkipListMap_rcu_shb_cmp_xorshift_stat)\ + TEST_CASE(tag_SkipListMap, SkipListMap_rcu_sht_less_pascal)\ + TEST_CASE(tag_SkipListMap, SkipListMap_rcu_sht_cmp_pascal_stat)\ + TEST_CASE(tag_SkipListMap, SkipListMap_rcu_sht_less_xorshift)\ + TEST_CASE(tag_SkipListMap, SkipListMap_rcu_sht_cmp_xorshift_stat) # define CDSUNIT_TEST_SkipListMap_RCU_signal \ CPPUNIT_TEST(SkipListMap_rcu_shb_less_pascal)\ @@ -353,56 +342,32 @@ #else # define CDSUNIT_DECLARE_SkipListMap_RCU_signal -# define CDSUNIT_DEFINE_SkipListMap_RCU_signal( IMPL, C ) # define CDSUNIT_TEST_SkipListMap_RCU_signal #endif #define CDSUNIT_DECLARE_SkipListMap \ - CDSUNIT_DECLARE_TEST(SkipListMap_hp_less_pascal)\ - CDSUNIT_DECLARE_TEST(SkipListMap_hp_cmp_pascal_stat)\ - CDSUNIT_DECLARE_TEST(SkipListMap_hp_less_xorshift)\ - CDSUNIT_DECLARE_TEST(SkipListMap_hp_cmp_xorshift_stat)\ - CDSUNIT_DECLARE_TEST(SkipListMap_dhp_less_pascal)\ - CDSUNIT_DECLARE_TEST(SkipListMap_dhp_cmp_pascal_stat)\ - CDSUNIT_DECLARE_TEST(SkipListMap_dhp_less_xorshift)\ - CDSUNIT_DECLARE_TEST(SkipListMap_dhp_cmp_xorshift_stat)\ - CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpi_less_pascal)\ - CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpi_cmp_pascal_stat)\ - CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpi_less_xorshift)\ - CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpi_cmp_xorshift_stat)\ - CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpb_less_pascal)\ - CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpb_cmp_pascal_stat)\ - CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpb_less_xorshift)\ - CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpb_cmp_xorshift_stat)\ - CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpt_less_pascal)\ - CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpt_cmp_pascal_stat)\ - CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpt_less_xorshift)\ - CDSUNIT_DECLARE_TEST(SkipListMap_rcu_gpt_cmp_xorshift_stat)\ + TEST_CASE(tag_SkipListMap, SkipListMap_hp_less_pascal)\ + TEST_CASE(tag_SkipListMap, SkipListMap_hp_cmp_pascal_stat)\ + TEST_CASE(tag_SkipListMap, SkipListMap_hp_less_xorshift)\ + TEST_CASE(tag_SkipListMap, SkipListMap_hp_cmp_xorshift_stat)\ + TEST_CASE(tag_SkipListMap, SkipListMap_dhp_less_pascal)\ + TEST_CASE(tag_SkipListMap, SkipListMap_dhp_cmp_pascal_stat)\ + TEST_CASE(tag_SkipListMap, SkipListMap_dhp_less_xorshift)\ + TEST_CASE(tag_SkipListMap, SkipListMap_dhp_cmp_xorshift_stat)\ + TEST_CASE(tag_SkipListMap, SkipListMap_rcu_gpi_less_pascal)\ + TEST_CASE(tag_SkipListMap, SkipListMap_rcu_gpi_cmp_pascal_stat)\ + TEST_CASE(tag_SkipListMap, SkipListMap_rcu_gpi_less_xorshift)\ + TEST_CASE(tag_SkipListMap, SkipListMap_rcu_gpi_cmp_xorshift_stat)\ + TEST_CASE(tag_SkipListMap, SkipListMap_rcu_gpb_less_pascal)\ + TEST_CASE(tag_SkipListMap, SkipListMap_rcu_gpb_cmp_pascal_stat)\ + TEST_CASE(tag_SkipListMap, SkipListMap_rcu_gpb_less_xorshift)\ + TEST_CASE(tag_SkipListMap, SkipListMap_rcu_gpb_cmp_xorshift_stat)\ + TEST_CASE(tag_SkipListMap, SkipListMap_rcu_gpt_less_pascal)\ + TEST_CASE(tag_SkipListMap, SkipListMap_rcu_gpt_cmp_pascal_stat)\ + TEST_CASE(tag_SkipListMap, SkipListMap_rcu_gpt_less_xorshift)\ + TEST_CASE(tag_SkipListMap, SkipListMap_rcu_gpt_cmp_xorshift_stat)\ CDSUNIT_DECLARE_SkipListMap_RCU_signal -#define CDSUNIT_DEFINE_SkipListMap( IMPL, C ) \ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_hp_less_pascal)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_hp_cmp_pascal_stat)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_hp_less_xorshift)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_hp_cmp_xorshift_stat)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_dhp_less_pascal)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_dhp_cmp_pascal_stat)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_dhp_less_xorshift)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_dhp_cmp_xorshift_stat)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpi_less_pascal)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpi_cmp_pascal_stat)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpi_less_xorshift)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpi_cmp_xorshift_stat)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpb_less_pascal)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpb_cmp_pascal_stat)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpb_less_xorshift)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpb_cmp_xorshift_stat)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpt_less_pascal)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpt_cmp_pascal_stat)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpt_less_xorshift)\ - TEST_MAP_NOLF_EXTRACT(IMPL, C, SkipListMap_rcu_gpt_cmp_xorshift_stat)\ - CDSUNIT_DEFINE_SkipListMap_RCU_signal( IMPL, C ) - #define CDSUNIT_TEST_SkipListMap \ CPPUNIT_TEST(SkipListMap_hp_less_pascal)\ CPPUNIT_TEST(SkipListMap_hp_cmp_pascal_stat)\ @@ -427,16 +392,10 @@ CDSUNIT_TEST_SkipListMap_RCU_signal #define CDSUNIT_DECLARE_SkipListMap_nogc \ - CDSUNIT_DECLARE_TEST(SkipListMap_nogc_less_pascal)\ - CDSUNIT_DECLARE_TEST(SkipListMap_nogc_cmp_pascal_stat)\ - CDSUNIT_DECLARE_TEST(SkipListMap_nogc_less_xorshift)\ - CDSUNIT_DECLARE_TEST(SkipListMap_nogc_cmp_xorshift_stat) - -#define CDSUNIT_DEFINE_SkipListMap_nogc( IMPL, C ) \ - TEST_MAP_NOLF(IMPL, C, SkipListMap_nogc_less_pascal)\ - TEST_MAP_NOLF(IMPL, C, SkipListMap_nogc_cmp_pascal_stat)\ - TEST_MAP_NOLF(IMPL, C, SkipListMap_nogc_less_xorshift)\ - TEST_MAP_NOLF(IMPL, C, SkipListMap_nogc_cmp_xorshift_stat) + TEST_CASE(tag_SkipListMap, SkipListMap_nogc_less_pascal)\ + TEST_CASE(tag_SkipListMap, SkipListMap_nogc_cmp_pascal_stat)\ + TEST_CASE(tag_SkipListMap, SkipListMap_nogc_less_xorshift)\ + TEST_CASE(tag_SkipListMap, SkipListMap_nogc_cmp_xorshift_stat) #define CDSUNIT_TEST_SkipListMap_nogc \ CPPUNIT_TEST(SkipListMap_nogc_less_pascal)\ diff --git a/tests/unit/map2/map_delodd.cpp b/tests/unit/map2/map_delodd.cpp index 7a3b1dde..795d58d6 100644 --- a/tests/unit/map2/map_delodd.cpp +++ b/tests/unit/map2/map_delodd.cpp @@ -5,13 +5,6 @@ namespace map2 { CPPUNIT_TEST_SUITE_REGISTRATION( Map_DelOdd ); - //size_t Map_DelOdd::c_nMapSize = 1000000 ; // max map size - //size_t Map_DelOdd::c_nInsThreadCount = 4 ; // insert thread count - //size_t Map_DelOdd::c_nDelThreadCount = 4 ; // delete thread count - //size_t Map_DelOdd::c_nExtractThreadCount = 4 ; // extract thread count - //size_t Map_DelOdd::c_nMaxLoadFactor = 8 ; // maximum load factor - //bool Map_DelOdd::c_bPrintGCState = true; - void Map_DelOdd::setUpParams( const CppUnitMini::TestCfg& cfg ) { c_nMapSize = cfg.getULong("MapSize", static_cast(c_nMapSize) ); c_nInsThreadCount = cfg.getULong("InsThreadCount", static_cast(c_nInsThreadCount) ); diff --git a/tests/unit/map2/map_delodd.h b/tests/unit/map2/map_delodd.h index b006fdf4..443b54e1 100644 --- a/tests/unit/map2/map_delodd.h +++ b/tests/unit/map2/map_delodd.h @@ -691,6 +691,7 @@ namespace map2 { # include "map2/map_defs.h" CDSUNIT_DECLARE_MichaelMap CDSUNIT_DECLARE_SplitList + CDSUNIT_DECLARE_SkipListMap // This test is not suitable for MultiLevelHashMap //CDSUNIT_DECLARE_MultiLevelHashMap @@ -698,13 +699,14 @@ namespace map2 { CPPUNIT_TEST_SUITE(Map_DelOdd) CDSUNIT_TEST_MichaelMap CDSUNIT_TEST_SplitList + CDSUNIT_TEST_SkipListMap + //CDSUNIT_TEST_MultiLevelHashMap // the test is not suitable CPPUNIT_TEST_SUITE_END(); ////CDSUNIT_DECLARE_StripedMap ////CDSUNIT_DECLARE_RefinableMap //CDSUNIT_DECLARE_CuckooMap - //CDSUNIT_DECLARE_SkipListMap //CDSUNIT_DECLARE_EllenBinTreeMap //CDSUNIT_DECLARE_BronsonAVLTreeMap //CDSUNIT_DECLARE_MultiLevelHashMap diff --git a/tests/unit/map2/map_delodd_skip.cpp b/tests/unit/map2/map_delodd_skip.cpp index 255f0784..c0cd7845 100644 --- a/tests/unit/map2/map_delodd_skip.cpp +++ b/tests/unit/map2/map_delodd_skip.cpp @@ -3,10 +3,10 @@ #include "map2/map_delodd.h" #include "map2/map_type_skip_list.h" -namespace map2 { - CDSUNIT_DEFINE_SkipListMap( cc::skip_list::implementation_tag, Map_DelOdd) +#undef TEST_CASE +#define TEST_CASE(TAG, X) void Map_DelOdd::X() { run_test::X>(); } +#include "map2/map_defs.h" - CPPUNIT_TEST_SUITE_PART( Map_DelOdd, run_SkipListMap ) - CDSUNIT_TEST_SkipListMap - CPPUNIT_TEST_SUITE_END_PART() +namespace map2 { + CDSUNIT_DECLARE_SkipListMap } // namespace map2 diff --git a/tests/unit/map2/map_type_skip_list.h b/tests/unit/map2/map_type_skip_list.h index eb142c94..8f95050e 100644 --- a/tests/unit/map2/map_type_skip_list.h +++ b/tests/unit/map2/map_type_skip_list.h @@ -14,8 +14,25 @@ namespace map2 { + template + class SkipListMap : public cc::SkipListMap< GC, Key, T, Traits > + { + typedef cc::SkipListMap< GC, Key, T, Traits > base_class; + public: + template + SkipListMap( Config const& /*cfg*/) + : base_class() + {} + + // for testing + static CDS_CONSTEXPR bool const c_bExtractSupported = true; + static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true; + }; + + struct tag_SkipListMap; + template - struct map_type< cc::skip_list::implementation_tag, Key, Value >: public map_type_base< Key, Value > + struct map_type< tag_SkipListMap, Key, Value >: public map_type_base< Key, Value > { typedef map_type_base< Key, Value > base_class; typedef typename base_class::compare compare; @@ -27,15 +44,15 @@ namespace map2 { ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_hp_less_pascal; - typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_dhp_less_pascal; - typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_nogc_less_pascal; - typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_gpi_less_pascal; - typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_gpb_less_pascal; - typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_gpt_less_pascal; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_hp_less_pascal; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_dhp_less_pascal; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_nogc_less_pascal; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_gpi_less_pascal; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_gpb_less_pascal; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_gpt_less_pascal; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_shb_less_pascal; - typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_sht_less_pascal; + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_shb_less_pascal; + typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_sht_less_pascal; #endif class traits_SkipListMap_less_pascal_seqcst: public cc::skip_list::make_traits < @@ -45,15 +62,15 @@ namespace map2 { ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_hp_less_pascal_seqcst; - typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_dhp_less_pascal_seqcst; - typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_nogc_less_pascal_seqcst; - typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_gpi_less_pascal_seqcst; - typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_gpb_less_pascal_seqcst; - typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_gpt_less_pascal_seqcst; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_hp_less_pascal_seqcst; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_dhp_less_pascal_seqcst; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_nogc_less_pascal_seqcst; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_gpi_less_pascal_seqcst; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_gpb_less_pascal_seqcst; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_gpt_less_pascal_seqcst; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_shb_less_pascal_seqcst; - typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_sht_less_pascal_seqcst; + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_shb_less_pascal_seqcst; + typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_sht_less_pascal_seqcst; #endif class traits_SkipListMap_less_pascal_stat: public cc::skip_list::make_traits < @@ -63,15 +80,15 @@ namespace map2 { ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_hp_less_pascal_stat; - typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_dhp_less_pascal_stat; - typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_nogc_less_pascal_stat; - typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_gpi_less_pascal_stat; - typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_gpb_less_pascal_stat; - typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_gpt_less_pascal_stat; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_hp_less_pascal_stat; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_dhp_less_pascal_stat; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_nogc_less_pascal_stat; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_gpi_less_pascal_stat; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_gpb_less_pascal_stat; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_gpt_less_pascal_stat; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_shb_less_pascal_stat; - typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_sht_less_pascal_stat; + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_shb_less_pascal_stat; + typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_sht_less_pascal_stat; #endif class traits_SkipListMap_cmp_pascal: public cc::skip_list::make_traits < @@ -80,15 +97,15 @@ namespace map2 { ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_hp_cmp_pascal; - typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_dhp_cmp_pascal; - typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_nogc_cmp_pascal; - typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_gpi_cmp_pascal; - typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_gpb_cmp_pascal; - typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_gpt_cmp_pascal; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_hp_cmp_pascal; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_dhp_cmp_pascal; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_nogc_cmp_pascal; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_gpi_cmp_pascal; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_gpb_cmp_pascal; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_gpt_cmp_pascal; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_shb_cmp_pascal; - typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_sht_cmp_pascal; + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_shb_cmp_pascal; + typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_sht_cmp_pascal; #endif class traits_SkipListMap_cmp_pascal_stat: public cc::skip_list::make_traits < @@ -98,15 +115,15 @@ namespace map2 { ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_hp_cmp_pascal_stat; - typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_dhp_cmp_pascal_stat; - typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_nogc_cmp_pascal_stat; - typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_gpi_cmp_pascal_stat; - typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_gpb_cmp_pascal_stat; - typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_gpt_cmp_pascal_stat; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_hp_cmp_pascal_stat; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_dhp_cmp_pascal_stat; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_nogc_cmp_pascal_stat; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_gpi_cmp_pascal_stat; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_gpb_cmp_pascal_stat; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_gpt_cmp_pascal_stat; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_shb_cmp_pascal_stat; - typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_sht_cmp_pascal_stat; + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_shb_cmp_pascal_stat; + typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_sht_cmp_pascal_stat; #endif class traits_SkipListMap_less_xorshift: public cc::skip_list::make_traits < @@ -115,15 +132,15 @@ namespace map2 { ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_hp_less_xorshift; - typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_dhp_less_xorshift; - typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_nogc_less_xorshift; - typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_gpi_less_xorshift; - typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_gpb_less_xorshift; - typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_gpt_less_xorshift; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_hp_less_xorshift; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_dhp_less_xorshift; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_nogc_less_xorshift; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_gpi_less_xorshift; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_gpb_less_xorshift; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_gpt_less_xorshift; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_shb_less_xorshift; - typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_sht_less_xorshift; + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_shb_less_xorshift; + typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_sht_less_xorshift; #endif class traits_SkipListMap_less_xorshift_stat: public cc::skip_list::make_traits < @@ -133,15 +150,15 @@ namespace map2 { ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_hp_less_xorshift_stat; - typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_dhp_less_xorshift_stat; - typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_nogc_less_xorshift_stat; - typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_gpi_less_xorshift_stat; - typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_gpb_less_xorshift_stat; - typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_gpt_less_xorshift_stat; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_hp_less_xorshift_stat; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_dhp_less_xorshift_stat; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_nogc_less_xorshift_stat; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_gpi_less_xorshift_stat; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_gpb_less_xorshift_stat; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_gpt_less_xorshift_stat; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_shb_less_xorshift_stat; - typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_sht_less_xorshift_stat; + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_shb_less_xorshift_stat; + typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_sht_less_xorshift_stat; #endif class traits_SkipListMap_cmp_xorshift: public cc::skip_list::make_traits < @@ -150,15 +167,15 @@ namespace map2 { ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_hp_cmp_xorshift; - typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_dhp_cmp_xorshift; - typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_nogc_cmp_xorshift; - typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_gpi_cmp_xorshift; - typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_gpb_cmp_xorshift; - typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_gpt_cmp_xorshift; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_hp_cmp_xorshift; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_dhp_cmp_xorshift; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_nogc_cmp_xorshift; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_gpi_cmp_xorshift; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_gpb_cmp_xorshift; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_gpt_cmp_xorshift; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_shb_cmp_xorshift; - typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_sht_cmp_xorshift; + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_shb_cmp_xorshift; + typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_sht_cmp_xorshift; #endif class traits_SkipListMap_cmp_xorshift_stat: public cc::skip_list::make_traits < @@ -168,21 +185,21 @@ namespace map2 { ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef cc::SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_hp_cmp_xorshift_stat; - typedef cc::SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_dhp_cmp_xorshift_stat; - typedef cc::SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_nogc_cmp_xorshift_stat; - typedef cc::SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_gpi_cmp_xorshift_stat; - typedef cc::SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_gpb_cmp_xorshift_stat; - typedef cc::SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_gpt_cmp_xorshift_stat; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_hp_cmp_xorshift_stat; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_dhp_cmp_xorshift_stat; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_nogc_cmp_xorshift_stat; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_gpi_cmp_xorshift_stat; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_gpb_cmp_xorshift_stat; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_gpt_cmp_xorshift_stat; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_shb_cmp_xorshift_stat; - typedef cc::SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_sht_cmp_xorshift_stat; + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_shb_cmp_xorshift_stat; + typedef SkipListMap< rcu_sht, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_sht_cmp_xorshift_stat; #endif }; template - static inline void print_stat( cc::SkipListMap< GC, K, T, Traits > const& m ) + static inline void print_stat( SkipListMap< GC, K, T, Traits > const& m ) { CPPUNIT_MSG( m.statistics() ); } -- 2.34.1