EllenBinTree refactoring
authorkhizmax <libcds.dev@gmail.com>
Sun, 9 Nov 2014 22:35:08 +0000 (01:35 +0300)
committerkhizmax <libcds.dev@gmail.com>
Sun, 9 Nov 2014 22:35:08 +0000 (01:35 +0300)
31 files changed:
cds/container/ellen_bintree_map_dhp.h [new file with mode: 0644]
cds/container/ellen_bintree_map_ptb.h [deleted file]
cds/container/ellen_bintree_map_rcu.h
cds/container/ellen_bintree_set_dhp.h [new file with mode: 0644]
cds/container/ellen_bintree_set_ptb.h [deleted file]
cds/container/ellen_bintree_set_rcu.h
cds/container/impl/ellen_bintree_map.h
cds/container/impl/ellen_bintree_set.h
cds/container/skip_list_map_nogc.h
projects/Win/vc12/cds.vcxproj
projects/Win/vc12/cds.vcxproj.filters
projects/Win/vc12/hdr-test-tree.vcxproj
projects/Win/vc12/hdr-test-tree.vcxproj.filters
projects/Win/vc12/unit-map-insdel.vcxproj
tests/test-hdr/tree/hdr_ellenbintree_map.h
tests/test-hdr/tree/hdr_ellenbintree_map_dhp.cpp [new file with mode: 0644]
tests/test-hdr/tree/hdr_ellenbintree_map_hp.cpp
tests/test-hdr/tree/hdr_ellenbintree_map_ptb.cpp [deleted file]
tests/test-hdr/tree/hdr_ellenbintree_map_rcu_gpb.cpp
tests/test-hdr/tree/hdr_ellenbintree_set.h
tests/test-hdr/tree/hdr_ellenbintree_set_dhp.cpp [new file with mode: 0644]
tests/test-hdr/tree/hdr_ellenbintree_set_hp.cpp
tests/test-hdr/tree/hdr_ellenbintree_set_ptb.cpp [deleted file]
tests/test-hdr/tree/hdr_ellenbintree_set_rcu_gpb.cpp
tests/unit/map2/map_defs.h
tests/unit/map2/map_types.h
tests/unit/pqueue/ellen_bintree_pqueue.h
tests/unit/pqueue/pqueue_defs.h
tests/unit/pqueue/pqueue_type.h
tests/unit/set2/set_defs.h
tests/unit/set2/set_types.h

