From e8a786c9556cb001ef5b0c4e3a975721fc1d2cbc Mon Sep 17 00:00:00 2001 From: khizmax Date: Sat, 29 Aug 2015 19:47:46 +0300 Subject: [PATCH] SplitListMap, SplitListSet: - replaced ensure() with update() - replaced find( key ) with contains( key ) MapDelOdd MT-test is refactored for SplitListMap --- cds/container/michael_map_nogc.h | 8 +- cds/container/split_list_map.h | 68 ++-- cds/container/split_list_map_nogc.h | 62 +++- cds/container/split_list_map_rcu.h | 64 ++-- cds/container/split_list_set.h | 68 ++-- cds/container/split_list_set_nogc.h | 66 +++- cds/container/split_list_set_rcu.h | 82 ++++- cds/intrusive/impl/michael_list.h | 2 +- cds/intrusive/split_list.h | 62 +++- cds/intrusive/split_list_nogc.h | 77 ++-- cds/intrusive/split_list_rcu.h | 73 ++-- projects/Win/vc12/unit-map-delodd.vcxproj | 2 +- tests/unit/map2/map_defs.h | 283 +++++---------- tests/unit/map2/map_delodd.h | 4 +- tests/unit/map2/map_delodd_michael.cpp | 1 - tests/unit/map2/map_delodd_split.cpp | 10 +- tests/unit/map2/map_type_split_list.h | 421 ++++++++++++---------- 17 files changed, 760 insertions(+), 593 deletions(-) diff --git a/cds/container/michael_map_nogc.h b/cds/container/michael_map_nogc.h index 737578ca..aa4b2d91 100644 --- a/cds/container/michael_map_nogc.h +++ b/cds/container/michael_map_nogc.h @@ -397,13 +397,13 @@ namespace cds { namespace container { /// Updates the item /** - If \p key is not in the list and \p bAllowInsert is \p true, - the function inserts a new item. + If \p key is not in the map and \p bAllowInsert is \p true, the function inserts a new item. Otherwise, the function returns an iterator pointing to the item found. Returns std::pair where \p first is an iterator pointing to - item found or inserted, \p second is true if new item has been added or \p false if the item - already is in the list. + item found or inserted (if inserting is not allowed and \p key is not found, the iterator will be \p end()), + \p second is true if new item has been added or \p false if the item + already is in the map. @warning For \ref cds_nonintrusive_MichaelKVList_nogc "MichaelKVList" as the bucket see \ref cds_intrusive_item_creating "insert item troubleshooting". \ref cds_nonintrusive_LazyKVList_nogc "LazyKVList" provides exclusive access to inserted item and does not require any node-level diff --git a/cds/container/split_list_map.h b/cds/container/split_list_map.h index ed1e3437..8576f036 100644 --- a/cds/container/split_list_map.h +++ b/cds/container/split_list_map.h @@ -312,19 +312,14 @@ namespace cds { namespace container { return base_class::emplace( std::forward(key), std::move(mapped_type(std::forward(args)...))); } - /// Ensures that the \p key exists in the map + /// Updates the node /** 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 - is inserted into the map (note that in this case the \ref key_type should be - constructible from type \p K). + If \p key is not found in the map, then \p key is inserted iff \p bAllowInsert is \p true. Otherwise, the functor \p func is called with item found. - The functor \p Func may be a function with signature: - \code - void func( bool bNew, value_type& item ); - \endcode - or a functor: + + The functor signature is: \code struct my_functor { void operator()( bool bNew, value_type& item ); @@ -333,25 +328,34 @@ namespace cds { namespace container { with arguments: - \p bNew - \p true if the item has been inserted, \p false otherwise - - \p item - item of the list + - \p item - item of the map Returns std::pair where \p first is true if operation is successfull, \p second is true if new item has been added or \p false if the item with \p key - already is in the list. + already is in the map. @warning For \ref cds_nonintrusive_MichaelKVList_gc "MichaelKVList" as the ordered list see \ref cds_intrusive_item_creating "insert item troubleshooting". \ref cds_nonintrusive_LazyKVList_gc "LazyKVList" provides exclusive access to inserted item and does not require any node-level synchronization. */ template - std::pair ensure( K const& key, Func func ) + std::pair update( K const& key, Func func, bool bAllowInsert = true ) { //TODO: pass arguments by reference (make_pair makes copy) - return base_class::ensure( std::make_pair( key, mapped_type() ), + return base_class::update( std::make_pair( key, mapped_type() ), [&func](bool bNew, value_type& item, value_type const& /*val*/) { func( bNew, item ); - } ); + }, + bAllowInsert ); + } + //@cond + // Deprecated, use update() + template + std::pair ensure( K const& key, Func func ) + { + return update( key, func, true ); } + //@endcond /// Deletes \p key from the map /** \anchor cds_nonintrusive_SplitListMap_erase_val @@ -506,31 +510,49 @@ namespace cds { namespace container { [&f](value_type& pair, K const&){ f( pair ); } ); } - /// Finds the key \p key - /** \anchor cds_nonintrusive_SplitListMap_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. + + 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. + Otherwise, you may use \p contains( Q const&, Less pred ) functions with explicit predicate for key comparing. */ 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_SplitListMap_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. */ template - bool find_with( K const& key, Less pred ) + bool contains( K const& key, Less pred ) { CDS_UNUSED( pred ); - return base_class::find( key, cds::details::predicate_wrapper() ); + return base_class::contains( key, cds::details::predicate_wrapper() ); } + //@cond + // Deprecated, use contains() + template + bool find_with( K const& key, Less pred ) + { + return contains( key, pred ); + } + //@endcond /// Finds \p key and return the item found /** \anchor cds_nonintrusive_SplitListMap_hp_get diff --git a/cds/container/split_list_map_nogc.h b/cds/container/split_list_map_nogc.h index dd5624aa..32e97330 100644 --- a/cds/container/split_list_map_nogc.h +++ b/cds/container/split_list_map_nogc.h @@ -227,48 +227,70 @@ namespace cds { namespace container { return base_class::emplace( std::forward(key), std::move(mapped_type(std::forward(args)...))); } - /// Ensures that the key \p key exists in the map + /// Updates the item /** - The operation inserts new item if the key \p key is not found in the map. - Otherwise, the function returns an iterator that points to item found. + If \p key is not in the map and \p bAllowInsert is \p true, the function inserts a new item. + Otherwise, the function returns an iterator pointing to the item found. - Returns std::pair where \p first is an iterator pointing to - item found or inserted, \p second is true if new item has been added or \p false if the item - already is in the list. + Returns std::pair where \p first is an iterator pointing to + item found or inserted (if inserting is not allowed and \p key is not found, the iterator will be \p end()), + \p second is true if new item has been added or \p false if the item + already is in the map. */ template - std::pair ensure( K const& key ) + std::pair update( K const& key, bool bAllowInsert = true ) { //TODO: pass arguments by reference (make_pair makes copy) - return base_class::ensure( std::make_pair( key, mapped_type() )); + return base_class::update( std::make_pair( key, mapped_type() ), bAllowInsert ); } + //@cond + // Deprecated, use update() + template + std::pair ensure( K const& key ) + { + return update( key, true ); + } + //@endcond - /// Find the key \p key - /** \anchor cds_nonintrusive_SplitListMap_nogc_find - + /// 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 \p end() otherwise + and returns an iterator pointed to item 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 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_SplitListMap_nogc_find "find(K const&)" - but \p pred is used for key comparing. + The function is an analog of 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 pred must imply the same element order as the comparator used for building the map. */ template - iterator find_with( K const& key, Less pred ) + iterator contains( K const& key, Less pred ) { CDS_UNUSED( pred ); - return base_class::find_with( key, cds::details::predicate_wrapper() ); + return base_class::contains( key, cds::details::predicate_wrapper() ); + } + //@cond + // Deprecated, use contains() + template + iterator find_with( K const& key, Less pred ) + { + return contains( key, pred ); } + //@endcond /// Checks if the map is empty /** diff --git a/cds/container/split_list_map_rcu.h b/cds/container/split_list_map_rcu.h index a66b8bb8..d19c5400 100644 --- a/cds/container/split_list_map_rcu.h +++ b/cds/container/split_list_map_rcu.h @@ -351,14 +351,15 @@ namespace cds { namespace container { return base_class::emplace( std::forward(key), std::move(mapped_type(std::forward(args)...))); } - /// Ensures that the \p key exists in the map + /// Updates data by \p key /** - The operation performs inserting or changing data with lock-free manner. + The operation performs inserting or replacing the element with lock-free manner. If the \p key not found in the map, then the new item created from \p key - is inserted into the map; in this case the \p key_type should be - constructible from type \p K. - Otherwise, the functor \p func is called with item found. + 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, if \p key is found, the functor \p func is called with item found. + The functor \p Func signature is: \code struct my_functor { @@ -367,31 +368,38 @@ namespace cds { namespace container { \endcode with arguments: - \p bNew - \p true if the item has been inserted, \p false otherwise - - \p item - item of the list + - \p item - the item found or inserted - The functor may change any fields of the \p item.second that is \p mapped_type; - however, \p func must guarantee that during changing no any other modifications - could be made on this item by concurrent threads. + The functor may change any fields of the \p item.second that is \p mapped_type. The function applies RCU lock internally. Returns std::pair where \p first is true if operation is successfull, \p second is true if new item has been added or \p false if the item with \p key - already is in the list. + already exists. @warning For \ref cds_nonintrusive_MichaelKVList_gc "MichaelKVList" as the ordered list see \ref cds_intrusive_item_creating "insert item troubleshooting". \ref cds_nonintrusive_LazyKVList_gc "LazyKVList" provides exclusive access to inserted item and does not require any node-level synchronization. */ template - std::pair ensure( K const& key, Func func ) + std::pair update( K const& key, Func func, bool bAllowInsert = true ) { //TODO: pass arguments by reference (make_pair makes copy) - return base_class::ensure( std::make_pair( key, mapped_type() ), + return base_class::update( std::make_pair( key, mapped_type() ), [&func](bool bNew, value_type& item, value_type const& /*val*/) { func( bNew, item ); - } ); + }, + bAllowInsert ); + } + //@cond + // Deprecated, use update() + template + std::pair ensure( K const& key, Func func ) + { + return update( key, func, true ); } + //@endcond /// Deletes \p key from the map /** \anchor cds_nonintrusive_SplitListMap_rcu_erase_val @@ -555,33 +563,47 @@ namespace cds { namespace container { [&f](value_type& pair, K const&){ f( pair ); } ); } - /// Finds the key \p key - /** \anchor cds_nonintrusive_SplitListMap_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 ); } + //@endcond - /// Finds the key \p key 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_SplitListMap_rcu_find_val "find(K const&)" - but \p pred is used for key comparing. + The function is an analog of 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. */ 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() ); + return base_class::contains( key, cds::details::predicate_wrapper() ); } + //@cond + // Deprecated, use contains() + template + bool find_with( K const& key, Less pred ) + { + return contains( key, pred ); + } + //@endcond /// Finds \p key and return the item found /** \anchor cds_intrusive_SplitListMap_rcu_get diff --git a/cds/container/split_list_set.h b/cds/container/split_list_set.h index 553e1168..c58ee026 100644 --- a/cds/container/split_list_set.h +++ b/cds/container/split_list_set.h @@ -434,17 +434,14 @@ namespace cds { namespace container { return insert_node( alloc_node( std::forward(args)...)); } - /// Ensures that the \p item exists in the set + /// Updates the node /** The operation performs inserting or changing data with lock-free manner. - If the \p val key not found in the set, then the new item created from \p val - is inserted into the set. Otherwise, the functor \p func is called with the item found. - The functor \p Func should be a function with signature: - \code - void func( bool bNew, value_type& item, const Q& val ); - \endcode - or a functor: + If \p key is not found in the set, then \p key is inserted iff \p bAllowInsert is \p true. + Otherwise, the functor \p func is called with item found. + + The functor signature is: \code struct my_functor { void operator()( bool bNew, value_type& item, const Q& val ); @@ -454,32 +451,40 @@ namespace cds { namespace container { with arguments: - \p bNew - \p true if the item has been inserted, \p false otherwise - \p item - item of the set - - \p val - argument \p val passed into the \p ensure function + - \p val - argument \p val passed into the \p %update() function The functor may change non-key fields of the \p item. Returns std::pair where \p first is true if operation is successfull, \p second is true if new item has been added or \p false if the item with \p key - already is in the set. + already is in the map. @warning For \ref cds_intrusive_MichaelList_hp "MichaelList" as the bucket see \ref cds_intrusive_item_creating "insert item troubleshooting". \ref cds_intrusive_LazyList_hp "LazyList" provides exclusive access to inserted item and does not require any node-level synchronization. */ template - std::pair ensure( Q const& val, Func func ) + std::pair update( Q const& val, Func func, bool bAllowInsert = true ) { scoped_node_ptr pNode( alloc_node( val )); - std::pair bRet = base_class::ensure( *pNode, + std::pair bRet = base_class::update( *pNode, [&func, &val]( bool bNew, node_type& item, node_type const& /*val*/ ) { func( bNew, item.m_Value, val ); - } ); + }, bAllowInsert ); if ( bRet.first && bRet.second ) pNode.release(); return bRet; } + //@cond + // Deprecated, use update() + template + std::pair ensure( Q const& val, Func func ) + { + return update( val, func, true ); + } + //@endcond /// Deletes \p key from the set /** \anchor cds_nonintrusive_SplitListSet_erase_val @@ -659,34 +664,49 @@ namespace cds { namespace container { } //@endcond - /// Finds the key \p key - /** \anchor cds_nonintrusive_SplitListSet_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 \ref value_type. + should accept a parameter of type \p Q that can be not the same as \p value_type. + Otherwise, you may use \p contains( Q const&, Less pred ) functions with explicit predicate for key comparing. */ 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 the key \p key 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_SplitListSet_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. + \p Less must imply the same element order as the comparator used for building the map. */ 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, typename maker::template predicate_wrapper::type() ); + return base_class::contains( key, typename maker::template predicate_wrapper::type() ); } + //@cond + // Deprecated, use contains() + template + bool find_with( Q const& key, Less pred ) + { + return contains( key, pred ); + } + //@endcond /// Finds the key \p key and return the item found /** \anchor cds_nonintrusive_SplitListSet_hp_get diff --git a/cds/container/split_list_set_nogc.h b/cds/container/split_list_set_nogc.h index 34c4b56a..f7ffd259 100644 --- a/cds/container/split_list_set_nogc.h +++ b/cds/container/split_list_set_nogc.h @@ -284,22 +284,29 @@ namespace cds { namespace container { return insert_node( alloc_node( std::forward(args)... ) ); } - /// Ensures that the item \p val exists in the set + /// Updates the item /** - The operation inserts new item created from \p val if the key \p val is not found in the set. - Otherwise, the function returns an iterator that points to item found. - The \p value_type should be constructible from a value of type \p Q. + If \p key is not in the set and \p bAllowInsert is \p true, the function inserts a new item. + Otherwise, the function returns an iterator pointing to the item found. Returns std::pair where \p first is an iterator pointing to - item found or inserted, \p second is true if new item has been added or \p false if the item + item found or inserted (if inserting is not allowed and \p key is not found, the iterator will be \p end()), + \p second is true if new item has been added or \p false if the item already is in the set. + + @warning If the set is based on \ref cds_nonintrusive_MichaelList_nogc "MichaelList", + see \ref cds_intrusive_item_creating "insert item troubleshooting". + \ref cds_nonintrusive_LazyList_nogc "LazyList" as the base provides exclusive access to inserted item + and does not require any node-level synchronization. */ template - std::pair ensure( const Q& val ) + std::pair update( Q const& key, bool bAllowInsert = true ) { - scoped_node_ptr pNode( alloc_node( val )); + scoped_node_ptr pNode( alloc_node( key )); - std::pair ret = base_class::ensure_( *pNode, [](bool /*bNew*/, node_type& /*item*/, node_type& /*val*/){} ); + std::pair ret = base_class::update_( *pNode, + [](bool /*bNew*/, node_type& /*item*/, node_type& /*val*/){}, + bAllowInser ); if ( ret.first != base_class::end() && ret.second ) { pNode.release(); return std::make_pair( iterator(ret.first), ret.second ); @@ -307,33 +314,54 @@ namespace cds { namespace container { return std::make_pair( iterator(ret.first), ret.second ); } + //@cond + // Deprecated, use update() + template + std::pair ensure( const Q& val ) + { + return update( val, true ); + } + //@endcond - /// Find the key \p key - /** \anchor cds_nonintrusive_SplitListSet_nogc_find - + /// 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 pointed to item found and \ref end() otherwise */ template - iterator find( Q const& key ) + iterator contains( Q const& key ) { return iterator( base_class::find_( key )); } + //@cond + // Deprecated, use contains() + template + iterator find( Q const& key ) + { + return contains( key ); + } + //@endcond - /// Finds the key \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_SplitListSet_nogc_find "find(Q const&)" - but \p pred is used for key comparing. + The function is an analog of 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 pred must imply the same element order as the comparator used for building the set. */ template - iterator find_with( Q const& key, Less pred ) + iterator contains( Q const& key, Less pred ) { CDS_UNUSED( pred ); return iterator( base_class::find_with_( key, typename maker::template predicate_wrapper::type() )); } + //@cond + // eprecated, use contains() + template + iterator find_with( Q const& key, Less pred ) + { + return contains( key, pred ); + } + //@endcond /// Checks if the set is empty /** diff --git a/cds/container/split_list_set_rcu.h b/cds/container/split_list_set_rcu.h index f563e1fd..2b1a5aad 100644 --- a/cds/container/split_list_set_rcu.h +++ b/cds/container/split_list_set_rcu.h @@ -580,19 +580,58 @@ namespace cds { namespace container { \p second is true if new item has been added or \p false if the item with \p key already is in the set. */ + /// Updates the node + /** + The operation performs inserting or changing data with lock-free manner. + + If \p key is not found in the set, then \p key is inserted iff \p bAllowInsert is \p true. + Otherwise, the functor \p func is called with item found. + + The functor signature is: + \code + struct my_functor { + void operator()( bool bNew, value_type& item, const Q& val ); + }; + \endcode + + with arguments: + - \p bNew - \p true if the item has been inserted, \p false otherwise + - \p item - item of the set + - \p val - argument \p val passed into the \p %update() function + + The functor may change non-key fields of the \p item. + + The function applies RCU lock internally. + + Returns std::pair where \p first is true if operation is successfull, + \p second is true if new item has been added or \p false if the item with \p key + already is in the map. + + @warning For \ref cds_intrusive_MichaelList_rcu "MichaelList" as the bucket see \ref cds_intrusive_item_creating "insert item troubleshooting". + \ref cds_intrusive_LazyList_rcu "LazyList" provides exclusive access to inserted item and does not require any node-level + synchronization. + */ template - std::pair ensure( Q const& val, Func func ) + std::pair update( Q const& val, Func func, bool bAllowInsert = true ) { scoped_node_ptr pNode( alloc_node( val )); - std::pair bRet = base_class::ensure( *pNode, + std::pair bRet = base_class::update( *pNode, [&func, &val]( bool bNew, node_type& item, node_type const& /*val*/ ) { func( bNew, item.m_Value, val ); - } ); + }, bAllowInsert ); if ( bRet.first && bRet.second ) pNode.release(); return bRet; } + //@cond + // Dprecated, use update() + template + std::pair ensure( Q const& val, Func func ) + { + return update( val, func, true ); + } + //@endcond /// Deletes \p key from the set /** \anchor cds_nonintrusive_SplitListSet_rcu_erase_val @@ -779,36 +818,51 @@ namespace cds { namespace container { } //@endcond - /// Finds the key \p key - /** \anchor cds_nonintrusive_SplitListSet_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. 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. + Otherwise, you may use \p contains( Q const&, Less pred ) functions with explicit predicate for key comparing. - The function makes RCU lock internally. + The function applies RCU lock internally. */ 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 the key \p key 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_SplitListSet_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. + \p Less must imply the same element order as the comparator used for building the map. */ 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, typename maker::template predicate_wrapper::type() ); + return base_class::contains( key, typename maker::template predicate_wrapper::type() ); } + //@cond + // Deprecated, use contains() + template + bool find_with( Q const& key, Less pred ) + { + return contains( key, pred ); + } + //@endcond /// Finds the key \p key and return the item found /** \anchor cds_nonintrusive_SplitListSet_rcu_get diff --git a/cds/intrusive/impl/michael_list.h b/cds/intrusive/impl/michael_list.h index 426242d6..3482bdc1 100644 --- a/cds/intrusive/impl/michael_list.h +++ b/cds/intrusive/impl/michael_list.h @@ -770,7 +770,7 @@ namespace cds { namespace intrusive { } //@endcond - /// Checks whether the map contains \p key using \p pred predicate for searching + /// Checks whether the list contains \p key using \p pred predicate for searching /** The function is an analog of contains( key ) but \p pred is used for key comparing. \p Less functor has the interface like \p std::less. diff --git a/cds/intrusive/split_list.h b/cds/intrusive/split_list.h index daba41df..fb385ad6 100644 --- a/cds/intrusive/split_list.h +++ b/cds/intrusive/split_list.h @@ -272,11 +272,11 @@ namespace cds { namespace intrusive { } template - std::pair ensure_at( dummy_node_type * pHead, value_type& val, Func func ) + std::pair update_at( dummy_node_type * pHead, value_type& val, Func func, bool bAllowInsert ) { assert( pHead != nullptr ); bucket_head_type h(pHead); - return base_class::ensure_at( h, val, func ); + return base_class::update_at( h, val, func, bAllowInsert ); } bool unlink_at( dummy_node_type * pHead, value_type& val ) @@ -687,11 +687,12 @@ namespace cds { namespace intrusive { return false; } - /// Ensures that the \p val exists in the set + /// Updates the node /** The operation performs inserting or changing data with lock-free manner. - If the item \p val is not found in the set, then \p val is inserted into the set. + If the item \p val is not found in the set, then \p val is inserted + iff \p bAllowInsert is \p true. Otherwise, the functor \p func is called with item found. The functor signature is: \code @@ -700,22 +701,22 @@ namespace cds { namespace intrusive { with arguments: - \p bNew - \p true if the item has been inserted, \p false otherwise - \p item - item of the set - - \p val - argument \p val passed into the \p ensure function + - \p val - argument \p val passed into the \p update() function If new item has been inserted (i.e. \p bNew is \p true) then \p item and \p val arguments refers to the same thing. - The functor can change non-key fields of the \p item. + The functor may change non-key fields of the \p item. Returns std::pair where \p first is \p true if operation is successfull, \p second is \p true if new item has been added or \p false if the item with \p key - already is in the set. + already is in the list. @warning For \ref cds_intrusive_MichaelList_hp "MichaelList" as the bucket see \ref cds_intrusive_item_creating "insert item troubleshooting". \ref cds_intrusive_LazyList_hp "LazyList" provides exclusive access to inserted item and does not require any node-level synchronization. */ template - std::pair ensure( value_type& val, Func func ) + std::pair update( value_type& val, Func func, bool bAllowInsert = true ) { size_t nHash = hash_value( val ); dummy_node_type * pHead = get_bucket( nHash ); @@ -723,7 +724,7 @@ namespace cds { namespace intrusive { node_traits::to_node_ptr( val )->m_nHash = split_list::regular_hash( nHash ); - std::pair bRet = m_List.ensure_at( pHead, val, func ); + std::pair bRet = m_List.update_at( pHead, val, func, bAllowInsert ); if ( bRet.first && bRet.second ) { inc_item_count(); m_Stat.onEnsureNew(); @@ -732,6 +733,14 @@ namespace cds { namespace intrusive { m_Stat.onEnsureExist(); return bRet; } + //@cond + // Deprecated, use update() + template + std::pair ensure( value_type& val, Func func ) + { + return update( val, func, true ); + } + //@endcond /// Unlinks the item \p val from the set /** @@ -940,34 +949,49 @@ namespace cds { namespace intrusive { } //@endcond - /// Finds the key \p key - /** \anchor cds_intrusive_SplitListSet_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 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. - Otherwise, you may use \p find_with functions with explicit predicate for key comparing. + Otherwise, you may use \p contains( Q const&, Less pred ) functions with explicit predicate for key comparing. */ template - bool find( Q const& key ) + bool contains( Q const& key ) { return find_( key, key_comparator() ); } + //@cond + // Deprecated, use contains() + template + bool find( Q const& key ) + { + return contains( key ); + } + //@endcond - /// Finds the key \p key with \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_SplitListSet_hp_find_val "find(Q const&)" - but \p cmp is used for key compare. - \p Less has the interface like \p std::less. - \p cmp must imply the same element order as the comparator used for building the set. + The function is an analog of 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_( key, typename wrapped_ordered_list::template make_compare_from_less() ); } + //@cond + // Deprecated, use contains() + template + bool find_with( Q const& key, Less pred ) + { + return contains( key, pred ); + } + //@endcond /// Finds the key \p key and return the item found /** \anchor cds_intrusive_SplitListSet_hp_get diff --git a/cds/intrusive/split_list_nogc.h b/cds/intrusive/split_list_nogc.h index d0a7ef95..710d814b 100644 --- a/cds/intrusive/split_list_nogc.h +++ b/cds/intrusive/split_list_nogc.h @@ -106,11 +106,11 @@ namespace cds { namespace intrusive { } template - std::pair ensure_at_( dummy_node_type * pHead, value_type& val, Func func ) + std::pair update_at_( dummy_node_type * pHead, value_type& val, Func func, bool bAllowInsert ) { assert( pHead != nullptr ); bucket_head_type h(static_cast(pHead)); - return base_class::ensure_at_( h, val, func ); + return base_class::update_at_( h, val, func, bAllowInsert ); } template @@ -324,74 +324,97 @@ namespace cds { namespace intrusive { return insert_( val ) != end(); } - /// Ensures that the \p item exists in the set + /// Updates the node /** The operation performs inserting or changing data with lock-free manner. - If the item \p val not found in the set, then \p val is inserted into the set. + If the item \p val is not found in the set, then \p val is inserted + iff \p bAllowInsert is \p true. Otherwise, the functor \p func is called with item found. The functor signature is: \code - struct ensure_functor { - void operator()( bool bNew, value_type& item, value_type& val ); - }; + void func( bool bNew, value_type& item, value_type& val ); \endcode with arguments: - \p bNew - \p true if the item has been inserted, \p false otherwise - \p item - item of the set - - \p val - argument \p val passed into the \p ensure function + - \p val - argument \p val passed into the \p update() function If new item has been inserted (i.e. \p bNew is \p true) then \p item and \p val arguments refers to the same thing. - The functor can change non-key fields of the \p item. + The functor may change non-key fields of the \p item. Returns std::pair where \p first is \p true if operation is successfull, - \p second is \p true if new item has been added or \p false if the item with given key - already is in the set. + \p second is \p true if new item has been added or \p false if the item with \p key + already is in the list. - @warning For \ref cds_intrusive_MichaelList_nogc "MichaelList" as the bucket see \ref cds_intrusive_item_creating "insert item troubleshooting". - \ref cds_intrusive_LazyList_nogc "LazyList" provides exclusive access to inserted item and does not require any node-level + @warning For \ref cds_intrusive_MichaelList_hp "MichaelList" as the bucket see \ref cds_intrusive_item_creating "insert item troubleshooting". + \ref cds_intrusive_LazyList_hp "LazyList" provides exclusive access to inserted item and does not require any node-level synchronization. */ template - std::pair ensure( value_type& val, Func func ) + std::pair update( value_type& val, Func func, bool bAllowInsert = true ) { - std::pair ret = ensure_( val, func ); + std::pair ret = update_( val, func, bAllowInsert ); return std::make_pair( ret.first != end(), ret.second ); } + //@cond + // Deprecated, use update() + template + std::pair ensure( value_type& val, Func func ) + { + return update( val, func, true ); + } + //@endcond - /// Finds the key \p key - /** \anchor cds_intrusive_SplitListSet_nogc_find_val + /// Checks whether the set contains \p key + /** The function searches the item with key equal to \p key - and returns pointer to item found or , and \p nullptr otherwise. + 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. + Otherwise, you may use \p contains( Q const&, Less pred ) functions with explicit predicate for key comparing. */ template - value_type * find( Q const& key ) + value_type * contains( Q const& key ) { iterator it = find_( key ); if ( it == end() ) return nullptr; return &*it; } + //@cond + // Deprecated, use contains() + template + value_type * find( Q const& key ) + { + return contains( key ); + } + //@endcond - /// Finds the key \p key with \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_SplitListSet_nogc_find_val "find(Q const&)" - but \p cmp is used for key compare. - \p Less has the interface like \p std::less. - \p cmp 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 list. */ template - value_type * find_with( Q const& key, Less pred ) + value_type * contains( Q const& key, Less pred ) { iterator it = find_with_( key, pred ); if ( it == end() ) return nullptr; return &*it; } + //@cond + // Deprecated, use contains() + template + value_type * find_with( Q const& key, Less pred ) + { + return contains( key, pred ); + } + //@endcond /// Finds the key \p key /** \anchor cds_intrusive_SplitListSet_nogc_find_func @@ -574,7 +597,7 @@ namespace cds { namespace intrusive { } template - std::pair ensure_( value_type& val, Func func ) + std::pair update_( value_type& val, Func func, bool bAllowInsert ) { size_t nHash = hash_value( val ); dummy_node_type * pHead = get_bucket( nHash ); @@ -582,7 +605,7 @@ namespace cds { namespace intrusive { node_traits::to_node_ptr( val )->m_nHash = split_list::regular_hash( nHash ); - std::pair ret = m_List.ensure_at_( pHead, val, func ); + std::pair ret = m_List.update_at_( pHead, val, func, bAllowInsert ); if ( ret.first != m_List.end() ) { if ( ret.second ) { inc_item_count(); diff --git a/cds/intrusive/split_list_rcu.h b/cds/intrusive/split_list_rcu.h index f26a253f..b66129c8 100644 --- a/cds/intrusive/split_list_rcu.h +++ b/cds/intrusive/split_list_rcu.h @@ -148,11 +148,11 @@ namespace cds { namespace intrusive { } template - std::pair ensure_at( dummy_node_type * pHead, value_type& val, Func func ) + std::pair update_at( dummy_node_type * pHead, value_type& val, Func func, bool bAllowInsert ) { assert( pHead != nullptr ); bucket_head_type h(pHead); - return base_class::ensure_at( h, val, func ); + return base_class::update_at( h, val, func, bAllowInsert ); } bool unlink_at( dummy_node_type * pHead, value_type& val ) @@ -570,11 +570,12 @@ namespace cds { namespace intrusive { return false; } - /// Ensures that the \p val exists in the set + /// Updates the node /** The operation performs inserting or changing data with lock-free manner. - If the item \p val is not found in the set, then \p val is inserted into the set. + If the item \p val is not found in the set, then \p val is inserted + iff \p bAllowInsert is \p true. Otherwise, the functor \p func is called with item found. The functor signature is: \code @@ -583,22 +584,24 @@ namespace cds { namespace intrusive { with arguments: - \p bNew - \p true if the item has been inserted, \p false otherwise - \p item - item of the set - - \p val - argument \p val passed into the \p ensure function + - \p val - argument \p val passed into the \p update() function If new item has been inserted (i.e. \p bNew is \p true) then \p item and \p val arguments - refers to the same thing. + refers to the same stuff. - The function makes RCU lock internally. + The functor may change non-key fields of the \p item. + + The function applies RCU lock internally. Returns std::pair where \p first is \p true if operation is successfull, \p second is \p true if new item has been added or \p false if the item with \p key - already is in the set. + already is in the list. @warning For \ref cds_intrusive_MichaelList_rcu "MichaelList" as the bucket see \ref cds_intrusive_item_creating "insert item troubleshooting". \ref cds_intrusive_LazyList_rcu "LazyList" provides exclusive access to inserted item and does not require any node-level synchronization. - */ + */ template - std::pair ensure( value_type& val, Func func ) + std::pair update( value_type& val, Func func, bool bAllowInsert = true ) { size_t nHash = hash_value( val ); dummy_node_type * pHead = get_bucket( nHash ); @@ -606,7 +609,7 @@ namespace cds { namespace intrusive { node_traits::to_node_ptr( val )->m_nHash = split_list::regular_hash( nHash ); - std::pair bRet = m_List.ensure_at( pHead, val, func ); + std::pair bRet = m_List.update_at( pHead, val, func, bAllowInsert ); if ( bRet.first && bRet.second ) { inc_item_count(); m_Stat.onEnsureNew(); @@ -615,6 +618,14 @@ namespace cds { namespace intrusive { m_Stat.onEnsureExist(); return bRet; } + //@cond + // Deprecated, use update() + template + std::pair ensure( value_type& val, Func func ) + { + return update( val, func, true ); + } + //@endcond /// Unlinks the item \p val from the set /** @@ -836,30 +847,49 @@ namespace cds { namespace intrusive { } //@endcond - /// Finds the key \p key - /** \anchor cds_intrusive_SplitListSet_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 \p key found or \p false otherwise. + 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. + Otherwise, you may use \p contains( Q const&, Less pred ) functions with explicit predicate for key comparing. */ template - bool find( Q const& key ) + bool contains( Q const& key ) { return find_value( key, key_comparator() ); } + //@cond + // Deprecated, use contains() + template + bool find( Q const& key ) + { + return contains( key ); + } + //@endcond - /// Finds the key \p key with \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_SplitListSet_rcu_find_val "find(Q const&)" - but \p cmp 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 an analog of 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 list. */ template - bool find_with( Q const& key, Less pred ) + bool contains( Q const& key, Less pred ) { CDS_UNUSED( pred ); return find_value( key, typename wrapped_ordered_list::template make_compare_from_less() ); } + //@cond + // Deprecated, use contains() + template + bool find_with( Q const& key, Less pred ) + { + return contains( key, pred ); + } + //@endcond /// Finds the key \p key and return the item found /** \anchor cds_intrusive_SplitListSet_rcu_get @@ -969,6 +999,7 @@ namespace cds { namespace intrusive { {} }; //@endcond + public: /// Forward iterator /** diff --git a/projects/Win/vc12/unit-map-delodd.vcxproj b/projects/Win/vc12/unit-map-delodd.vcxproj index 8fd3aa35..9aeb7eaa 100644 --- a/projects/Win/vc12/unit-map-delodd.vcxproj +++ b/projects/Win/vc12/unit-map-delodd.vcxproj @@ -60,7 +60,7 @@ true - true + false diff --git a/tests/unit/map2/map_defs.h b/tests/unit/map2/map_defs.h index 69a0fa07..d94b68d7 100644 --- a/tests/unit/map2/map_defs.h +++ b/tests/unit/map2/map_defs.h @@ -113,56 +113,30 @@ #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED # define CDSUNIT_DECLARE_SplitList_RCU_signal \ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHB_dyn_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHB_dyn_cmp_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHB_st_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHB_dyn_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHB_st_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHB_st_less_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHT_dyn_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHT_dyn_cmp_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHT_st_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHT_dyn_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHT_st_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_SHT_st_less_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHB_dyn_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHB_dyn_cmp_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHB_st_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHB_dyn_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHB_st_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHB_st_less_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHT_dyn_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHT_dyn_cmp_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHT_st_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHT_dyn_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHT_st_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_SHT_st_less_stat) - -# define CDSUNIT_DEFINE_SplitList_RCU_signal( IMPL, C ) \ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHB_dyn_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHB_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHB_st_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHB_dyn_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHB_st_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHB_st_less_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHT_dyn_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHT_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHT_st_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHT_dyn_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHT_st_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_SHT_st_less_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHB_dyn_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHB_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHB_st_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHB_dyn_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHB_st_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHB_st_less_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHT_dyn_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHT_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHT_st_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHT_dyn_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHT_st_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_SHT_st_less_stat) + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_SHB_dyn_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_SHB_dyn_cmp_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_SHB_st_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_SHB_dyn_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_SHB_st_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_SHB_st_less_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_SHT_dyn_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_SHT_dyn_cmp_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_SHT_st_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_SHT_dyn_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_SHT_st_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_SHT_st_less_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_SHB_dyn_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_SHB_dyn_cmp_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_SHB_st_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_SHB_dyn_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_SHB_st_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_SHB_st_less_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_SHT_dyn_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_SHT_dyn_cmp_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_SHT_st_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_SHT_dyn_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_SHT_st_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_SHT_st_less_stat) # define CDSUNIT_TEST_SplitList_RCU_signal \ CPPUNIT_TEST(SplitList_Michael_RCU_SHB_dyn_cmp)\ @@ -197,131 +171,68 @@ #endif #define CDSUNIT_DECLARE_SplitList \ - CDSUNIT_DECLARE_TEST(SplitList_Michael_HP_dyn_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_HP_dyn_cmp_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_HP_st_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_HP_dyn_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_HP_st_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_HP_st_less_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_DHP_dyn_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_DHP_dyn_cmp_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_DHP_st_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_DHP_dyn_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_DHP_st_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_DHP_st_less_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPI_dyn_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPI_dyn_cmp_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPI_st_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPI_dyn_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPI_st_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPI_st_less_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPB_dyn_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPB_dyn_cmp_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPB_st_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPB_dyn_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPB_st_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPB_st_less_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPT_dyn_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPT_dyn_cmp_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPT_st_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPT_dyn_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPT_st_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_RCU_GPT_st_less_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_HP_dyn_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_HP_dyn_cmp_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_HP_st_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_HP_dyn_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_HP_st_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_HP_st_less_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_DHP_dyn_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_DHP_dyn_cmp_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_DHP_st_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_DHP_dyn_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_DHP_st_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_DHP_st_less_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPI_dyn_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPI_dyn_cmp_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPI_st_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPI_dyn_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPI_st_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPI_st_less_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPB_dyn_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPB_dyn_cmp_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPB_st_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPB_dyn_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPB_st_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPB_st_less_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPT_dyn_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPT_dyn_cmp_stat)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPT_st_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPT_dyn_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPT_st_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_RCU_GPT_st_less_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_HP_dyn_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_HP_dyn_cmp_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_HP_st_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_HP_dyn_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_HP_st_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_HP_st_less_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_DHP_dyn_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_DHP_dyn_cmp_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_DHP_st_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_DHP_dyn_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_DHP_st_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_DHP_st_less_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_GPI_dyn_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_GPI_dyn_cmp_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_GPI_st_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_GPI_dyn_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_GPI_st_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_GPI_st_less_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_GPB_dyn_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_GPB_dyn_cmp_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_GPB_st_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_GPB_dyn_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_GPB_st_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_GPB_st_less_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_GPT_dyn_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_GPT_dyn_cmp_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_GPT_st_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_GPT_dyn_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_GPT_st_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_RCU_GPT_st_less_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_HP_dyn_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_HP_dyn_cmp_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_HP_st_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_HP_dyn_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_HP_st_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_HP_st_less_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_DHP_dyn_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_DHP_dyn_cmp_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_DHP_st_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_DHP_dyn_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_DHP_st_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_DHP_st_less_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_GPI_dyn_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_GPI_dyn_cmp_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_GPI_st_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_GPI_dyn_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_GPI_st_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_GPI_st_less_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_GPB_dyn_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_GPB_dyn_cmp_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_GPB_st_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_GPB_dyn_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_GPB_st_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_GPB_st_less_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_GPT_dyn_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_GPT_dyn_cmp_stat)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_GPT_st_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_GPT_dyn_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_GPT_st_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_RCU_GPT_st_less_stat)\ CDSUNIT_DECLARE_SplitList_RCU_signal -#define CDSUNIT_DEFINE_SplitList( IMPL, C ) \ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_HP_dyn_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_HP_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_HP_st_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_HP_dyn_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_HP_st_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_HP_st_less_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_DHP_dyn_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_DHP_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_DHP_st_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_DHP_dyn_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_DHP_st_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_DHP_st_less_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPI_dyn_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPI_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPI_st_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPI_dyn_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPI_st_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPI_st_less_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPB_dyn_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPB_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPB_st_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPB_dyn_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPB_st_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPB_st_less_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPT_dyn_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPT_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPT_st_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPT_dyn_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPT_st_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Michael_RCU_GPT_st_less_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_HP_dyn_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_HP_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_HP_st_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_HP_dyn_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_HP_st_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_HP_st_less_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_DHP_dyn_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_DHP_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_DHP_st_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_DHP_dyn_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_DHP_st_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_DHP_st_less_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPI_dyn_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPI_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPI_st_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPI_dyn_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPI_st_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPI_st_less_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPB_dyn_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPB_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPB_st_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPB_dyn_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPB_st_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPB_st_less_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPT_dyn_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPT_dyn_cmp_stat)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPT_st_cmp)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPT_dyn_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPT_st_less)\ - TEST_MAP_EXTRACT(IMPL, C, SplitList_Lazy_RCU_GPT_st_less_stat)\ - CDSUNIT_DEFINE_SplitList_RCU_signal( IMPL, C ) - #define CDSUNIT_TEST_SplitList \ CPPUNIT_TEST(SplitList_Michael_HP_dyn_cmp)\ CPPUNIT_TEST(SplitList_Michael_HP_dyn_cmp_stat)\ @@ -386,24 +297,14 @@ CDSUNIT_TEST_SplitList_RCU_signal #define CDSUNIT_DECLARE_SplitList_nogc \ - CDSUNIT_DECLARE_TEST(SplitList_Michael_NOGC_dyn_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_NOGC_st_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_NOGC_dyn_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Michael_NOGC_st_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_NOGC_dyn_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_NOGC_st_cmp)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_NOGC_dyn_less)\ - CDSUNIT_DECLARE_TEST(SplitList_Lazy_NOGC_st_less) - -#define CDSUNIT_DEFINE_SplitList_nogc( IMPL, C ) \ - TEST_MAP(IMPL, C, SplitList_Michael_NOGC_dyn_cmp)\ - TEST_MAP(IMPL, C, SplitList_Michael_NOGC_st_cmp)\ - TEST_MAP(IMPL, C, SplitList_Michael_NOGC_dyn_less)\ - TEST_MAP(IMPL, C, SplitList_Michael_NOGC_st_less)\ - TEST_MAP(IMPL, C, SplitList_Lazy_NOGC_dyn_cmp)\ - TEST_MAP(IMPL, C, SplitList_Lazy_NOGC_st_cmp)\ - TEST_MAP(IMPL, C, SplitList_Lazy_NOGC_dyn_less)\ - TEST_MAP(IMPL, C, SplitList_Lazy_NOGC_st_less) + TEST_CASE(tag_SplitListMap, SplitList_Michael_NOGC_dyn_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_NOGC_st_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_NOGC_dyn_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Michael_NOGC_st_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_NOGC_dyn_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_NOGC_st_cmp)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_NOGC_dyn_less)\ + TEST_CASE(tag_SplitListMap, SplitList_Lazy_NOGC_st_less) #define CDSUNIT_TEST_SplitList_nogc \ CPPUNIT_TEST(SplitList_Michael_NOGC_dyn_cmp)\ diff --git a/tests/unit/map2/map_delodd.h b/tests/unit/map2/map_delodd.h index e30824fd..b006fdf4 100644 --- a/tests/unit/map2/map_delodd.h +++ b/tests/unit/map2/map_delodd.h @@ -690,17 +690,17 @@ namespace map2 { # include "map2/map_defs.h" CDSUNIT_DECLARE_MichaelMap + CDSUNIT_DECLARE_SplitList // This test is not suitable for MultiLevelHashMap //CDSUNIT_DECLARE_MultiLevelHashMap CPPUNIT_TEST_SUITE(Map_DelOdd) CDSUNIT_TEST_MichaelMap + CDSUNIT_TEST_SplitList //CDSUNIT_TEST_MultiLevelHashMap // the test is not suitable CPPUNIT_TEST_SUITE_END(); - //CDSUNIT_DECLARE_MichaelMap - //CDSUNIT_DECLARE_SplitList ////CDSUNIT_DECLARE_StripedMap ////CDSUNIT_DECLARE_RefinableMap //CDSUNIT_DECLARE_CuckooMap diff --git a/tests/unit/map2/map_delodd_michael.cpp b/tests/unit/map2/map_delodd_michael.cpp index 2abd4968..db52476e 100644 --- a/tests/unit/map2/map_delodd_michael.cpp +++ b/tests/unit/map2/map_delodd_michael.cpp @@ -10,4 +10,3 @@ namespace map2 { CDSUNIT_DECLARE_MichaelMap } // namespace map2 - diff --git a/tests/unit/map2/map_delodd_split.cpp b/tests/unit/map2/map_delodd_split.cpp index e1e916f2..2b1aa086 100644 --- a/tests/unit/map2/map_delodd_split.cpp +++ b/tests/unit/map2/map_delodd_split.cpp @@ -3,10 +3,10 @@ #include "map2/map_delodd.h" #include "map2/map_type_split_list.h" -namespace map2 { - CDSUNIT_DEFINE_SplitList( cc::split_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_SplitList ) - CDSUNIT_TEST_SplitList - CPPUNIT_TEST_SUITE_END_PART() +namespace map2 { + CDSUNIT_DECLARE_SplitList } // namespace map2 diff --git a/tests/unit/map2/map_type_split_list.h b/tests/unit/map2/map_type_split_list.h index e18aa241..3a807253 100644 --- a/tests/unit/map2/map_type_split_list.h +++ b/tests/unit/map2/map_type_split_list.h @@ -23,8 +23,67 @@ namespace map2 { + template + class SplitListMap : public cc::SplitListMap< GC, Key, T, Traits > + { + typedef cc::SplitListMap< GC, Key, T, Traits > base_class; + public: + template + SplitListMap( Config const& cfg) + : base_class( cfg.c_nMapSize, cfg.c_nLoadFactor ) + {} + + // for testing + static CDS_CONSTEXPR bool const c_bExtractSupported = true; + static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true; + }; + + template + class SplitListMap< cds::gc::nogc, Key, T, Traits> : public cc::SplitListMap< cds::gc::nogc, Key, T, Traits > + { + typedef cc::SplitListMap< cds::gc::nogc, Key, T, Traits > base_class; + public: + template + SplitListMap( Config const& cfg) + : base_class( cfg.c_nMapSize, cfg.c_nLoadFactor ) + {} + + template + bool insert( K const& key ) + { + return base_class::insert( key ) != base_class::end(); + } + + template + bool insert( K const& key, V const& val ) + { + return base_class::insert( key, val ) != base_class::end(); + } + + template + bool insert_with( K const& key, Func func ) + { + return base_class::insert_with( key, func ) != base_class::end(); + } + + template + bool find( K const& key ) + { + return base_class::find( key ) != base_class::end(); + } + + void clear() + {} + + // for testing + static CDS_CONSTEXPR bool const c_bExtractSupported = true; + static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true; + }; + + struct tag_SplitListMap; + template - struct map_type< cc::split_list::implementation_tag, Key, Value >: public map_type_base< Key, Value > + struct map_type< tag_SplitListMap, Key, Value >: public map_type_base< Key, Value > { typedef map_type_base< Key, Value > base_class; typedef typename base_class::compare compare; @@ -33,44 +92,6 @@ namespace map2 { typedef typename base_class::key_hash key_hash; typedef typename base_class::hash hash; - // SplitListMap has no clear() method - template - class NogcSplitMapWrapper: public Base - { - typedef Base base_class; - public: - NogcSplitMapWrapper( size_t nMaxItemCount, size_t nLoadFactor ) - : base_class( nMaxItemCount, nLoadFactor ) - {} - - template - bool insert( K const& key ) - { - return base_class::insert( key ) != base_class::end(); - } - - template - bool insert( K const& key, V const& val ) - { - return base_class::insert( key, val ) != base_class::end(); - } - - template - bool insert_with( K const& key, Func func ) - { - return base_class::insert_with( key, func ) != base_class::end(); - } - - template - bool find( K const& key ) - { - return base_class::find( key ) != base_class::end(); - } - - void clear() - {} - }; - // *************************************************************************** // SplitListMap based on MichaelList @@ -84,30 +105,30 @@ namespace map2 { > >::type {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_HP_dyn_cmp; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_DHP_dyn_cmp; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_cmp >> SplitList_Michael_NOGC_dyn_cmp; - typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_GPI_dyn_cmp; - typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_GPB_dyn_cmp; - typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_GPT_dyn_cmp; + typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_HP_dyn_cmp; + typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_DHP_dyn_cmp; + typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_NOGC_dyn_cmp; + typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_GPI_dyn_cmp; + typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_GPB_dyn_cmp; + typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_GPT_dyn_cmp; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_SHB_dyn_cmp; - typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_SHT_dyn_cmp; + typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_SHB_dyn_cmp; + typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_cmp > SplitList_Michael_RCU_SHT_dyn_cmp; #endif struct traits_SplitList_Michael_dyn_cmp_stat : public traits_SplitList_Michael_dyn_cmp { typedef cc::split_list::stat<> stat; }; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_HP_dyn_cmp_stat; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_DHP_dyn_cmp_stat; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_cmp_stat >> SplitList_Michael_NOGC_dyn_cmp_stat; - typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_GPI_dyn_cmp_stat; - typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_GPB_dyn_cmp_stat; - typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_GPT_dyn_cmp_stat; + typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_HP_dyn_cmp_stat; + typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_DHP_dyn_cmp_stat; + typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_cmp_stat> SplitList_Michael_NOGC_dyn_cmp_stat; + typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_GPI_dyn_cmp_stat; + typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_GPB_dyn_cmp_stat; + typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_GPT_dyn_cmp_stat; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_SHB_dyn_cmp_stat; - typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_SHT_dyn_cmp_stat; + typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_SHB_dyn_cmp_stat; + typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_cmp_stat > SplitList_Michael_RCU_SHT_dyn_cmp_stat; #endif struct traits_SplitList_Michael_dyn_cmp_seqcst: public cc::split_list::make_traits< @@ -122,15 +143,15 @@ namespace map2 { > >::type {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_HP_dyn_cmp_seqcst; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_DHP_dyn_cmp_seqcst; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst >> SplitList_Michael_NOGC_dyn_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_GPI_dyn_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_GPB_dyn_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_GPT_dyn_cmp_seqcst; + typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_HP_dyn_cmp_seqcst; + typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_DHP_dyn_cmp_seqcst; + typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst> SplitList_Michael_NOGC_dyn_cmp_seqcst; + typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_GPI_dyn_cmp_seqcst; + typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_GPB_dyn_cmp_seqcst; + typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_GPT_dyn_cmp_seqcst; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_SHB_dyn_cmp_seqcst; - typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_SHT_dyn_cmp_seqcst; + typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_SHB_dyn_cmp_seqcst; + typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_cmp_seqcst > SplitList_Michael_RCU_SHT_dyn_cmp_seqcst; #endif struct traits_SplitList_Michael_st_cmp: public cc::split_list::make_traits< @@ -144,15 +165,15 @@ namespace map2 { > >::type {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_HP_st_cmp; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_DHP_st_cmp; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_cmp >> SplitList_Michael_NOGC_st_cmp; - typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_GPI_st_cmp; - typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_GPB_st_cmp; - typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_GPT_st_cmp; + typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_HP_st_cmp; + typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_DHP_st_cmp; + typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_cmp> SplitList_Michael_NOGC_st_cmp; + typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_GPI_st_cmp; + typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_GPB_st_cmp; + typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_GPT_st_cmp; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_SHB_st_cmp; - typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_SHT_st_cmp; + typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_SHB_st_cmp; + typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_cmp > SplitList_Michael_RCU_SHT_st_cmp; #endif struct traits_SplitList_Michael_st_cmp_seqcst: public cc::split_list::make_traits< @@ -168,15 +189,15 @@ namespace map2 { > >::type {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_HP_st_cmp_seqcst; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_DHP_st_cmp_seqcst; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_cmp_seqcst >> SplitList_Michael_NOGC_st_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_RCU_GPI_st_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_RCU_GPB_st_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_RCU_GPT_st_cmp_seqcst; + typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_HP_st_cmp_seqcst; + typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_DHP_st_cmp_seqcst; + typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_cmp_seqcst> SplitList_Michael_NOGC_st_cmp_seqcst; + typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_RCU_GPI_st_cmp_seqcst; + typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_RCU_GPB_st_cmp_seqcst; + typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_RCU_GPT_st_cmp_seqcst; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_RCU_SHB_st_cmp_seqcst; - typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_RCU_SHT_st_cmp_seqcst; + typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_RCU_SHB_st_cmp_seqcst; + typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_cmp_seqcst > SplitList_Michael_RCU_SHT_st_cmp_seqcst; #endif //HP + less @@ -190,15 +211,15 @@ namespace map2 { > >::type {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_HP_dyn_less; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_DHP_dyn_less; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_less >> SplitList_Michael_NOGC_dyn_less; - typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_GPI_dyn_less; - typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_GPB_dyn_less; - typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_GPT_dyn_less; + typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_HP_dyn_less; + typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_DHP_dyn_less; + typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_less> SplitList_Michael_NOGC_dyn_less; + typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_GPI_dyn_less; + typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_GPB_dyn_less; + typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_GPT_dyn_less; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_SHB_dyn_less; - typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_SHT_dyn_less; + typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_SHB_dyn_less; + typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_less > SplitList_Michael_RCU_SHT_dyn_less; #endif @@ -214,15 +235,15 @@ namespace map2 { > >::type {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_HP_dyn_less_seqcst; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_DHP_dyn_less_seqcst; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_less_seqcst >> SplitList_Michael_NOGC_dyn_less_seqcst; - typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_GPI_dyn_less_seqcst; - typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_GPB_dyn_less_seqcst; - typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_GPT_dyn_less_seqcst; + typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_HP_dyn_less_seqcst; + typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_DHP_dyn_less_seqcst; + typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_dyn_less_seqcst> SplitList_Michael_NOGC_dyn_less_seqcst; + typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_GPI_dyn_less_seqcst; + typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_GPB_dyn_less_seqcst; + typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_GPT_dyn_less_seqcst; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_SHB_dyn_less_seqcst; - typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_SHT_dyn_less_seqcst; + typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_SHB_dyn_less_seqcst; + typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_dyn_less_seqcst > SplitList_Michael_RCU_SHT_dyn_less_seqcst; #endif struct traits_SplitList_Michael_st_less: public cc::split_list::make_traits< @@ -236,30 +257,30 @@ namespace map2 { > >::type {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_HP_st_less; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_DHP_st_less; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_less >> SplitList_Michael_NOGC_st_less; - typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_GPI_st_less; - typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_GPB_st_less; - typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_GPT_st_less; + typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_HP_st_less; + typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_DHP_st_less; + typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_less> SplitList_Michael_NOGC_st_less; + typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_GPI_st_less; + typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_GPB_st_less; + typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_GPT_st_less; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_SHB_st_less; - typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_SHT_st_less; + typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_SHB_st_less; + typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_less > SplitList_Michael_RCU_SHT_st_less; #endif struct traits_SplitList_Michael_st_less_stat : traits_SplitList_Michael_st_less { typedef cc::split_list::stat<> stat; }; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_HP_st_less_stat; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_DHP_st_less_stat; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_less_stat >> SplitList_Michael_NOGC_st_less_stat; - typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_GPI_st_less_stat; - typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_GPB_st_less_stat; - typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_GPT_st_less_stat; + typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_HP_st_less_stat; + typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_DHP_st_less_stat; + typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_less_stat> SplitList_Michael_NOGC_st_less_stat; + typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_GPI_st_less_stat; + typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_GPB_st_less_stat; + typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_GPT_st_less_stat; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_SHB_st_less_stat; - typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_SHT_st_less_stat; + typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_SHB_st_less_stat; + typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_less_stat > SplitList_Michael_RCU_SHT_st_less_stat; #endif @@ -276,15 +297,15 @@ namespace map2 { > >::type {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_HP_st_less_seqcst; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_DHP_st_less_seqcst; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_less_seqcst >> SplitList_Michael_NOGC_st_less_seqcst; - typedef cc::SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_GPI_st_less_seqcst; - typedef cc::SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_GPB_st_less_seqcst; - typedef cc::SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_GPT_st_less_seqcst; + typedef SplitListMap< cds::gc::HP, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_HP_st_less_seqcst; + typedef SplitListMap< cds::gc::DHP, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_DHP_st_less_seqcst; + typedef SplitListMap< cds::gc::nogc, Key, Value, traits_SplitList_Michael_st_less_seqcst> SplitList_Michael_NOGC_st_less_seqcst; + typedef SplitListMap< rcu_gpi, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_GPI_st_less_seqcst; + typedef SplitListMap< rcu_gpb, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_GPB_st_less_seqcst; + typedef SplitListMap< rcu_gpt, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_GPT_st_less_seqcst; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_SHB_st_less_seqcst; - typedef cc::SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_SHT_st_less_seqcst; + typedef SplitListMap< rcu_shb, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_SHB_st_less_seqcst; + typedef SplitListMap< rcu_sht, Key, Value, traits_SplitList_Michael_st_less_seqcst > SplitList_Michael_RCU_SHT_st_less_seqcst; #endif @@ -302,30 +323,30 @@ namespace map2 { > >::type {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_HP_dyn_cmp; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_DHP_dyn_cmp; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_cmp >> SplitList_Lazy_NOGC_dyn_cmp; - typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_GPI_dyn_cmp; - typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_GPB_dyn_cmp; - typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_GPT_dyn_cmp; + typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_HP_dyn_cmp; + typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_DHP_dyn_cmp; + typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_cmp> SplitList_Lazy_NOGC_dyn_cmp; + typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_GPI_dyn_cmp; + typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_GPB_dyn_cmp; + typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_GPT_dyn_cmp; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_SHB_dyn_cmp; - typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_SHT_dyn_cmp; + typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_SHB_dyn_cmp; + typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_cmp > SplitList_Lazy_RCU_SHT_dyn_cmp; #endif struct SplitList_Lazy_dyn_cmp_stat : public SplitList_Lazy_dyn_cmp { typedef cc::split_list::stat<> stat; }; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_HP_dyn_cmp_stat; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_DHP_dyn_cmp_stat; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_cmp_stat >> SplitList_Lazy_NOGC_dyn_cmp_stat; - typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_GPI_dyn_cmp_stat; - typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_GPB_dyn_cmp_stat; - typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_GPT_dyn_cmp_stat; + typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_HP_dyn_cmp_stat; + typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_DHP_dyn_cmp_stat; + typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_cmp_stat> SplitList_Lazy_NOGC_dyn_cmp_stat; + typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_GPI_dyn_cmp_stat; + typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_GPB_dyn_cmp_stat; + typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_GPT_dyn_cmp_stat; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_SHB_dyn_cmp_stat; - typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_SHT_dyn_cmp_stat; + typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_SHB_dyn_cmp_stat; + typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_cmp_stat > SplitList_Lazy_RCU_SHT_dyn_cmp_stat; #endif struct SplitList_Lazy_dyn_cmp_seqcst : @@ -341,15 +362,15 @@ namespace map2 { > >::type {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_HP_dyn_cmp_seqcst; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_DHP_dyn_cmp_seqcst; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_cmp_seqcst >> SplitList_Lazy_NOGC_dyn_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_GPI_dyn_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_GPB_dyn_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_GPT_dyn_cmp_seqcst; + typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_HP_dyn_cmp_seqcst; + typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_DHP_dyn_cmp_seqcst; + typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_cmp_seqcst> SplitList_Lazy_NOGC_dyn_cmp_seqcst; + typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_GPI_dyn_cmp_seqcst; + typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_GPB_dyn_cmp_seqcst; + typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_GPT_dyn_cmp_seqcst; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_SHB_dyn_cmp_seqcst; - typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_SHT_dyn_cmp_seqcst; + typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_SHB_dyn_cmp_seqcst; + typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_cmp_seqcst > SplitList_Lazy_RCU_SHT_dyn_cmp_seqcst; #endif struct SplitList_Lazy_st_cmp : @@ -364,15 +385,15 @@ namespace map2 { > >::type {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_HP_st_cmp; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_DHP_st_cmp; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_cmp >> SplitList_Lazy_NOGC_st_cmp; - typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_GPI_st_cmp; - typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_GPB_st_cmp; - typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_GPT_st_cmp; + typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_HP_st_cmp; + typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_DHP_st_cmp; + typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_cmp> SplitList_Lazy_NOGC_st_cmp; + typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_GPI_st_cmp; + typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_GPB_st_cmp; + typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_GPT_st_cmp; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_SHB_st_cmp; - typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_SHT_st_cmp; + typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_SHB_st_cmp; + typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_cmp > SplitList_Lazy_RCU_SHT_st_cmp; #endif @@ -390,15 +411,15 @@ namespace map2 { > >::type {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_HP_st_cmp_seqcst; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_DHP_st_cmp_seqcst; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_cmp_seqcst >> SplitList_Lazy_NOGC_st_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_RCU_GPI_st_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_RCU_GPB_st_cmp_seqcst; - typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_RCU_GPT_st_cmp_seqcst; + typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_HP_st_cmp_seqcst; + typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_DHP_st_cmp_seqcst; + typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_NOGC_st_cmp_seqcst; + typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_RCU_GPI_st_cmp_seqcst; + typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_RCU_GPB_st_cmp_seqcst; + typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_RCU_GPT_st_cmp_seqcst; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_RCU_SHB_st_cmp_seqcst; - typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_RCU_SHT_st_cmp_seqcst; + typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_RCU_SHB_st_cmp_seqcst; + typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_cmp_seqcst> SplitList_Lazy_RCU_SHT_st_cmp_seqcst; #endif @@ -413,15 +434,15 @@ namespace map2 { > >::type {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_HP_dyn_less; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_DHP_dyn_less; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_less >> SplitList_Lazy_NOGC_dyn_less; - typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_GPI_dyn_less; - typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_GPB_dyn_less; - typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_GPT_dyn_less; + typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_HP_dyn_less; + typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_DHP_dyn_less; + typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_less> SplitList_Lazy_NOGC_dyn_less; + typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_GPI_dyn_less; + typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_GPB_dyn_less; + typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_GPT_dyn_less; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_SHB_dyn_less; - typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_SHT_dyn_less; + typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_SHB_dyn_less; + typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_less > SplitList_Lazy_RCU_SHT_dyn_less; #endif struct SplitList_Lazy_dyn_less_seqcst: @@ -437,15 +458,15 @@ namespace map2 { > >::type {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_HP_dyn_less_seqcst; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_DHP_dyn_less_seqcst; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_less_seqcst >> SplitList_Lazy_NOGC_dyn_less_seqcst; - typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_GPI_dyn_less_seqcst; - typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_GPB_dyn_less_seqcst; - typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_GPT_dyn_less_seqcst; + typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_HP_dyn_less_seqcst; + typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_DHP_dyn_less_seqcst; + typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_dyn_less_seqcst> SplitList_Lazy_NOGC_dyn_less_seqcst; + typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_GPI_dyn_less_seqcst; + typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_GPB_dyn_less_seqcst; + typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_GPT_dyn_less_seqcst; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_SHB_dyn_less_seqcst; - typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_SHT_dyn_less_seqcst; + typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_SHB_dyn_less_seqcst; + typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_dyn_less_seqcst > SplitList_Lazy_RCU_SHT_dyn_less_seqcst; #endif struct SplitList_Lazy_st_less : @@ -460,30 +481,30 @@ namespace map2 { > >::type {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_HP_st_less; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_DHP_st_less; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_less >> SplitList_Lazy_NOGC_st_less; - typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_GPI_st_less; - typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_GPB_st_less; - typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_GPT_st_less; + typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_HP_st_less; + typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_DHP_st_less; + typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_less> SplitList_Lazy_NOGC_st_less; + typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_GPI_st_less; + typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_GPB_st_less; + typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_GPT_st_less; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_SHB_st_less; - typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_SHT_st_less; + typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_SHB_st_less; + typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_less > SplitList_Lazy_RCU_SHT_st_less; #endif struct SplitList_Lazy_st_less_stat : public SplitList_Lazy_st_less { typedef cc::split_list::stat<> stat; }; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_HP_st_less_stat; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_DHP_st_less_stat; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_less_stat >> SplitList_Lazy_NOGC_st_less_stat; - typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_GPI_st_less_stat; - typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_GPB_st_less_stat; - typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_GPT_st_less_stat; + typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_HP_st_less_stat; + typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_DHP_st_less_stat; + typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_less_stat> SplitList_Lazy_NOGC_st_less_stat; + typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_GPI_st_less_stat; + typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_GPB_st_less_stat; + typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_GPT_st_less_stat; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_SHB_st_less_stat; - typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_SHT_st_less_stat; + typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_SHB_st_less_stat; + typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_less_stat > SplitList_Lazy_RCU_SHT_st_less_stat; #endif struct SplitList_Lazy_st_less_seqcst : @@ -500,20 +521,20 @@ namespace map2 { > >::type {}; - typedef cc::SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_HP_st_less_seqcst; - typedef cc::SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_DHP_st_less_seqcst; - typedef NogcSplitMapWrapper< cc::SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_less_seqcst >> SplitList_Lazy_NOGC_st_less_seqcst; - typedef cc::SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_GPI_st_less_seqcst; - typedef cc::SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_GPB_st_less_seqcst; - typedef cc::SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_GPT_st_less_seqcst; + typedef SplitListMap< cds::gc::HP, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_HP_st_less_seqcst; + typedef SplitListMap< cds::gc::DHP, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_DHP_st_less_seqcst; + typedef SplitListMap< cds::gc::nogc, Key, Value, SplitList_Lazy_st_less_seqcst> SplitList_Lazy_NOGC_st_less_seqcst; + typedef SplitListMap< rcu_gpi, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_GPI_st_less_seqcst; + typedef SplitListMap< rcu_gpb, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_GPB_st_less_seqcst; + typedef SplitListMap< rcu_gpt, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_GPT_st_less_seqcst; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_SHB_st_less_seqcst; - typedef cc::SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_SHT_st_less_seqcst; + typedef SplitListMap< rcu_shb, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_SHB_st_less_seqcst; + typedef SplitListMap< rcu_sht, Key, Value, SplitList_Lazy_st_less_seqcst > SplitList_Lazy_RCU_SHT_st_less_seqcst; #endif }; template - static inline void print_stat( cc::SplitListMap< GC, K, T, Traits > const& m ) + static inline void print_stat( SplitListMap< GC, K, T, Traits > const& m ) { CPPUNIT_MSG( m.statistics() ); } -- 2.34.1