--- /dev/null
+//$$CDS-header$$
+
+#ifndef __CDS_CONTAINER_ELLEN_BINTREE_MAP_DHP_H
+#define __CDS_CONTAINER_ELLEN_BINTREE_MAP_DHP_H
+
+#include <cds/gc/ptb.h>
+#include <cds/container/impl/ellen_bintree_map.h>
+
+#endif // #ifndef __CDS_CONTAINER_ELLEN_BINTREE_MAP_DHP_H
+++ /dev/null
-//$$CDS-header$$
-
-#ifndef __CDS_CONTAINER_ELLEN_BINTREE_MAP_PTB_H
-#define __CDS_CONTAINER_ELLEN_BINTREE_MAP_PTB_H
-
-#include <cds/gc/ptb.h>
-#include <cds/container/impl/ellen_bintree_map.h>
-
-#endif // #ifndef __CDS_CONTAINER_ELLEN_BINTREE_MAP_PTB_H
- \p RCU - one of \ref cds_urcu_gc "RCU type"
- \p Key - key type
- \p T - value type to be stored in tree's leaf nodes.
- - \p Traits - type traits. See ellen_bintree::type_traits for explanation.
-
- It is possible to declare option-based tree with ellen_bintree::make_map_traits metafunction
- instead of \p Traits template argument.
- Template argument list \p Options of ellen_bintree::make_map_traits metafunction are:
- - opt::compare - key compare functor. No default functor is provided.
- If the option is not specified, \p %opt::less is used.
- - opt::less - specifies binary predicate used for key compare. At least \p %opt::compare or \p %opt::less should be defined.
- - opt::item_counter - the type of item counting feature. Default is \ref atomicity::empty_item_counter that is no item counting.
- - opt::memory_model - C++ memory ordering model. Can be opt::v::relaxed_ordering (relaxed memory model, the default)
- or opt::v::sequential_consistent (sequentially consisnent memory model).
- - opt::allocator - the allocator used for \ref ellen_bintree::map_node "leaf nodes" which contains data.
- Default is \ref CDS_DEFAULT_ALLOCATOR.
- - opt::node_allocator - the allocator used for \ref ellen_bintree::internal_node "internal nodes".
- Default is \ref CDS_DEFAULT_ALLOCATOR.
- - ellen_bintree::update_desc_allocator - an allocator of \ref ellen_bintree::update_desc "update descriptors",
- default is \ref CDS_DEFAULT_ALLOCATOR.
- Note that update descriptor is helping data structure with short lifetime and it is good candidate for pooling.
- The number of simultaneously existing descriptors is a relatively small number limited the number of threads
- working with the tree and RCU buffer size.
- Therefore, a bounded lock-free container like \p cds::container::VyukovMPMCCycleQueue is good choice for the free-list
- of update descriptors, see cds::memory::vyukov_queue_pool free-list implementation.
- Also notice that size of update descriptor is not dependent on the type of data
- stored in the tree so single free-list object can be used for several EllenBinTree-based object.
- - opt::stat - internal statistics. Available types: ellen_bintree::stat, ellen_bintree::empty_stat (the default)
- - opt::rcu_check_deadlock - a deadlock checking policy. Default is opt::v::rcu_throw_deadlock
- - opt::copy_policy - key copy policy defines a functor to copy leaf node's key to internal node.
- By default, assignment operator is used.
- The copy functor interface is:
- \code
- struct copy_functor {
- void operator()( Key& dest, Key const& src );
- };
- \endcode
+ - \p Traits - map traits, default is \p ellen_bintree::traits.
+ It is possible to declare option-based tree with \p ellen_bintree::make_map_traits metafunction
+ instead of \p Traits template argument.
@note Before including <tt><cds/container/ellen_bintree_map_rcu.h></tt> you should include appropriate RCU header file,
see \ref cds_urcu_gc "RCU type" for list of existing RCU class and corresponding header files.
typename Key,
typename T,
#ifdef CDS_DOXYGEN_INVOKED
- class Traits = ellen_bintree::type_traits
+ class Traits = ellen_bintree::traits
#else
class Traits
#endif
typedef typename maker::type base_class;
//@endcond
public:
- typedef cds::urcu::gc<RCU> gc ; ///< RCU Garbage collector
- typedef Key key_type ; ///< type of a key stored in the map
- typedef T mapped_type ; ///< type of value stored in the map
- typedef std::pair< key_type const, mapped_type > value_type ; ///< Key-value pair stored in leaf node of the mp
- typedef Traits options ; ///< Traits template parameter
+ typedef cds::urcu::gc<RCU> gc; ///< RCU Garbage collector
+ typedef Key key_type; ///< type of a key stored in the map
+ typedef T mapped_type; ///< type of value stored in the map
+ typedef std::pair< key_type const, mapped_type > value_type; ///< Key-value pair stored in leaf node of the mp
+ typedef Traits traits; ///< Traits template parameter
# ifdef CDS_DOXYGEN_INVOKED
- typedef implementation_defined key_comparator ; ///< key compare functor based on opt::compare and opt::less option setter.
+ typedef implementation_defined key_comparator ; ///< key compare functor based on \p Traits::compare and \p Traits::less
# else
- typedef typename maker::intrusive_type_traits::compare key_comparator;
+ typedef typename maker::intrusive_traits::compare key_comparator;
# endif
- typedef typename base_class::item_counter item_counter ; ///< Item counting policy used
- typedef typename base_class::memory_model memory_model ; ///< Memory ordering. See cds::opt::memory_model option
- typedef typename base_class::node_allocator node_allocator_type ; ///< allocator for maintaining internal node
- typedef typename base_class::stat stat ; ///< internal statistics type
- typedef typename base_class::rcu_check_deadlock rcu_check_deadlock ; ///< Deadlock checking policy
- typedef typename options::copy_policy copy_policy ; ///< key copy policy
+ typedef typename base_class::item_counter item_counter; ///< Item counting policy
+ typedef typename base_class::memory_model memory_model; ///< Memory ordering, see \p cds::opt::memory_model option
+ typedef typename base_class::node_allocator node_allocator_type; ///< allocator for maintaining internal node
+ typedef typename base_class::stat stat; ///< internal statistics
+ typedef typename base_class::rcu_check_deadlock rcu_check_deadlock; ///< Deadlock checking policy
+ typedef typename traits::copy_policy copy_policy; ///< key copy policy
- typedef typename options::allocator allocator_type ; ///< Allocator for leaf nodes
- typedef typename base_class::node_allocator node_allocator ; ///< Internal node allocator
- typedef typename base_class::update_desc_allocator update_desc_allocator ; ///< Update descriptor allocator
+ typedef typename traits::allocator allocator_type; ///< Allocator for leaf nodes
+ typedef typename base_class::node_allocator node_allocator; ///< Internal node allocator
+ typedef typename base_class::update_desc_allocator update_desc_allocator; ///< Update descriptor allocator
static CDS_CONSTEXPR const bool c_bExtractLockExternal = base_class::c_bExtractLockExternal; ///< Group of \p extract_xxx functions do not require external locking
typedef typename gc::scoped_lock rcu_lock ; ///< RCU scoped lock
/// pointer to extracted node
- typedef cds::urcu::exempt_ptr< gc, leaf_node, value_type, typename maker::intrusive_type_traits::disposer,
+ typedef cds::urcu::exempt_ptr< gc, leaf_node, value_type, typename maker::intrusive_traits::disposer,
cds::urcu::details::conventional_exempt_member_cast<leaf_node, value_type>
> exempt_ptr;
The function creates a node with \p key and default value, and then inserts the node created into the map.
Preconditions:
- - The \ref key_type should be constructible from a value of type \p K.
- In trivial case, \p K is equal to \ref key_type.
- - The \ref mapped_type should be default-constructible.
+ - The \p key_type should be constructible from a value of type \p K.
+ - The \p mapped_type should be default-constructible.
- RCU \p synchronize method can be called. RCU should not be locked.
+ RCU \p synchronize() can be called. RCU should not be locked.
Returns \p true if inserting successful, \p false otherwise.
*/
and then inserts the node created into the map.
Preconditions:
- - The \ref key_type should be constructible from \p key of type \p K.
- - The \ref value_type should be constructible from \p val of type \p V.
+ - The \p key_type should be constructible from \p key of type \p K.
+ - The \p value_type should be constructible from \p val of type \p V.
- RCU \p synchronize method can be called. RCU should not be locked.
+ RCU \p synchronize() method can be called. RCU should not be locked.
Returns \p true if \p val is inserted into the map, \p false otherwise.
*/
This can be useful if complete initialization of object of \p value_type is heavyweight and
it is preferable that the initialization should be completed only if inserting is successful.
- RCU \p synchronize method can be called. RCU should not be locked.
+ RCU \p synchronize() method can be called. RCU should not be locked.
*/
template <typename K, typename Func>
bool insert_key( const K& key, Func func )
return false;
}
- /// For key \p key inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
+ /// For key \p key inserts data of type \p value_type created in-place from \p args
/**
Returns \p true if inserting successful, \p false otherwise.
- RCU \p synchronize method can be called. RCU should not be locked.
+ RCU \p synchronize() method can be called. RCU should not be locked.
*/
template <typename K, typename... Args>
bool emplace( K&& key, Args&&... args )
The functor may change any fields of the \p item.second that is \ref value_type.
- RCU \p synchronize method can be called. RCU should not be locked.
+ RCU \p synchronize() method can be called. RCU should not be locked.
Returns <tt> std::pair<bool, bool> </tt> 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.
+
+ @warning See \ref cds_intrusive_item_creating "insert item troubleshooting"
*/
template <typename K, typename Func>
std::pair<bool, bool> ensure( K const& key, Func func )
/// Delete \p key from the map
/**\anchor cds_nonintrusive_EllenBinTreeMap_rcu_erase_val
- RCU \p synchronize method can be called. RCU should not be locked.
+ RCU \p synchronize() method can be called. RCU should not be locked.
Return \p true if \p key is found and deleted, \p false otherwise
*/
}
/// Checks if the map is empty
- /**
- Emptiness is checked by item counting: if item count is zero then the map is empty.
- */
bool empty() const
{
return base_class::empty();
}
/// Returns item count in the map
+ /**
+ Only leaf nodes containing user data are counted.
+
+ The value returned depends on item counter type provided by \p Traits template parameter.
+ If it is \p atomicity::empty_item_counter this function always returns 0.
+
+ The function is not suitable for checking the tree emptiness, use \p empty()
+ member function for this purpose.
+ */
size_t size() const
{
return base_class::size();
{
return base_class::check_consistency();
}
-
};
}} // namespace cds::container
--- /dev/null
+//$$CDS-header$$
+
+#ifndef __CDS_CONTAINER_ELLEN_BINTREE_SET_DHP_H
+#define __CDS_CONTAINER_ELLEN_BINTREE_SET_DHP_H
+
+#include <cds/gc/ptb.h>
+#include <cds/container/impl/ellen_bintree_set.h>
+
+#endif // #ifndef __CDS_CONTAINER_ELLEN_BINTREE_SET_DHP_H
+++ /dev/null
-//$$CDS-header$$
-
-#ifndef __CDS_CONTAINER_ELLEN_BINTREE_SET_PTB_H
-#define __CDS_CONTAINER_ELLEN_BINTREE_SET_PTB_H
-
-#include <cds/gc/ptb.h>
-#include <cds/container/impl/ellen_bintree_set.h>
-
-#endif // #ifndef __CDS_CONTAINER_ELLEN_BINTREE_SET_PTB_H
- \p RCU - one of \ref cds_urcu_gc "RCU type"
- \p Key - key type, a subset of \p T
- \p T - type to be stored in tree's leaf nodes.
- - \p Traits - type traits. See ellen_bintree::type_traits for explanation.
-
- It is possible to declare option-based tree with ellen_bintree::make_set_traits metafunction
- instead of \p Traits template argument.
- Template argument list \p Options of ellen_bintree::make_set_traits metafunction are:
- - ellen_bintree::key_extractor - key extracting functor, mandatory option. The functor has the following prototype:
- \code
- struct key_extractor {
- void operator ()( Key& dest, T const& src );
- };
- \endcode
- It should initialize \p dest key from \p src data. The functor is used to initialize internal nodes.
- - opt::compare - key compare functor. No default functor is provided.
- If the option is not specified, \p %opt::less is used.
- - opt::less - specifies binary predicate used for key compare. At least \p %opt::compare or \p %opt::less should be defined.
- - opt::item_counter - the type of item counting feature. Default is \ref atomicity::empty_item_counter that is no item counting.
- - opt::memory_model - C++ memory ordering model. Can be opt::v::relaxed_ordering (relaxed memory model, the default)
- or opt::v::sequential_consistent (sequentially consisnent memory model).
- - opt::allocator - the allocator used for \ref ellen_bintree::node "leaf nodes" which contains data.
- Default is \ref CDS_DEFAULT_ALLOCATOR.
- - opt::node_allocator - the allocator used for internal nodes. Default is \ref CDS_DEFAULT_ALLOCATOR.
- - ellen_bintree::update_desc_allocator - an allocator of \ref ellen_bintree::update_desc "update descriptors",
- default is \ref CDS_DEFAULT_ALLOCATOR.
- Note that update descriptor is helping data structure with short lifetime and it is good candidate for pooling.
- The number of simultaneously existing descriptors is a relatively small number limited the number of threads
- working with the tree and RCU buffer size.
- Therefore, a bounded lock-free container like \p cds::container::VyukovMPMCCycleQueue is good choice for the free-list
- of update descriptors, see cds::memory::vyukov_queue_pool free-list implementation.
- Also notice that size of update descriptor is not dependent on the type of data
- stored in the tree so single free-list object can be used for several EllenBinTree-based object.
- - opt::stat - internal statistics. Available types: ellen_bintree::stat, ellen_bintree::empty_stat (the default)
- - opt::rcu_check_deadlock - a deadlock checking policy. Default is opt::v::rcu_throw_deadlock
+ - \p Traits - set traits, default is \p ellen_bintree::traits.
+ It is possible to declare option-based tree with \p ellen_bintree::make_set_traits metafunction
+ instead of \p Traits template argument.
@note Before including <tt><cds/container/ellen_bintree_set_rcu.h></tt> you should include appropriate RCU header file,
see \ref cds_urcu_gc "RCU type" for list of existing RCU class and corresponding header files.
typename Key,
typename T,
#ifdef CDS_DOXYGEN_INVOKED
- class Traits = ellen_bintree::type_traits
+ class Traits = ellen_bintree::traits
#else
class Traits
#endif
//@endcond
public:
- typedef cds::urcu::gc<RCU> gc ; ///< RCU Garbage collector
- typedef Key key_type ; ///< type of a key stored in internal nodes; key is a part of \p value_type
- typedef T value_type ; ///< type of value stored in the binary tree
- typedef Traits options ; ///< Traits template parameter
+ typedef cds::urcu::gc<RCU> gc; ///< RCU Garbage collector
+ typedef Key key_type; ///< type of a key stored in internal nodes; key is a part of \p value_type
+ typedef T value_type; ///< type of value stored in the binary tree
+ typedef Traits traits; ///< Traits template parameter
# ifdef CDS_DOXYGEN_INVOKED
- typedef implementation_defined key_comparator ; ///< key compare functor based on opt::compare and opt::less option setter.
+ typedef implementation_defined key_comparator; ///< key compare functor based on \p Traits::compare and \p Traits::less
# else
- typedef typename maker::intrusive_type_traits::compare key_comparator;
+ typedef typename maker::intrusive_traits::compare key_comparator;
# endif
- typedef typename base_class::item_counter item_counter ; ///< Item counting policy used
- typedef typename base_class::memory_model memory_model ; ///< Memory ordering. See cds::opt::memory_model option
- typedef typename base_class::stat stat ; ///< internal statistics type
- typedef typename base_class::rcu_check_deadlock rcu_check_deadlock ; ///< Deadlock checking policy
- typedef typename options::key_extractor key_extractor ; ///< key extracting functor
+ typedef typename base_class::item_counter item_counter; ///< Item counting policy
+ typedef typename base_class::memory_model memory_model; ///< Memory ordering, see \p cds::opt::memory_model
+ typedef typename base_class::stat stat; ///< internal statistics type
+ typedef typename base_class::rcu_check_deadlock rcu_check_deadlock; ///< Deadlock checking policy
+ typedef typename traits::key_extractor key_extractor; ///< key extracting functor
- typedef typename options::allocator allocator_type ; ///< Allocator for leaf nodes
- typedef typename base_class::node_allocator node_allocator ; ///< Internal node allocator
- typedef typename base_class::update_desc_allocator update_desc_allocator ; ///< Update descriptor allocator
+ typedef typename traits::allocator allocator_type; ///< Allocator for leaf nodes
+ typedef typename base_class::node_allocator node_allocator; ///< Internal node allocator
+ typedef typename base_class::update_desc_allocator update_desc_allocator; ///< Update descriptor allocator
static CDS_CONSTEXPR const bool c_bExtractLockExternal = base_class::c_bExtractLockExternal; ///< Group of \p extract_xxx functions do not require external locking
typedef typename maker::cxx_leaf_node_allocator cxx_leaf_node_allocator;
typedef typename base_class::value_type leaf_node;
typedef typename base_class::internal_node internal_node;
- typedef std::unique_ptr< leaf_node, typename maker::intrusive_type_traits::disposer > scoped_node_ptr;
+ typedef std::unique_ptr< leaf_node, typename maker::intrusive_traits::disposer > scoped_node_ptr;
//@endcond
public:
- typedef typename gc::scoped_lock rcu_lock ; ///< RCU scoped lock
+ typedef typename gc::scoped_lock rcu_lock; ///< RCU scoped lock
/// pointer to extracted node
- typedef cds::urcu::exempt_ptr< gc, leaf_node, value_type, typename maker::intrusive_type_traits::disposer,
+ typedef cds::urcu::exempt_ptr< gc, leaf_node, value_type, typename maker::intrusive_traits::disposer,
cds::urcu::details::conventional_exempt_member_cast<leaf_node, value_type>
> exempt_ptr;
The object of \ref value_type should be constructible from a value of type \p Q.
In trivial case, \p Q is equal to \ref value_type.
- RCU \p synchronize method can be called. RCU should not be locked.
+ RCU \p synchronize() method can be called. RCU should not be locked.
Returns \p true if \p val is inserted into the set, \p false otherwise.
*/
\p val no any other changes could be made on this set's item by concurrent threads.
The user-defined functor is called only if the inserting is success.
- RCU \p synchronize method can be called. RCU should not be locked.
+ RCU \p synchronize() can be called. RCU should not be locked.
*/
template <typename Q, typename Func>
bool insert( Q const& val, Func f )
The functor may change non-key fields of the \p item; however, \p func must guarantee
that during changing no any other modifications could be made on this item by concurrent threads.
- RCU \p synchronize method can be called. RCU should not be locked.
+ RCU \p synchronize() can be called. RCU should not be locked.
Returns <tt> std::pair<bool, bool> </tt> 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.
+
+ @warning See \ref cds_intrusive_item_creating "insert item troubleshooting"
*/
template <typename Q, typename Func>
std::pair<bool, bool> ensure( const Q& val, Func func )
return bRes;
}
- /// Inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
+ /// Inserts data of type \p value_type created in-place from \p args
/**
Returns \p true if inserting successful, \p false otherwise.
cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >() );
}
- /// Find the key \p val
+ /// Find the key \p key
/**
@anchor cds_nonintrusive_EllenBinTreeSet_rcu_find_func
- The function searches the item with key equal to \p val and calls the functor \p f for item found.
+ The function searches the item with key equal to \p key and calls the functor \p f for item found.
The interface of \p Func functor is:
\code
struct functor {
- void operator()( value_type& item, Q& val );
+ void operator()( value_type& item, Q& key );
};
\endcode
- where \p item is the item found, \p val is the <tt>find</tt> function argument.
+ where \p item is the item found, \p key is the <tt>find</tt> function argument.
The functor may change non-key fields of \p item. Note that the functor is only guarantee
that \p item cannot be disposed during functor is executing.
The functor does not serialize simultaneous access to the set's \p item. If such access is
possible you must provide your own synchronization schema on item level to exclude unsafe item modifications.
- The \p val argument is non-const since it can be used as \p f functor destination i.e., the functor
+ The \p key argument is non-const since it can be used as \p f functor destination i.e., the functor
can modify both arguments.
Note the hash functor specified for class \p Traits template parameter
The function applies RCU lock internally.
- The function returns \p true if \p val is found, \p false otherwise.
+ The function returns \p true if \p key is found, \p false otherwise.
*/
template <typename Q, typename Func>
- bool find( Q& val, Func f ) const
+ bool find( Q& key, Func f ) const
+ {
+ return base_class::find( key, [&f]( leaf_node& node, Q& v ) { f( node.m_Value, v ); });
+ }
+ //@cond
+ template <typename Q, typename Func>
+ bool find( Q const& key, Func f ) const
{
- return base_class::find( val, [&f]( leaf_node& node, Q& v ) { f( node.m_Value, v ); });
+ return base_class::find( key, [&f]( leaf_node& node, Q const& v ) { f( node.m_Value, v ); } );
}
+ //@endcond
- /// Finds the key \p val using \p pred predicate for searching
+ /// Finds the key \p key using \p pred predicate for searching
/**
The function is an analog of \ref cds_nonintrusive_EllenBinTreeSet_rcu_find_func "find(Q&, Func)"
but \p pred is used for key comparing.
\p Less must imply the same element order as the comparator used for building the set.
*/
template <typename Q, typename Less, typename Func>
- bool find_with( Q& val, Less pred, Func f ) const
+ bool find_with( Q& key, Less pred, Func f ) const
{
- return base_class::find_with( val, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >(),
+ return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >(),
[&f]( leaf_node& node, Q& v ) { f( node.m_Value, v ); } );
}
-
- /// Find the key \p val
- /** @anchor cds_nonintrusive_EllenBinTreeSet_rcu_find_cfunc
-
- The function searches the item with key equal to \p val and calls the functor \p f for item found.
- The interface of \p Func functor is:
- \code
- struct functor {
- void operator()( value_type& item, Q const& val );
- };
- \endcode
- where \p item is the item found, \p val is the <tt>find</tt> function argument.
-
- The functor may change non-key fields of \p item. Note that the functor is only guarantee
- that \p item cannot be disposed during functor is executing.
- The functor does not serialize simultaneous access to the set's \p item. If such access is
- possible you must provide your own synchronization schema on item level to exclude unsafe item modifications.
-
- Note the hash functor specified for class \p Traits template parameter
- should accept a parameter of type \p Q that may be not the same as \p value_type.
-
- The function applies RCU lock internally.
-
- The function returns \p true if \p val is found, \p false otherwise.
- */
- template <typename Q, typename Func>
- bool find( Q const& val, Func f ) const
- {
- return base_class::find( val, [&f]( leaf_node& node, Q const& v ) { f( node.m_Value, v ); });
- }
-
- /// Finds the key \p val using \p pred predicate for searching
- /**
- The function is an analog of \ref cds_nonintrusive_EllenBinTreeSet_rcu_find_cfunc "find(Q const&, Func)"
- 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.
- */
+ //@cond
template <typename Q, typename Less, typename Func>
- bool find_with( Q const& val, Less pred, Func f ) const
+ bool find_with( Q const& key, Less pred, Func f ) const
{
- return base_class::find_with( val, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >(),
- [&f]( leaf_node& node, Q const& v ) { f( node.m_Value, v ); } );
+ return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >(),
+ [&f]( leaf_node& node, Q const& v ) { f( node.m_Value, v ); } );
}
+ //@endcond
- /// Find the key \p val
+ /// Find the key \p key
/** @anchor cds_nonintrusive_EllenBinTreeSet_rcu_find_val
- The function searches the item with key equal to \p val
+ 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
The function applies RCU lock internally.
*/
template <typename Q>
- bool find( Q const & val ) const
+ bool find( Q const& key ) const
{
- return base_class::find( val );
+ return base_class::find( key );
}
- /// Finds the key \p val using \p pred predicate for searching
+ /// Finds the key \p key using \p pred predicate for searching
/**
The function is an analog of \ref cds_nonintrusive_EllenBinTreeSet_rcu_find_val "find(Q const&)"
but \p pred is used for key comparing.
\p Less must imply the same element order as the comparator used for building the set.
*/
template <typename Q, typename Less>
- bool find_with( Q const& val, Less pred ) const
+ bool find_with( Q const& key, Less pred ) const
{
- return base_class::find_with( val, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >());
+ return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >());
}
/// Finds \p key and return the item found
Only leaf nodes containing user data are counted.
The value returned depends on item counter type provided by \p Traits template parameter.
- If it is atomicity::empty_item_counter this function always returns 0.
- Therefore, the function is not suitable for checking the tree emptiness, use \ref empty
+ If it is \p atomicity::empty_item_counter \p %size() always returns 0.
+ Therefore, the function is not suitable for checking the tree emptiness, use \p empty()
member function for this purpose.
*/
size_t size() const
{
return base_class::check_consistency();
}
-
};
-
}} // namespace cds::container
#endif // #ifndef __CDS_CONTAINER_ELLEN_BINTREE_SET_RCU_H
#ifndef __CDS_CONTAINER_IMPL_ELLEN_BINTREE_MAP_H
#define __CDS_CONTAINER_IMPL_ELLEN_BINTREE_MAP_H
-#include <traits>
+#include <type_traits>
#include <cds/container/details/ellen_bintree_base.h>
#include <cds/intrusive/impl/ellen_bintree.h>
#include <cds/container/details/guarded_ptr_cast.h>
# ifdef CDS_DOXYGEN_INVOKED
typedef implementation_defined key_comparator; ///< key compare functor based on \p Traits::compare and \p Traits::less
# else
- typedef typename maker::intrusive_type_traits::compare key_comparator;
+ typedef typename maker::intrusive_traits::compare key_comparator;
# endif
typedef typename base_class::item_counter item_counter; ///< Item counting policy
typedef typename base_class::memory_model memory_model; ///< Memory ordering, see \p cds::opt::memory_model
#ifndef __CDS_CONTAINER_IMPL_ELLEN_BINTREE_SET_H
#define __CDS_CONTAINER_IMPL_ELLEN_BINTREE_SET_H
-#include <traits>
+#include <type_traits>
#include <cds/container/details/ellen_bintree_base.h>
#include <cds/intrusive/impl/ellen_bintree.h>
#include <cds/container/details/guarded_ptr_cast.h>
# ifdef CDS_DOXYGEN_INVOKED
typedef implementation_defined key_comparator ; ///< key compare functor based on opt::compare and opt::less option setter.
# else
- typedef typename maker::intrusive_type_traits::compare key_comparator;
+ typedef typename maker::intrusive_traits::compare key_comparator;
# endif
typedef typename base_class::item_counter item_counter; ///< Item counting policy used
typedef typename base_class::memory_model memory_model; ///< Memory ordering. See cds::opt::memory_model option
}} // namespace skip_list::details
//@endcond
-
/// Lock-free skip-list map (template specialization for gc::nogc)
/** @ingroup cds_nonintrusive_map
\anchor cds_nonintrusive_SkipListMap_nogc
<ClInclude Include="..\..\..\cds\container\details\michael_set_base.h" />\r
<ClInclude Include="..\..\..\cds\container\details\skip_list_base.h" />\r
<ClInclude Include="..\..\..\cds\container\details\split_list_base.h" />\r
+ <ClInclude Include="..\..\..\cds\container\ellen_bintree_map_dhp.h" />\r
<ClInclude Include="..\..\..\cds\container\ellen_bintree_map_hp.h" />\r
- <ClInclude Include="..\..\..\cds\container\ellen_bintree_map_ptb.h" />\r
<ClInclude Include="..\..\..\cds\container\ellen_bintree_map_rcu.h" />\r
+ <ClInclude Include="..\..\..\cds\container\ellen_bintree_set_dhp.h" />\r
<ClInclude Include="..\..\..\cds\container\ellen_bintree_set_hp.h" />\r
- <ClInclude Include="..\..\..\cds\container\ellen_bintree_set_ptb.h" />\r
<ClInclude Include="..\..\..\cds\container\ellen_bintree_set_rcu.h" />\r
<ClInclude Include="..\..\..\cds\container\impl\ellen_bintree_map.h" />\r
<ClInclude Include="..\..\..\cds\container\impl\ellen_bintree_set.h" />\r
<ClInclude Include="..\..\..\cds\container\ellen_bintree_map_hp.h">\r
<Filter>Header Files\cds\container</Filter>\r
</ClInclude>\r
- <ClInclude Include="..\..\..\cds\container\ellen_bintree_map_ptb.h">\r
- <Filter>Header Files\cds\container</Filter>\r
- </ClInclude>\r
<ClInclude Include="..\..\..\cds\container\ellen_bintree_set_hp.h">\r
<Filter>Header Files\cds\container</Filter>\r
</ClInclude>\r
- <ClInclude Include="..\..\..\cds\container\ellen_bintree_set_ptb.h">\r
- <Filter>Header Files\cds\container</Filter>\r
- </ClInclude>\r
<ClInclude Include="..\..\..\cds\intrusive\mspriority_queue.h">\r
<Filter>Header Files\cds\intrusive</Filter>\r
</ClInclude>\r
<ClInclude Include="..\..\..\cds\intrusive\ellen_bintree_dhp.h">\r
<Filter>Header Files\cds\intrusive</Filter>\r
</ClInclude>\r
+ <ClInclude Include="..\..\..\cds\container\ellen_bintree_map_dhp.h">\r
+ <Filter>Header Files\cds\container</Filter>\r
+ </ClInclude>\r
+ <ClInclude Include="..\..\..\cds\container\ellen_bintree_set_dhp.h">\r
+ <Filter>Header Files\cds\container</Filter>\r
+ </ClInclude>\r
</ItemGroup>\r
</Project>
\ No newline at end of file
<ClInclude Include="..\..\..\tests\test-hdr\tree\hdr_intrusive_ellen_bintree_pool_rcu.h" />\r
</ItemGroup>\r
<ItemGroup>\r
+ <ClCompile Include="..\..\..\tests\test-hdr\tree\hdr_ellenbintree_map_dhp.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\tree\hdr_ellenbintree_map_hp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\tree\hdr_ellenbintree_map_ptb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\tree\hdr_ellenbintree_map_rcu_gpb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\tree\hdr_ellenbintree_map_rcu_gpi.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\tree\hdr_ellenbintree_map_rcu_gpt.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\tree\hdr_ellenbintree_map_rcu_shb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\tree\hdr_ellenbintree_map_rcu_sht.cpp" />\r
+ <ClCompile Include="..\..\..\tests\test-hdr\tree\hdr_ellenbintree_set_dhp.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\tree\hdr_ellenbintree_set_hp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\tree\hdr_ellenbintree_set_ptb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\tree\hdr_ellenbintree_set_rcu_gpb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\tree\hdr_ellenbintree_set_rcu_gpi.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\tree\hdr_ellenbintree_set_rcu_gpt.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\tree\hdr_ellenbintree_map_hp.cpp">\r
<Filter>container</Filter>\r
</ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\tree\hdr_ellenbintree_map_ptb.cpp">\r
- <Filter>container</Filter>\r
- </ClCompile>\r
<ClCompile Include="..\..\..\tests\test-hdr\tree\hdr_ellenbintree_set_hp.cpp">\r
<Filter>container</Filter>\r
</ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\tree\hdr_ellenbintree_set_ptb.cpp">\r
- <Filter>container</Filter>\r
- </ClCompile>\r
<ClCompile Include="..\..\..\tests\test-hdr\tree\hdr_intrusive_ellen_bintree_dhp.cpp">\r
<Filter>intrusive</Filter>\r
</ClCompile>\r
<ClCompile Include="..\..\..\tests\test-hdr\tree\hdr_intrusive_ellen_bintree_dhp_member.cpp">\r
<Filter>intrusive</Filter>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\tests\test-hdr\tree\hdr_ellenbintree_map_dhp.cpp">\r
+ <Filter>container</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\tests\test-hdr\tree\hdr_ellenbintree_set_dhp.cpp">\r
+ <Filter>container</Filter>\r
+ </ClCompile>\r
</ItemGroup>\r
</Project>
\ No newline at end of file
</ProjectConfiguration>\r
</ItemGroup>\r
<ItemGroup>\r
- <ClCompile Include="..\..\..\tests\unit\map2\map_delodd.cpp" />\r
<ClCompile Include="..\..\..\tests\unit\map2\map_insdel_func.cpp" />\r
<ClCompile Include="..\..\..\tests\unit\map2\map_insdel_int.cpp" />\r
<ClCompile Include="..\..\..\tests\unit\map2\map_insdel_item_int.cpp" />\r
void EllenBinTree_hp_less_pool();
void EllenBinTree_hp_less_pool_ic_stat();
- void EllenBinTree_ptb_less();
- void EllenBinTree_ptb_cmp();
- void EllenBinTree_ptb_cmpless();
- void EllenBinTree_ptb_less_ic();
- void EllenBinTree_ptb_cmp_ic();
- void EllenBinTree_ptb_less_stat();
- void EllenBinTree_ptb_cmp_ic_stat();
- void EllenBinTree_ptb_less_pool();
- void EllenBinTree_ptb_less_pool_ic_stat();
+ void EllenBinTree_dhp_less();
+ void EllenBinTree_dhp_cmp();
+ void EllenBinTree_dhp_cmpless();
+ void EllenBinTree_dhp_less_ic();
+ void EllenBinTree_dhp_cmp_ic();
+ void EllenBinTree_dhp_less_stat();
+ void EllenBinTree_dhp_cmp_ic_stat();
+ void EllenBinTree_dhp_less_pool();
+ void EllenBinTree_dhp_less_pool_ic_stat();
void EllenBinTree_rcu_gpb_less();
void EllenBinTree_rcu_gpb_cmp();
CPPUNIT_TEST(EllenBinTree_hp_less_pool)
CPPUNIT_TEST(EllenBinTree_hp_less_pool_ic_stat)
- CPPUNIT_TEST(EllenBinTree_ptb_less)
- CPPUNIT_TEST(EllenBinTree_ptb_cmp)
- CPPUNIT_TEST(EllenBinTree_ptb_less_stat)
- CPPUNIT_TEST(EllenBinTree_ptb_cmpless)
- CPPUNIT_TEST(EllenBinTree_ptb_less_ic)
- CPPUNIT_TEST(EllenBinTree_ptb_cmp_ic)
- CPPUNIT_TEST(EllenBinTree_ptb_cmp_ic_stat)
- CPPUNIT_TEST(EllenBinTree_ptb_less_pool)
- CPPUNIT_TEST(EllenBinTree_ptb_less_pool_ic_stat)
+ CPPUNIT_TEST(EllenBinTree_dhp_less)
+ CPPUNIT_TEST(EllenBinTree_dhp_cmp)
+ CPPUNIT_TEST(EllenBinTree_dhp_less_stat)
+ CPPUNIT_TEST(EllenBinTree_dhp_cmpless)
+ CPPUNIT_TEST(EllenBinTree_dhp_less_ic)
+ CPPUNIT_TEST(EllenBinTree_dhp_cmp_ic)
+ CPPUNIT_TEST(EllenBinTree_dhp_cmp_ic_stat)
+ CPPUNIT_TEST(EllenBinTree_dhp_less_pool)
+ CPPUNIT_TEST(EllenBinTree_dhp_less_pool_ic_stat)
CPPUNIT_TEST(EllenBinTree_rcu_gpi_less)
CPPUNIT_TEST(EllenBinTree_rcu_gpi_cmp)
--- /dev/null
+//$$CDS-header$$
+
+#include "tree/hdr_ellenbintree_map.h"
+#include <cds/container/ellen_bintree_map_dhp.h>
+
+#include "tree/hdr_intrusive_ellen_bintree_pool_dhp.h"
+#include "unit/print_ellenbintree_stat.h"
+
+namespace tree {
+ namespace cc = cds::container;
+ namespace co = cds::opt;
+ namespace {
+ typedef cds::gc::DHP gc_type;
+
+ typedef cc::ellen_bintree::map_node<gc_type, EllenBinTreeMapHdrTest::key_type, EllenBinTreeMapHdrTest::value_type> tree_leaf_node;
+ typedef cc::ellen_bintree::internal_node< EllenBinTreeMapHdrTest::key_type, tree_leaf_node > tree_internal_node;
+ typedef cc::ellen_bintree::update_desc<tree_leaf_node, tree_internal_node> tree_update_desc;
+
+ struct print_stat {
+ template <typename Tree>
+ void operator()( Tree const& t)
+ {
+ std::cout << t.statistics();
+ }
+ };
+
+ }
+
+ void EllenBinTreeMapHdrTest::EllenBinTree_dhp_less()
+ {
+ struct map_traits : public cc::ellen_bintree::traits
+ {
+ typedef EllenBinTreeMapHdrTest::less less;
+ };
+ typedef cc::EllenBinTreeMap< gc_type, key_type, value_type, map_traits > set_type;
+
+ test<set_type, print_stat>();
+ }
+
+ void EllenBinTreeMapHdrTest::EllenBinTree_dhp_cmp()
+ {
+ typedef cc::EllenBinTreeMap< gc_type, key_type, value_type,
+ cc::ellen_bintree::make_map_traits<
+ co::compare< compare >
+ >::type
+ > set_type;
+
+ test<set_type, print_stat>();
+ }
+
+ void EllenBinTreeMapHdrTest::EllenBinTree_dhp_cmpless()
+ {
+ typedef cc::EllenBinTreeMap< gc_type, key_type, value_type,
+ cc::ellen_bintree::make_map_traits<
+ co::compare< compare >
+ ,co::less< less >
+ >::type
+ > set_type;
+
+ test<set_type, print_stat>();
+ }
+
+ void EllenBinTreeMapHdrTest::EllenBinTree_dhp_less_ic()
+ {
+ typedef cc::EllenBinTreeMap< gc_type, key_type, value_type,
+ cc::ellen_bintree::make_map_traits<
+ co::less< less >
+ ,co::item_counter< cds::atomicity::item_counter >
+ >::type
+ > set_type;
+
+ test<set_type, print_stat>();
+ }
+
+ void EllenBinTreeMapHdrTest::EllenBinTree_dhp_cmp_ic()
+ {
+ typedef cc::EllenBinTreeMap< gc_type, key_type, value_type,
+ cc::ellen_bintree::make_map_traits<
+ co::item_counter< cds::atomicity::item_counter >
+ ,co::compare< compare >
+ >::type
+ > set_type;
+
+ test<set_type, print_stat>();
+ }
+
+ void EllenBinTreeMapHdrTest::EllenBinTree_dhp_less_stat()
+ {
+ typedef cc::EllenBinTreeMap< gc_type, key_type, value_type,
+ cc::ellen_bintree::make_map_traits<
+ co::less< less >
+ ,co::stat< cc::ellen_bintree::stat<> >
+ >::type
+ > set_type;
+
+ test<set_type, print_stat>();
+ }
+
+ void EllenBinTreeMapHdrTest::EllenBinTree_dhp_cmp_ic_stat()
+ {
+ typedef cc::EllenBinTreeMap< gc_type, key_type, value_type,
+ cc::ellen_bintree::make_map_traits<
+ co::item_counter< cds::atomicity::item_counter >
+ ,co::stat< cc::ellen_bintree::stat<> >
+ ,co::compare< compare >
+ >::type
+ > set_type;
+
+ test<set_type, print_stat>();
+ }
+
+ void EllenBinTreeMapHdrTest::EllenBinTree_dhp_less_pool()
+ {
+ typedef cc::EllenBinTreeMap< gc_type, key_type, value_type,
+ cc::ellen_bintree::make_map_traits<
+ co::less< less >
+ ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_dhp::internal_node_pool_accessor > >
+ ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_dhp::update_desc_pool_accessor > >
+ >::type
+ > set_type;
+
+ test<set_type, print_stat>();
+ }
+
+ void EllenBinTreeMapHdrTest::EllenBinTree_dhp_less_pool_ic_stat()
+ {
+ typedef cc::EllenBinTreeMap< gc_type, key_type, value_type,
+ cc::ellen_bintree::make_map_traits<
+ co::less< less >
+ ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_dhp::internal_node_pool_accessor > >
+ ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_dhp::update_desc_pool_accessor > >
+ ,co::item_counter< cds::atomicity::item_counter >
+ ,co::stat< cc::ellen_bintree::stat<> >
+ >::type
+ > set_type;
+
+ test<set_type, print_stat>();
+ }
+
+} // namespace tree
namespace {
typedef cds::gc::HP gc_type;
- typedef cc::ellen_bintree::map_node<gc_type, EllenBinTreeMapHdrTest::key_type, EllenBinTreeMapHdrTest::value_type> tree_leaf_node;
+ typedef cc::ellen_bintree::map_node<gc_type, EllenBinTreeMapHdrTest::key_type, EllenBinTreeMapHdrTest::value_type> tree_leaf_node;
typedef cc::ellen_bintree::internal_node< EllenBinTreeMapHdrTest::key_type, tree_leaf_node > tree_internal_node;
typedef cc::ellen_bintree::update_desc<tree_leaf_node, tree_internal_node> tree_update_desc;
void EllenBinTreeMapHdrTest::EllenBinTree_hp_less()
{
- typedef cc::EllenBinTreeMap< gc_type, key_type, value_type,
- cc::ellen_bintree::make_map_traits<
- co::less< less >
- >::type
- > set_type;
+ struct set_traits : public cc::ellen_bintree::traits
+ {
+ typedef EllenBinTreeMapHdrTest::less less;
+ };
+ typedef cc::EllenBinTreeMap< gc_type, key_type, value_type, set_traits > set_type;
test<set_type, print_stat>();
}
+++ /dev/null
-//$$CDS-header$$
-
-#include "tree/hdr_ellenbintree_map.h"
-#include <cds/container/ellen_bintree_map_ptb.h>
-
-#include "tree/hdr_intrusive_ellen_bintree_pool_dhp.h"
-#include "unit/print_ellenbintree_stat.h"
-
-namespace tree {
- namespace cc = cds::container;
- namespace co = cds::opt;
- namespace {
- typedef cds::gc::PTB gc_type;
-
- typedef cc::ellen_bintree::map_node<gc_type, EllenBinTreeMapHdrTest::key_type, EllenBinTreeMapHdrTest::value_type> tree_leaf_node;
- typedef cc::ellen_bintree::internal_node< EllenBinTreeMapHdrTest::key_type, tree_leaf_node > tree_internal_node;
- typedef cc::ellen_bintree::update_desc<tree_leaf_node, tree_internal_node> tree_update_desc;
-
- struct print_stat {
- template <typename Tree>
- void operator()( Tree const& t)
- {
- std::cout << t.statistics();
- }
- };
-
- }
-
- void EllenBinTreeMapHdrTest::EllenBinTree_ptb_less()
- {
- typedef cc::EllenBinTreeMap< gc_type, key_type, value_type,
- cc::ellen_bintree::make_map_traits<
- co::less< less >
- >::type
- > set_type;
-
- test<set_type, print_stat>();
- }
-
- void EllenBinTreeMapHdrTest::EllenBinTree_ptb_cmp()
- {
- typedef cc::EllenBinTreeMap< gc_type, key_type, value_type,
- cc::ellen_bintree::make_map_traits<
- co::compare< compare >
- >::type
- > set_type;
-
- test<set_type, print_stat>();
- }
-
- void EllenBinTreeMapHdrTest::EllenBinTree_ptb_cmpless()
- {
- typedef cc::EllenBinTreeMap< gc_type, key_type, value_type,
- cc::ellen_bintree::make_map_traits<
- co::compare< compare >
- ,co::less< less >
- >::type
- > set_type;
-
- test<set_type, print_stat>();
- }
-
- void EllenBinTreeMapHdrTest::EllenBinTree_ptb_less_ic()
- {
- typedef cc::EllenBinTreeMap< gc_type, key_type, value_type,
- cc::ellen_bintree::make_map_traits<
- co::less< less >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test<set_type, print_stat>();
- }
-
- void EllenBinTreeMapHdrTest::EllenBinTree_ptb_cmp_ic()
- {
- typedef cc::EllenBinTreeMap< gc_type, key_type, value_type,
- cc::ellen_bintree::make_map_traits<
- co::item_counter< cds::atomicity::item_counter >
- ,co::compare< compare >
- >::type
- > set_type;
-
- test<set_type, print_stat>();
- }
-
- void EllenBinTreeMapHdrTest::EllenBinTree_ptb_less_stat()
- {
- typedef cc::EllenBinTreeMap< gc_type, key_type, value_type,
- cc::ellen_bintree::make_map_traits<
- co::less< less >
- ,co::stat< cc::ellen_bintree::stat<> >
- >::type
- > set_type;
-
- test<set_type, print_stat>();
- }
-
- void EllenBinTreeMapHdrTest::EllenBinTree_ptb_cmp_ic_stat()
- {
- typedef cc::EllenBinTreeMap< gc_type, key_type, value_type,
- cc::ellen_bintree::make_map_traits<
- co::item_counter< cds::atomicity::item_counter >
- ,co::stat< cc::ellen_bintree::stat<> >
- ,co::compare< compare >
- >::type
- > set_type;
-
- test<set_type, print_stat>();
- }
-
- void EllenBinTreeMapHdrTest::EllenBinTree_ptb_less_pool()
- {
- typedef cc::EllenBinTreeMap< gc_type, key_type, value_type,
- cc::ellen_bintree::make_map_traits<
- co::less< less >
- ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_dhp::internal_node_pool_accessor > >
- ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_dhp::update_desc_pool_accessor > >
- >::type
- > set_type;
-
- test<set_type, print_stat>();
- }
-
- void EllenBinTreeMapHdrTest::EllenBinTree_ptb_less_pool_ic_stat()
- {
- typedef cc::EllenBinTreeMap< gc_type, key_type, value_type,
- cc::ellen_bintree::make_map_traits<
- co::less< less >
- ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_dhp::internal_node_pool_accessor > >
- ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_dhp::update_desc_pool_accessor > >
- ,co::item_counter< cds::atomicity::item_counter >
- ,co::stat< cc::ellen_bintree::stat<> >
- >::type
- > set_type;
-
- test<set_type, print_stat>();
- }
-
-} // namespace tree
cc::ellen_bintree::make_map_traits<
co::less< less >
>::type
- > set_type;
+ > map_type;
- test_rcu<set_type, print_stat>();
+ test_rcu<map_type, print_stat>();
}
void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpb_cmp()
cc::ellen_bintree::make_map_traits<
co::compare< compare >
>::type
- > set_type;
+ > map_type;
- test_rcu<set_type, print_stat>();
+ test_rcu<map_type, print_stat>();
}
void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpb_cmpless()
co::compare< compare >
,co::less< less >
>::type
- > set_type;
+ > map_type;
- test_rcu<set_type, print_stat>();
+ test_rcu<map_type, print_stat>();
}
void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpb_less_ic()
co::less< less >
,co::item_counter< cds::atomicity::item_counter >
>::type
- > set_type;
+ > map_type;
- test_rcu<set_type, print_stat>();
+ test_rcu<map_type, print_stat>();
}
void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpb_cmp_ic()
{
- typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type,
- cc::ellen_bintree::make_map_traits<
- co::item_counter< cds::atomicity::item_counter >
- ,co::compare< compare >
- >::type
- > set_type;
+ struct map_traits : public cc::ellen_bintree::traits {
+ typedef cds::atomicity::item_counter item_counter;
+ typedef EllenBinTreeMapHdrTest::compare compare;
+ };
+ typedef cc::EllenBinTreeMap< rcu_type, key_type, value_type, map_traits > map_type;
- test_rcu<set_type, print_stat>();
+ test_rcu<map_type, print_stat>();
}
void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpb_less_stat()
co::less< less >
,co::stat< cc::ellen_bintree::stat<> >
>::type
- > set_type;
+ > map_type;
- test_rcu<set_type, print_stat>();
+ test_rcu<map_type, print_stat>();
}
void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpb_cmp_ic_stat()
,co::stat< cc::ellen_bintree::stat<> >
,co::compare< compare >
>::type
- > set_type;
+ > map_type;
- test_rcu<set_type, print_stat>();
+ test_rcu<map_type, print_stat>();
}
void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpb_less_pool()
,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_rcu::internal_node_pool_accessor > >
,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_rcu::update_desc_pool_accessor > >
>::type
- > set_type;
+ > map_type;
- test_rcu<set_type, print_stat>();
+ test_rcu<map_type, print_stat>();
}
void EllenBinTreeMapHdrTest::EllenBinTree_rcu_gpb_less_pool_ic_stat()
,co::item_counter< cds::atomicity::item_counter >
,co::stat< cc::ellen_bintree::stat<> >
>::type
- > set_type;
+ > map_type;
- test_rcu<set_type, print_stat>();
+ test_rcu<map_type, print_stat>();
}
} // namespace tree
void EllenBinTree_hp_less_pool();
void EllenBinTree_hp_less_pool_ic_stat();
- void EllenBinTree_ptb_less();
- void EllenBinTree_ptb_cmp();
- void EllenBinTree_ptb_cmpless();
- void EllenBinTree_ptb_less_ic();
- void EllenBinTree_ptb_cmp_ic();
- void EllenBinTree_ptb_less_stat();
- void EllenBinTree_ptb_cmp_ic_stat();
- void EllenBinTree_ptb_less_pool();
- void EllenBinTree_ptb_less_pool_ic_stat();
+ void EllenBinTree_dhp_less();
+ void EllenBinTree_dhp_cmp();
+ void EllenBinTree_dhp_cmpless();
+ void EllenBinTree_dhp_less_ic();
+ void EllenBinTree_dhp_cmp_ic();
+ void EllenBinTree_dhp_less_stat();
+ void EllenBinTree_dhp_cmp_ic_stat();
+ void EllenBinTree_dhp_less_pool();
+ void EllenBinTree_dhp_less_pool_ic_stat();
void EllenBinTree_rcu_gpi_less();
void EllenBinTree_rcu_gpi_cmp();
CPPUNIT_TEST(EllenBinTree_hp_less_pool)
CPPUNIT_TEST(EllenBinTree_hp_less_pool_ic_stat)
- CPPUNIT_TEST(EllenBinTree_ptb_less)
- CPPUNIT_TEST(EllenBinTree_ptb_cmp)
- CPPUNIT_TEST(EllenBinTree_ptb_less_stat)
- CPPUNIT_TEST(EllenBinTree_ptb_cmpless)
- CPPUNIT_TEST(EllenBinTree_ptb_less_ic)
- CPPUNIT_TEST(EllenBinTree_ptb_cmp_ic)
- CPPUNIT_TEST(EllenBinTree_ptb_cmp_ic_stat)
- CPPUNIT_TEST(EllenBinTree_ptb_less_pool)
- CPPUNIT_TEST(EllenBinTree_ptb_less_pool_ic_stat)
+ CPPUNIT_TEST(EllenBinTree_dhp_less)
+ CPPUNIT_TEST(EllenBinTree_dhp_cmp)
+ CPPUNIT_TEST(EllenBinTree_dhp_less_stat)
+ CPPUNIT_TEST(EllenBinTree_dhp_cmpless)
+ CPPUNIT_TEST(EllenBinTree_dhp_less_ic)
+ CPPUNIT_TEST(EllenBinTree_dhp_cmp_ic)
+ CPPUNIT_TEST(EllenBinTree_dhp_cmp_ic_stat)
+ CPPUNIT_TEST(EllenBinTree_dhp_less_pool)
+ CPPUNIT_TEST(EllenBinTree_dhp_less_pool_ic_stat)
CPPUNIT_TEST(EllenBinTree_rcu_gpi_less)
CPPUNIT_TEST(EllenBinTree_rcu_gpi_cmp)
--- /dev/null
+//$$CDS-header$$
+
+#include "tree/hdr_ellenbintree_set.h"
+#include <cds/container/ellen_bintree_set_dhp.h>
+
+#include "tree/hdr_intrusive_ellen_bintree_pool_dhp.h"
+#include "unit/print_ellenbintree_stat.h"
+
+namespace tree {
+ namespace cc = cds::container;
+ namespace co = cds::opt;
+ namespace {
+ typedef cds::gc::DHP gc_type;
+
+ typedef cc::ellen_bintree::node<gc_type, EllenBinTreeSetHdrTest::value_type> tree_leaf_node;
+ typedef cc::ellen_bintree::internal_node< EllenBinTreeSetHdrTest::key_type, tree_leaf_node > tree_internal_node;
+ typedef cc::ellen_bintree::update_desc<tree_leaf_node, tree_internal_node> tree_update_desc;
+
+ struct print_stat {
+ template <typename Tree>
+ void operator()( Tree const& t)
+ {
+ std::cout << t.statistics();
+ }
+ };
+
+ }
+
+ void EllenBinTreeSetHdrTest::EllenBinTree_dhp_less()
+ {
+ struct set_traits: public cc::ellen_bintree::traits{
+ typedef EllenBinTreeSetHdrTest::key_extractor key_extractor;
+ typedef EllenBinTreeSetHdrTest::less less;
+ };
+ typedef cc::EllenBinTreeSet< gc_type, key_type, value_type, set_traits > set_type;
+
+ test<set_type, print_stat>();
+ }
+
+ void EllenBinTreeSetHdrTest::EllenBinTree_dhp_cmp()
+ {
+ typedef cc::EllenBinTreeSet< gc_type, key_type, value_type,
+ cc::ellen_bintree::make_set_traits<
+ cc::ellen_bintree::key_extractor< key_extractor >
+ ,co::compare< compare >
+ >::type
+ > set_type;
+
+ test<set_type, print_stat>();
+ }
+
+ void EllenBinTreeSetHdrTest::EllenBinTree_dhp_cmpless()
+ {
+ typedef cc::EllenBinTreeSet< gc_type, key_type, value_type,
+ cc::ellen_bintree::make_set_traits<
+ cc::ellen_bintree::key_extractor< key_extractor >
+ ,co::compare< compare >
+ ,co::less< less >
+ >::type
+ > set_type;
+
+ test<set_type, print_stat>();
+ }
+
+ void EllenBinTreeSetHdrTest::EllenBinTree_dhp_less_ic()
+ {
+ typedef cc::EllenBinTreeSet< gc_type, key_type, value_type,
+ cc::ellen_bintree::make_set_traits<
+ cc::ellen_bintree::key_extractor< key_extractor >
+ ,co::less< less >
+ ,co::item_counter< cds::atomicity::item_counter >
+ >::type
+ > set_type;
+
+ test<set_type, print_stat>();
+ }
+
+ void EllenBinTreeSetHdrTest::EllenBinTree_dhp_cmp_ic()
+ {
+ typedef cc::EllenBinTreeSet< gc_type, key_type, value_type,
+ cc::ellen_bintree::make_set_traits<
+ cc::ellen_bintree::key_extractor< key_extractor >
+ ,co::item_counter< cds::atomicity::item_counter >
+ ,co::compare< compare >
+ >::type
+ > set_type;
+
+ test<set_type, print_stat>();
+ }
+
+ void EllenBinTreeSetHdrTest::EllenBinTree_dhp_less_stat()
+ {
+ typedef cc::EllenBinTreeSet< gc_type, key_type, value_type,
+ cc::ellen_bintree::make_set_traits<
+ cc::ellen_bintree::key_extractor< key_extractor >
+ ,co::less< less >
+ ,co::stat< cc::ellen_bintree::stat<> >
+ >::type
+ > set_type;
+
+ test<set_type, print_stat>();
+ }
+
+ void EllenBinTreeSetHdrTest::EllenBinTree_dhp_cmp_ic_stat()
+ {
+ typedef cc::EllenBinTreeSet< gc_type, key_type, value_type,
+ cc::ellen_bintree::make_set_traits<
+ cc::ellen_bintree::key_extractor< key_extractor >
+ ,co::item_counter< cds::atomicity::item_counter >
+ ,co::stat< cc::ellen_bintree::stat<> >
+ ,co::compare< compare >
+ >::type
+ > set_type;
+
+ test<set_type, print_stat>();
+ }
+
+ void EllenBinTreeSetHdrTest::EllenBinTree_dhp_less_pool()
+ {
+ typedef cc::EllenBinTreeSet< gc_type, key_type, value_type,
+ cc::ellen_bintree::make_set_traits<
+ cc::ellen_bintree::key_extractor< key_extractor >
+ ,co::less< less >
+ ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_dhp::internal_node_pool_accessor > >
+ ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_dhp::update_desc_pool_accessor > >
+ >::type
+ > set_type;
+
+ test<set_type, print_stat>();
+ }
+
+ void EllenBinTreeSetHdrTest::EllenBinTree_dhp_less_pool_ic_stat()
+ {
+ typedef cc::EllenBinTreeSet< gc_type, key_type, value_type,
+ cc::ellen_bintree::make_set_traits<
+ cc::ellen_bintree::key_extractor< key_extractor >
+ ,co::less< less >
+ ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_dhp::internal_node_pool_accessor > >
+ ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_dhp::update_desc_pool_accessor > >
+ ,co::item_counter< cds::atomicity::item_counter >
+ ,co::stat< cc::ellen_bintree::stat<> >
+ >::type
+ > set_type;
+
+ test<set_type, print_stat>();
+ }
+
+} // namespace tree
std::cout << t.statistics();
}
};
-
}
void EllenBinTreeSetHdrTest::EllenBinTree_hp_less()
{
- typedef cc::EllenBinTreeSet< gc_type, key_type, value_type,
- cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< key_extractor >
- ,co::less< less >
- >::type
- > set_type;
+ struct set_traits : public cc::ellen_bintree::traits{
+ typedef EllenBinTreeSetHdrTest::key_extractor key_extractor;
+ typedef EllenBinTreeSetHdrTest::less less;
+ };
+ typedef cc::EllenBinTreeSet< gc_type, key_type, value_type, set_traits > set_type;
test<set_type, print_stat>();
}
+++ /dev/null
-//$$CDS-header$$
-
-#include "tree/hdr_ellenbintree_set.h"
-#include <cds/container/ellen_bintree_set_ptb.h>
-
-#include "tree/hdr_intrusive_ellen_bintree_pool_dhp.h"
-#include "unit/print_ellenbintree_stat.h"
-
-namespace tree {
- namespace cc = cds::container;
- namespace co = cds::opt;
- namespace {
- typedef cds::gc::PTB gc_type;
-
- typedef cc::ellen_bintree::node<gc_type, EllenBinTreeSetHdrTest::value_type> tree_leaf_node;
- typedef cc::ellen_bintree::internal_node< EllenBinTreeSetHdrTest::key_type, tree_leaf_node > tree_internal_node;
- typedef cc::ellen_bintree::update_desc<tree_leaf_node, tree_internal_node> tree_update_desc;
-
- struct print_stat {
- template <typename Tree>
- void operator()( Tree const& t)
- {
- std::cout << t.statistics();
- }
- };
-
- }
-
- void EllenBinTreeSetHdrTest::EllenBinTree_ptb_less()
- {
- typedef cc::EllenBinTreeSet< gc_type, key_type, value_type,
- cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< key_extractor >
- ,co::less< less >
- >::type
- > set_type;
-
- test<set_type, print_stat>();
- }
-
- void EllenBinTreeSetHdrTest::EllenBinTree_ptb_cmp()
- {
- typedef cc::EllenBinTreeSet< gc_type, key_type, value_type,
- cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< key_extractor >
- ,co::compare< compare >
- >::type
- > set_type;
-
- test<set_type, print_stat>();
- }
-
- void EllenBinTreeSetHdrTest::EllenBinTree_ptb_cmpless()
- {
- typedef cc::EllenBinTreeSet< gc_type, key_type, value_type,
- cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< key_extractor >
- ,co::compare< compare >
- ,co::less< less >
- >::type
- > set_type;
-
- test<set_type, print_stat>();
- }
-
- void EllenBinTreeSetHdrTest::EllenBinTree_ptb_less_ic()
- {
- typedef cc::EllenBinTreeSet< gc_type, key_type, value_type,
- cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< key_extractor >
- ,co::less< less >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test<set_type, print_stat>();
- }
-
- void EllenBinTreeSetHdrTest::EllenBinTree_ptb_cmp_ic()
- {
- typedef cc::EllenBinTreeSet< gc_type, key_type, value_type,
- cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< key_extractor >
- ,co::item_counter< cds::atomicity::item_counter >
- ,co::compare< compare >
- >::type
- > set_type;
-
- test<set_type, print_stat>();
- }
-
- void EllenBinTreeSetHdrTest::EllenBinTree_ptb_less_stat()
- {
- typedef cc::EllenBinTreeSet< gc_type, key_type, value_type,
- cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< key_extractor >
- ,co::less< less >
- ,co::stat< cc::ellen_bintree::stat<> >
- >::type
- > set_type;
-
- test<set_type, print_stat>();
- }
-
- void EllenBinTreeSetHdrTest::EllenBinTree_ptb_cmp_ic_stat()
- {
- typedef cc::EllenBinTreeSet< gc_type, key_type, value_type,
- cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< key_extractor >
- ,co::item_counter< cds::atomicity::item_counter >
- ,co::stat< cc::ellen_bintree::stat<> >
- ,co::compare< compare >
- >::type
- > set_type;
-
- test<set_type, print_stat>();
- }
-
- void EllenBinTreeSetHdrTest::EllenBinTree_ptb_less_pool()
- {
- typedef cc::EllenBinTreeSet< gc_type, key_type, value_type,
- cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< key_extractor >
- ,co::less< less >
- ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_dhp::internal_node_pool_accessor > >
- ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_dhp::update_desc_pool_accessor > >
- >::type
- > set_type;
-
- test<set_type, print_stat>();
- }
-
- void EllenBinTreeSetHdrTest::EllenBinTree_ptb_less_pool_ic_stat()
- {
- typedef cc::EllenBinTreeSet< gc_type, key_type, value_type,
- cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< key_extractor >
- ,co::less< less >
- ,co::node_allocator< cds::memory::pool_allocator< tree_internal_node, ellen_bintree_dhp::internal_node_pool_accessor > >
- ,cc::ellen_bintree::update_desc_allocator< cds::memory::pool_allocator< tree_update_desc, ellen_bintree_dhp::update_desc_pool_accessor > >
- ,co::item_counter< cds::atomicity::item_counter >
- ,co::stat< cc::ellen_bintree::stat<> >
- >::type
- > set_type;
-
- test<set_type, print_stat>();
- }
-
-} // namespace tree
std::cout << t.statistics();
}
};
-
}
void EllenBinTreeSetHdrTest::EllenBinTree_rcu_gpb_less()
{
- typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type,
- cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< key_extractor >
- ,co::less< less >
- >::type
- > set_type;
+ struct set_traits : public cc::ellen_bintree::traits{
+ typedef EllenBinTreeSetHdrTest::key_extractor key_extractor;
+ typedef EllenBinTreeSetHdrTest::less less;
+ };
+ typedef cc::EllenBinTreeSet< rcu_type, key_type, value_type, set_traits > set_type;
test_rcu<set_type, print_stat>();
}
#define CDSUNIT_DECLARE_EllenBinTreeMap \
TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_hp)\
TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_hp_stat)\
- TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_ptb)\
- TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_ptb_stat)\
+ TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_dhp)\
+ TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_dhp_stat)\
TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_rcu_gpi)\
TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_rcu_gpi_stat)\
TEST_MAP_NOLF_EXTRACT(EllenBinTreeMap_rcu_gpb)\
#define CDSUNIT_TEST_EllenBinTreeMap \
CPPUNIT_TEST(EllenBinTreeMap_hp)\
CPPUNIT_TEST(EllenBinTreeMap_hp_stat)\
- CPPUNIT_TEST(EllenBinTreeMap_ptb)\
- CPPUNIT_TEST(EllenBinTreeMap_ptb_stat)\
+ CPPUNIT_TEST(EllenBinTreeMap_dhp)\
+ CPPUNIT_TEST(EllenBinTreeMap_dhp_stat)\
CPPUNIT_TEST(EllenBinTreeMap_rcu_gpi)\
CPPUNIT_TEST(EllenBinTreeMap_rcu_gpi_stat)\
CPPUNIT_TEST(EllenBinTreeMap_rcu_gpb)\
#include <cds/container/ellen_bintree_map_rcu.h>
#include <cds/container/ellen_bintree_map_hp.h>
-#include <cds/container/ellen_bintree_map_ptb.h>
+#include <cds/container/ellen_bintree_map_dhp.h>
#include <boost/version.hpp>
#if BOOST_VERSION >= 104800
typedef cc::ellen_bintree::internal_node< Key, leaf_node > internal_node;
typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc;
};
- struct ptb_gc {
+ struct dhp_gc {
typedef cc::ellen_bintree::map_node<cds::gc::DHP, Key, Value> leaf_node;
typedef cc::ellen_bintree::internal_node< Key, leaf_node > internal_node;
typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc;
#endif
};
-
- // ***************************************************************************
- // EllenBinTreeMap - HP
-
- struct traits_EllenBinTreeMap_hp: public cc::ellen_bintree::make_set_traits<
+ struct traits_EllenBinTreeMap: public cc::ellen_bintree::make_set_traits<
co::less< less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::hp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
,co::item_counter< cds::atomicity::item_counter >
>::type
{};
+ struct traits_EllenBinTreeMap_hp : traits_EllenBinTreeMap {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::hp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
typedef cc::EllenBinTreeMap< cds::gc::HP, Key, Value, traits_EllenBinTreeMap_hp >EllenBinTreeMap_hp;
- struct traits_EllenBinTreeMap_hp_stat: public cc::ellen_bintree::make_set_traits<
- co::less< less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::hp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- ,co::stat< cc::ellen_bintree::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- {};
- typedef cc::EllenBinTreeMap< cds::gc::HP, Key, Value, traits_EllenBinTreeMap_hp_stat > EllenBinTreeMap_hp_stat;
-
- // ***************************************************************************
- // EllenBinTreeMap - DHP
-
- struct traits_EllenBinTreeMap_ptb: public cc::ellen_bintree::make_set_traits<
- co::less< less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::ptb_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- {};
- typedef cc::EllenBinTreeMap< cds::gc::DHP, Key, Value, traits_EllenBinTreeMap_ptb> EllenBinTreeMap_ptb;
+ struct traits_EllenBinTreeMap_dhp : traits_EllenBinTreeMap {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::dhp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeMap< cds::gc::DHP, Key, Value, traits_EllenBinTreeMap_dhp >EllenBinTreeMap_dhp;
- struct traits_EllenBinTreeMap_ptb_stat: public cc::ellen_bintree::make_set_traits<
- co::less< less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::ptb_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- ,co::stat< cc::ellen_bintree::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- {};
- typedef cc::EllenBinTreeMap< cds::gc::DHP, Key, Value, traits_EllenBinTreeMap_ptb_stat > EllenBinTreeMap_ptb_stat;
+ struct traits_EllenBinTreeMap_gpi : traits_EllenBinTreeMap {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpi::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeMap< rcu_gpi, Key, Value, traits_EllenBinTreeMap_gpi >EllenBinTreeMap_rcu_gpi;
- // ***************************************************************************
- // EllenBinTreeMap - RCU
+ struct traits_EllenBinTreeMap_gpb : traits_EllenBinTreeMap {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeMap< rcu_gpb, Key, Value, traits_EllenBinTreeMap_gpb >EllenBinTreeMap_rcu_gpb;
- struct traits_EllenBinTreeMap_rcu_gpi: public cc::ellen_bintree::make_set_traits<
- co::less< less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::gpi::update_desc, ellen_bintree_pool::bounded_update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- {};
- typedef cc::EllenBinTreeMap< rcu_gpi, Key, Value, traits_EllenBinTreeMap_rcu_gpi > EllenBinTreeMap_rcu_gpi;
+ struct traits_EllenBinTreeMap_gpt : traits_EllenBinTreeMap {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpt::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeMap< rcu_gpt, Key, Value, traits_EllenBinTreeMap_gpt >EllenBinTreeMap_rcu_gpt;
- struct traits_EllenBinTreeMap_rcu_gpi_stat: public cc::ellen_bintree::make_set_traits<
- co::less< less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::gpi::update_desc, ellen_bintree_pool::bounded_update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- ,co::stat< cc::ellen_bintree::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- {};
- typedef cc::EllenBinTreeMap< rcu_gpi, Key, Value, traits_EllenBinTreeMap_rcu_gpi_stat > EllenBinTreeMap_rcu_gpi_stat;
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+ struct traits_EllenBinTreeMap_shb : traits_EllenBinTreeMap {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::shb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeMap< rcu_shb, Key, Value, traits_EllenBinTreeMap_shb >EllenBinTreeMap_rcu_shb;
- struct traits_EllenBinTreeMap_rcu_gpb: public cc::ellen_bintree::make_set_traits<
- co::less< less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::gpb::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- {};
- typedef cc::EllenBinTreeMap< rcu_gpb, Key, Value, traits_EllenBinTreeMap_rcu_gpb > EllenBinTreeMap_rcu_gpb;
+ struct traits_EllenBinTreeMap_sht : traits_EllenBinTreeMap {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::sht::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeMap< rcu_sht, Key, Value, traits_EllenBinTreeMap_sht >EllenBinTreeMap_rcu_sht;
+#endif
- struct traits_EllenBinTreeMap_rcu_gpb_stat: public cc::ellen_bintree::make_set_traits<
+ struct traits_EllenBinTreeMap_stat: public cc::ellen_bintree::make_set_traits<
co::less< less >
,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::gpb::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
+ cds::memory::pool_allocator< typename ellen_bintree_props::hp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
>
,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
,co::stat< cc::ellen_bintree::stat<> >
,co::item_counter< cds::atomicity::item_counter >
>::type
{};
- typedef cc::EllenBinTreeMap< rcu_gpb, Key, Value, traits_EllenBinTreeMap_rcu_gpb_stat > EllenBinTreeMap_rcu_gpb_stat;
- struct traits_EllenBinTreeMap_rcu_gpt: public cc::ellen_bintree::make_set_traits<
- co::less< less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::gpt::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- {};
- typedef cc::EllenBinTreeMap< rcu_gpt, Key, Value, traits_EllenBinTreeMap_rcu_gpt > EllenBinTreeMap_rcu_gpt;
+ struct traits_EllenBinTreeMap_stat_hp : public traits_EllenBinTreeMap_stat
+ {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::hp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeMap< cds::gc::HP, Key, Value, traits_EllenBinTreeMap_stat_hp > EllenBinTreeMap_hp_stat;
- struct traits_EllenBinTreeMap_rcu_gpt_stat: public cc::ellen_bintree::make_set_traits<
- co::less< less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::gpt::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- ,co::stat< cc::ellen_bintree::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- {};
- typedef cc::EllenBinTreeMap< rcu_gpt, Key, Value, traits_EllenBinTreeMap_rcu_gpt_stat > EllenBinTreeMap_rcu_gpt_stat;
+ struct traits_EllenBinTreeMap_stat_dhp : public traits_EllenBinTreeMap_stat
+ {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::dhp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeMap< cds::gc::HP, Key, Value, traits_EllenBinTreeMap_stat_dhp > EllenBinTreeMap_dhp_stat;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- struct traits_EllenBinTreeMap_rcu_shb: public cc::ellen_bintree::make_set_traits<
- co::less< less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::shb::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- {};
- typedef cc::EllenBinTreeMap< rcu_shb, Key, Value, traits_EllenBinTreeMap_rcu_shb > EllenBinTreeMap_rcu_shb;
+ struct traits_EllenBinTreeMap_stat_gpi : public traits_EllenBinTreeMap_stat
+ {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpi::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeMap< rcu_gpi, Key, Value, traits_EllenBinTreeMap_stat_gpi > EllenBinTreeMap_rcu_gpi_stat;
- struct traits_EllenBinTreeMap_rcu_shb_stat: public cc::ellen_bintree::make_set_traits<
- co::less< less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::shb::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- ,co::item_counter< cds::atomicity::item_counter >
- ,co::stat< cc::ellen_bintree::stat<> >
- >::type
- {};
- typedef cc::EllenBinTreeMap< rcu_shb, Key, Value, traits_EllenBinTreeMap_rcu_shb_stat > EllenBinTreeMap_rcu_shb_stat;
+ struct traits_EllenBinTreeMap_stat_gpb : public traits_EllenBinTreeMap_stat
+ {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeMap< rcu_gpb, Key, Value, traits_EllenBinTreeMap_stat_gpb > EllenBinTreeMap_rcu_gpb_stat;
- struct traits_EllenBinTreeMap_rcu_sht: public cc::ellen_bintree::make_set_traits<
- co::less< less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::sht::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- {};
- typedef cc::EllenBinTreeMap< rcu_sht, Key, Value, traits_EllenBinTreeMap_rcu_sht > EllenBinTreeMap_rcu_sht;
+ struct traits_EllenBinTreeMap_stat_gpt : public traits_EllenBinTreeMap_stat
+ {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpt::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeMap< rcu_gpt, Key, Value, traits_EllenBinTreeMap_stat_gpt > EllenBinTreeMap_rcu_gpt_stat;
- struct traits_EllenBinTreeMap_rcu_sht_stat: public cc::ellen_bintree::make_set_traits<
- co::less< less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::sht::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- ,co::item_counter< cds::atomicity::item_counter >
- ,co::stat< cc::ellen_bintree::stat<> >
- >::type
- {};
- typedef cc::EllenBinTreeMap< rcu_sht, Key, Value, traits_EllenBinTreeMap_rcu_sht_stat > EllenBinTreeMap_rcu_sht_stat;
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+ struct traits_EllenBinTreeMap_stat_shb : public traits_EllenBinTreeMap_stat
+ {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::shb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeMap< rcu_shb, Key, Value, traits_EllenBinTreeMap_stat_shb > EllenBinTreeMap_rcu_shb_stat;
+ struct traits_EllenBinTreeMap_stat_sht : public traits_EllenBinTreeMap_stat
+ {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::sht::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeMap< rcu_sht, Key, Value, traits_EllenBinTreeMap_stat_sht > EllenBinTreeMap_rcu_sht_stat;
#endif
-
// ***************************************************************************
// Standard implementations
#define __CDSUNIT_STD_ELLEN_BINTREE_PQUEUE_H
#include <cds/container/ellen_bintree_set_hp.h>
-#include <cds/container/ellen_bintree_set_ptb.h>
+#include <cds/container/ellen_bintree_set_dhp.h>
#include <cds/urcu/general_instant.h>
#include <cds/urcu/general_buffered.h>
#include <cds/urcu/general_threaded.h>
TEST_CASE(EllenBinTree_HP_min) \
TEST_CASE(EllenBinTree_HP_min_stat) \
TEST_CASE(EllenBinTree_DHP_max) \
+ TEST_CASE(EllenBinTree_DHP_max_stat) \
TEST_CASE(EllenBinTree_DHP_min) \
+ TEST_CASE(EllenBinTree_DHP_min_stat) \
TEST_CASE(EllenBinTree_RCU_gpi_max) \
TEST_CASE(EllenBinTree_RCU_gpi_max_stat) \
TEST_CASE(EllenBinTree_RCU_gpi_min) \
CPPUNIT_TEST(EllenBinTree_HP_min) \
CPPUNIT_TEST(EllenBinTree_HP_min_stat) \
CPPUNIT_TEST(EllenBinTree_DHP_max) \
+ CPPUNIT_TEST(EllenBinTree_DHP_max_stat) \
CPPUNIT_TEST(EllenBinTree_DHP_min) \
+ CPPUNIT_TEST(EllenBinTree_DHP_min_stat) \
/*CPPUNIT_TEST(EllenBinTree_RCU_gpi_max)*/ \
/*CPPUNIT_TEST(EllenBinTree_RCU_gpi_max_stat)*/ \
/*CPPUNIT_TEST(EllenBinTree_RCU_gpi_min)*/ \
TEST_CASE(SkipList_HP_min) \
TEST_CASE(SkipList_HP_min_stat) \
TEST_CASE(SkipList_DHP_max) \
+ TEST_CASE(SkipList_DHP_max_stat) \
TEST_CASE(SkipList_DHP_min) \
+ TEST_CASE(SkipList_DHP_min_stat) \
TEST_CASE(SkipList_RCU_gpi_max) \
TEST_CASE(SkipList_RCU_gpi_min) \
TEST_CASE(SkipList_RCU_gpb_max) \
CPPUNIT_TEST(SkipList_HP_min) \
CPPUNIT_TEST(SkipList_HP_min_stat) \
CPPUNIT_TEST(SkipList_DHP_max) \
+ CPPUNIT_TEST(SkipList_DHP_max_stat) \
CPPUNIT_TEST(SkipList_DHP_min) \
+ CPPUNIT_TEST(SkipList_DHP_min_stat) \
CPPUNIT_TEST(SkipList_RCU_gpi_max) \
CPPUNIT_TEST(SkipList_RCU_gpi_min) \
CPPUNIT_TEST(SkipList_RCU_gpb_max) \
}
};
+ typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_gpi;
+ typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_gpb;
+ typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_gpt;
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+ typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_shb;
+ typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_sht;
+#endif
+
// MSPriorityQueue
struct traits_MSPriorityQueue_static_less : public
// Priority queue based on EllenBinTreeSet
- typedef EllenBinTreePQueue< cds::gc::HP, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename Value::key_extractor >
- ,cc::opt::less< std::less<Value> >
- >::type
- > EllenBinTree_HP_max;
-
- typedef EllenBinTreePQueue< cds::gc::HP, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename Value::key_extractor >
- ,cc::opt::less< std::less<Value> >
- ,co::stat< cc::ellen_bintree::stat<> >
- >::type
- > EllenBinTree_HP_max_stat;
-
- typedef EllenBinTreePQueue< cds::gc::HP, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename Value::key_extractor >
- ,cc::opt::less< std::greater<Value> >
- >::type, false
- > EllenBinTree_HP_min;
-
- typedef EllenBinTreePQueue< cds::gc::HP, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename Value::key_extractor >
- ,cc::opt::less< std::greater<Value> >
- ,co::stat< cc::ellen_bintree::stat<> >
- >::type, false
- > EllenBinTree_HP_min_stat;
-
- typedef EllenBinTreePQueue< cds::gc::DHP, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename Value::key_extractor >
- ,cc::opt::less< std::less<Value> >
- >::type
- > EllenBinTree_DHP_max;
-
- typedef EllenBinTreePQueue< cds::gc::DHP, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename Value::key_extractor >
- ,cc::opt::less< std::greater<Value> >
- >::type, false
- > EllenBinTree_DHP_min;
-
- typedef EllenBinTreePQueue< cds::urcu::gc< cds::urcu::general_instant<> >, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename Value::key_extractor >
- ,cc::opt::less< std::less<Value> >
- >::type
- > EllenBinTree_RCU_gpi_max;
-
- typedef EllenBinTreePQueue< cds::urcu::gc< cds::urcu::general_instant<> >, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
+ struct traits_EllenBinTree_max :
+ public cc::ellen_bintree::make_set_traits<
cc::ellen_bintree::key_extractor< typename Value::key_extractor >
,cc::opt::less< std::less<Value> >
,co::stat< cc::ellen_bintree::stat<> >
>::type
- > EllenBinTree_RCU_gpi_max_stat;
-
- typedef EllenBinTreePQueue< cds::urcu::gc< cds::urcu::general_instant<> >, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename Value::key_extractor >
- ,cc::opt::less< std::greater<Value> >
- >::type, false
- > EllenBinTree_RCU_gpi_min;
-
- typedef EllenBinTreePQueue< cds::urcu::gc< cds::urcu::general_instant<> >, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename Value::key_extractor >
- ,cc::opt::less< std::greater<Value> >
- ,co::stat< cc::ellen_bintree::stat<> >
- >::type, false
- > EllenBinTree_RCU_gpi_min_stat;
-
- typedef EllenBinTreePQueue< cds::urcu::gc< cds::urcu::general_buffered<> >, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename Value::key_extractor >
- ,cc::opt::less< std::less<Value> >
- >::type
- > EllenBinTree_RCU_gpb_max;
+ {};
+ typedef EllenBinTreePQueue< cds::gc::HP, typename Value::key_type, Value, traits_EllenBinTree_max > EllenBinTree_HP_max;
+ typedef EllenBinTreePQueue< cds::gc::DHP, typename Value::key_type, Value, traits_EllenBinTree_max > EllenBinTree_DHP_max;
+ typedef EllenBinTreePQueue< rcu_gpi, typename Value::key_type, Value, traits_EllenBinTree_max > EllenBinTree_RCU_gpi_max;
+ typedef EllenBinTreePQueue< rcu_gpb, typename Value::key_type, Value, traits_EllenBinTree_max > EllenBinTree_RCU_gpb_max;
+ typedef EllenBinTreePQueue< rcu_gpt, typename Value::key_type, Value, traits_EllenBinTree_max > EllenBinTree_RCU_gpt_max;
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+ typedef EllenBinTreePQueue< rcu_shb, typename Value::key_type, Value, traits_EllenBinTree_max > EllenBinTree_RCU_shb_max;
+ typedef EllenBinTreePQueue< rcu_sht, typename Value::key_type, Value, traits_EllenBinTree_max > EllenBinTree_RCU_sht_max;
+#endif
- typedef EllenBinTreePQueue< cds::urcu::gc< cds::urcu::general_buffered<> >, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
+ struct traits_EllenBinTree_max_stat :
+ public cc::ellen_bintree::make_set_traits<
cc::ellen_bintree::key_extractor< typename Value::key_extractor >
,cc::opt::less< std::less<Value> >
,co::stat< cc::ellen_bintree::stat<> >
>::type
- > EllenBinTree_RCU_gpb_max_stat;
-
- typedef EllenBinTreePQueue< cds::urcu::gc< cds::urcu::general_buffered<> >, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename Value::key_extractor >
- ,cc::opt::less< std::greater<Value> >
- >::type, false
- > EllenBinTree_RCU_gpb_min;
+ {};
+ typedef EllenBinTreePQueue< cds::gc::HP, typename Value::key_type, Value, traits_EllenBinTree_max_stat > EllenBinTree_HP_max_stat;
+ typedef EllenBinTreePQueue< cds::gc::DHP, typename Value::key_type, Value, traits_EllenBinTree_max_stat > EllenBinTree_DHP_max_stat;
+ typedef EllenBinTreePQueue< rcu_gpi, typename Value::key_type, Value, traits_EllenBinTree_max_stat > EllenBinTree_RCU_gpi_max_stat;
+ typedef EllenBinTreePQueue< rcu_gpb, typename Value::key_type, Value, traits_EllenBinTree_max_stat > EllenBinTree_RCU_gpb_max_stat;
+ typedef EllenBinTreePQueue< rcu_gpt, typename Value::key_type, Value, traits_EllenBinTree_max_stat > EllenBinTree_RCU_gpt_max_stat;
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+ typedef EllenBinTreePQueue< rcu_shb, typename Value::key_type, Value, traits_EllenBinTree_max_stat > EllenBinTree_RCU_shb_max_stat;
+ typedef EllenBinTreePQueue< rcu_sht, typename Value::key_type, Value, traits_EllenBinTree_max_stat > EllenBinTree_RCU_sht_max_stat;
+#endif
- typedef EllenBinTreePQueue< cds::urcu::gc< cds::urcu::general_buffered<> >, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
+ struct traits_EllenBinTree_min :
+ public cc::ellen_bintree::make_set_traits<
cc::ellen_bintree::key_extractor< typename Value::key_extractor >
,cc::opt::less< std::greater<Value> >
- ,co::stat< cc::ellen_bintree::stat<> >
- >::type, false
- > EllenBinTree_RCU_gpb_min_stat;
-
- typedef EllenBinTreePQueue< cds::urcu::gc< cds::urcu::general_threaded<> >, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename Value::key_extractor >
- ,cc::opt::less< std::less<Value> >
>::type
- > EllenBinTree_RCU_gpt_max;
-
- typedef EllenBinTreePQueue< cds::urcu::gc< cds::urcu::general_threaded<> >, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename Value::key_extractor >
- ,cc::opt::less< std::less<Value> >
- ,co::stat< cc::ellen_bintree::stat<> >
- >::type
- > EllenBinTree_RCU_gpt_max_stat;
-
- typedef EllenBinTreePQueue< cds::urcu::gc< cds::urcu::general_threaded<> >, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename Value::key_extractor >
- ,cc::opt::less< std::greater<Value> >
- >::type, false
- > EllenBinTree_RCU_gpt_min;
-
- typedef EllenBinTreePQueue< cds::urcu::gc< cds::urcu::general_threaded<> >, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename Value::key_extractor >
- ,cc::opt::less< std::greater<Value> >
- ,co::stat< cc::ellen_bintree::stat<> >
- >::type, false
- > EllenBinTree_RCU_gpt_min_stat;
-
+ {};
+ typedef EllenBinTreePQueue< cds::gc::HP, typename Value::key_type, Value, traits_EllenBinTree_min, false > EllenBinTree_HP_min;
+ typedef EllenBinTreePQueue< cds::gc::DHP, typename Value::key_type, Value, traits_EllenBinTree_min, false > EllenBinTree_DHP_min;
+ typedef EllenBinTreePQueue< rcu_gpi, typename Value::key_type, Value, traits_EllenBinTree_min, false > EllenBinTree_RCU_gpi_min;
+ typedef EllenBinTreePQueue< rcu_gpb, typename Value::key_type, Value, traits_EllenBinTree_min, false > EllenBinTree_RCU_gpb_min;
+ typedef EllenBinTreePQueue< rcu_gpt, typename Value::key_type, Value, traits_EllenBinTree_min, false > EllenBinTree_RCU_gpt_min;
#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef EllenBinTreePQueue< cds::urcu::gc< cds::urcu::signal_buffered<> >, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename Value::key_extractor >
- ,cc::opt::less< std::less<Value> >
- >::type
- > EllenBinTree_RCU_shb_max;
-
- typedef EllenBinTreePQueue< cds::urcu::gc< cds::urcu::signal_buffered<> >, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename Value::key_extractor >
- ,cc::opt::less< std::less<Value> >
- ,co::stat< cc::ellen_bintree::stat<> >
- >::type
- > EllenBinTree_RCU_shb_max_stat;
-
- typedef EllenBinTreePQueue< cds::urcu::gc< cds::urcu::signal_buffered<> >, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename Value::key_extractor >
- ,cc::opt::less< std::greater<Value> >
- >::type, false
- > EllenBinTree_RCU_shb_min;
+ typedef EllenBinTreePQueue< rcu_shb, typename Value::key_type, Value, traits_EllenBinTree_min, false > EllenBinTree_RCU_shb_min;
+ typedef EllenBinTreePQueue< rcu_sht, typename Value::key_type, Value, traits_EllenBinTree_min, false > EllenBinTree_RCU_sht_min;
+#endif
- typedef EllenBinTreePQueue< cds::urcu::gc< cds::urcu::signal_buffered<> >, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
+ struct traits_EllenBinTree_min_stat :
+ public cc::ellen_bintree::make_set_traits<
cc::ellen_bintree::key_extractor< typename Value::key_extractor >
,cc::opt::less< std::greater<Value> >
,co::stat< cc::ellen_bintree::stat<> >
- >::type, false
- > EllenBinTree_RCU_shb_min_stat;
-
- typedef EllenBinTreePQueue< cds::urcu::gc< cds::urcu::signal_threaded<> >, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename Value::key_extractor >
- ,cc::opt::less< std::less<Value> >
>::type
- > EllenBinTree_RCU_sht_max;
-
- typedef EllenBinTreePQueue< cds::urcu::gc< cds::urcu::signal_threaded<> >, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename Value::key_extractor >
- ,cc::opt::less< std::less<Value> >
- ,co::stat< cc::ellen_bintree::stat<> >
- >::type
- > EllenBinTree_RCU_sht_max_stat;
-
- typedef EllenBinTreePQueue< cds::urcu::gc< cds::urcu::signal_threaded<> >, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename Value::key_extractor >
- ,cc::opt::less< std::greater<Value> >
- >::type, false
- > EllenBinTree_RCU_sht_min;
-
- typedef EllenBinTreePQueue< cds::urcu::gc< cds::urcu::signal_threaded<> >, typename Value::key_type, Value,
- typename cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename Value::key_extractor >
- ,cc::opt::less< std::greater<Value> >
- ,co::stat< cc::ellen_bintree::stat<> >
- >::type, false
- > EllenBinTree_RCU_sht_min_stat;
+ {};
+ typedef EllenBinTreePQueue< cds::gc::HP, typename Value::key_type, Value, traits_EllenBinTree_min_stat, false > EllenBinTree_HP_min_stat;
+ typedef EllenBinTreePQueue< cds::gc::DHP, typename Value::key_type, Value, traits_EllenBinTree_min_stat, false > EllenBinTree_DHP_min_stat;
+ typedef EllenBinTreePQueue< rcu_gpi, typename Value::key_type, Value, traits_EllenBinTree_min_stat, false > EllenBinTree_RCU_gpi_min_stat;
+ typedef EllenBinTreePQueue< rcu_gpb, typename Value::key_type, Value, traits_EllenBinTree_min_stat, false > EllenBinTree_RCU_gpb_min_stat;
+ typedef EllenBinTreePQueue< rcu_gpt, typename Value::key_type, Value, traits_EllenBinTree_min_stat, false > EllenBinTree_RCU_gpt_min_stat;
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+ typedef EllenBinTreePQueue< rcu_shb, typename Value::key_type, Value, traits_EllenBinTree_min_stat, false > EllenBinTree_RCU_shb_min_stat;
+ typedef EllenBinTreePQueue< rcu_sht, typename Value::key_type, Value, traits_EllenBinTree_min_stat, false > EllenBinTree_RCU_sht_min_stat;
#endif
// Priority queue based on SkipListSet
- typedef SkipListPQueue< cds::gc::HP, Value,
- typename cc::skip_list::make_traits<
- cc::opt::less< std::less<Value> >
- >::type
- > SkipList_HP_max;
+ struct traits_SkipList_max :
+ public cc::skip_list::make_traits <
+ cc::opt::less < std::less<Value> >
+ > ::type
+ {};
+ typedef SkipListPQueue< cds::gc::HP, Value, traits_SkipList_max > SkipList_HP_max;
+ typedef SkipListPQueue< cds::gc::DHP, Value, traits_SkipList_max > SkipList_DHP_max;
+ typedef SkipListPQueue< rcu_gpi, Value, traits_SkipList_max > SkipList_RCU_gpi_max;
+ typedef SkipListPQueue< rcu_gpb, Value, traits_SkipList_max > SkipList_RCU_gpb_max;
+ typedef SkipListPQueue< rcu_gpt, Value, traits_SkipList_max > SkipList_RCU_gpt_max;
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+ typedef SkipListPQueue< rcu_shb, Value, traits_SkipList_max > SkipList_RCU_shb_max;
+ typedef SkipListPQueue< rcu_sht, Value, traits_SkipList_max > SkipList_RCU_sht_max;
+#endif
- typedef SkipListPQueue< cds::gc::HP, Value,
- typename cc::skip_list::make_traits<
+ struct traits_SkipList_max_stat :
+ public cc::skip_list::make_traits<
cc::opt::less< std::less<Value> >
,co::stat< cc::skip_list::stat<> >
>::type
- > SkipList_HP_max_stat;
-
- typedef SkipListPQueue< cds::gc::HP, Value,
- typename cc::skip_list::make_traits<
- cc::opt::less< std::greater<Value> >
- >::type, false
- > SkipList_HP_min;
-
- typedef SkipListPQueue< cds::gc::HP, Value,
- typename cc::skip_list::make_traits<
- cc::opt::less< std::greater<Value> >
- ,co::stat< cc::skip_list::stat<> >
- >::type, false
- > SkipList_HP_min_stat;
-
-
- typedef SkipListPQueue< cds::gc::DHP, Value,
- typename cc::skip_list::make_traits<
- cc::opt::less< std::less<Value> >
- >::type
- > SkipList_DHP_max;
-
- typedef SkipListPQueue< cds::gc::DHP, Value,
- typename cc::skip_list::make_traits<
- cc::opt::less< std::greater<Value> >
- >::type, false
- > SkipList_DHP_min;
-
- typedef SkipListPQueue< cds::urcu::gc< cds::urcu::general_instant<> >, Value,
- typename cc::skip_list::make_traits<
- cc::opt::less< std::less<Value> >
- >::type
- > SkipList_RCU_gpi_max;
+ {};
+ typedef SkipListPQueue< cds::gc::HP, Value, traits_SkipList_max_stat > SkipList_HP_max_stat;
+ typedef SkipListPQueue< cds::gc::DHP, Value, traits_SkipList_max_stat > SkipList_DHP_max_stat;
+ typedef SkipListPQueue< rcu_gpi, Value, traits_SkipList_max_stat > SkipList_RCU_gpi_max_stat;
+ typedef SkipListPQueue< rcu_gpb, Value, traits_SkipList_max_stat > SkipList_RCU_gpb_max_stat;
+ typedef SkipListPQueue< rcu_gpt, Value, traits_SkipList_max_stat > SkipList_RCU_gpt_max_stat;
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+ typedef SkipListPQueue< rcu_shb, Value, traits_SkipList_max_stat > SkipList_RCU_shb_max_stat;
+ typedef SkipListPQueue< rcu_sht, Value, traits_SkipList_max_stat > SkipList_RCU_sht_max_stat;
+#endif
- typedef SkipListPQueue< cds::urcu::gc< cds::urcu::general_instant<> >, Value,
- typename cc::skip_list::make_traits<
+ struct traits_SkipList_min :
+ public cc::skip_list::make_traits<
cc::opt::less< std::greater<Value> >
- >::type, false
- > SkipList_RCU_gpi_min;
-
- typedef SkipListPQueue< cds::urcu::gc< cds::urcu::general_buffered<> >, Value,
- typename cc::skip_list::make_traits<
- cc::opt::less< std::less<Value> >
>::type
- > SkipList_RCU_gpb_max;
-
- typedef SkipListPQueue< cds::urcu::gc< cds::urcu::general_buffered<> >, Value,
- typename cc::skip_list::make_traits<
- cc::opt::less< std::greater<Value> >
- >::type, false
- > SkipList_RCU_gpb_min;
-
- typedef SkipListPQueue< cds::urcu::gc< cds::urcu::general_threaded<> >, Value,
- typename cc::skip_list::make_traits<
- cc::opt::less< std::less<Value> >
- >::type
- > SkipList_RCU_gpt_max;
-
- typedef SkipListPQueue< cds::urcu::gc< cds::urcu::general_threaded<> >, Value,
- typename cc::skip_list::make_traits<
- cc::opt::less< std::greater<Value> >
- >::type, false
- > SkipList_RCU_gpt_min;
-
+ {};
+ typedef SkipListPQueue< cds::gc::HP, Value, traits_SkipList_min, false > SkipList_HP_min;
+ typedef SkipListPQueue< cds::gc::DHP, Value, traits_SkipList_min, false > SkipList_DHP_min;
+ typedef SkipListPQueue< rcu_gpi, Value, traits_SkipList_min, false > SkipList_RCU_gpi_min;
+ typedef SkipListPQueue< rcu_gpb, Value, traits_SkipList_min, false > SkipList_RCU_gpb_min;
+ typedef SkipListPQueue< rcu_gpt, Value, traits_SkipList_min, false > SkipList_RCU_gpt_min;
#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- typedef SkipListPQueue< cds::urcu::gc< cds::urcu::signal_buffered<> >, Value,
- typename cc::skip_list::make_traits<
- cc::opt::less< std::less<Value> >
- >::type
- > SkipList_RCU_shb_max;
+ typedef SkipListPQueue< rcu_shb, Value, traits_SkipList_min, false > SkipList_RCU_shb_min;
+ typedef SkipListPQueue< rcu_sht, Value, traits_SkipList_min, false > SkipList_RCU_sht_min;
+#endif
- typedef SkipListPQueue< cds::urcu::gc< cds::urcu::signal_buffered<> >, Value,
- typename cc::skip_list::make_traits<
+ struct traits_SkipList_min_stat :
+ public cc::skip_list::make_traits<
cc::opt::less< std::greater<Value> >
- >::type, false
- > SkipList_RCU_shb_min;
-
- typedef SkipListPQueue< cds::urcu::gc< cds::urcu::signal_threaded<> >, Value,
- typename cc::skip_list::make_traits<
- cc::opt::less< std::less<Value> >
+ ,co::stat< cc::skip_list::stat<> >
>::type
- > SkipList_RCU_sht_max;
-
- typedef SkipListPQueue< cds::urcu::gc< cds::urcu::signal_threaded<> >, Value,
- typename cc::skip_list::make_traits<
- cc::opt::less< std::greater<Value> >
- >::type, false
- > SkipList_RCU_sht_min;
+ {};
+ typedef SkipListPQueue< cds::gc::HP, Value, traits_SkipList_min_stat, false > SkipList_HP_min_stat;
+ typedef SkipListPQueue< cds::gc::DHP, Value, traits_SkipList_min_stat, false > SkipList_DHP_min_stat;
+ typedef SkipListPQueue< rcu_gpi, Value, traits_SkipList_min_stat, false > SkipList_RCU_gpi_min_stat;
+ typedef SkipListPQueue< rcu_gpb, Value, traits_SkipList_min_stat, false > SkipList_RCU_gpb_min_stat;
+ typedef SkipListPQueue< rcu_gpt, Value, traits_SkipList_min_stat, false > SkipList_RCU_gpt_min_stat;
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+ typedef SkipListPQueue< rcu_shb, Value, traits_SkipList_min_stat, false > SkipList_RCU_shb_min_stat;
+ typedef SkipListPQueue< rcu_sht, Value, traits_SkipList_min_stat, false > SkipList_RCU_sht_min_stat;
#endif
+
// FCPriorityQueue
struct traits_FCPQueue_stat : public
cds::container::fcpqueue::make_traits <
#define CDSUNIT_DECLARE_EllenBinTreeSet \
TEST_SET_NOLF_EXTRACT(EllenBinTreeSet_hp)\
TEST_SET_NOLF_EXTRACT(EllenBinTreeSet_hp_stat)\
- TEST_SET_NOLF_EXTRACT(EllenBinTreeSet_ptb)\
- TEST_SET_NOLF_EXTRACT(EllenBinTreeSet_ptb_stat)\
+ TEST_SET_NOLF_EXTRACT(EllenBinTreeSet_dhp)\
+ TEST_SET_NOLF_EXTRACT(EllenBinTreeSet_dhp_stat)\
TEST_SET_NOLF_EXTRACT(EllenBinTreeSet_rcu_gpi)\
TEST_SET_NOLF_EXTRACT(EllenBinTreeSet_rcu_gpi_stat)\
TEST_SET_NOLF_EXTRACT(EllenBinTreeSet_rcu_gpb)\
#define CDSUNIT_TEST_EllenBinTreeSet \
CPPUNIT_TEST(EllenBinTreeSet_hp)\
CPPUNIT_TEST(EllenBinTreeSet_hp_stat)\
- CPPUNIT_TEST(EllenBinTreeSet_ptb)\
- CPPUNIT_TEST(EllenBinTreeSet_ptb_stat)\
+ CPPUNIT_TEST(EllenBinTreeSet_dhp)\
+ CPPUNIT_TEST(EllenBinTreeSet_dhp_stat)\
CPPUNIT_TEST(EllenBinTreeSet_rcu_gpi)\
/*CPPUNIT_TEST(EllenBinTreeSet_rcu_gpi_stat)*/\
CPPUNIT_TEST(EllenBinTreeSet_rcu_gpb)\
#include <cds/container/ellen_bintree_set_rcu.h>
#include <cds/container/ellen_bintree_set_hp.h>
-#include <cds/container/ellen_bintree_set_ptb.h>
+#include <cds/container/ellen_bintree_set_dhp.h>
#include <cds/container/striped_set/std_list.h>
#include <cds/container/striped_set/std_vector.h>
typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc;
};
- struct ptb_gc {
+ struct dhp_gc {
typedef cc::ellen_bintree::node<cds::gc::DHP, key_val> leaf_node;
typedef cc::ellen_bintree::internal_node< key_type, leaf_node > internal_node;
typedef cc::ellen_bintree::update_desc< leaf_node, internal_node > update_desc;
#endif
};
-
- // ***************************************************************************
- // EllenBinTreeSet - HP
-
- class traits_EllenBinTreeSet_hp: public cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename ellen_bintree_props::key_extractor >
- ,co::less< typename ellen_bintree_props::less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::hp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- >::type
- {};
- typedef cc::EllenBinTreeSet< cds::gc::HP, key_type, key_val, traits_EllenBinTreeSet_hp > EllenBinTreeSet_hp;
-
- class traits_EllenBinTreeSet_hp_stat: public cc::ellen_bintree::make_set_traits<
+ struct traits_EllenBinTreeSet: public cc::ellen_bintree::make_set_traits<
cc::ellen_bintree::key_extractor< typename ellen_bintree_props::key_extractor >
,co::less< typename ellen_bintree_props::less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::hp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- ,co::stat< cc::ellen_bintree::stat<> >
>::type
{};
- typedef cc::EllenBinTreeSet< cds::gc::HP, key_type, key_val, traits_EllenBinTreeSet_hp_stat > EllenBinTreeSet_hp_stat;
-
- // ***************************************************************************
- // EllenBinTreeSet - DHP
- class traits_EllenBinTreeSet_ptb: public cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename ellen_bintree_props::key_extractor >
- ,co::less< typename ellen_bintree_props::less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::ptb_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- >::type
- {};
- typedef cc::EllenBinTreeSet< cds::gc::DHP, key_type, key_val, traits_EllenBinTreeSet_ptb > EllenBinTreeSet_ptb;
+ struct traits_EllenBinTreeSet_hp : public traits_EllenBinTreeSet
+ {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::hp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeSet< cds::gc::HP, key_type, key_val, traits_EllenBinTreeSet_hp > EllenBinTreeSet_hp;
- class traits_EllenBinTreeSet_ptb_stat: public cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename ellen_bintree_props::key_extractor >
- ,co::less< typename ellen_bintree_props::less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::ptb_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- ,co::stat< cc::ellen_bintree::stat<> >
- >::type
- {};
- typedef cc::EllenBinTreeSet< cds::gc::DHP, key_type, key_val, traits_EllenBinTreeSet_ptb_stat > EllenBinTreeSet_ptb_stat;
+ struct traits_EllenBinTreeSet_dhp : public traits_EllenBinTreeSet
+ {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::dhp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeSet< cds::gc::DHP, key_type, key_val, traits_EllenBinTreeSet_dhp > EllenBinTreeSet_dhp;
+ struct traits_EllenBinTreeSet_gpi : public traits_EllenBinTreeSet
+ {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpi::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeSet< rcu_gpi, key_type, key_val, traits_EllenBinTreeSet_gpi > EllenBinTreeSet_rcu_gpi;
- // ***************************************************************************
- // EllenBinTreeSet - RCU
+ struct traits_EllenBinTreeSet_gpb : public traits_EllenBinTreeSet
+ {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeSet< rcu_gpb, key_type, key_val, traits_EllenBinTreeSet_gpb > EllenBinTreeSet_rcu_gpb;
- class traits_EllenBinTreeSet_rcu_gpi: public cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename ellen_bintree_props::key_extractor >
- ,co::less< typename ellen_bintree_props::less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::gpi::update_desc, ellen_bintree_pool::bounded_update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- >::type
- {};
- typedef cc::EllenBinTreeSet< rcu_gpi, key_type, key_val, traits_EllenBinTreeSet_rcu_gpi > EllenBinTreeSet_rcu_gpi;
+ struct traits_EllenBinTreeSet_gpt : public traits_EllenBinTreeSet
+ {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpt::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeSet< rcu_gpt, key_type, key_val, traits_EllenBinTreeSet_gpt > EllenBinTreeSet_rcu_gpt;
- class traits_EllenBinTreeSet_rcu_gpi_stat: public cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename ellen_bintree_props::key_extractor >
- ,co::less< typename ellen_bintree_props::less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::gpi::update_desc, ellen_bintree_pool::bounded_update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- ,co::stat< cc::ellen_bintree::stat<> >
- >::type
- {};
- typedef cc::EllenBinTreeSet< rcu_gpi, key_type, key_val, traits_EllenBinTreeSet_rcu_gpi_stat > EllenBinTreeSet_rcu_gpi_stat;
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+ struct traits_EllenBinTreeSet_shb : public traits_EllenBinTreeSet
+ {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::shb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeSet< rcu_shb, key_type, key_val, traits_EllenBinTreeSet_shb > EllenBinTreeSet_rcu_shb;
- class traits_EllenBinTreeSet_rcu_gpb: public cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename ellen_bintree_props::key_extractor >
- ,co::less< typename ellen_bintree_props::less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::gpb::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- >::type
- {};
- typedef cc::EllenBinTreeSet< rcu_gpb, key_type, key_val, traits_EllenBinTreeSet_rcu_gpb > EllenBinTreeSet_rcu_gpb;
+ struct traits_EllenBinTreeSet_sht : public traits_EllenBinTreeSet
+ {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::sht::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeSet< rcu_sht, key_type, key_val, traits_EllenBinTreeSet_sht > EllenBinTreeSet_rcu_sht;
+#endif
- class traits_EllenBinTreeSet_rcu_gpb_stat: public cc::ellen_bintree::make_set_traits<
+ struct traits_EllenBinTreeSet_stat: public cc::ellen_bintree::make_set_traits<
cc::ellen_bintree::key_extractor< typename ellen_bintree_props::key_extractor >
,co::less< typename ellen_bintree_props::less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::gpb::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
,co::stat< cc::ellen_bintree::stat<> >
>::type
{};
- typedef cc::EllenBinTreeSet< rcu_gpb, key_type, key_val, traits_EllenBinTreeSet_rcu_gpb_stat > EllenBinTreeSet_rcu_gpb_stat;
- class traits_EllenBinTreeSet_rcu_gpt: public cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename ellen_bintree_props::key_extractor >
- ,co::less< typename ellen_bintree_props::less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::gpt::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- >::type
- {};
- typedef cc::EllenBinTreeSet< rcu_gpt, key_type, key_val, traits_EllenBinTreeSet_rcu_gpt > EllenBinTreeSet_rcu_gpt;
+ struct traits_EllenBinTreeSet_stat_hp : public traits_EllenBinTreeSet_stat
+ {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::hp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeSet< cds::gc::HP, key_type, key_val, traits_EllenBinTreeSet_stat_hp > EllenBinTreeSet_hp_stat;
- class traits_EllenBinTreeSet_rcu_gpt_stat: public cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename ellen_bintree_props::key_extractor >
- ,co::less< typename ellen_bintree_props::less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::gpt::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- ,co::stat< cc::ellen_bintree::stat<> >
- >::type
- {};
- typedef cc::EllenBinTreeSet< rcu_gpt, key_type, key_val, traits_EllenBinTreeSet_rcu_gpt_stat > EllenBinTreeSet_rcu_gpt_stat;
+ struct traits_EllenBinTreeSet_stat_dhp : public traits_EllenBinTreeSet_stat
+ {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::dhp_gc::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeSet< cds::gc::DHP, key_type, key_val, traits_EllenBinTreeSet_stat_dhp > EllenBinTreeSet_dhp_stat;
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
- class traits_EllenBinTreeSet_rcu_shb: public cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename ellen_bintree_props::key_extractor >
- ,co::less< typename ellen_bintree_props::less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::shb::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- >::type
- {};
- typedef cc::EllenBinTreeSet< rcu_shb, key_type, key_val, traits_EllenBinTreeSet_rcu_shb > EllenBinTreeSet_rcu_shb;
+ struct traits_EllenBinTreeSet_stat_gpi : public traits_EllenBinTreeSet_stat
+ {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpi::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeSet< rcu_gpi, key_type, key_val, traits_EllenBinTreeSet_stat_gpi > EllenBinTreeSet_rcu_gpi_stat;
- class traits_EllenBinTreeSet_rcu_shb_stat: public cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename ellen_bintree_props::key_extractor >
- ,co::less< typename ellen_bintree_props::less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::shb::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- ,co::stat< cc::ellen_bintree::stat<> >
- >::type
- {};
- typedef cc::EllenBinTreeSet< rcu_shb, key_type, key_val, traits_EllenBinTreeSet_rcu_shb_stat > EllenBinTreeSet_rcu_shb_stat;
+ struct traits_EllenBinTreeSet_stat_gpb : public traits_EllenBinTreeSet_stat
+ {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeSet< rcu_gpb, key_type, key_val, traits_EllenBinTreeSet_stat_gpb > EllenBinTreeSet_rcu_gpb_stat;
- class traits_EllenBinTreeSet_rcu_sht: public cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename ellen_bintree_props::key_extractor >
- ,co::less< typename ellen_bintree_props::less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::sht::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- >::type
- {};
- typedef cc::EllenBinTreeSet< rcu_sht, key_type, key_val, traits_EllenBinTreeSet_rcu_sht > EllenBinTreeSet_rcu_sht;
+ struct traits_EllenBinTreeSet_stat_gpt : public traits_EllenBinTreeSet_stat
+ {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::gpt::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeSet< rcu_gpt, key_type, key_val, traits_EllenBinTreeSet_stat_gpt > EllenBinTreeSet_rcu_gpt_stat;
- class traits_EllenBinTreeSet_rcu_sht_stat: public cc::ellen_bintree::make_set_traits<
- cc::ellen_bintree::key_extractor< typename ellen_bintree_props::key_extractor >
- ,co::less< typename ellen_bintree_props::less >
- ,cc::ellen_bintree::update_desc_allocator<
- cds::memory::pool_allocator< typename ellen_bintree_props::sht::update_desc, ellen_bintree_pool::update_desc_pool_accessor >
- >
- ,co::node_allocator< ellen_bintree_pool::internal_node_allocator< int > >
- ,co::stat< cc::ellen_bintree::stat<> >
- >::type
- {};
- typedef cc::EllenBinTreeSet< rcu_sht, key_type, key_val, traits_EllenBinTreeSet_rcu_sht_stat > EllenBinTreeSet_rcu_sht_stat;
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+ struct traits_EllenBinTreeSet_stat_shb : public traits_EllenBinTreeSet_stat
+ {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::shb::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeSet< rcu_shb, key_type, key_val, traits_EllenBinTreeSet_stat_shb > EllenBinTreeSet_rcu_shb_stat;
+ struct traits_EllenBinTreeSet_stat_sht : public traits_EllenBinTreeSet_stat
+ {
+ typedef cds::memory::pool_allocator< typename ellen_bintree_props::sht::update_desc, ellen_bintree_pool::update_desc_pool_accessor > update_desc_allocator;
+ };
+ typedef cc::EllenBinTreeSet< rcu_sht, key_type, key_val, traits_EllenBinTreeSet_stat_sht > EllenBinTreeSet_rcu_sht_stat;
#endif
// ***************************************************************************