diff --git a/cds/container/ellen_bintree_map_dhp.h b/cds/container/ellen_bintree_map_dhp.h
new file mode 100644 (file)
index 0000000..91378d4
--- /dev/null
@@ -0,0 +1,9 @@
+//$$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
diff --git a/cds/container/ellen_bintree_map_ptb.h b/cds/container/ellen_bintree_map_ptb.h
deleted file mode 100644 (file)
index ab16d52..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-//$$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
index a45a8620b4688cb21c1c481e3d2d59d48a8da018..e3ad6135532da590ce1a7d4d4b3331fc27d012a7 100644 (file)
@@ -40,40 +40,9 @@ namespace cds { namespace container {
         - \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.
@@ -83,7 +52,7 @@ namespace cds { namespace container {
         typename Key,
         typename T,
 #ifdef CDS_DOXYGEN_INVOKED
-        class Traits = ellen_bintree::type_traits
+        class Traits = ellen_bintree::traits
 #else
         class Traits
 #endif
@@ -100,27 +69,27 @@ namespace cds { namespace container {
         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
 
@@ -139,7 +108,7 @@ namespace cds { namespace container {
         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;
 
@@ -158,11 +127,10 @@ namespace cds { namespace container {
             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.
         */
@@ -178,10 +146,10 @@ namespace cds { namespace container {
             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.
         */
@@ -222,7 +190,7 @@ namespace cds { namespace container {
             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 )
@@ -235,11 +203,11 @@ namespace cds { namespace container {
             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 )
@@ -277,11 +245,13 @@ namespace cds { namespace container {
 
             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 )
@@ -298,7 +268,7 @@ namespace cds { namespace container {
         /// 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
         */
@@ -537,15 +507,21 @@ namespace cds { namespace container {
         }
 
         /// 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();
@@ -565,7 +541,6 @@ namespace cds { namespace container {
         {
             return base_class::check_consistency();
         }
-
     };
 }} // namespace cds::container
 
diff --git a/cds/container/ellen_bintree_set_dhp.h b/cds/container/ellen_bintree_set_dhp.h
new file mode 100644 (file)
index 0000000..beaca96
--- /dev/null
@@ -0,0 +1,9 @@
+//$$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
diff --git a/cds/container/ellen_bintree_set_ptb.h b/cds/container/ellen_bintree_set_ptb.h
deleted file mode 100644 (file)
index ebba563..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-//$$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
index 1a201c0fa29a07803396daa6eae3d36cb5e46fff..f0a0049e0c070d2f989147028d58311101d34a7b 100644 (file)
@@ -40,38 +40,9 @@ namespace cds { namespace container {
         - \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.
@@ -120,7 +91,7 @@ namespace cds { namespace container {
         typename Key,
         typename T,
 #ifdef CDS_DOXYGEN_INVOKED
-        class Traits = ellen_bintree::type_traits
+        class Traits = ellen_bintree::traits
 #else
         class Traits
 #endif
@@ -138,25 +109,25 @@ namespace cds { namespace container {
         //@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
 
@@ -165,14 +136,14 @@ namespace cds { namespace container {
         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;
 
@@ -195,7 +166,7 @@ namespace cds { namespace container {
             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.
         */
@@ -225,7 +196,7 @@ namespace cds { namespace container {
             \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 )
@@ -263,11 +234,13 @@ namespace cds { namespace container {
             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 )
@@ -280,7 +253,7 @@ namespace cds { namespace container {
             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.
 
@@ -445,25 +418,25 @@ namespace cds { namespace container {
                 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
@@ -471,15 +444,22 @@ namespace cds { namespace container {
 
             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.
@@ -487,60 +467,24 @@ namespace cds { namespace container {
             \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
@@ -549,12 +493,12 @@ namespace cds { namespace container {
             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.
@@ -562,9 +506,9 @@ namespace cds { namespace container {
             \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
@@ -630,8 +574,8 @@ namespace cds { namespace container {
             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
@@ -653,9 +597,7 @@ namespace cds { namespace container {
         {
             return base_class::check_consistency();
         }
-
     };
-
 }}  // namespace cds::container
 
 #endif // #ifndef __CDS_CONTAINER_ELLEN_BINTREE_SET_RCU_H
index 8f60db7506dbc8d7f9198a14f0524bd9cd5314f7..c8dab92550b2c6bb2de8da9c1aec934aa32b34b9 100644 (file)
@@ -3,7 +3,7 @@
 #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>
@@ -85,7 +85,7 @@ namespace cds { namespace container {
 #   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
index 366ab1f03ddc429f0785707bb08e2d04bd5485d0..13f75fb56c6e287288108d3c19899c235d8c3eaf 100644 (file)
@@ -3,7 +3,7 @@
 #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>
@@ -123,7 +123,7 @@ namespace cds { namespace container {
 #   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
index 4aa63eca15fe0bf8e17df4cd33914cea4902af7e..916de56732317a5f84bfaaf848bc4b1db3984ee1 100644 (file)
@@ -19,7 +19,6 @@ namespace cds { namespace container {
     }} // namespace skip_list::details
     //@endcond
 
-
     /// Lock-free skip-list map (template specialization for gc::nogc)
     /** @ingroup cds_nonintrusive_map
         \anchor cds_nonintrusive_SkipListMap_nogc
index b1d4c659a5f92c370910e5f4d6c3509d95632ac5..373bc40fc4a9f0163e3c3bb83e49f9ce4708e6bc 100644 (file)
     <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
index 9e873d167b422c08d6564551857d6eced521192c..ef76ea7f21535aa968d5d9492d41eed2852d0100 100644 (file)
     <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
index c21ab5c6ab9074690f947c3345c673659eefe516..33ee01bb52cd3f5266a1b4cef1d5eb54eac1ded4 100644 (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
index 343c96a1bf9f5ac658074ec24174d7ebddb82b74..fcdd471278c0ec1543b50d2d35a9bfd78f46c2e7 100644 (file)
     <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
index f9bc6e8dadb2aa4403c02f96b9230990c1411018..3f1b634fc8616dbadf01646d42bc315cd63d75cd 100644 (file)
@@ -43,7 +43,6 @@
     </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
index c087779c616cbb59947ec487e13394fead8025dd..d917bc8afb1b2b6d79afaecd1c523e7b37723370 100644 (file)
@@ -573,15 +573,15 @@ 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_gpb_less();
         void EllenBinTree_rcu_gpb_cmp();
@@ -634,15 +634,15 @@ namespace tree {
             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)
diff --git a/tests/test-hdr/tree/hdr_ellenbintree_map_dhp.cpp b/tests/test-hdr/tree/hdr_ellenbintree_map_dhp.cpp
new file mode 100644 (file)
index 0000000..3145e08
--- /dev/null
@@ -0,0 +1,140 @@
+//$$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
index 4b27b8fbec2a09eb95eccbefcbbcd7ff6ada75b3..81201123a1ea0edee657b17ba1adb62e8ef6d97c 100644 (file)
@@ -12,7 +12,7 @@ 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;
 
@@ -28,11 +28,11 @@ namespace tree {
 
     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>();
     }
diff --git a/tests/test-hdr/tree/hdr_ellenbintree_map_ptb.cpp b/tests/test-hdr/tree/hdr_ellenbintree_map_ptb.cpp
deleted file mode 100644 (file)
index 3fef81b..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-//$$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
index f72e6105efec36c2de626c33e8f4cd87af67716b..6a7bdc539e26009038182ba75fbb99fefcc45280 100644 (file)
@@ -33,9 +33,9 @@ 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()
@@ -44,9 +44,9 @@ namespace tree {
             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()
@@ -56,9 +56,9 @@ namespace tree {
                 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()
@@ -68,21 +68,20 @@ namespace tree {
                 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()
@@ -92,9 +91,9 @@ namespace tree {
                 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()
@@ -105,9 +104,9 @@ namespace tree {
                 ,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()
@@ -118,9 +117,9 @@ namespace tree {
                 ,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()
@@ -133,9 +132,9 @@ namespace tree {
                 ,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
index 24c11647dbeb1d0d65f926f55f116d7ce011a902..8d80b66de1c11baf13e50e7695193065e2640949 100644 (file)
@@ -662,15 +662,15 @@ 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();
@@ -733,15 +733,15 @@ namespace tree {
             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)
diff --git a/tests/test-hdr/tree/hdr_ellenbintree_set_dhp.cpp b/tests/test-hdr/tree/hdr_ellenbintree_set_dhp.cpp
new file mode 100644 (file)
index 0000000..cdabe21
--- /dev/null
@@ -0,0 +1,148 @@
+//$$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
index 9f0a3776e55a71326e02c0268c09157b471dfc61..582ef7ee140a6539eb2e957bbe2cb6bfa34f2743 100644 (file)
@@ -23,17 +23,15 @@ 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>();
     }
diff --git a/tests/test-hdr/tree/hdr_ellenbintree_set_ptb.cpp b/tests/test-hdr/tree/hdr_ellenbintree_set_ptb.cpp
deleted file mode 100644 (file)
index d5bef86..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-//$$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
index c91a441762f3cfca6d4076728a63c60555433114..063dfb61bd1556db73679b0e7263c788c8df9b0a 100644 (file)
@@ -24,17 +24,15 @@ 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>();
     }
index 5b83fa54ebb2fda381ed5ff1551054ea72fc6fcc..a9c2f0283303a6d2d93d6f6394cf1bb175ad21a2 100644 (file)
@@ -404,8 +404,8 @@ TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less_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)\
@@ -417,8 +417,8 @@ TEST_MAP_EXTRACT(SplitList_Lazy_RCU_SHT_st_less_stat)
 #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)\
index de8f106bf5c02968bc539cd4716341979bbad5fa..0050f73b6e3c0086db13f414aec9638a99539e66 100644 (file)
@@ -39,7 +39,7 @@
 
 #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
@@ -1645,7 +1645,7 @@ namespace map2 {
                 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;
@@ -1679,181 +1679,104 @@ namespace map2 {
 #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
 
index 9651d066fef076fea65e14c37952d495b063d124..8be18c7ea713cfd1787a84ce67d8c3744f8058de 100644 (file)
@@ -4,7 +4,7 @@
 #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>
index 845ad4edf981dedd983f5c6bf5f3984e8a0d90b5..4dcf3734fa01c13684eec65783abf48e6a11297f 100644 (file)
@@ -55,7 +55,9 @@
     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)     \
@@ -75,7 +77,9 @@
     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)  \
index 803aad848d38ad7a4e2156e76cef13f43f19d875..5c271d6a14b4e6acf31ae2d091eb1b3923717255 100644 (file)
@@ -38,6 +38,14 @@ namespace pqueue {
             }
         };
 
+        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
@@ -103,304 +111,137 @@ namespace pqueue {
 
 
         // 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 <
index c96ca5447e0f20538d3b6d8b72b96ec0d1851330..f0bb9d28e4e7db6009feaac00af825813dd53fb4 100644 (file)
 #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)\
index a41de00b3b8766fbb3f6f11f5b93461866832bbf..8c3d09c6f1a499a033fa0e5c9511ab1003d067cb 100644 (file)
@@ -30,7 +30,7 @@
 
 #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>
@@ -1634,7 +1634,7 @@ namespace set2 {
                 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;
@@ -1669,179 +1669,107 @@ namespace set2 {
 #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
 
         // ***************************************************************************