MultiLevelHashSet test, bugfixing
authorkhizmax <libcds.dev@gmail.com>
Sun, 18 Oct 2015 10:26:51 +0000 (13:26 +0300)
committerkhizmax <libcds.dev@gmail.com>
Sun, 18 Oct 2015 10:26:51 +0000 (13:26 +0300)
72 files changed:
.gitignore
build/build.sh
cds/container/details/multilevel_hashmap_base.h
cds/container/impl/multilevel_hashmap.h
cds/container/multilevel_hashmap_rcu.h
cds/intrusive/cuckoo_set.h
projects/Win/build-msbuild.cmd
projects/Win/build-vc14.cmd [new file with mode: 0644]
projects/Win/vc12/unit-set-delodd.vcxproj
projects/Win/vc14/unit-set-delodd.vcxproj
projects/source.unit.set.mk
tests/test-hdr/map/hdr_multilevel_hashmap.h
tests/test-hdr/map/hdr_multilevel_hashmap_dhp.cpp
tests/test-hdr/map/hdr_multilevel_hashmap_hp.cpp
tests/test-hdr/map/hdr_multilevel_hashmap_rcu_gpb.cpp
tests/test-hdr/map/hdr_multilevel_hashmap_rcu_gpi.cpp
tests/test-hdr/map/hdr_multilevel_hashmap_rcu_gpt.cpp
tests/test-hdr/map/hdr_multilevel_hashmap_rcu_shb.cpp
tests/test-hdr/map/hdr_multilevel_hashmap_rcu_sht.cpp
tests/test-hdr/set/hdr_intrusive_multilevel_hashset.h
tests/test-hdr/set/hdr_intrusive_multilevel_hashset_dhp.cpp
tests/test-hdr/set/hdr_intrusive_multilevel_hashset_hp.cpp
tests/test-hdr/set/hdr_intrusive_multilevel_hashset_rcu_gpb.cpp
tests/test-hdr/set/hdr_intrusive_multilevel_hashset_rcu_gpi.cpp
tests/test-hdr/set/hdr_intrusive_multilevel_hashset_rcu_gpt.cpp
tests/test-hdr/set/hdr_intrusive_multilevel_hashset_rcu_shb.cpp
tests/test-hdr/set/hdr_intrusive_multilevel_hashset_rcu_sht.cpp
tests/test-hdr/set/hdr_multilevel_hashset.h
tests/test-hdr/set/hdr_multilevel_hashset_dhp.cpp
tests/test-hdr/set/hdr_multilevel_hashset_hp.cpp
tests/test-hdr/set/hdr_multilevel_hashset_rcu_gpb.cpp
tests/test-hdr/set/hdr_multilevel_hashset_rcu_gpi.cpp
tests/test-hdr/set/hdr_multilevel_hashset_rcu_gpt.cpp
tests/test-hdr/set/hdr_multilevel_hashset_rcu_shb.cpp
tests/test-hdr/set/hdr_multilevel_hashset_rcu_sht.cpp
tests/unit/map2/map_defs.h
tests/unit/map2/map_delodd.h
tests/unit/map2/map_delodd_multilevelhashmap.cpp
tests/unit/map2/map_find_string.h
tests/unit/map2/map_find_string_multilevelhashmap.cpp
tests/unit/map2/map_insdel_func.h
tests/unit/map2/map_insdel_func_multilevelhashmap.cpp
tests/unit/map2/map_insdel_int.h
tests/unit/map2/map_insdel_int_multilevelhashmap.cpp
tests/unit/map2/map_insdel_item_int.h
tests/unit/map2/map_insdel_item_int_multilevelhashmap.cpp
tests/unit/map2/map_insdel_item_string.h
tests/unit/map2/map_insdel_item_string_multilevelhashmap.cpp
tests/unit/map2/map_insdel_string.h
tests/unit/map2/map_insdel_string_multilevelhashmap.cpp
tests/unit/map2/map_insdelfind.h
tests/unit/map2/map_insdelfind_multilevelhashmap.cpp
tests/unit/map2/map_insfind_int.h
tests/unit/map2/map_insfind_int_multilevelhashmap.cpp
tests/unit/map2/map_type_multilevel_hashmap.h
tests/unit/set2/CMakeLists.txt
tests/unit/set2/set_defs.h
tests/unit/set2/set_delodd.cpp
tests/unit/set2/set_delodd.h
tests/unit/set2/set_delodd_multilevelhashset.cpp [new file with mode: 0644]
tests/unit/set2/set_insdel_func.h
tests/unit/set2/set_insdel_func_multilevelhashset.cpp
tests/unit/set2/set_insdel_string.h
tests/unit/set2/set_insdel_string_multilevelhashset.cpp
tests/unit/set2/set_type_cuckoo.h
tests/unit/set2/set_type_ellen_bintree.h
tests/unit/set2/set_type_michael.h
tests/unit/set2/set_type_multilevel_hashset.h
tests/unit/set2/set_type_skip_list.h
tests/unit/set2/set_type_split_list.h
tests/unit/set2/set_type_std.h
tests/unit/set2/set_type_striped.h

index ef8a1bd..e4a293e 100644 (file)
@@ -1,4 +1,3 @@
-/tools/doxygen.log
 /doc
 /sandbox
 /projects/Win/vc12/cds.opensdf
@@ -9,13 +8,12 @@
 *.d
 /tests/data/dictionary.txt
 /bin
-obj
+/obj
 /projects/Win/vc12/*.user
 /projects/Win/vc14/cds.sdf
 /projects/Win/vc14/cds.v14.suo
 /projects/Win/vc14/*.user
 /projects/Win/vc14/*.opensdf
 /projects/Win/vc14/.vs/
-/build/build-mingw-amd64.bat
-/build/build-mingw-amd64.log
 /todo-2.1.txt
+*.log
index 56dd2b0..c7e253f 100644 (file)
@@ -532,7 +532,7 @@ mkdir -p $OBJ_PATH/debug
 
 CXXFLAGS="$compileroptions $cxx_debug_options $EXTRA_CXXFLAGS" \
 CFLAGS="$compileroptions $cxx_debug_options $EXTRA_CFLAGS $debugflag " \
-LDLIBS="$ld_libs" \
+LDLIBS="$LDLIBS $ld_libs" \
 LDFLAGS="$linkeroptions -shared $ld_debug_options $EXTRA_LDFLAGS " \
 $MAKE -f Makefile \
      platform=$OS_FAMILY \
@@ -556,7 +556,7 @@ mkdir -p $OBJ_PATH/release
 CXXFLAGS="$compileroptions $cxx_release_options $EXTRA_CXXFLAGS " \
 CFLAGS="$compileroptions $cxx_release_options $EXTRA_CFLAGS " \
 LDFLAGS="$linkeroptions -shared $ld_resease_options $EXTRA_LDFLAGS " \
-LDLIBS="$ld_libs" \
+LDLIBS="$LDLIBS $ld_libs" \
 $MAKE -f Makefile \
      platform=$OS_FAMILY \
      BIN_PATH=$BIN_PATH \
@@ -572,7 +572,7 @@ if test $MAKE_DEBUG_TEST = '0'; then
     CXXFLAGS="$compileroptions $cxx_release_options $cxx_test_release_options $EXTRA_CXXFLAGS " \
     CFLAGS="$compileroptions $cxx_release_options $EXTRA_CFLAGS " \
     LDFLAGS="$linkeroptions $ld_release_options $ld_test_release_options $EXTRA_TEST_LDFLAGS " \
-    LDLIBS="$ld_libs" \
+    LDLIBS="$LDLIBS $ld_libs" \
     $MAKE -f Makefile -j $makejobs \
         platform=$OS_FAMILY \
         BIN_PATH=$BIN_PATH \
@@ -585,15 +585,10 @@ echo ---------------------------------
 echo Make tests debug
 
 if test $MAKE_DEBUG_TEST = '1'; then
-    CXXFLAGS="$compileroptions $cxx_debug_options $cxx_test_release_options $EXTRA_CXXFLAGS "
-    export CXXFLAGS
-    CFLAGS="$compileroptions $cxx_debug_options $EXTRA_CFLAGS "
-    export CFLAGS
-    LDFLAGS="$linkeroptions $ld_debug_options $ld_test_release_options $EXTRA_TEST_LDFLAGS "
-    export LDFLAGS
-    LDLIBS="$ld_libs"
-    export LDLIBS
-
+    CXXFLAGS="$compileroptions $cxx_debug_options $cxx_test_release_options $EXTRA_CXXFLAGS " \
+    CFLAGS="$compileroptions $cxx_debug_options $EXTRA_CFLAGS " \
+    LDFLAGS="$linkeroptions $ld_debug_options $ld_test_release_options $EXTRA_TEST_LDFLAGS " \
+    LDLIBS="$LDLIBS $ld_libs" \
     $MAKE -f Makefile -j $makejobs \
         platform=$OS_FAMILY \
         BIN_PATH=$BIN_PATH \
index 38ad515..b06b5cb 100644 (file)
@@ -26,13 +26,68 @@ namespace cds { namespace container {
         /// \p MultiLevelHashMap traits
         struct traits
         {
-            /// Hash functor, default is \p std::hash
+            /// Hash functor, default is \p opt::none
             /**
                 \p MultiLevelHashMap may use any hash functor converting a key to
                 fixed-sized bit-string, for example, <a href="https://en.wikipedia.org/wiki/Secure_Hash_Algorithm">SHA1, SHA2</a>,
                 <a href="https://en.wikipedia.org/wiki/MurmurHash">MurmurHash</a>,
                 <a href="https://en.wikipedia.org/wiki/CityHash">CityHash</a>
                 or its successor <a href="https://code.google.com/p/farmhash/">FarmHash</a>.
+
+                If you use a fixed-sized key you may use it directly instead of a hash.
+                In such case \p %traits::hash should be specified as \p opt::none.
+                However, if you want to use the hash values or if your key type is not fixed-sized
+                you must specify a proper hash functor in your traits.
+                For example:
+                fixed-sized key - IP4 address map
+                @code
+                    // Key - IP address
+                    struct ip4_address {
+                        uint8_t ip[4];
+                    };
+
+                    // IP compare
+                    struct ip4_cmp {
+                        int operator()( ip4_address const& lhs, ip4_address const& rhs ) const
+                        {
+                            return memcmp( &lhs, &rhs, sizeof(lhs));
+                        }
+                    };
+
+                    // Value - statistics for the IP address
+                    struct statistics {
+                        // ...
+                    };
+
+                    // Traits
+                    // Key type (ip4_addr) is fixed-sized so we may use the map without any hash functor
+                    struct ip4_map_traits: public cds::container::multilevl_hashmap::traits
+                    {
+                        typedef ip4_cmp  compare;
+                    };
+
+                    // IP4 address - statistics map
+                    typedef cds::container::MultiLevelHashMap< cds::gc::HP, ip4_address, statistics, ip4_map_traits > ip4_map;
+                @endcode
+
+                variable-size key requires a hash functor: URL map
+                @code
+                    // Value - statistics for the URL
+                    struct statistics {
+                        // ...
+                    };
+
+                    // Traits
+                    // Key type (std::string) is variable-sized so we must provide a hash functor in our traits
+                    // We do not specify any comparing predicate (less or compare) so <tt> std::less<std::string> </tt> will be used by default
+                    struct url_map_traits: public cds::container::multilevl_hashmap::traits
+                    {
+                        typedef std::hash<std::string> hash;
+                    };
+
+                    // URL statistics map
+                    typedef cds::container::MultiLevelHashMap< cds::gc::HP, std::string, statistics, url_map_traits > url_map;
+                @endcode
             */
             typedef opt::none hash;
 
@@ -134,22 +189,18 @@ namespace cds { namespace container {
     //@cond
     namespace details {
 
-        template <typename GC, typename Key, typename T, typename Traits>
-        struct make_multilevel_hashmap
+        template <typename Key, typename Value, typename Hash>
+        struct hash_selector
         {
-            typedef GC      gc;
-            typedef Key     key_type;
-            typedef T       mapped_type;
-            typedef Traits  original_traits;
-            typedef typename cds::opt::v::hash_selector< typename original_traits::hash >::type hasher;
+            typedef Key key_type;
+            typedef Value mapped_type;
+            typedef Hash hasher;
 
             typedef typename std::decay<
                 typename std::remove_reference<
-                    decltype( hasher()( std::declval<key_type>()) )
+                decltype(hasher()(std::declval<key_type>()))
                 >::type
             >::type hash_type;
-            //typedef typename std::result_of< hasher( std::declval<key_type>()) >::type hash_type;
-            static_assert( !std::is_pointer<hash_type>::value, "hash functor should return a reference to hash value" );
 
             struct node_type
             {
@@ -157,48 +208,109 @@ namespace cds { namespace container {
                 hash_type const m_hash;
 
                 node_type() = delete;
-                node_type( node_type const& ) = delete;
+                node_type(node_type const&) = delete;
 
                 template <typename Q>
-                node_type( hasher& h, Q const& key )
-                    : m_Value( std::move( std::make_pair( key, mapped_type())))
-                    , m_hash( h( m_Value.first ))
+                node_type(hasher& h, Q const& key)
+                    : m_Value(std::move(std::make_pair(key, mapped_type())))
+                    , m_hash(h(m_Value.first))
                 {}
 
                 template <typename Q, typename U >
-                node_type( hasher& h, Q const& key, U const& val )
-                    : m_Value( std::move( std::make_pair( key, mapped_type(val))))
-                    , m_hash( h( m_Value.first ))
+                node_type(hasher& h, Q const& key, U const& val)
+                    : m_Value(std::move(std::make_pair(key, mapped_type(val))))
+                    , m_hash(h(m_Value.first))
                 {}
 
                 template <typename Q, typename... Args>
-                node_type( hasher& h, Q&& key, Args&&... args )
-                    : m_Value( std::move( std::make_pair( std::forward<Q>(key), std::move( mapped_type( std::forward<Args>(args)... )))))
-                    , m_hash( h( m_Value.first ))
+                node_type(hasher& h, Q&& key, Args&&... args)
+                    : m_Value(std::move(std::make_pair(std::forward<Q>(key), std::move(mapped_type(std::forward<Args>(args)...)))))
+                    , m_hash(h(m_Value.first))
                 {}
             };
 
-            typedef cds::details::Allocator< node_type, typename original_traits::allocator > cxx_node_allocator;
+            struct hash_accessor
+            {
+                hash_type const& operator()(node_type const& node) const
+                {
+                    return node.m_hash;
+                }
+            };
+        };
 
-            struct node_disposer
+        template <typename Key, typename Value>
+        struct hash_selector<Key, Value, opt::none>
+        {
+            typedef Key key_type;
+            typedef Value mapped_type;
+
+            struct hasher {
+                key_type const& operator()(key_type const& k) const
+                {
+                    return k;
+                }
+            };
+            typedef key_type hash_type;
+
+            struct node_type
             {
-                void operator()( node_type * p ) const
+                std::pair< key_type const, mapped_type> m_Value;
+
+                node_type() = delete;
+                node_type(node_type const&) = delete;
+
+                template <typename Q>
+                node_type(hasher /*h*/, Q const& key)
+                    : m_Value(std::move(std::make_pair(key, mapped_type())))
+                {}
+
+                template <typename Q, typename U >
+                node_type(hasher /*h*/, Q const& key, U const& val)
+                    : m_Value(std::move(std::make_pair(key, mapped_type(val))))
+                {}
+
+                template <typename Q, typename... Args>
+                node_type(hasher /*h*/, Q&& key, Args&&... args)
+                    : m_Value(std::move(std::make_pair(std::forward<Q>(key), std::move(mapped_type(std::forward<Args>(args)...)))))
+                {}
+            };
+
+            struct hash_accessor
+            {
+                hash_type const& operator()(node_type const& node) const
                 {
-                    cxx_node_allocator().Delete( p );
+                    return node.m_Value.first;
                 }
             };
+        };
 
-            struct get_node_hash
+        template <typename GC, typename Key, typename T, typename Traits>
+        struct make_multilevel_hashmap
+        {
+            typedef GC      gc;
+            typedef Key     key_type;
+            typedef T       mapped_type;
+            typedef Traits  original_traits;
+
+
+            typedef hash_selector< key_type, mapped_type, typename original_traits::hash > select;
+            typedef typename select::hasher    hasher;
+            typedef typename select::hash_type hash_type;
+            typedef typename select::node_type node_type;
+
+            typedef cds::details::Allocator< node_type, typename original_traits::allocator > cxx_node_allocator;
+
+            struct node_disposer
             {
-                hash_type const& operator()( node_type const& n )
+                void operator()( node_type * p ) const
                 {
-                    return n.m_hash;
+                    cxx_node_allocator().Delete( p );
                 }
             };
 
             struct intrusive_traits: public original_traits
             {
-                typedef get_node_hash hash_accessor;
+                typedef typename select::hash_accessor hash_accessor;
                 typedef node_disposer disposer;
             };
 
index 1ed1b4e..50a9d66 100644 (file)
@@ -62,6 +62,7 @@ namespace cds { namespace container {
           <a href="https://en.wikipedia.org/wiki/MurmurHash">MurmurHash</a>, <a href="https://en.wikipedia.org/wiki/CityHash">CityHash</a>
           or its successor <a href="https://code.google.com/p/farmhash/">FarmHash</a> and so on, which
           converts variable-length strings to fixed-length bit-strings, and such hash values will be the keys in \p %MultiLevelHashMap.
+          If your key is fixed-sized the hash functor is optional, see \p multilevel_hashmap::traits::hash for explanation and examples.
         - \p %MultiLevelHashMap uses a perfect hashing. It means that if two different keys, for example, of type \p std::string,
           have identical hash then you cannot insert both that keys in the map. \p %MultiLevelHashMap does not maintain the key,
           it maintains its fixed-size hash value.
@@ -481,8 +482,7 @@ namespace cds { namespace container {
         template <typename K>
         bool erase( K const& key )
         {
-            hash_type h = m_Hasher( key_type( key ));
-            return base_class::erase( h );
+            return base_class::erase( m_Hasher( key_type( key )));
         }
 
         /// Delete \p key from the map
@@ -505,8 +505,7 @@ namespace cds { namespace container {
         template <typename K, typename Func>
         bool erase( K const& key, Func f )
         {
-            hash_type h = m_Hasher( key_type( key ));
-            return base_class::erase( h, [&f]( node_type& node) { f( node.m_Value ); } );
+            return base_class::erase( m_Hasher(key_type(key)), [&f]( node_type& node) { f( node.m_Value ); } );
         }
 
         /// Deletes the element pointed by iterator \p iter
index c120b34..c049b43 100644 (file)
@@ -26,6 +26,7 @@ namespace cds { namespace container {
           <a href="https://en.wikipedia.org/wiki/MurmurHash">MurmurHash</a>, <a href="https://en.wikipedia.org/wiki/CityHash">CityHash</a>
           or its successor <a href="https://code.google.com/p/farmhash/">FarmHash</a> and so on, which
           converts variable-length strings to fixed-length bit-strings, and such hash values will be the keys in \p %MultiLevelHashMap.
+          If your key is fixed-sized the hash functor is optional, see \p multilevel_hashmap::traits::hash for explanation and examples.
         - \p %MultiLevelHashMap uses a perfect hashing. It means that if two different keys, for example, of type \p std::string,
           have identical hash then you cannot insert both that keys in the map. \p %MultiLevelHashMap does not maintain the key,
           it maintains its fixed-size hash value.
@@ -91,6 +92,7 @@ namespace cds { namespace container {
         typedef typename maker::node_type node_type;
         typedef typename maker::cxx_node_allocator cxx_node_allocator;
         typedef std::unique_ptr< node_type, typename maker::node_disposer > scoped_node_ptr;
+        typedef typename base_class::check_deadlock_policy check_deadlock_policy;
 
         struct node_cast
         {
@@ -458,8 +460,7 @@ namespace cds { namespace container {
         template <typename K>
         bool erase( K const& key )
         {
-            hash_type h = m_Hasher( key_type( key ));
-            return base_class::erase( h );
+            return base_class::erase(m_Hasher(key_type(key)));
         }
 
         /// Delete \p key from the map
@@ -484,8 +485,7 @@ namespace cds { namespace container {
         template <typename K, typename Func>
         bool erase( K const& key, Func f )
         {
-            hash_type h = m_Hasher( key_type( key ));
-            return base_class::erase( h, [&f]( node_type& node) { f( node.m_Value ); } );
+            return base_class::erase(m_Hasher(key_type(key)), [&f]( node_type& node) { f( node.m_Value ); });
         }
 
         /// Extracts the item from the map with specified \p key
index f2c12f7..c439e5d 100644 (file)
@@ -401,7 +401,7 @@ namespace cds { namespace intrusive {
 
         protected:
             //@cond
-            lock_array      m_Locks[c_nArity] ;   ///< array of lock_array_type
+            lock_array      m_Locks[c_nArity] ;   ///< array of \p lock_array_type
             statistics_type m_Stat              ; ///< internal statistics
             //@endcond
 
@@ -917,18 +917,6 @@ namespace cds { namespace intrusive {
                 for ( unsigned int i = 0; i < c_nArity; ++i )
                     pNew[i] = create_lock_array( nCapacity );
 
-                /*
-                // Assignment m_arrLocks[i] = pNew[i] may call heavy-weighted dtor for each item of m_arrLocks
-                // that is unacceptable under spin-lock
-                // So, we store copy of m_arrLocks in pOld
-                lock_array_ptr pOld[ c_nArity ];
-                for ( unsigned int i = 0; i < c_nArity; ++i )
-                    pOld[i] = m_arrLocks[i];
-
-                // m_arrLocks assignment will not lead to calling dtor of each item of m_arrLocks
-                // since copy of m_arrLocks locates in pOld and assignment will not be too painful for spin-lock
-                */
-
                 {
                     scoped_spinlock sl(m_access);
                     for ( unsigned int i = 0; i < c_nArity; ++i )
@@ -1364,7 +1352,7 @@ namespace cds { namespace intrusive {
             };
 
             template <typename Node, unsigned int Capacity>
-            class bucket_entry<Node, cuckoo::vector<Capacity> >
+            class bucket_entry<Node, cuckoo::vector<Capacity>>
             {
             public:
                 typedef Node                            node_type;
@@ -1381,22 +1369,14 @@ namespace cds { namespace intrusive {
                 {
                     assert( m_nSize < c_nCapacity );
 
-                    // std alorithm
                     if ( nFrom < m_nSize )
                         std::copy_backward( m_arrNode + nFrom, m_arrNode + m_nSize, m_arrNode + m_nSize + 1 );
-
-                    // alternative: low-level byte copying
-                    //memmove( m_arrNode + nFrom + 1, m_arrNode + nFrom, (m_nSize - nFrom) * sizeof(m_arrNode[0]) );
                 }
 
                 void shift_down( node_type ** pFrom )
                 {
                     assert( m_arrNode <= pFrom && pFrom < m_arrNode + m_nSize);
-                    // std algo
-                    std::copy( pFrom + 1, m_arrNode + m_nSize, pFrom  );
-
-                    // alternative: low-level byte copying
-                    //memmove( pFrom + 1, pFrom, (m_nSize - nFrom - 1) * sizeof(m_arrNode[0]));
+                    std::copy( pFrom + 1, m_arrNode + m_nSize, pFrom );
                 }
             public:
                 class iterator
@@ -1473,8 +1453,8 @@ namespace cds { namespace intrusive {
                     assert( !it.pArr || (m_arrNode <= it.pArr && it.pArr <= m_arrNode + m_nSize));
 
                     if ( it.pArr ) {
-                        shift_up( (unsigned int)(it.pArr - m_arrNode) + 1 );
-                        *(it.pArr + 1) = p;
+                        shift_up( static_cast<unsigned int>(it.pArr - m_arrNode) + 1 );
+                        it.pArr[1] = p;
                     }
                     else {
                         shift_up(0);
@@ -1514,7 +1494,7 @@ namespace cds { namespace intrusive {
             struct hash_ops {
                 static void store( Node * pNode, size_t * pHashes )
                 {
-                    memcpy( pNode->m_arrHash, pHashes, sizeof(size_t) * ArraySize );
+                    memcpy( pNode->m_arrHash, pHashes, sizeof(pHashes[0]) * ArraySize );
                 }
                 static bool equal_to( Node& node, unsigned int nTable, size_t nHash )
                 {
@@ -1911,10 +1891,7 @@ namespace cds { namespace intrusive {
             bucket_iterator     itFound;
         };
 
-        typedef typename std::conditional< c_isSorted
-            , cuckoo::details::contains< node_traits, true >
-            , cuckoo::details::contains< node_traits, false >
-        >::type contains_action;
+        typedef cuckoo::details::contains< node_traits, c_isSorted > contains_action;
 
         template <typename Predicate>
         struct predicate_wrapper {
@@ -2206,10 +2183,11 @@ namespace cds { namespace intrusive {
 
         CDS_CONSTEXPR static unsigned int calc_probeset_size( unsigned int nProbesetSize ) CDS_NOEXCEPT
         {
-            return nProbesetSize
-                ? nProbesetSize
-                : ( node_type::probeset_size ? node_type::probeset_size : c_nDefaultProbesetSize )
-;
+            return std::is_same< probeset_class, cuckoo::vector_probeset_class >::value
+                ? node_type::probeset_size
+                : (nProbesetSize
+                    ? nProbesetSize
+                    : ( node_type::probeset_size ? node_type::probeset_size : c_nDefaultProbesetSize ));
         }
         //@endcond
 
@@ -2238,7 +2216,7 @@ namespace cds { namespace intrusive {
         /// Constructs the set object with given probe set size and threshold
         /**
             If probe set type is <tt> cuckoo::vector<Capacity> </tt> vector
-            then \p nProbesetSize should be equal to vector's \p Capacity.
+            then \p nProbesetSize is ignored since it should be equal to vector's \p Capacity.
         */
         CuckooSet(
             size_t nInitialSize                 ///< Initial set size; if 0 - use default initial size \ref c_nDefaultInitialSize
index a0dd182..08f2674 100644 (file)
@@ -1,5 +1,5 @@
 :: Command line arguments:\r
-:: %1 - Visual C++ version: vc12 (2013)\r
+:: %1 - Visual C++ version: vc12 (2013), vc14 (2015)\r
 :: %2 - configuration to build (Release, Debug etc)\r
 :: %3,%4,...%9 - [optional] additional MSBuild options\r
 \r
diff --git a/projects/Win/build-vc14.cmd b/projects/Win/build-vc14.cmd
new file mode 100644 (file)
index 0000000..15d1189
--- /dev/null
@@ -0,0 +1,2 @@
+call "%VS140COMNTOOLS%"\vsvars32.bat\r
+call build-msbuild.cmd vc14 Release /tv:14.0 /m\r
index ad91832..50f87cd 100644 (file)
@@ -47,6 +47,7 @@
     <ClCompile Include="..\..\..\tests\unit\set2\set_delodd_cuckoo.cpp" />\r
     <ClCompile Include="..\..\..\tests\unit\set2\set_delodd_ellentree.cpp" />\r
     <ClCompile Include="..\..\..\tests\unit\set2\set_delodd_michael.cpp" />\r
+    <ClCompile Include="..\..\..\tests\unit\set2\set_delodd_multilevelhashset.cpp" />\r
     <ClCompile Include="..\..\..\tests\unit\set2\set_delodd_skip.cpp" />\r
     <ClCompile Include="..\..\..\tests\unit\set2\set_delodd_split.cpp" />\r
   </ItemGroup>\r
index 80c227e..8981a8e 100644 (file)
@@ -55,6 +55,7 @@
     <ClCompile Include="..\..\..\tests\unit\set2\set_delodd_cuckoo.cpp" />\r
     <ClCompile Include="..\..\..\tests\unit\set2\set_delodd_ellentree.cpp" />\r
     <ClCompile Include="..\..\..\tests\unit\set2\set_delodd_michael.cpp" />\r
+    <ClCompile Include="..\..\..\tests\unit\set2\set_delodd_multilevelhashset.cpp" />\r
     <ClCompile Include="..\..\..\tests\unit\set2\set_delodd_skip.cpp" />\r
     <ClCompile Include="..\..\..\tests\unit\set2\set_delodd_split.cpp" />\r
   </ItemGroup>\r
index ee11421..49688ba 100644 (file)
@@ -28,7 +28,8 @@ CDSUNIT_SET_SOURCES := \
     tests/unit/set2/set_insdelfind_std.cpp \
        tests/unit/set2/set_delodd.cpp \
        tests/unit/set2/set_delodd_cuckoo.cpp \
-       tests/unit/set2/set_delodd_michael.cpp \
        tests/unit/set2/set_delodd_ellentree.cpp \
+       tests/unit/set2/set_delodd_michael.cpp \
+       tests/unit/set2/set_delodd_multilevelhashset.cpp \
        tests/unit/set2/set_delodd_skip.cpp \
        tests/unit/set2/set_delodd_split.cpp \
index 559c87d..8d0bf2c 100644 (file)
@@ -608,6 +608,10 @@ namespace map {
             CPPUNIT_MSG(m.statistics());
         }
 
+        void hp_nohash();
+        void hp_nohash_stat();
+        void hp_nohash_5_3();
+        void hp_nohash_5_3_stat();
         void hp_stdhash();
         void hp_stdhash_stat();
         void hp_stdhash_5_3();
@@ -617,6 +621,10 @@ namespace map {
         void hp_hash128_4_3();
         void hp_hash128_4_3_stat();
 
+        void dhp_nohash();
+        void dhp_nohash_stat();
+        void dhp_nohash_5_3();
+        void dhp_nohash_5_3_stat();
         void dhp_stdhash();
         void dhp_stdhash_stat();
         void dhp_stdhash_5_3();
@@ -626,6 +634,10 @@ namespace map {
         void dhp_hash128_4_3();
         void dhp_hash128_4_3_stat();
 
+        void rcu_gpb_nohash();
+        void rcu_gpb_nohash_stat();
+        void rcu_gpb_nohash_5_3();
+        void rcu_gpb_nohash_5_3_stat();
         void rcu_gpb_stdhash();
         void rcu_gpb_stdhash_stat();
         void rcu_gpb_stdhash_5_3();
@@ -635,6 +647,10 @@ namespace map {
         void rcu_gpb_hash128_4_3();
         void rcu_gpb_hash128_4_3_stat();
 
+        void rcu_gpi_nohash();
+        void rcu_gpi_nohash_stat();
+        void rcu_gpi_nohash_5_3();
+        void rcu_gpi_nohash_5_3_stat();
         void rcu_gpi_stdhash();
         void rcu_gpi_stdhash_stat();
         void rcu_gpi_stdhash_5_3();
@@ -644,6 +660,10 @@ namespace map {
         void rcu_gpi_hash128_4_3();
         void rcu_gpi_hash128_4_3_stat();
 
+        void rcu_gpt_nohash();
+        void rcu_gpt_nohash_stat();
+        void rcu_gpt_nohash_5_3();
+        void rcu_gpt_nohash_5_3_stat();
         void rcu_gpt_stdhash();
         void rcu_gpt_stdhash_stat();
         void rcu_gpt_stdhash_5_3();
@@ -653,6 +673,10 @@ namespace map {
         void rcu_gpt_hash128_4_3();
         void rcu_gpt_hash128_4_3_stat();
 
+        void rcu_shb_nohash();
+        void rcu_shb_nohash_stat();
+        void rcu_shb_nohash_5_3();
+        void rcu_shb_nohash_5_3_stat();
         void rcu_shb_stdhash();
         void rcu_shb_stdhash_stat();
         void rcu_shb_stdhash_5_3();
@@ -662,6 +686,10 @@ namespace map {
         void rcu_shb_hash128_4_3();
         void rcu_shb_hash128_4_3_stat();
 
+        void rcu_sht_nohash();
+        void rcu_sht_nohash_stat();
+        void rcu_sht_nohash_5_3();
+        void rcu_sht_nohash_5_3_stat();
         void rcu_sht_stdhash();
         void rcu_sht_stdhash_stat();
         void rcu_sht_stdhash_5_3();
@@ -672,6 +700,10 @@ namespace map {
         void rcu_sht_hash128_4_3_stat();
 
         CPPUNIT_TEST_SUITE(MultiLevelHashMapHdrTest)
+            CPPUNIT_TEST(hp_nohash)
+            CPPUNIT_TEST(hp_nohash_stat)
+            CPPUNIT_TEST(hp_nohash_5_3)
+            CPPUNIT_TEST(hp_nohash_5_3_stat)
             CPPUNIT_TEST(hp_stdhash)
             CPPUNIT_TEST(hp_stdhash_stat)
             CPPUNIT_TEST(hp_stdhash_5_3)
@@ -681,6 +713,10 @@ namespace map {
             CPPUNIT_TEST(hp_hash128_4_3)
             CPPUNIT_TEST(hp_hash128_4_3_stat)
 
+            CPPUNIT_TEST(dhp_nohash)
+            CPPUNIT_TEST(dhp_nohash_stat)
+            CPPUNIT_TEST(dhp_nohash_5_3)
+            CPPUNIT_TEST(dhp_nohash_5_3_stat)
             CPPUNIT_TEST(dhp_stdhash)
             CPPUNIT_TEST(dhp_stdhash_stat)
             CPPUNIT_TEST(dhp_stdhash_5_3)
@@ -690,6 +726,10 @@ namespace map {
             CPPUNIT_TEST(dhp_hash128_4_3)
             CPPUNIT_TEST(dhp_hash128_4_3_stat)
 
+            CPPUNIT_TEST(rcu_gpb_nohash)
+            CPPUNIT_TEST(rcu_gpb_nohash_stat)
+            CPPUNIT_TEST(rcu_gpb_nohash_5_3)
+            CPPUNIT_TEST(rcu_gpb_nohash_5_3_stat)
             CPPUNIT_TEST(rcu_gpb_stdhash)
             CPPUNIT_TEST(rcu_gpb_stdhash_stat)
             CPPUNIT_TEST(rcu_gpb_stdhash_5_3)
@@ -699,6 +739,10 @@ namespace map {
             CPPUNIT_TEST(rcu_gpb_hash128_4_3)
             CPPUNIT_TEST(rcu_gpb_hash128_4_3_stat)
 
+            CPPUNIT_TEST(rcu_gpi_nohash)
+            CPPUNIT_TEST(rcu_gpi_nohash_stat)
+            CPPUNIT_TEST(rcu_gpi_nohash_5_3)
+            CPPUNIT_TEST(rcu_gpi_nohash_5_3_stat)
             CPPUNIT_TEST(rcu_gpi_stdhash)
             CPPUNIT_TEST(rcu_gpi_stdhash_stat)
             CPPUNIT_TEST(rcu_gpi_stdhash_5_3)
@@ -708,6 +752,10 @@ namespace map {
             CPPUNIT_TEST(rcu_gpi_hash128_4_3)
             CPPUNIT_TEST(rcu_gpi_hash128_4_3_stat)
 
+            CPPUNIT_TEST(rcu_gpt_nohash)
+            CPPUNIT_TEST(rcu_gpt_nohash_stat)
+            CPPUNIT_TEST(rcu_gpt_nohash_5_3)
+            CPPUNIT_TEST(rcu_gpt_nohash_5_3_stat)
             CPPUNIT_TEST(rcu_gpt_stdhash)
             CPPUNIT_TEST(rcu_gpt_stdhash_stat)
             CPPUNIT_TEST(rcu_gpt_stdhash_5_3)
@@ -717,6 +765,10 @@ namespace map {
             CPPUNIT_TEST(rcu_gpt_hash128_4_3)
             CPPUNIT_TEST(rcu_gpt_hash128_4_3_stat)
 
+            CPPUNIT_TEST(rcu_shb_nohash)
+            CPPUNIT_TEST(rcu_shb_nohash_stat)
+            CPPUNIT_TEST(rcu_shb_nohash_5_3)
+            CPPUNIT_TEST(rcu_shb_nohash_5_3_stat)
             CPPUNIT_TEST(rcu_shb_stdhash)
             CPPUNIT_TEST(rcu_shb_stdhash_stat)
             CPPUNIT_TEST(rcu_shb_stdhash_5_3)
@@ -726,6 +778,10 @@ namespace map {
             CPPUNIT_TEST(rcu_shb_hash128_4_3)
             CPPUNIT_TEST(rcu_shb_hash128_4_3_stat)
 
+            CPPUNIT_TEST(rcu_sht_nohash)
+            CPPUNIT_TEST(rcu_sht_nohash_stat)
+            CPPUNIT_TEST(rcu_sht_nohash_5_3)
+            CPPUNIT_TEST(rcu_sht_nohash_5_3_stat)
             CPPUNIT_TEST(rcu_sht_stdhash)
             CPPUNIT_TEST(rcu_sht_stdhash_stat)
             CPPUNIT_TEST(rcu_sht_stdhash_5_3)
index 43cb364..89e8e60 100644 (file)
@@ -9,13 +9,23 @@ namespace map {
         typedef cds::gc::DHP gc_type;
     } // namespace
 
-    void MultiLevelHashMapHdrTest::dhp_stdhash()
+    void MultiLevelHashMapHdrTest::dhp_nohash()
     {
         typedef cc::MultiLevelHashMap< gc_type, size_t, Item > map_type;
 
         test_hp<map_type>(4, 2);
     }
 
+    void MultiLevelHashMapHdrTest::dhp_stdhash()
+    {
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef std::hash<size_t> hash;
+        };
+        typedef cc::MultiLevelHashMap< gc_type, size_t, Item, traits > map_type;
+
+        test_hp<map_type>(4, 2);
+    }
+
     void MultiLevelHashMapHdrTest::dhp_hash128()
     {
         struct traits : public cc::multilevel_hashmap::traits {
@@ -34,9 +44,26 @@ namespace map {
         test_hp<map_type2>(4, 2);
     }
 
+    void MultiLevelHashMapHdrTest::dhp_nohash_stat()
+    {
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef cc::multilevel_hashmap::stat<> stat;
+        };
+        typedef cc::MultiLevelHashMap< gc_type, size_t, Item, traits > map_type;
+        test_hp<map_type>(4, 2);
+
+        typedef cc::MultiLevelHashMap< gc_type, size_t, Item,
+            typename cc::multilevel_hashmap::make_traits<
+                co::stat< cc::multilevel_hashmap::stat<>>
+            >::type
+        > map_type2;
+        test_hp<map_type2>(4, 2);
+    }
+
     void MultiLevelHashMapHdrTest::dhp_stdhash_stat()
     {
         struct traits : public cc::multilevel_hashmap::traits {
+            typedef std::hash<size_t> hash;
             typedef cc::multilevel_hashmap::stat<> stat;
         };
         typedef cc::MultiLevelHashMap< gc_type, size_t, Item, traits > map_type;
@@ -45,12 +72,13 @@ namespace map {
         typedef cc::MultiLevelHashMap< gc_type, size_t, Item,
             typename cc::multilevel_hashmap::make_traits<
                 co::stat< cc::multilevel_hashmap::stat<>>
+                ,co::hash< std::hash<size_t>>
             >::type
         > map_type2;
         test_hp<map_type2>(4, 2);
     }
 
-        void MultiLevelHashMapHdrTest::dhp_hash128_stat()
+    void MultiLevelHashMapHdrTest::dhp_hash128_stat()
     {
         struct traits : public cc::multilevel_hashmap::traits {
             typedef cc::multilevel_hashmap::stat<> stat;
@@ -70,18 +98,48 @@ namespace map {
         test_hp<map_type2>(4, 2);
     }
 
-    void MultiLevelHashMapHdrTest::dhp_stdhash_5_3()
+    void MultiLevelHashMapHdrTest::dhp_nohash_5_3()
     {
         typedef cc::MultiLevelHashMap< gc_type, size_t, Item > map_type;
 
         test_hp<map_type>(5, 3);
     }
 
+
+    void MultiLevelHashMapHdrTest::dhp_stdhash_5_3()
+    {
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef std::hash<size_t> hash;
+        };
+        typedef cc::MultiLevelHashMap< gc_type, size_t, Item, traits > map_type;
+
+        test_hp<map_type>(5, 3);
+    }
+
+    void MultiLevelHashMapHdrTest::dhp_nohash_5_3_stat()
+    {
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef cc::multilevel_hashmap::stat<> stat;
+            typedef cds::backoff::empty back_off;
+        };
+        typedef cc::MultiLevelHashMap< gc_type, size_t, Item, traits > map_type;
+        test_hp<map_type>(5, 3);
+
+        typedef cc::MultiLevelHashMap< gc_type, size_t, Item,
+            typename cc::multilevel_hashmap::make_traits<
+            co::stat< cc::multilevel_hashmap::stat<>>
+            , co::back_off< cds::backoff::empty >
+            >::type
+        > map_type2;
+        test_hp<map_type2>(5, 3);
+    }
+
     void MultiLevelHashMapHdrTest::dhp_stdhash_5_3_stat()
     {
         struct traits : public cc::multilevel_hashmap::traits {
             typedef cc::multilevel_hashmap::stat<> stat;
             typedef cds::backoff::empty back_off;
+            typedef std::hash<size_t> hash;
         };
         typedef cc::MultiLevelHashMap< gc_type, size_t, Item, traits > map_type;
         test_hp<map_type>(5, 3);
@@ -90,6 +148,7 @@ namespace map {
             typename cc::multilevel_hashmap::make_traits<
                 co::stat< cc::multilevel_hashmap::stat<>>
                 ,co::back_off< cds::backoff::empty >
+                ,co::hash< std::hash<size_t>>
             >::type
         > map_type2;
         test_hp<map_type2>(5, 3);
@@ -134,5 +193,6 @@ namespace map {
         > map_type2;
         test_hp<map_type2>(4, 3);
     }
-
 } // namespace map
+
+CPPUNIT_TEST_SUITE_REGISTRATION(map::MultiLevelHashMapHdrTest);
index 40c3e37..8eca0d9 100644 (file)
@@ -9,13 +9,23 @@ namespace map {
         typedef cds::gc::HP gc_type;
     } // namespace
 
-    void MultiLevelHashMapHdrTest::hp_stdhash()
+    void MultiLevelHashMapHdrTest::hp_nohash()
     {
         typedef cc::MultiLevelHashMap< gc_type, size_t, Item > map_type;
 
         test_hp<map_type>(4, 2);
     }
 
+    void MultiLevelHashMapHdrTest::hp_stdhash()
+    {
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef std::hash<size_t> hash;
+        };
+        typedef cc::MultiLevelHashMap< gc_type, size_t, Item, traits > map_type;
+
+        test_hp<map_type>(4, 2);
+    }
+
     void MultiLevelHashMapHdrTest::hp_hash128()
     {
         struct traits : public cc::multilevel_hashmap::traits {
@@ -34,9 +44,26 @@ namespace map {
         test_hp<map_type2>(4, 2);
     }
 
+    void MultiLevelHashMapHdrTest::hp_nohash_stat()
+    {
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef cc::multilevel_hashmap::stat<> stat;
+        };
+        typedef cc::MultiLevelHashMap< gc_type, size_t, Item, traits > map_type;
+        test_hp<map_type>(4, 2);
+
+        typedef cc::MultiLevelHashMap< gc_type, size_t, Item,
+            typename cc::multilevel_hashmap::make_traits<
+                co::stat< cc::multilevel_hashmap::stat<>>
+            >::type
+        > map_type2;
+        test_hp<map_type2>(4, 2);
+    }
+
     void MultiLevelHashMapHdrTest::hp_stdhash_stat()
     {
         struct traits : public cc::multilevel_hashmap::traits {
+            typedef std::hash<size_t> hash;
             typedef cc::multilevel_hashmap::stat<> stat;
         };
         typedef cc::MultiLevelHashMap< gc_type, size_t, Item, traits > map_type;
@@ -45,12 +72,13 @@ namespace map {
         typedef cc::MultiLevelHashMap< gc_type, size_t, Item,
             typename cc::multilevel_hashmap::make_traits<
                 co::stat< cc::multilevel_hashmap::stat<>>
+                ,co::hash< std::hash<size_t>>
             >::type
         > map_type2;
         test_hp<map_type2>(4, 2);
     }
 
-        void MultiLevelHashMapHdrTest::hp_hash128_stat()
+    void MultiLevelHashMapHdrTest::hp_hash128_stat()
     {
         struct traits : public cc::multilevel_hashmap::traits {
             typedef cc::multilevel_hashmap::stat<> stat;
@@ -70,18 +98,48 @@ namespace map {
         test_hp<map_type2>(4, 2);
     }
 
-    void MultiLevelHashMapHdrTest::hp_stdhash_5_3()
+    void MultiLevelHashMapHdrTest::hp_nohash_5_3()
     {
         typedef cc::MultiLevelHashMap< gc_type, size_t, Item > map_type;
 
         test_hp<map_type>(5, 3);
     }
 
+
+    void MultiLevelHashMapHdrTest::hp_stdhash_5_3()
+    {
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef std::hash<size_t> hash;
+        };
+        typedef cc::MultiLevelHashMap< gc_type, size_t, Item, traits > map_type;
+
+        test_hp<map_type>(5, 3);
+    }
+
+    void MultiLevelHashMapHdrTest::hp_nohash_5_3_stat()
+    {
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef cc::multilevel_hashmap::stat<> stat;
+            typedef cds::backoff::empty back_off;
+        };
+        typedef cc::MultiLevelHashMap< gc_type, size_t, Item, traits > map_type;
+        test_hp<map_type>(5, 3);
+
+        typedef cc::MultiLevelHashMap< gc_type, size_t, Item,
+            typename cc::multilevel_hashmap::make_traits<
+            co::stat< cc::multilevel_hashmap::stat<>>
+            , co::back_off< cds::backoff::empty >
+            >::type
+        > map_type2;
+        test_hp<map_type2>(5, 3);
+    }
+
     void MultiLevelHashMapHdrTest::hp_stdhash_5_3_stat()
     {
         struct traits : public cc::multilevel_hashmap::traits {
             typedef cc::multilevel_hashmap::stat<> stat;
             typedef cds::backoff::empty back_off;
+            typedef std::hash<size_t> hash;
         };
         typedef cc::MultiLevelHashMap< gc_type, size_t, Item, traits > map_type;
         test_hp<map_type>(5, 3);
@@ -90,6 +148,7 @@ namespace map {
             typename cc::multilevel_hashmap::make_traits<
                 co::stat< cc::multilevel_hashmap::stat<>>
                 ,co::back_off< cds::backoff::empty >
+                ,co::hash< std::hash<size_t>>
             >::type
         > map_type2;
         test_hp<map_type2>(5, 3);
@@ -134,7 +193,6 @@ namespace map {
         > map_type2;
         test_hp<map_type2>(4, 3);
     }
-
 } // namespace map
 
 CPPUNIT_TEST_SUITE_REGISTRATION(map::MultiLevelHashMapHdrTest);
index 51c9095..15d1218 100644 (file)
@@ -10,13 +10,23 @@ namespace map {
         typedef cds::urcu::gc< cds::urcu::general_buffered<>> rcu_type;
     } // namespace
 
-    void MultiLevelHashMapHdrTest::rcu_gpb_stdhash()
+    void MultiLevelHashMapHdrTest::rcu_gpb_nohash()
     {
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item > map_type;
 
         test_rcu<map_type>(4, 2);
     }
 
+    void MultiLevelHashMapHdrTest::rcu_gpb_stdhash()
+    {
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef std::hash<size_t> hash;
+        };
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
+
+        test_rcu<map_type>(4, 2);
+    }
+
     void MultiLevelHashMapHdrTest::rcu_gpb_hash128()
     {
         struct traits : public cc::multilevel_hashmap::traits {
@@ -35,9 +45,26 @@ namespace map {
         test_rcu<map_type2>(4, 2);
     }
 
+    void MultiLevelHashMapHdrTest::rcu_gpb_nohash_stat()
+    {
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef cc::multilevel_hashmap::stat<> stat;
+        };
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
+        test_rcu<map_type>(4, 2);
+
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item,
+            typename cc::multilevel_hashmap::make_traits<
+            co::stat< cc::multilevel_hashmap::stat<>>
+            >::type
+        > map_type2;
+        test_rcu<map_type2>(4, 2);
+    }
+
     void MultiLevelHashMapHdrTest::rcu_gpb_stdhash_stat()
     {
         struct traits : public cc::multilevel_hashmap::traits {
+            typedef std::hash<size_t> hash;
             typedef cc::multilevel_hashmap::stat<> stat;
         };
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
@@ -46,6 +73,7 @@ namespace map {
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item,
             typename cc::multilevel_hashmap::make_traits<
                 co::stat< cc::multilevel_hashmap::stat<>>
+                ,co::hash<std::hash<size_t>>
             >::type
         > map_type2;
         test_rcu<map_type2>(4, 2);
@@ -71,18 +99,47 @@ namespace map {
         test_rcu<map_type2>(4, 2);
     }
 
-    void MultiLevelHashMapHdrTest::rcu_gpb_stdhash_5_3()
+    void MultiLevelHashMapHdrTest::rcu_gpb_nohash_5_3()
     {
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item > map_type;
 
         test_rcu<map_type>(5, 3);
     }
 
+    void MultiLevelHashMapHdrTest::rcu_gpb_stdhash_5_3()
+    {
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef std::hash<size_t> hash;
+        };
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
+
+        test_rcu<map_type>(5, 3);
+    }
+
+    void MultiLevelHashMapHdrTest::rcu_gpb_nohash_5_3_stat()
+    {
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef cc::multilevel_hashmap::stat<> stat;
+            typedef cds::backoff::empty back_off;
+        };
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
+        test_rcu<map_type>(5, 3);
+
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item,
+            typename cc::multilevel_hashmap::make_traits<
+            co::stat< cc::multilevel_hashmap::stat<>>
+            , co::back_off< cds::backoff::empty >
+            >::type
+        > map_type2;
+        test_rcu<map_type2>(5, 3);
+    }
+
     void MultiLevelHashMapHdrTest::rcu_gpb_stdhash_5_3_stat()
     {
         struct traits : public cc::multilevel_hashmap::traits {
             typedef cc::multilevel_hashmap::stat<> stat;
             typedef cds::backoff::empty back_off;
+            typedef std::hash<size_t> hash;
         };
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
         test_rcu<map_type>(5, 3);
@@ -91,6 +148,7 @@ namespace map {
             typename cc::multilevel_hashmap::make_traits<
                 co::stat< cc::multilevel_hashmap::stat<>>
                 ,co::back_off< cds::backoff::empty >
+                ,co::hash< std::hash<size_t>>
             >::type
         > map_type2;
         test_rcu<map_type2>(5, 3);
index 134eae2..349c29d 100644 (file)
@@ -10,13 +10,23 @@ namespace map {
         typedef cds::urcu::gc< cds::urcu::general_instant<>> rcu_type;
     } // namespace
 
-    void MultiLevelHashMapHdrTest::rcu_gpi_stdhash()
+    void MultiLevelHashMapHdrTest::rcu_gpi_nohash()
     {
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item > map_type;
 
         test_rcu<map_type>(4, 2);
     }
 
+    void MultiLevelHashMapHdrTest::rcu_gpi_stdhash()
+    {
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef std::hash<size_t> hash;
+        };
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
+
+        test_rcu<map_type>(4, 2);
+    }
+
     void MultiLevelHashMapHdrTest::rcu_gpi_hash128()
     {
         struct traits : public cc::multilevel_hashmap::traits {
@@ -35,9 +45,26 @@ namespace map {
         test_rcu<map_type2>(4, 2);
     }
 
+    void MultiLevelHashMapHdrTest::rcu_gpi_nohash_stat()
+    {
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef cc::multilevel_hashmap::stat<> stat;
+        };
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
+        test_rcu<map_type>(4, 2);
+
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item,
+            typename cc::multilevel_hashmap::make_traits<
+            co::stat< cc::multilevel_hashmap::stat<>>
+            >::type
+        > map_type2;
+        test_rcu<map_type2>(4, 2);
+    }
+
     void MultiLevelHashMapHdrTest::rcu_gpi_stdhash_stat()
     {
         struct traits : public cc::multilevel_hashmap::traits {
+            typedef std::hash<size_t> hash;
             typedef cc::multilevel_hashmap::stat<> stat;
         };
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
@@ -46,6 +73,7 @@ namespace map {
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item,
             typename cc::multilevel_hashmap::make_traits<
                 co::stat< cc::multilevel_hashmap::stat<>>
+                ,co::hash<std::hash<size_t>>
             >::type
         > map_type2;
         test_rcu<map_type2>(4, 2);
@@ -71,18 +99,47 @@ namespace map {
         test_rcu<map_type2>(4, 2);
     }
 
-    void MultiLevelHashMapHdrTest::rcu_gpi_stdhash_5_3()
+    void MultiLevelHashMapHdrTest::rcu_gpi_nohash_5_3()
     {
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item > map_type;
 
         test_rcu<map_type>(5, 3);
     }
 
+    void MultiLevelHashMapHdrTest::rcu_gpi_stdhash_5_3()
+    {
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef std::hash<size_t> hash;
+        };
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
+
+        test_rcu<map_type>(5, 3);
+    }
+
+    void MultiLevelHashMapHdrTest::rcu_gpi_nohash_5_3_stat()
+    {
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef cc::multilevel_hashmap::stat<> stat;
+            typedef cds::backoff::empty back_off;
+        };
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
+        test_rcu<map_type>(5, 3);
+
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item,
+            typename cc::multilevel_hashmap::make_traits<
+            co::stat< cc::multilevel_hashmap::stat<>>
+            , co::back_off< cds::backoff::empty >
+            >::type
+        > map_type2;
+        test_rcu<map_type2>(5, 3);
+    }
+
     void MultiLevelHashMapHdrTest::rcu_gpi_stdhash_5_3_stat()
     {
         struct traits : public cc::multilevel_hashmap::traits {
             typedef cc::multilevel_hashmap::stat<> stat;
             typedef cds::backoff::empty back_off;
+            typedef std::hash<size_t> hash;
         };
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
         test_rcu<map_type>(5, 3);
@@ -91,6 +148,7 @@ namespace map {
             typename cc::multilevel_hashmap::make_traits<
                 co::stat< cc::multilevel_hashmap::stat<>>
                 ,co::back_off< cds::backoff::empty >
+                ,co::hash< std::hash<size_t>>
             >::type
         > map_type2;
         test_rcu<map_type2>(5, 3);
index 32d85b3..155035c 100644 (file)
@@ -10,13 +10,23 @@ namespace map {
         typedef cds::urcu::gc< cds::urcu::general_threaded<>> rcu_type;
     } // namespace
 
-    void MultiLevelHashMapHdrTest::rcu_gpt_stdhash()
+    void MultiLevelHashMapHdrTest::rcu_gpt_nohash()
     {
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item > map_type;
 
         test_rcu<map_type>(4, 2);
     }
 
+    void MultiLevelHashMapHdrTest::rcu_gpt_stdhash()
+    {
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef std::hash<size_t> hash;
+        };
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
+
+        test_rcu<map_type>(4, 2);
+    }
+
     void MultiLevelHashMapHdrTest::rcu_gpt_hash128()
     {
         struct traits : public cc::multilevel_hashmap::traits {
@@ -35,9 +45,26 @@ namespace map {
         test_rcu<map_type2>(4, 2);
     }
 
+    void MultiLevelHashMapHdrTest::rcu_gpt_nohash_stat()
+    {
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef cc::multilevel_hashmap::stat<> stat;
+        };
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
+        test_rcu<map_type>(4, 2);
+
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item,
+            typename cc::multilevel_hashmap::make_traits<
+            co::stat< cc::multilevel_hashmap::stat<>>
+            >::type
+        > map_type2;
+        test_rcu<map_type2>(4, 2);
+    }
+
     void MultiLevelHashMapHdrTest::rcu_gpt_stdhash_stat()
     {
         struct traits : public cc::multilevel_hashmap::traits {
+            typedef std::hash<size_t> hash;
             typedef cc::multilevel_hashmap::stat<> stat;
         };
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
@@ -46,6 +73,7 @@ namespace map {
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item,
             typename cc::multilevel_hashmap::make_traits<
                 co::stat< cc::multilevel_hashmap::stat<>>
+                ,co::hash<std::hash<size_t>>
             >::type
         > map_type2;
         test_rcu<map_type2>(4, 2);
@@ -71,18 +99,47 @@ namespace map {
         test_rcu<map_type2>(4, 2);
     }
 
-    void MultiLevelHashMapHdrTest::rcu_gpt_stdhash_5_3()
+    void MultiLevelHashMapHdrTest::rcu_gpt_nohash_5_3()
     {
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item > map_type;
 
         test_rcu<map_type>(5, 3);
     }
 
+    void MultiLevelHashMapHdrTest::rcu_gpt_stdhash_5_3()
+    {
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef std::hash<size_t> hash;
+        };
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
+
+        test_rcu<map_type>(5, 3);
+    }
+
+    void MultiLevelHashMapHdrTest::rcu_gpt_nohash_5_3_stat()
+    {
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef cc::multilevel_hashmap::stat<> stat;
+            typedef cds::backoff::empty back_off;
+        };
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
+        test_rcu<map_type>(5, 3);
+
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item,
+            typename cc::multilevel_hashmap::make_traits<
+            co::stat< cc::multilevel_hashmap::stat<>>
+            , co::back_off< cds::backoff::empty >
+            >::type
+        > map_type2;
+        test_rcu<map_type2>(5, 3);
+    }
+
     void MultiLevelHashMapHdrTest::rcu_gpt_stdhash_5_3_stat()
     {
         struct traits : public cc::multilevel_hashmap::traits {
             typedef cc::multilevel_hashmap::stat<> stat;
             typedef cds::backoff::empty back_off;
+            typedef std::hash<size_t> hash;
         };
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
         test_rcu<map_type>(5, 3);
@@ -91,6 +148,7 @@ namespace map {
             typename cc::multilevel_hashmap::make_traits<
                 co::stat< cc::multilevel_hashmap::stat<>>
                 ,co::back_off< cds::backoff::empty >
+                ,co::hash< std::hash<size_t>>
             >::type
         > map_type2;
         test_rcu<map_type2>(5, 3);
index b553661..5eb4de4 100644 (file)
@@ -12,7 +12,7 @@ namespace map {
     } // namespace
 #endif
 
-    void MultiLevelHashMapHdrTest::rcu_shb_stdhash()
+    void MultiLevelHashMapHdrTest::rcu_shb_nohash()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item > map_type;
@@ -21,6 +21,18 @@ namespace map {
 #endif
     }
 
+    void MultiLevelHashMapHdrTest::rcu_shb_stdhash()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef std::hash<size_t> hash;
+        };
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
+
+        test_rcu<map_type>(4, 2);
+#endif
+    }
+
     void MultiLevelHashMapHdrTest::rcu_shb_hash128()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
@@ -41,10 +53,29 @@ namespace map {
 #endif
     }
 
+    void MultiLevelHashMapHdrTest::rcu_shb_nohash_stat()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef cc::multilevel_hashmap::stat<> stat;
+        };
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
+        test_rcu<map_type>(4, 2);
+
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item,
+            typename cc::multilevel_hashmap::make_traits<
+            co::stat< cc::multilevel_hashmap::stat<>>
+            >::type
+        > map_type2;
+        test_rcu<map_type2>(4, 2);
+#endif
+    }
+
     void MultiLevelHashMapHdrTest::rcu_shb_stdhash_stat()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
         struct traits : public cc::multilevel_hashmap::traits {
+            typedef std::hash<size_t> hash;
             typedef cc::multilevel_hashmap::stat<> stat;
         };
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
@@ -53,13 +84,14 @@ namespace map {
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item,
             typename cc::multilevel_hashmap::make_traits<
                 co::stat< cc::multilevel_hashmap::stat<>>
+                ,co::hash<std::hash<size_t>>
             >::type
         > map_type2;
         test_rcu<map_type2>(4, 2);
 #endif
     }
 
-        void MultiLevelHashMapHdrTest::rcu_shb_hash128_stat()
+    void MultiLevelHashMapHdrTest::rcu_shb_hash128_stat()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
         struct traits : public cc::multilevel_hashmap::traits {
@@ -79,23 +111,56 @@ namespace map {
         > map_type2;
         test_rcu<map_type2>(4, 2);
 #endif
-        }
+    }
+
+    void MultiLevelHashMapHdrTest::rcu_shb_nohash_5_3()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item > map_type;
+
+        test_rcu<map_type>(5, 3);
+#endif
+    }
 
     void MultiLevelHashMapHdrTest::rcu_shb_stdhash_5_3()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item > map_type;
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef std::hash<size_t> hash;
+        };
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
 
         test_rcu<map_type>(5, 3);
 #endif
     }
 
+    void MultiLevelHashMapHdrTest::rcu_shb_nohash_5_3_stat()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef cc::multilevel_hashmap::stat<> stat;
+            typedef cds::backoff::empty back_off;
+        };
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
+        test_rcu<map_type>(5, 3);
+
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item,
+            typename cc::multilevel_hashmap::make_traits<
+            co::stat< cc::multilevel_hashmap::stat<>>
+            , co::back_off< cds::backoff::empty >
+            >::type
+        > map_type2;
+        test_rcu<map_type2>(5, 3);
+#endif
+    }
+
     void MultiLevelHashMapHdrTest::rcu_shb_stdhash_5_3_stat()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
         struct traits : public cc::multilevel_hashmap::traits {
             typedef cc::multilevel_hashmap::stat<> stat;
             typedef cds::backoff::empty back_off;
+            typedef std::hash<size_t> hash;
         };
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
         test_rcu<map_type>(5, 3);
@@ -104,6 +169,7 @@ namespace map {
             typename cc::multilevel_hashmap::make_traits<
                 co::stat< cc::multilevel_hashmap::stat<>>
                 ,co::back_off< cds::backoff::empty >
+                ,co::hash< std::hash<size_t>>
             >::type
         > map_type2;
         test_rcu<map_type2>(5, 3);
index 0fc205f..91f3d55 100644 (file)
@@ -12,7 +12,7 @@ namespace map {
     } // namespace
 #endif
 
-    void MultiLevelHashMapHdrTest::rcu_sht_stdhash()
+    void MultiLevelHashMapHdrTest::rcu_sht_nohash()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item > map_type;
@@ -21,6 +21,18 @@ namespace map {
 #endif
     }
 
+    void MultiLevelHashMapHdrTest::rcu_sht_stdhash()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef std::hash<size_t> hash;
+        };
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
+
+        test_rcu<map_type>(4, 2);
+#endif
+    }
+
     void MultiLevelHashMapHdrTest::rcu_sht_hash128()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
@@ -41,10 +53,29 @@ namespace map {
 #endif
     }
 
+    void MultiLevelHashMapHdrTest::rcu_sht_nohash_stat()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef cc::multilevel_hashmap::stat<> stat;
+        };
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
+        test_rcu<map_type>(4, 2);
+
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item,
+            typename cc::multilevel_hashmap::make_traits<
+            co::stat< cc::multilevel_hashmap::stat<>>
+            >::type
+        > map_type2;
+        test_rcu<map_type2>(4, 2);
+#endif
+    }
+
     void MultiLevelHashMapHdrTest::rcu_sht_stdhash_stat()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
         struct traits : public cc::multilevel_hashmap::traits {
+            typedef std::hash<size_t> hash;
             typedef cc::multilevel_hashmap::stat<> stat;
         };
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
@@ -53,13 +84,14 @@ namespace map {
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item,
             typename cc::multilevel_hashmap::make_traits<
                 co::stat< cc::multilevel_hashmap::stat<>>
+                ,co::hash<std::hash<size_t>>
             >::type
         > map_type2;
         test_rcu<map_type2>(4, 2);
 #endif
     }
 
-        void MultiLevelHashMapHdrTest::rcu_sht_hash128_stat()
+    void MultiLevelHashMapHdrTest::rcu_sht_hash128_stat()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
         struct traits : public cc::multilevel_hashmap::traits {
@@ -79,23 +111,56 @@ namespace map {
         > map_type2;
         test_rcu<map_type2>(4, 2);
 #endif
-        }
+    }
+
+    void MultiLevelHashMapHdrTest::rcu_sht_nohash_5_3()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item > map_type;
+
+        test_rcu<map_type>(5, 3);
+#endif
+    }
 
     void MultiLevelHashMapHdrTest::rcu_sht_stdhash_5_3()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item > map_type;
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef std::hash<size_t> hash;
+        };
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
 
         test_rcu<map_type>(5, 3);
 #endif
     }
 
+    void MultiLevelHashMapHdrTest::rcu_sht_nohash_5_3_stat()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        struct traits : public cc::multilevel_hashmap::traits {
+            typedef cc::multilevel_hashmap::stat<> stat;
+            typedef cds::backoff::empty back_off;
+        };
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
+        test_rcu<map_type>(5, 3);
+
+        typedef cc::MultiLevelHashMap< rcu_type, size_t, Item,
+            typename cc::multilevel_hashmap::make_traits<
+            co::stat< cc::multilevel_hashmap::stat<>>
+            , co::back_off< cds::backoff::empty >
+            >::type
+        > map_type2;
+        test_rcu<map_type2>(5, 3);
+#endif
+    }
+
     void MultiLevelHashMapHdrTest::rcu_sht_stdhash_5_3_stat()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
         struct traits : public cc::multilevel_hashmap::traits {
             typedef cc::multilevel_hashmap::stat<> stat;
             typedef cds::backoff::empty back_off;
+            typedef std::hash<size_t> hash;
         };
         typedef cc::MultiLevelHashMap< rcu_type, size_t, Item, traits > map_type;
         test_rcu<map_type>(5, 3);
@@ -104,6 +169,7 @@ namespace map {
             typename cc::multilevel_hashmap::make_traits<
                 co::stat< cc::multilevel_hashmap::stat<>>
                 ,co::back_off< cds::backoff::empty >
+                ,co::hash< std::hash<size_t>>
             >::type
         > map_type2;
         test_rcu<map_type2>(5, 3);
index 1c295dd..551fd9b 100644 (file)
@@ -45,6 +45,15 @@ namespace set {
             }
         };
 
+        template <typename Key>
+        struct get_key
+        {
+            Key const& operator()(Item<Key> const& i) const
+            {
+                return i.hash;
+            }
+        };
+
         struct item_disposer {
             template <typename Hash>
             void operator()( Item<Hash> * p )
@@ -53,6 +62,14 @@ namespace set {
             }
         };
 
+        template <typename Key>
+        struct nohash {
+            Key operator()(Key k) const
+            {
+                return k;
+            }
+        };
+
         struct hash128
         {
             size_t lo;
@@ -581,6 +598,10 @@ namespace set {
             CPPUNIT_MSG(s.statistics());
         }
 
+        void hp_nohash();
+        void hp_nohash_stat();
+        void hp_nohash_5_3();
+        void hp_nohash_5_3_stat();
         void hp_stdhash();
         void hp_stdhash_stat();
         void hp_stdhash_5_3();
@@ -590,6 +611,10 @@ namespace set {
         void hp_hash128_4_3();
         void hp_hash128_4_3_stat();
 
+        void dhp_nohash();
+        void dhp_nohash_stat();
+        void dhp_nohash_5_3();
+        void dhp_nohash_5_3_stat();
         void dhp_stdhash();
         void dhp_stdhash_stat();
         void dhp_stdhash_5_3();
@@ -599,6 +624,10 @@ namespace set {
         void dhp_hash128_4_3();
         void dhp_hash128_4_3_stat();
 
+        void rcu_gpi_nohash();
+        void rcu_gpi_nohash_stat();
+        void rcu_gpi_nohash_5_3();
+        void rcu_gpi_nohash_5_3_stat();
         void rcu_gpi_stdhash();
         void rcu_gpi_stdhash_stat();
         void rcu_gpi_stdhash_5_3();
@@ -608,6 +637,10 @@ namespace set {
         void rcu_gpi_hash128_4_3();
         void rcu_gpi_hash128_4_3_stat();
 
+        void rcu_gpb_nohash();
+        void rcu_gpb_nohash_stat();
+        void rcu_gpb_nohash_5_3();
+        void rcu_gpb_nohash_5_3_stat();
         void rcu_gpb_stdhash();
         void rcu_gpb_stdhash_stat();
         void rcu_gpb_stdhash_5_3();
@@ -617,6 +650,10 @@ namespace set {
         void rcu_gpb_hash128_4_3();
         void rcu_gpb_hash128_4_3_stat();
 
+        void rcu_gpt_nohash();
+        void rcu_gpt_nohash_stat();
+        void rcu_gpt_nohash_5_3();
+        void rcu_gpt_nohash_5_3_stat();
         void rcu_gpt_stdhash();
         void rcu_gpt_stdhash_stat();
         void rcu_gpt_stdhash_5_3();
@@ -626,6 +663,10 @@ namespace set {
         void rcu_gpt_hash128_4_3();
         void rcu_gpt_hash128_4_3_stat();
 
+        void rcu_shb_nohash();
+        void rcu_shb_nohash_stat();
+        void rcu_shb_nohash_5_3();
+        void rcu_shb_nohash_5_3_stat();
         void rcu_shb_stdhash();
         void rcu_shb_stdhash_stat();
         void rcu_shb_stdhash_5_3();
@@ -635,6 +676,10 @@ namespace set {
         void rcu_shb_hash128_4_3();
         void rcu_shb_hash128_4_3_stat();
 
+        void rcu_sht_nohash();
+        void rcu_sht_nohash_stat();
+        void rcu_sht_nohash_5_3();
+        void rcu_sht_nohash_5_3_stat();
         void rcu_sht_stdhash();
         void rcu_sht_stdhash_stat();
         void rcu_sht_stdhash_5_3();
@@ -645,6 +690,10 @@ namespace set {
         void rcu_sht_hash128_4_3_stat();
 
         CPPUNIT_TEST_SUITE(IntrusiveMultiLevelHashSetHdrTest)
+            CPPUNIT_TEST(hp_nohash)
+            CPPUNIT_TEST(hp_nohash_stat)
+            CPPUNIT_TEST(hp_nohash_5_3)
+            CPPUNIT_TEST(hp_nohash_5_3_stat)
             CPPUNIT_TEST(hp_stdhash)
             CPPUNIT_TEST(hp_stdhash_stat)
             CPPUNIT_TEST(hp_stdhash_5_3)
@@ -654,6 +703,10 @@ namespace set {
             CPPUNIT_TEST(hp_hash128_4_3)
             CPPUNIT_TEST(hp_hash128_4_3_stat)
 
+            CPPUNIT_TEST(dhp_nohash)
+            CPPUNIT_TEST(dhp_nohash_stat)
+            CPPUNIT_TEST(dhp_nohash_5_3)
+            CPPUNIT_TEST(dhp_nohash_5_3_stat)
             CPPUNIT_TEST(dhp_stdhash)
             CPPUNIT_TEST(dhp_stdhash_stat)
             CPPUNIT_TEST(dhp_stdhash_5_3)
@@ -663,6 +716,10 @@ namespace set {
             CPPUNIT_TEST(dhp_hash128_4_3)
             CPPUNIT_TEST(dhp_hash128_4_3_stat)
 
+            CPPUNIT_TEST(rcu_gpi_nohash)
+            CPPUNIT_TEST(rcu_gpi_nohash_stat)
+            CPPUNIT_TEST(rcu_gpi_nohash_5_3)
+            CPPUNIT_TEST(rcu_gpi_nohash_5_3_stat)
             CPPUNIT_TEST(rcu_gpi_stdhash)
             CPPUNIT_TEST(rcu_gpi_stdhash_stat)
             CPPUNIT_TEST(rcu_gpi_stdhash_5_3)
@@ -672,6 +729,10 @@ namespace set {
             CPPUNIT_TEST(rcu_gpi_hash128_4_3)
             CPPUNIT_TEST(rcu_gpi_hash128_4_3_stat)
 
+            CPPUNIT_TEST(rcu_gpb_nohash)
+            CPPUNIT_TEST(rcu_gpb_nohash_stat)
+            CPPUNIT_TEST(rcu_gpb_nohash_5_3)
+            CPPUNIT_TEST(rcu_gpb_nohash_5_3_stat)
             CPPUNIT_TEST(rcu_gpb_stdhash)
             CPPUNIT_TEST(rcu_gpb_stdhash_stat)
             CPPUNIT_TEST(rcu_gpb_stdhash_5_3)
@@ -681,6 +742,10 @@ namespace set {
             CPPUNIT_TEST(rcu_gpb_hash128_4_3)
             CPPUNIT_TEST(rcu_gpb_hash128_4_3_stat)
 
+            CPPUNIT_TEST(rcu_gpt_nohash)
+            CPPUNIT_TEST(rcu_gpt_nohash_stat)
+            CPPUNIT_TEST(rcu_gpt_nohash_5_3)
+            CPPUNIT_TEST(rcu_gpt_nohash_5_3_stat)
             CPPUNIT_TEST(rcu_gpt_stdhash)
             CPPUNIT_TEST(rcu_gpt_stdhash_stat)
             CPPUNIT_TEST(rcu_gpt_stdhash_5_3)
@@ -690,6 +755,10 @@ namespace set {
             CPPUNIT_TEST(rcu_gpt_hash128_4_3)
             CPPUNIT_TEST(rcu_gpt_hash128_4_3_stat)
 
+            CPPUNIT_TEST(rcu_shb_nohash)
+            CPPUNIT_TEST(rcu_shb_nohash_stat)
+            CPPUNIT_TEST(rcu_shb_nohash_5_3)
+            CPPUNIT_TEST(rcu_shb_nohash_5_3_stat)
             CPPUNIT_TEST(rcu_shb_stdhash)
             CPPUNIT_TEST(rcu_shb_stdhash_stat)
             CPPUNIT_TEST(rcu_shb_stdhash_5_3)
@@ -699,6 +768,10 @@ namespace set {
             CPPUNIT_TEST(rcu_shb_hash128_4_3)
             CPPUNIT_TEST(rcu_shb_hash128_4_3_stat)
 
+            CPPUNIT_TEST(rcu_sht_nohash)
+            CPPUNIT_TEST(rcu_sht_nohash_stat)
+            CPPUNIT_TEST(rcu_sht_nohash_5_3)
+            CPPUNIT_TEST(rcu_sht_nohash_5_3_stat)
             CPPUNIT_TEST(rcu_sht_stdhash)
             CPPUNIT_TEST(rcu_sht_stdhash_stat)
             CPPUNIT_TEST(rcu_sht_stdhash_5_3)
index e78f35a..5c0d5b5 100644 (file)
@@ -9,6 +9,30 @@ namespace set {
         typedef cds::gc::DHP gc_type;
     } // namespace
 
+    void IntrusiveMultiLevelHashSetHdrTest::dhp_nohash()
+    {
+        typedef size_t key_type;
+
+        struct traits : public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+        };
+        typedef ci::MultiLevelHashSet< gc_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_hp<set_type, nohash<key_type>>(4, 2);
+
+        typedef ci::MultiLevelHashSet<
+            gc_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+                ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+                , ci::opt::disposer< item_disposer >
+            >::type
+        > set_type2;
+        test_hp<set_type2, nohash<key_type>>(4, 2);
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::dhp_stdhash()
     {
         typedef size_t hash_type;
@@ -59,6 +83,32 @@ namespace set {
         test_hp<set_type2, hash128::make>(4, 2);
     }
 
+    void IntrusiveMultiLevelHashSetHdrTest::dhp_nohash_stat()
+    {
+        typedef size_t key_type;
+
+        struct traits : public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+            typedef ci::multilevel_hashset::stat<> stat;
+        };
+        typedef ci::MultiLevelHashSet< gc_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_hp<set_type, nohash<key_type>>(4, 2);
+
+        typedef ci::MultiLevelHashSet<
+            gc_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+            ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+            , ci::opt::disposer< item_disposer >
+            , co::stat< ci::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_hp<set_type2, nohash<key_type>>(4, 2);
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::dhp_stdhash_stat()
     {
         typedef size_t hash_type;
@@ -113,6 +163,30 @@ namespace set {
         test_hp<set_type2, hash_type::make>(4, 2);
     }
 
+    void IntrusiveMultiLevelHashSetHdrTest::dhp_nohash_5_3()
+    {
+        typedef size_t key_type;
+
+        struct traits : public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+        };
+        typedef ci::MultiLevelHashSet< gc_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_hp<set_type, nohash<key_type>>(5, 3);
+
+        typedef ci::MultiLevelHashSet<
+            gc_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+            ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+            , ci::opt::disposer< item_disposer >
+            >::type
+        > set_type2;
+        test_hp<set_type2, nohash<key_type>>(5, 3);
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::dhp_stdhash_5_3()
     {
         typedef size_t hash_type;
@@ -163,6 +237,32 @@ namespace set {
         test_hp<set_type2, hash128::make >(4, 3);
     }
 
+    void IntrusiveMultiLevelHashSetHdrTest::dhp_nohash_5_3_stat()
+    {
+        typedef size_t key_type;
+
+        struct traits: public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+            typedef ci::multilevel_hashset::stat<> stat;
+        };
+        typedef ci::MultiLevelHashSet< gc_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
+        test_hp<set_type, nohash<key_type>>(5, 3);
+
+        typedef ci::MultiLevelHashSet<
+            gc_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+                ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+                , ci::opt::disposer< item_disposer >
+                ,co::stat< ci::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_hp<set_type2, nohash<key_type>>(5, 3);
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::dhp_stdhash_5_3_stat()
     {
         typedef size_t hash_type;
index 36ae475..341204a 100644 (file)
@@ -9,6 +9,30 @@ namespace set {
         typedef cds::gc::HP gc_type;
     } // namespace
 
+    void IntrusiveMultiLevelHashSetHdrTest::hp_nohash()
+    {
+        typedef size_t key_type;
+
+        struct traits : public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+        };
+        typedef ci::MultiLevelHashSet< gc_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_hp<set_type, nohash<key_type>>(4, 2);
+
+        typedef ci::MultiLevelHashSet<
+            gc_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+                ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+                , ci::opt::disposer< item_disposer >
+            >::type
+        > set_type2;
+        test_hp<set_type2, nohash<key_type>>(4, 2);
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::hp_stdhash()
     {
         typedef size_t hash_type;
@@ -59,6 +83,32 @@ namespace set {
         test_hp<set_type2, hash128::make>(4, 2);
     }
 
+    void IntrusiveMultiLevelHashSetHdrTest::hp_nohash_stat()
+    {
+        typedef size_t key_type;
+
+        struct traits : public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+            typedef ci::multilevel_hashset::stat<> stat;
+        };
+        typedef ci::MultiLevelHashSet< gc_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_hp<set_type, nohash<key_type>>(4, 2);
+
+        typedef ci::MultiLevelHashSet<
+            gc_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+            ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+            , ci::opt::disposer< item_disposer >
+            , co::stat< ci::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_hp<set_type2, nohash<key_type>>(4, 2);
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::hp_stdhash_stat()
     {
         typedef size_t hash_type;
@@ -113,6 +163,30 @@ namespace set {
         test_hp<set_type2, hash_type::make>(4, 2);
     }
 
+    void IntrusiveMultiLevelHashSetHdrTest::hp_nohash_5_3()
+    {
+        typedef size_t key_type;
+
+        struct traits : public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+        };
+        typedef ci::MultiLevelHashSet< gc_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_hp<set_type, nohash<key_type>>(5, 3);
+
+        typedef ci::MultiLevelHashSet<
+            gc_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+            ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+            , ci::opt::disposer< item_disposer >
+            >::type
+        > set_type2;
+        test_hp<set_type2, nohash<key_type>>(5, 3);
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::hp_stdhash_5_3()
     {
         typedef size_t hash_type;
@@ -163,6 +237,32 @@ namespace set {
         test_hp<set_type2, hash128::make >(4, 3);
     }
 
+    void IntrusiveMultiLevelHashSetHdrTest::hp_nohash_5_3_stat()
+    {
+        typedef size_t key_type;
+
+        struct traits: public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+            typedef ci::multilevel_hashset::stat<> stat;
+        };
+        typedef ci::MultiLevelHashSet< gc_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
+        test_hp<set_type, nohash<key_type>>(5, 3);
+
+        typedef ci::MultiLevelHashSet<
+            gc_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+                ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+                , ci::opt::disposer< item_disposer >
+                ,co::stat< ci::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_hp<set_type2, nohash<key_type>>(5, 3);
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::hp_stdhash_5_3_stat()
     {
         typedef size_t hash_type;
index ecf1640..72f02b8 100644 (file)
@@ -10,6 +10,30 @@ namespace set {
         typedef cds::urcu::gc<cds::urcu::general_buffered<>> rcu_type;
     } // namespace
 
+    void IntrusiveMultiLevelHashSetHdrTest::rcu_gpb_nohash()
+    {
+        typedef size_t key_type;
+
+        struct traits : public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+        };
+        typedef ci::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(4, 2);
+
+        typedef ci::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+                ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+                , ci::opt::disposer< item_disposer >
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(4, 2);
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::rcu_gpb_stdhash()
     {
         typedef size_t hash_type;
@@ -60,6 +84,32 @@ namespace set {
         test_rcu<set_type2, hash128::make>(4, 2);
     }
 
+    void IntrusiveMultiLevelHashSetHdrTest::rcu_gpb_nohash_stat()
+    {
+        typedef size_t key_type;
+
+        struct traits : public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+            typedef ci::multilevel_hashset::stat<> stat;
+        };
+        typedef ci::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(4, 2);
+
+        typedef ci::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+            ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+            , ci::opt::disposer< item_disposer >
+            , co::stat< ci::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(4, 2);
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::rcu_gpb_stdhash_stat()
     {
         typedef size_t hash_type;
@@ -114,6 +164,30 @@ namespace set {
         test_rcu<set_type2, hash_type::make>(4, 2);
     }
 
+    void IntrusiveMultiLevelHashSetHdrTest::rcu_gpb_nohash_5_3()
+    {
+        typedef size_t key_type;
+
+        struct traits : public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+        };
+        typedef ci::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(5, 3);
+
+        typedef ci::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+            ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+            , ci::opt::disposer< item_disposer >
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(5, 3);
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::rcu_gpb_stdhash_5_3()
     {
         typedef size_t hash_type;
@@ -164,6 +238,32 @@ namespace set {
         test_rcu<set_type2, hash128::make >(4, 3);
     }
 
+    void IntrusiveMultiLevelHashSetHdrTest::rcu_gpb_nohash_5_3_stat()
+    {
+        typedef size_t key_type;
+
+        struct traits: public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+            typedef ci::multilevel_hashset::stat<> stat;
+        };
+        typedef ci::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
+        test_rcu<set_type, nohash<key_type>>(5, 3);
+
+        typedef ci::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+                ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+                , ci::opt::disposer< item_disposer >
+                ,co::stat< ci::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(5, 3);
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::rcu_gpb_stdhash_5_3_stat()
     {
         typedef size_t hash_type;
index 03df714..f61730f 100644 (file)
@@ -10,6 +10,30 @@ namespace set {
         typedef cds::urcu::gc<cds::urcu::general_instant<>> rcu_type;
     } // namespace
 
+    void IntrusiveMultiLevelHashSetHdrTest::rcu_gpi_nohash()
+    {
+        typedef size_t key_type;
+
+        struct traits : public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+        };
+        typedef ci::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(4, 2);
+
+        typedef ci::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+                ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+                , ci::opt::disposer< item_disposer >
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(4, 2);
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::rcu_gpi_stdhash()
     {
         typedef size_t hash_type;
@@ -60,6 +84,32 @@ namespace set {
         test_rcu<set_type2, hash128::make>(4, 2);
     }
 
+    void IntrusiveMultiLevelHashSetHdrTest::rcu_gpi_nohash_stat()
+    {
+        typedef size_t key_type;
+
+        struct traits : public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+            typedef ci::multilevel_hashset::stat<> stat;
+        };
+        typedef ci::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(4, 2);
+
+        typedef ci::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+            ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+            , ci::opt::disposer< item_disposer >
+            , co::stat< ci::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(4, 2);
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::rcu_gpi_stdhash_stat()
     {
         typedef size_t hash_type;
@@ -114,6 +164,30 @@ namespace set {
         test_rcu<set_type2, hash_type::make>(4, 2);
     }
 
+    void IntrusiveMultiLevelHashSetHdrTest::rcu_gpi_nohash_5_3()
+    {
+        typedef size_t key_type;
+
+        struct traits : public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+        };
+        typedef ci::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(5, 3);
+
+        typedef ci::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+            ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+            , ci::opt::disposer< item_disposer >
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(5, 3);
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::rcu_gpi_stdhash_5_3()
     {
         typedef size_t hash_type;
@@ -164,6 +238,32 @@ namespace set {
         test_rcu<set_type2, hash128::make >(4, 3);
     }
 
+    void IntrusiveMultiLevelHashSetHdrTest::rcu_gpi_nohash_5_3_stat()
+    {
+        typedef size_t key_type;
+
+        struct traits: public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+            typedef ci::multilevel_hashset::stat<> stat;
+        };
+        typedef ci::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
+        test_rcu<set_type, nohash<key_type>>(5, 3);
+
+        typedef ci::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+                ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+                , ci::opt::disposer< item_disposer >
+                ,co::stat< ci::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(5, 3);
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::rcu_gpi_stdhash_5_3_stat()
     {
         typedef size_t hash_type;
index 2f50bf5..da4e9d5 100644 (file)
@@ -10,6 +10,30 @@ namespace set {
         typedef cds::urcu::gc<cds::urcu::general_threaded<>> rcu_type;
     } // namespace
 
+    void IntrusiveMultiLevelHashSetHdrTest::rcu_gpt_nohash()
+    {
+        typedef size_t key_type;
+
+        struct traits : public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+        };
+        typedef ci::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(4, 2);
+
+        typedef ci::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+                ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+                , ci::opt::disposer< item_disposer >
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(4, 2);
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::rcu_gpt_stdhash()
     {
         typedef size_t hash_type;
@@ -60,6 +84,32 @@ namespace set {
         test_rcu<set_type2, hash128::make>(4, 2);
     }
 
+    void IntrusiveMultiLevelHashSetHdrTest::rcu_gpt_nohash_stat()
+    {
+        typedef size_t key_type;
+
+        struct traits : public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+            typedef ci::multilevel_hashset::stat<> stat;
+        };
+        typedef ci::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(4, 2);
+
+        typedef ci::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+            ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+            , ci::opt::disposer< item_disposer >
+            , co::stat< ci::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(4, 2);
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::rcu_gpt_stdhash_stat()
     {
         typedef size_t hash_type;
@@ -114,6 +164,30 @@ namespace set {
         test_rcu<set_type2, hash_type::make>(4, 2);
     }
 
+    void IntrusiveMultiLevelHashSetHdrTest::rcu_gpt_nohash_5_3()
+    {
+        typedef size_t key_type;
+
+        struct traits : public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+        };
+        typedef ci::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(5, 3);
+
+        typedef ci::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+            ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+            , ci::opt::disposer< item_disposer >
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(5, 3);
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::rcu_gpt_stdhash_5_3()
     {
         typedef size_t hash_type;
@@ -164,6 +238,32 @@ namespace set {
         test_rcu<set_type2, hash128::make >(4, 3);
     }
 
+    void IntrusiveMultiLevelHashSetHdrTest::rcu_gpt_nohash_5_3_stat()
+    {
+        typedef size_t key_type;
+
+        struct traits: public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+            typedef ci::multilevel_hashset::stat<> stat;
+        };
+        typedef ci::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
+        test_rcu<set_type, nohash<key_type>>(5, 3);
+
+        typedef ci::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+                ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+                , ci::opt::disposer< item_disposer >
+                ,co::stat< ci::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(5, 3);
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::rcu_gpt_stdhash_5_3_stat()
     {
         typedef size_t hash_type;
index 20cb604..b123681 100644 (file)
@@ -6,13 +6,38 @@
 #include "unit/print_multilevel_hashset_stat.h"
 
 namespace set {
-
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
     namespace {
         typedef cds::urcu::gc<cds::urcu::signal_buffered<>> rcu_type;
     } // namespace
 #endif
 
+    void IntrusiveMultiLevelHashSetHdrTest::rcu_shb_nohash()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        typedef size_t key_type;
+
+        struct traits : public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+        };
+        typedef ci::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(4, 2);
+
+        typedef ci::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+                ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+                , ci::opt::disposer< item_disposer >
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(4, 2);
+#endif
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::rcu_shb_stdhash()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
@@ -67,6 +92,34 @@ namespace set {
 #endif
     }
 
+    void IntrusiveMultiLevelHashSetHdrTest::rcu_shb_nohash_stat()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        typedef size_t key_type;
+
+        struct traits : public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+            typedef ci::multilevel_hashset::stat<> stat;
+        };
+        typedef ci::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(4, 2);
+
+        typedef ci::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+            ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+            , ci::opt::disposer< item_disposer >
+            , co::stat< ci::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(4, 2);
+#endif
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::rcu_shb_stdhash_stat()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
@@ -125,6 +178,32 @@ namespace set {
 #endif
     }
 
+    void IntrusiveMultiLevelHashSetHdrTest::rcu_shb_nohash_5_3()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        typedef size_t key_type;
+
+        struct traits : public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+        };
+        typedef ci::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(5, 3);
+
+        typedef ci::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+            ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+            , ci::opt::disposer< item_disposer >
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(5, 3);
+#endif
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::rcu_shb_stdhash_5_3()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
@@ -179,6 +258,34 @@ namespace set {
 #endif
     }
 
+    void IntrusiveMultiLevelHashSetHdrTest::rcu_shb_nohash_5_3_stat()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        typedef size_t key_type;
+
+        struct traits: public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+            typedef ci::multilevel_hashset::stat<> stat;
+        };
+        typedef ci::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
+        test_rcu<set_type, nohash<key_type>>(5, 3);
+
+        typedef ci::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+                ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+                , ci::opt::disposer< item_disposer >
+                ,co::stat< ci::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(5, 3);
+#endif
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::rcu_shb_stdhash_5_3_stat()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
index b662d2c..6ade6cf 100644 (file)
@@ -6,13 +6,38 @@
 #include "unit/print_multilevel_hashset_stat.h"
 
 namespace set {
-
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
     namespace {
         typedef cds::urcu::gc<cds::urcu::signal_threaded<>> rcu_type;
     } // namespace
 #endif
 
+    void IntrusiveMultiLevelHashSetHdrTest::rcu_sht_nohash()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        typedef size_t key_type;
+
+        struct traits : public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+        };
+        typedef ci::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(4, 2);
+
+        typedef ci::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+                ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+                , ci::opt::disposer< item_disposer >
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(4, 2);
+#endif
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::rcu_sht_stdhash()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
@@ -67,6 +92,34 @@ namespace set {
 #endif
     }
 
+    void IntrusiveMultiLevelHashSetHdrTest::rcu_sht_nohash_stat()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        typedef size_t key_type;
+
+        struct traits : public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+            typedef ci::multilevel_hashset::stat<> stat;
+        };
+        typedef ci::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(4, 2);
+
+        typedef ci::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+            ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+            , ci::opt::disposer< item_disposer >
+            , co::stat< ci::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(4, 2);
+#endif
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::rcu_sht_stdhash_stat()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
@@ -125,6 +178,32 @@ namespace set {
 #endif
     }
 
+    void IntrusiveMultiLevelHashSetHdrTest::rcu_sht_nohash_5_3()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        typedef size_t key_type;
+
+        struct traits : public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+        };
+        typedef ci::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(5, 3);
+
+        typedef ci::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+            ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+            , ci::opt::disposer< item_disposer >
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(5, 3);
+#endif
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::rcu_sht_stdhash_5_3()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
@@ -179,6 +258,34 @@ namespace set {
 #endif
     }
 
+    void IntrusiveMultiLevelHashSetHdrTest::rcu_sht_nohash_5_3_stat()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        typedef size_t key_type;
+
+        struct traits: public ci::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef item_disposer disposer;
+            typedef ci::multilevel_hashset::stat<> stat;
+        };
+        typedef ci::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
+        test_rcu<set_type, nohash<key_type>>(5, 3);
+
+        typedef ci::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename ci::multilevel_hashset::make_traits<
+                ci::multilevel_hashset::hash_accessor< get_key<key_type>>
+                , ci::opt::disposer< item_disposer >
+                ,co::stat< ci::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(5, 3);
+#endif
+    }
+
     void IntrusiveMultiLevelHashSetHdrTest::rcu_sht_stdhash_5_3_stat()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
index 2c5f395..e61d362 100644 (file)
@@ -76,6 +76,23 @@ namespace set {
             }
         };
 
+        template <typename Key>
+        struct get_key
+        {
+            Key operator()(Item<Key> const& i)const
+            {
+                return i.hash;
+            }
+        };
+
+        template <typename Key>
+        struct nohash {
+            Key operator()(Key k) const
+            {
+                return k;
+            }
+        };
+
         struct hash128
         {
             size_t lo;
@@ -636,6 +653,10 @@ namespace set {
             CPPUNIT_MSG(s.statistics());
         }
 
+        void hp_nohash();
+        void hp_nohash_stat();
+        void hp_nohash_5_3();
+        void hp_nohash_5_3_stat();
         void hp_stdhash();
         void hp_stdhash_stat();
         void hp_stdhash_5_3();
@@ -645,6 +666,10 @@ namespace set {
         void hp_hash128_4_3();
         void hp_hash128_4_3_stat();
 
+        void dhp_nohash();
+        void dhp_nohash_stat();
+        void dhp_nohash_5_3();
+        void dhp_nohash_5_3_stat();
         void dhp_stdhash();
         void dhp_stdhash_stat();
         void dhp_stdhash_5_3();
@@ -654,6 +679,10 @@ namespace set {
         void dhp_hash128_4_3();
         void dhp_hash128_4_3_stat();
 
+        void rcu_gpi_nohash();
+        void rcu_gpi_nohash_stat();
+        void rcu_gpi_nohash_5_3();
+        void rcu_gpi_nohash_5_3_stat();
         void rcu_gpi_stdhash();
         void rcu_gpi_stdhash_stat();
         void rcu_gpi_stdhash_5_3();
@@ -663,6 +692,10 @@ namespace set {
         void rcu_gpi_hash128_4_3();
         void rcu_gpi_hash128_4_3_stat();
 
+        void rcu_gpb_nohash();
+        void rcu_gpb_nohash_stat();
+        void rcu_gpb_nohash_5_3();
+        void rcu_gpb_nohash_5_3_stat();
         void rcu_gpb_stdhash();
         void rcu_gpb_stdhash_stat();
         void rcu_gpb_stdhash_5_3();
@@ -672,6 +705,10 @@ namespace set {
         void rcu_gpb_hash128_4_3();
         void rcu_gpb_hash128_4_3_stat();
 
+        void rcu_gpt_nohash();
+        void rcu_gpt_nohash_stat();
+        void rcu_gpt_nohash_5_3();
+        void rcu_gpt_nohash_5_3_stat();
         void rcu_gpt_stdhash();
         void rcu_gpt_stdhash_stat();
         void rcu_gpt_stdhash_5_3();
@@ -681,6 +718,10 @@ namespace set {
         void rcu_gpt_hash128_4_3();
         void rcu_gpt_hash128_4_3_stat();
 
+        void rcu_shb_nohash();
+        void rcu_shb_nohash_stat();
+        void rcu_shb_nohash_5_3();
+        void rcu_shb_nohash_5_3_stat();
         void rcu_shb_stdhash();
         void rcu_shb_stdhash_stat();
         void rcu_shb_stdhash_5_3();
@@ -690,6 +731,10 @@ namespace set {
         void rcu_shb_hash128_4_3();
         void rcu_shb_hash128_4_3_stat();
 
+        void rcu_sht_nohash();
+        void rcu_sht_nohash_stat();
+        void rcu_sht_nohash_5_3();
+        void rcu_sht_nohash_5_3_stat();
         void rcu_sht_stdhash();
         void rcu_sht_stdhash_stat();
         void rcu_sht_stdhash_5_3();
@@ -700,6 +745,10 @@ namespace set {
         void rcu_sht_hash128_4_3_stat();
 
         CPPUNIT_TEST_SUITE(MultiLevelHashSetHdrTest)
+            CPPUNIT_TEST(hp_nohash)
+            CPPUNIT_TEST(hp_nohash_stat)
+            CPPUNIT_TEST(hp_nohash_5_3)
+            CPPUNIT_TEST(hp_nohash_5_3_stat)
             CPPUNIT_TEST(hp_stdhash)
             CPPUNIT_TEST(hp_stdhash_stat)
             CPPUNIT_TEST(hp_stdhash_5_3)
@@ -709,6 +758,10 @@ namespace set {
             CPPUNIT_TEST(hp_hash128_4_3)
             CPPUNIT_TEST(hp_hash128_4_3_stat)
 
+            CPPUNIT_TEST(dhp_nohash)
+            CPPUNIT_TEST(dhp_nohash_stat)
+            CPPUNIT_TEST(dhp_nohash_5_3)
+            CPPUNIT_TEST(dhp_nohash_5_3_stat)
             CPPUNIT_TEST(dhp_stdhash)
             CPPUNIT_TEST(dhp_stdhash_stat)
             CPPUNIT_TEST(dhp_stdhash_5_3)
@@ -718,6 +771,10 @@ namespace set {
             CPPUNIT_TEST(dhp_hash128_4_3)
             CPPUNIT_TEST(dhp_hash128_4_3_stat)
 
+            CPPUNIT_TEST(rcu_gpi_nohash)
+            CPPUNIT_TEST(rcu_gpi_nohash_stat)
+            CPPUNIT_TEST(rcu_gpi_nohash_5_3)
+            CPPUNIT_TEST(rcu_gpi_nohash_5_3_stat)
             CPPUNIT_TEST(rcu_gpi_stdhash)
             CPPUNIT_TEST(rcu_gpi_stdhash_stat)
             CPPUNIT_TEST(rcu_gpi_stdhash_5_3)
@@ -727,6 +784,10 @@ namespace set {
             CPPUNIT_TEST(rcu_gpi_hash128_4_3)
             CPPUNIT_TEST(rcu_gpi_hash128_4_3_stat)
 
+            CPPUNIT_TEST(rcu_gpb_nohash)
+            CPPUNIT_TEST(rcu_gpb_nohash_stat)
+            CPPUNIT_TEST(rcu_gpb_nohash_5_3)
+            CPPUNIT_TEST(rcu_gpb_nohash_5_3_stat)
             CPPUNIT_TEST(rcu_gpb_stdhash)
             CPPUNIT_TEST(rcu_gpb_stdhash_stat)
             CPPUNIT_TEST(rcu_gpb_stdhash_5_3)
@@ -736,6 +797,10 @@ namespace set {
             CPPUNIT_TEST(rcu_gpb_hash128_4_3)
             CPPUNIT_TEST(rcu_gpb_hash128_4_3_stat)
 
+            CPPUNIT_TEST(rcu_gpt_nohash)
+            CPPUNIT_TEST(rcu_gpt_nohash_stat)
+            CPPUNIT_TEST(rcu_gpt_nohash_5_3)
+            CPPUNIT_TEST(rcu_gpt_nohash_5_3_stat)
             CPPUNIT_TEST(rcu_gpt_stdhash)
             CPPUNIT_TEST(rcu_gpt_stdhash_stat)
             CPPUNIT_TEST(rcu_gpt_stdhash_5_3)
@@ -745,6 +810,10 @@ namespace set {
             CPPUNIT_TEST(rcu_gpt_hash128_4_3)
             CPPUNIT_TEST(rcu_gpt_hash128_4_3_stat)
 
+            CPPUNIT_TEST(rcu_shb_nohash)
+            CPPUNIT_TEST(rcu_shb_nohash_stat)
+            CPPUNIT_TEST(rcu_shb_nohash_5_3)
+            CPPUNIT_TEST(rcu_shb_nohash_5_3_stat)
             CPPUNIT_TEST(rcu_shb_stdhash)
             CPPUNIT_TEST(rcu_shb_stdhash_stat)
             CPPUNIT_TEST(rcu_shb_stdhash_5_3)
@@ -754,6 +823,10 @@ namespace set {
             CPPUNIT_TEST(rcu_shb_hash128_4_3)
             CPPUNIT_TEST(rcu_shb_hash128_4_3_stat)
 
+            CPPUNIT_TEST(rcu_sht_nohash)
+            CPPUNIT_TEST(rcu_sht_nohash_stat)
+            CPPUNIT_TEST(rcu_sht_nohash_5_3)
+            CPPUNIT_TEST(rcu_sht_nohash_5_3_stat)
             CPPUNIT_TEST(rcu_sht_stdhash)
             CPPUNIT_TEST(rcu_sht_stdhash_stat)
             CPPUNIT_TEST(rcu_sht_stdhash_5_3)
index 9e089e0..02989fd 100644 (file)
@@ -9,6 +9,28 @@ namespace set {
         typedef cds::gc::DHP gc_type;
     } // namespace
 
+    void MultiLevelHashSetHdrTest::dhp_nohash()
+    {
+        typedef size_t key_type;
+
+        struct traits : public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+        };
+        typedef cc::MultiLevelHashSet< gc_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_hp<set_type, nohash<key_type>>(4, 2);
+
+        typedef cc::MultiLevelHashSet<
+            gc_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+                cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+            >::type
+        > set_type2;
+        test_hp<set_type2, nohash<key_type>>(4, 2);
+    }
+
     void MultiLevelHashSetHdrTest::dhp_stdhash()
     {
         typedef size_t hash_type;
@@ -55,6 +77,30 @@ namespace set {
         test_hp<set_type2, hash128::make>(4, 2);
     }
 
+    void MultiLevelHashSetHdrTest::dhp_nohash_stat()
+    {
+        typedef size_t key_type;
+
+        struct traits : public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef cc::multilevel_hashset::stat<> stat;
+        };
+        typedef cc::MultiLevelHashSet< gc_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_hp<set_type, nohash<key_type>>(4, 2);
+
+        typedef cc::MultiLevelHashSet<
+            gc_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+                cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+                , co::stat< cc::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_hp<set_type2, nohash<key_type>>(4, 2);
+    }
+
     void MultiLevelHashSetHdrTest::dhp_stdhash_stat()
     {
         typedef size_t hash_type;
@@ -105,6 +151,28 @@ namespace set {
         test_hp<set_type2, hash_type::make>(4, 2);
     }
 
+    void MultiLevelHashSetHdrTest::dhp_nohash_5_3()
+    {
+        typedef size_t key_type;
+
+        struct traits: public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+        };
+        typedef cc::MultiLevelHashSet< gc_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
+        test_hp<set_type, nohash<key_type>>(5, 3);
+
+        typedef cc::MultiLevelHashSet<
+            gc_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+                cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+            >::type
+        > set_type2;
+        test_hp<set_type2, nohash<key_type>>(5, 3);
+    }
+
     void MultiLevelHashSetHdrTest::dhp_stdhash_5_3()
     {
         typedef size_t hash_type;
@@ -151,6 +219,30 @@ namespace set {
         test_hp<set_type2, hash128::make >(4, 3);
     }
 
+    void MultiLevelHashSetHdrTest::dhp_nohash_5_3_stat()
+    {
+        typedef size_t key_type;
+
+        struct traits: public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef cc::multilevel_hashset::stat<> stat;
+        };
+        typedef cc::MultiLevelHashSet< gc_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
+        test_hp<set_type, nohash<key_type>>(5, 3);
+
+        typedef cc::MultiLevelHashSet<
+            gc_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+                cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+                ,co::stat< cc::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_hp<set_type2, nohash<key_type>>(5, 3);
+    }
+
     void MultiLevelHashSetHdrTest::dhp_stdhash_5_3_stat()
     {
         typedef size_t hash_type;
@@ -203,4 +295,5 @@ namespace set {
         test_hp<set_type2, hash_type::make>(4, 3);
     }
 
+
 } // namespace set
index 5ee89c4..11e6f16 100644 (file)
@@ -9,6 +9,28 @@ namespace set {
         typedef cds::gc::HP gc_type;
     } // namespace
 
+    void MultiLevelHashSetHdrTest::hp_nohash()
+    {
+        typedef size_t key_type;
+
+        struct traits : public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+        };
+        typedef cc::MultiLevelHashSet< gc_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_hp<set_type, nohash<key_type>>(4, 2);
+
+        typedef cc::MultiLevelHashSet<
+            gc_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+            cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+            >::type
+        > set_type2;
+        test_hp<set_type2, nohash<key_type>>(4, 2);
+    }
+
     void MultiLevelHashSetHdrTest::hp_stdhash()
     {
         typedef size_t hash_type;
@@ -55,6 +77,30 @@ namespace set {
         test_hp<set_type2, hash128::make>(4, 2);
     }
 
+    void MultiLevelHashSetHdrTest::hp_nohash_stat()
+    {
+        typedef size_t key_type;
+
+        struct traits : public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef cc::multilevel_hashset::stat<> stat;
+        };
+        typedef cc::MultiLevelHashSet< gc_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_hp<set_type, nohash<key_type>>(4, 2);
+
+        typedef cc::MultiLevelHashSet<
+            gc_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+            cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+            , co::stat< cc::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_hp<set_type2, nohash<key_type>>(4, 2);
+    }
+
     void MultiLevelHashSetHdrTest::hp_stdhash_stat()
     {
         typedef size_t hash_type;
@@ -105,6 +151,28 @@ namespace set {
         test_hp<set_type2, hash_type::make>(4, 2);
     }
 
+    void MultiLevelHashSetHdrTest::hp_nohash_5_3()
+    {
+        typedef size_t key_type;
+
+        struct traits: public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+        };
+        typedef cc::MultiLevelHashSet< gc_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
+        test_hp<set_type, nohash<key_type>>(5, 3);
+
+        typedef cc::MultiLevelHashSet<
+            gc_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+                cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+            >::type
+        > set_type2;
+        test_hp<set_type2, nohash<key_type>>(5, 3);
+    }
+
     void MultiLevelHashSetHdrTest::hp_stdhash_5_3()
     {
         typedef size_t hash_type;
@@ -151,6 +219,30 @@ namespace set {
         test_hp<set_type2, hash128::make >(4, 3);
     }
 
+    void MultiLevelHashSetHdrTest::hp_nohash_5_3_stat()
+    {
+        typedef size_t key_type;
+
+        struct traits: public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef cc::multilevel_hashset::stat<> stat;
+        };
+        typedef cc::MultiLevelHashSet< gc_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
+        test_hp<set_type, nohash<key_type>>(5, 3);
+
+        typedef cc::MultiLevelHashSet<
+            gc_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+                cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+                ,co::stat< cc::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_hp<set_type2, nohash<key_type>>(5, 3);
+    }
+
     void MultiLevelHashSetHdrTest::hp_stdhash_5_3_stat()
     {
         typedef size_t hash_type;
index 57fe646..b44bb6e 100644 (file)
@@ -10,6 +10,28 @@ namespace set {
         typedef cds::urcu::gc<cds::urcu::general_buffered<>> rcu_type;
     } // namespace
 
+    void MultiLevelHashSetHdrTest::rcu_gpb_nohash()
+    {
+        typedef size_t key_type;
+
+        struct traits : public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+        };
+        typedef cc::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(4, 2);
+
+        typedef cc::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+            cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(4, 2);
+    }
+
     void MultiLevelHashSetHdrTest::rcu_gpb_stdhash()
     {
         typedef size_t hash_type;
@@ -56,6 +78,30 @@ namespace set {
         test_rcu<set_type2, hash128::make>(4, 2);
     }
 
+    void MultiLevelHashSetHdrTest::rcu_gpb_nohash_stat()
+    {
+        typedef size_t key_type;
+
+        struct traits : public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef cc::multilevel_hashset::stat<> stat;
+        };
+        typedef cc::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(4, 2);
+
+        typedef cc::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+            cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+            , co::stat< cc::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(4, 2);
+    }
+
     void MultiLevelHashSetHdrTest::rcu_gpb_stdhash_stat()
     {
         typedef size_t hash_type;
@@ -106,6 +152,28 @@ namespace set {
         test_rcu<set_type2, hash_type::make>(4, 2);
     }
 
+    void MultiLevelHashSetHdrTest::rcu_gpb_nohash_5_3()
+    {
+        typedef size_t key_type;
+
+        struct traits: public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+        };
+        typedef cc::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
+        test_rcu<set_type, nohash<key_type>>(5, 3);
+
+        typedef cc::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+                cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(5, 3);
+    }
+
     void MultiLevelHashSetHdrTest::rcu_gpb_stdhash_5_3()
     {
         typedef size_t hash_type;
@@ -152,6 +220,30 @@ namespace set {
         test_rcu<set_type2, hash128::make >(4, 3);
     }
 
+    void MultiLevelHashSetHdrTest::rcu_gpb_nohash_5_3_stat()
+    {
+        typedef size_t key_type;
+
+        struct traits: public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef cc::multilevel_hashset::stat<> stat;
+        };
+        typedef cc::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
+        test_rcu<set_type, nohash<key_type>>(5, 3);
+
+        typedef cc::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+                cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+                ,co::stat< cc::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(5, 3);
+    }
+
     void MultiLevelHashSetHdrTest::rcu_gpb_stdhash_5_3_stat()
     {
         typedef size_t hash_type;
@@ -203,4 +295,6 @@ namespace set {
         > set_type2;
         test_rcu<set_type2, hash_type::make>(4, 3);
     }
+
+
 } // namespace set
index 8f49d77..946a5fe 100644 (file)
@@ -10,6 +10,28 @@ namespace set {
         typedef cds::urcu::gc<cds::urcu::general_instant<>> rcu_type;
     } // namespace
 
+    void MultiLevelHashSetHdrTest::rcu_gpi_nohash()
+    {
+        typedef size_t key_type;
+
+        struct traits : public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+        };
+        typedef cc::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(4, 2);
+
+        typedef cc::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+            cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(4, 2);
+    }
+
     void MultiLevelHashSetHdrTest::rcu_gpi_stdhash()
     {
         typedef size_t hash_type;
@@ -56,6 +78,30 @@ namespace set {
         test_rcu<set_type2, hash128::make>(4, 2);
     }
 
+    void MultiLevelHashSetHdrTest::rcu_gpi_nohash_stat()
+    {
+        typedef size_t key_type;
+
+        struct traits : public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef cc::multilevel_hashset::stat<> stat;
+        };
+        typedef cc::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(4, 2);
+
+        typedef cc::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+            cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+            , co::stat< cc::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(4, 2);
+    }
+
     void MultiLevelHashSetHdrTest::rcu_gpi_stdhash_stat()
     {
         typedef size_t hash_type;
@@ -106,6 +152,28 @@ namespace set {
         test_rcu<set_type2, hash_type::make>(4, 2);
     }
 
+    void MultiLevelHashSetHdrTest::rcu_gpi_nohash_5_3()
+    {
+        typedef size_t key_type;
+
+        struct traits: public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+        };
+        typedef cc::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
+        test_rcu<set_type, nohash<key_type>>(5, 3);
+
+        typedef cc::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+                cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(5, 3);
+    }
+
     void MultiLevelHashSetHdrTest::rcu_gpi_stdhash_5_3()
     {
         typedef size_t hash_type;
@@ -152,6 +220,30 @@ namespace set {
         test_rcu<set_type2, hash128::make >(4, 3);
     }
 
+    void MultiLevelHashSetHdrTest::rcu_gpi_nohash_5_3_stat()
+    {
+        typedef size_t key_type;
+
+        struct traits: public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef cc::multilevel_hashset::stat<> stat;
+        };
+        typedef cc::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
+        test_rcu<set_type, nohash<key_type>>(5, 3);
+
+        typedef cc::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+                cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+                ,co::stat< cc::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(5, 3);
+    }
+
     void MultiLevelHashSetHdrTest::rcu_gpi_stdhash_5_3_stat()
     {
         typedef size_t hash_type;
@@ -203,4 +295,6 @@ namespace set {
         > set_type2;
         test_rcu<set_type2, hash_type::make>(4, 3);
     }
+
+
 } // namespace set
index 400ff18..a209533 100644 (file)
@@ -10,6 +10,28 @@ namespace set {
         typedef cds::urcu::gc<cds::urcu::general_threaded<>> rcu_type;
     } // namespace
 
+    void MultiLevelHashSetHdrTest::rcu_gpt_nohash()
+    {
+        typedef size_t key_type;
+
+        struct traits : public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+        };
+        typedef cc::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(4, 2);
+
+        typedef cc::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+            cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(4, 2);
+    }
+
     void MultiLevelHashSetHdrTest::rcu_gpt_stdhash()
     {
         typedef size_t hash_type;
@@ -56,6 +78,30 @@ namespace set {
         test_rcu<set_type2, hash128::make>(4, 2);
     }
 
+    void MultiLevelHashSetHdrTest::rcu_gpt_nohash_stat()
+    {
+        typedef size_t key_type;
+
+        struct traits : public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef cc::multilevel_hashset::stat<> stat;
+        };
+        typedef cc::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(4, 2);
+
+        typedef cc::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+            cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+            , co::stat< cc::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(4, 2);
+    }
+
     void MultiLevelHashSetHdrTest::rcu_gpt_stdhash_stat()
     {
         typedef size_t hash_type;
@@ -106,6 +152,28 @@ namespace set {
         test_rcu<set_type2, hash_type::make>(4, 2);
     }
 
+    void MultiLevelHashSetHdrTest::rcu_gpt_nohash_5_3()
+    {
+        typedef size_t key_type;
+
+        struct traits: public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+        };
+        typedef cc::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
+        test_rcu<set_type, nohash<key_type>>(5, 3);
+
+        typedef cc::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+                cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(5, 3);
+    }
+
     void MultiLevelHashSetHdrTest::rcu_gpt_stdhash_5_3()
     {
         typedef size_t hash_type;
@@ -152,6 +220,30 @@ namespace set {
         test_rcu<set_type2, hash128::make >(4, 3);
     }
 
+    void MultiLevelHashSetHdrTest::rcu_gpt_nohash_5_3_stat()
+    {
+        typedef size_t key_type;
+
+        struct traits: public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef cc::multilevel_hashset::stat<> stat;
+        };
+        typedef cc::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
+        test_rcu<set_type, nohash<key_type>>(5, 3);
+
+        typedef cc::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+                cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+                ,co::stat< cc::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(5, 3);
+    }
+
     void MultiLevelHashSetHdrTest::rcu_gpt_stdhash_5_3_stat()
     {
         typedef size_t hash_type;
@@ -203,4 +295,6 @@ namespace set {
         > set_type2;
         test_rcu<set_type2, hash_type::make>(4, 3);
     }
+
+
 } // namespace set
index 319d923..eaf261c 100644 (file)
@@ -12,6 +12,30 @@ namespace set {
     } // namespace
 #endif
 
+    void MultiLevelHashSetHdrTest::rcu_shb_nohash()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        typedef size_t key_type;
+
+        struct traits : public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+        };
+        typedef cc::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(4, 2);
+
+        typedef cc::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+            cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(4, 2);
+#endif
+    }
+
     void MultiLevelHashSetHdrTest::rcu_shb_stdhash()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
@@ -62,6 +86,32 @@ namespace set {
 #endif
     }
 
+    void MultiLevelHashSetHdrTest::rcu_shb_nohash_stat()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        typedef size_t key_type;
+
+        struct traits : public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef cc::multilevel_hashset::stat<> stat;
+        };
+        typedef cc::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(4, 2);
+
+        typedef cc::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+            cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+            , co::stat< cc::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(4, 2);
+#endif
+    }
+
     void MultiLevelHashSetHdrTest::rcu_shb_stdhash_stat()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
@@ -116,6 +166,30 @@ namespace set {
 #endif
     }
 
+    void MultiLevelHashSetHdrTest::rcu_shb_nohash_5_3()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        typedef size_t key_type;
+
+        struct traits: public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+        };
+        typedef cc::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
+        test_rcu<set_type, nohash<key_type>>(5, 3);
+
+        typedef cc::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+                cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(5, 3);
+#endif
+    }
+
     void MultiLevelHashSetHdrTest::rcu_shb_stdhash_5_3()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
@@ -166,6 +240,32 @@ namespace set {
 #endif
     }
 
+    void MultiLevelHashSetHdrTest::rcu_shb_nohash_5_3_stat()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        typedef size_t key_type;
+
+        struct traits: public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef cc::multilevel_hashset::stat<> stat;
+        };
+        typedef cc::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
+        test_rcu<set_type, nohash<key_type>>(5, 3);
+
+        typedef cc::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+                cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+                ,co::stat< cc::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(5, 3);
+#endif
+    }
+
     void MultiLevelHashSetHdrTest::rcu_shb_stdhash_5_3_stat()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
index 34415de..9147939 100644 (file)
@@ -12,6 +12,30 @@ namespace set {
     } // namespace
 #endif
 
+    void MultiLevelHashSetHdrTest::rcu_sht_nohash()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        typedef size_t key_type;
+
+        struct traits : public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+        };
+        typedef cc::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(4, 2);
+
+        typedef cc::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+            cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(4, 2);
+#endif
+    }
+
     void MultiLevelHashSetHdrTest::rcu_sht_stdhash()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
@@ -62,6 +86,32 @@ namespace set {
 #endif
     }
 
+    void MultiLevelHashSetHdrTest::rcu_sht_nohash_stat()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        typedef size_t key_type;
+
+        struct traits : public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef cc::multilevel_hashset::stat<> stat;
+        };
+        typedef cc::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!");
+        test_rcu<set_type, nohash<key_type>>(4, 2);
+
+        typedef cc::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+            cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+            , co::stat< cc::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(4, 2);
+#endif
+    }
+
     void MultiLevelHashSetHdrTest::rcu_sht_stdhash_stat()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
@@ -116,6 +166,30 @@ namespace set {
 #endif
     }
 
+    void MultiLevelHashSetHdrTest::rcu_sht_nohash_5_3()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        typedef size_t key_type;
+
+        struct traits: public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+        };
+        typedef cc::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
+        test_rcu<set_type, nohash<key_type>>(5, 3);
+
+        typedef cc::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+                cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(5, 3);
+#endif
+    }
+
     void MultiLevelHashSetHdrTest::rcu_sht_stdhash_5_3()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
@@ -166,6 +240,32 @@ namespace set {
 #endif
     }
 
+    void MultiLevelHashSetHdrTest::rcu_sht_nohash_5_3_stat()
+    {
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        typedef size_t key_type;
+
+        struct traits: public cc::multilevel_hashset::traits
+        {
+            typedef get_key<key_type> hash_accessor;
+            typedef cc::multilevel_hashset::stat<> stat;
+        };
+        typedef cc::MultiLevelHashSet< rcu_type, Item<key_type>, traits > set_type;
+        static_assert(std::is_same< typename set_type::hash_type, size_t>::value, "set::hash_type != size_t!!!" );
+        test_rcu<set_type, nohash<key_type>>(5, 3);
+
+        typedef cc::MultiLevelHashSet<
+            rcu_type,
+            Item<key_type>,
+            typename cc::multilevel_hashset::make_traits<
+                cc::multilevel_hashset::hash_accessor< get_key<key_type>>
+                ,co::stat< cc::multilevel_hashset::stat<>>
+            >::type
+        > set_type2;
+        test_rcu<set_type2, nohash<key_type>>(5, 3);
+#endif
+    }
+
     void MultiLevelHashSetHdrTest::rcu_sht_stdhash_5_3_stat()
     {
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
index 1d30ad2..8de1ba6 100644 (file)
 // **************************************************************************************
 // MultiLevelHashMap
 
-#undef CDSUNIT_DECLARE_MultiLevelHashMap64
-#undef CDSUNIT_DECLARE_MultiLevelHashMap64_RCU_Signal
 
-#if CDS_BUILD_BITS == 64
-#   ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-#       define CDSUNIT_DECLARE_MultiLevelHashMap64_RCU_Signal \
-            TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_shb_city64) \
-            TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_shb_city64_stat) \
-            TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_sht_city64) \
-            TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_sht_city64_stat) \
-            TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_shb_city128) \
-            TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_shb_city128_stat) \
-            TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_sht_city128) \
-            TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_sht_city128_stat) \
-
-#   else
-#       define CDSUNIT_DECLARE_MultiLevelHashMap64_RCU_Signal
-#   endif
-
-#   define CDSUNIT_DECLARE_MultiLevelHashMap64  \
-        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_hp_city64) \
-        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_hp_city64_stat) \
-        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_dhp_city64) \
-        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_dhp_city64_stat) \
-        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpi_city64) \
-        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpi_city64_stat) \
-        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpb_city64) \
-        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpb_city64_stat) \
-        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpt_city64) \
-        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpt_city64_stat) \
-        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_hp_city128) \
-        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_hp_city128_stat) \
-        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_dhp_city128) \
-        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_dhp_city128_stat) \
-        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpi_city128) \
-        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpi_city128_stat) \
-        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpb_city128) \
-        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpb_city128_stat) \
-        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpt_city128) \
-        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpt_city128_stat) \
-        CDSUNIT_DECLARE_MultiLevelHashMap64_RCU_Signal
+// fixed-sized key - no hash function is necessary
+
+#undef CDSUNIT_DECLARE_MultiLevelHashMap_fixed
+#undef CDSUNIT_DECLARE_MultiLevelHashMap_fixed_RCU_Signal
+#undef CDSUNIT_TEST_MultiLevelHashMap_fixed
+#undef CDSUNIT_TEST_MultiLevelHashMap_fixed_RCU_Signal
+
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+#   define CDSUNIT_DECLARE_MultiLevelHashMap_fixed_RCU_Signal \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_shb_fixed) \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_shb_fixed_stat) \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_sht_fixed) \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_sht_fixed_stat) \
+
+#   define CDSUNIT_TEST_MultiLevelHashMap_fixed_RCU_Signal \
+        CPPUNIT_TEST(MultiLevelHashMap_rcu_shb_fixed) \
+        CPPUNIT_TEST(MultiLevelHashMap_rcu_shb_fixed_stat) \
+        CPPUNIT_TEST(MultiLevelHashMap_rcu_sht_fixed) \
+        CPPUNIT_TEST(MultiLevelHashMap_rcu_sht_fixed_stat) \
 
 #else
-#   define CDSUNIT_DECLARE_MultiLevelHashMap64
+#   define CDSUNIT_DECLARE_MultiLevelHashMap_fixed_RCU_Signal
+#   define CDSUNIT_TEST_MultiLevelHashMap_fixed_RCU_Signal
 #endif
 
-#undef CDSUNIT_DECLARE_MultiLevelHashMap
-#undef CDSUNIT_DECLARE_MultiLevelHashMap_hash
-#undef CDSUNIT_DECLARE_MultiLevelHashMap_hash_RCU_Signal
+
+#define CDSUNIT_DECLARE_MultiLevelHashMap_fixed \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_hp_fixed) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_hp_fixed_stat) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_dhp_fixed) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_dhp_fixed_stat) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpi_fixed) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpi_fixed_stat) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpb_fixed) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpb_fixed_stat) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpt_fixed) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpt_fixed_stat) \
+    CDSUNIT_DECLARE_MultiLevelHashMap_fixed_RCU_Signal
+
+#define CDSUNIT_TEST_MultiLevelHashMap_fixed \
+    CPPUNIT_TEST(MultiLevelHashMap_hp_fixed) \
+    CPPUNIT_TEST(MultiLevelHashMap_hp_fixed_stat) \
+    CPPUNIT_TEST(MultiLevelHashMap_dhp_fixed) \
+    CPPUNIT_TEST(MultiLevelHashMap_dhp_fixed_stat) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpi_fixed) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpi_fixed_stat) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpb_fixed) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpb_fixed_stat) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpt_fixed) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpt_fixed_stat) \
+    CDSUNIT_TEST_MultiLevelHashMap_fixed_RCU_Signal
+
+// std::hash
+
 #undef CDSUNIT_DECLARE_MultiLevelHashMap_stdhash
 #undef CDSUNIT_DECLARE_MultiLevelHashMap_stdhash_RCU_Signal
+#undef CDSUNIT_TEST_MultiLevelHashMap_stdhash
+#undef CDSUNIT_TEST_MultiLevelHashMap_stdhash_RCU_Signal
 
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
 #   define CDSUNIT_DECLARE_MultiLevelHashMap_stdhash_RCU_Signal \
-    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_shb_stdhash) \
-    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_shb_stdhash_stat) \
-    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_sht_stdhash) \
-    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_sht_stdhash_stat) \
-
-#   define CDSUNIT_DECLARE_MultiLevelHashMap_hash_RCU_Signal \
-    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_shb_md5) \
-    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_shb_md5_stat) \
-    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_sht_md5) \
-    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_sht_md5_stat) \
-    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_shb_sha256) \
-    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_shb_sha256_stat) \
-    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_sht_sha256) \
-    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_sht_sha256_stat) \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_shb_stdhash) \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_shb_stdhash_stat) \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_sht_stdhash) \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_sht_stdhash_stat) \
+
+#   define CDSUNIT_TEST_MultiLevelHashMap_stdhash_RCU_Signal \
+        CPPUNIT_TEST(MultiLevelHashMap_rcu_shb_stdhash) \
+        CPPUNIT_TEST(MultiLevelHashMap_rcu_shb_stdhash_stat) \
+        CPPUNIT_TEST(MultiLevelHashMap_rcu_sht_stdhash) \
+        CPPUNIT_TEST(MultiLevelHashMap_rcu_sht_stdhash_stat) \
 
 #else
 #   define CDSUNIT_DECLARE_MultiLevelHashMap_stdhash_RCU_Signal
-#   define CDSUNIT_DECLARE_MultiLevelHashMap_hash_RCU_Signal
+#   define CDSUNIT_TEST_MultiLevelHashMap_stdhash_RCU_Signal
 #endif
 
-#define CDSUNIT_DECLARE_MultiLevelHashMap_stdhash  \
+
+#define CDSUNIT_DECLARE_MultiLevelHashMap_stdhash \
     TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_hp_stdhash) \
     TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_hp_stdhash_stat) \
     TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_dhp_stdhash) \
     TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpt_stdhash_stat) \
     CDSUNIT_DECLARE_MultiLevelHashMap_stdhash_RCU_Signal
 
-#define CDSUNIT_DECLARE_MultiLevelHashMap_hash  \
+#define CDSUNIT_TEST_MultiLevelHashMap_stdhash \
+    CPPUNIT_TEST(MultiLevelHashMap_hp_stdhash) \
+    CPPUNIT_TEST(MultiLevelHashMap_hp_stdhash_stat) \
+    CPPUNIT_TEST(MultiLevelHashMap_dhp_stdhash) \
+    CPPUNIT_TEST(MultiLevelHashMap_dhp_stdhash_stat) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpi_stdhash) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpi_stdhash_stat) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpb_stdhash) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpb_stdhash_stat) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpt_stdhash) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpt_stdhash_stat) \
+    CDSUNIT_TEST_MultiLevelHashMap_stdhash_RCU_Signal
+
+// MD5
+
+#undef CDSUNIT_DECLARE_MultiLevelHashMap_md5
+#undef CDSUNIT_DECLARE_MultiLevelHashMap_md5_RCU_Signal
+#undef CDSUNIT_TEST_MultiLevelHashMap_md5
+#undef CDSUNIT_TEST_MultiLevelHashMap_md5_RCU_Signal
+
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+#   define CDSUNIT_DECLARE_MultiLevelHashMap_md5_RCU_Signal \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_shb_md5) \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_shb_md5_stat) \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_sht_md5) \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_sht_md5_stat) \
+
+#   define CDSUNIT_TEST_MultiLevelHashMap_md5_RCU_Signal \
+        CPPUNIT_TEST(MultiLevelHashMap_rcu_shb_md5) \
+        CPPUNIT_TEST(MultiLevelHashMap_rcu_shb_md5_stat) \
+        CPPUNIT_TEST(MultiLevelHashMap_rcu_sht_md5) \
+        CPPUNIT_TEST(MultiLevelHashMap_rcu_sht_md5_stat) \
+
+#else
+#   define CDSUNIT_DECLARE_MultiLevelHashMap_md5_RCU_Signal
+#   define CDSUNIT_TEST_MultiLevelHashMap_md5_RCU_Signal
+#endif
+
+
+#define CDSUNIT_DECLARE_MultiLevelHashMap_md5 \
     TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_hp_md5) \
     TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_hp_md5_stat) \
     TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_dhp_md5) \
     TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpb_md5_stat) \
     TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpt_md5) \
     TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpt_md5_stat) \
-    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_hp_sha256) \
-    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_hp_sha256_stat) \
-    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_dhp_sha256) \
-    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_dhp_sha256_stat) \
-    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpi_sha256) \
-    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpi_sha256_stat) \
-    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpb_sha256) \
-    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpb_sha256_stat) \
-    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpt_sha256) \
-    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpt_sha256_stat) \
-    CDSUNIT_DECLARE_MultiLevelHashMap_hash_RCU_Signal \
-    CDSUNIT_DECLARE_MultiLevelHashMap64 \
-
-#define CDSUNIT_DECLARE_MultiLevelHashMap  \
-    CDSUNIT_DECLARE_MultiLevelHashMap_stdhash \
-    CDSUNIT_DECLARE_MultiLevelHashMap_hash \
+    CDSUNIT_DECLARE_MultiLevelHashMap_md5_RCU_Signal
 
+#define CDSUNIT_TEST_MultiLevelHashMap_md5 \
+    CPPUNIT_TEST(MultiLevelHashMap_hp_md5) \
+    CPPUNIT_TEST(MultiLevelHashMap_hp_md5_stat) \
+    CPPUNIT_TEST(MultiLevelHashMap_dhp_md5) \
+    CPPUNIT_TEST(MultiLevelHashMap_dhp_md5_stat) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpi_md5) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpi_md5_stat) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpb_md5) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpb_md5_stat) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpt_md5) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpt_md5_stat) \
+    CDSUNIT_TEST_MultiLevelHashMap_md5_RCU_Signal
 
-#undef CDSUNIT_TEST_MultiLevelHashMap64
-#undef CDSUNIT_TEST_MultiLevelHashMap64_RCU_Signal
-#if CDS_BUILD_BITS == 64
-#   ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-#       define CDSUNIT_TEST_MultiLevelHashMap64_RCU_Signal \
-            CPPUNIT_TEST(MultiLevelHashMap_rcu_shb_city64) \
-            CPPUNIT_TEST(MultiLevelHashMap_rcu_shb_city64_stat) \
-            CPPUNIT_TEST(MultiLevelHashMap_rcu_sht_city64) \
-            CPPUNIT_TEST(MultiLevelHashMap_rcu_sht_city64_stat) \
-            CPPUNIT_TEST(MultiLevelHashMap_rcu_shb_city128) \
-            CPPUNIT_TEST(MultiLevelHashMap_rcu_shb_city128_stat) \
-            CPPUNIT_TEST(MultiLevelHashMap_rcu_sht_city128) \
-            CPPUNIT_TEST(MultiLevelHashMap_rcu_sht_city128_stat) \
-
-#   else
-#       define CDSUNIT_TEST_MultiLevelHashMap64_RCU_Signal
-#   endif
-
-#   define CDSUNIT_TEST_MultiLevelHashMap64  \
-        CPPUNIT_TEST(MultiLevelHashMap_hp_city64) \
-        CPPUNIT_TEST(MultiLevelHashMap_hp_city64_stat) \
-        CPPUNIT_TEST(MultiLevelHashMap_dhp_city64) \
-        CPPUNIT_TEST(MultiLevelHashMap_dhp_city64_stat) \
-        CPPUNIT_TEST(MultiLevelHashMap_rcu_gpi_city64) \
-        CPPUNIT_TEST(MultiLevelHashMap_rcu_gpi_city64_stat) \
-        CPPUNIT_TEST(MultiLevelHashMap_rcu_gpb_city64) \
-        CPPUNIT_TEST(MultiLevelHashMap_rcu_gpb_city64_stat) \
-        CPPUNIT_TEST(MultiLevelHashMap_rcu_gpt_city64) \
-        CPPUNIT_TEST(MultiLevelHashMap_rcu_gpt_city64_stat) \
-        CPPUNIT_TEST(MultiLevelHashMap_hp_city128) \
-        CPPUNIT_TEST(MultiLevelHashMap_hp_city128_stat) \
-        CPPUNIT_TEST(MultiLevelHashMap_dhp_city128) \
-        CPPUNIT_TEST(MultiLevelHashMap_dhp_city128_stat) \
-        CPPUNIT_TEST(MultiLevelHashMap_rcu_gpi_city128) \
-        CPPUNIT_TEST(MultiLevelHashMap_rcu_gpi_city128_stat) \
-        CPPUNIT_TEST(MultiLevelHashMap_rcu_gpb_city128) \
-        CPPUNIT_TEST(MultiLevelHashMap_rcu_gpb_city128_stat) \
-        CPPUNIT_TEST(MultiLevelHashMap_rcu_gpt_city128) \
-        CPPUNIT_TEST(MultiLevelHashMap_rcu_gpt_city128_stat) \
-        CDSUNIT_TEST_MultiLevelHashMap64_RCU_Signal
-
-#else
-#   define CDSUNIT_TEST_MultiLevelHashMap64
-#endif
+// SHA256
 
-#undef CDSUNIT_TEST_MultiLevelHashMap_hash
-#undef CDSUNIT_TEST_MultiLevelHashMap_hash_RCU_Signal
-#undef CDSUNIT_TEST_MultiLevelHashMap_stdhash
-#undef CDSUNIT_TEST_MultiLevelHashMap_stdhash_RCU_Signal
+#undef CDSUNIT_DECLARE_MultiLevelHashMap_sha256
+#undef CDSUNIT_DECLARE_MultiLevelHashMap_sha256_RCU_Signal
+#undef CDSUNIT_TEST_MultiLevelHashMap_sha256
+#undef CDSUNIT_TEST_MultiLevelHashMap_sha256_RCU_Signal
 
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-#   define CDSUNIT_TEST_MultiLevelHashMap_stdhash_RCU_Signal \
-        CPPUNIT_TEST(MultiLevelHashMap_rcu_shb_stdhash) \
-        CPPUNIT_TEST(MultiLevelHashMap_rcu_shb_stdhash_stat) \
-        CPPUNIT_TEST(MultiLevelHashMap_rcu_sht_stdhash) \
-        CPPUNIT_TEST(MultiLevelHashMap_rcu_sht_stdhash_stat) \
+#   define CDSUNIT_DECLARE_MultiLevelHashMap_sha256_RCU_Signal \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_shb_sha256) \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_shb_sha256_stat) \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_sht_sha256) \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_sht_sha256_stat) \
 
-#   define CDSUNIT_TEST_MultiLevelHashMap_hash_RCU_Signal \
-        CPPUNIT_TEST(MultiLevelHashMap_rcu_shb_md5) \
-        CPPUNIT_TEST(MultiLevelHashMap_rcu_shb_md5_stat) \
-        CPPUNIT_TEST(MultiLevelHashMap_rcu_sht_md5) \
-        CPPUNIT_TEST(MultiLevelHashMap_rcu_sht_md5_stat) \
+#   define CDSUNIT_TEST_MultiLevelHashMap_sha256_RCU_Signal \
         CPPUNIT_TEST(MultiLevelHashMap_rcu_shb_sha256) \
         CPPUNIT_TEST(MultiLevelHashMap_rcu_shb_sha256_stat) \
         CPPUNIT_TEST(MultiLevelHashMap_rcu_sht_sha256) \
         CPPUNIT_TEST(MultiLevelHashMap_rcu_sht_sha256_stat) \
 
 #else
-#   define CDSUNIT_TEST_MultiLevelHashMap_hash_RCU_Signal
-#   define CDSUNIT_TEST_MultiLevelHashMap_stdhash_RCU_Signal
+#   define CDSUNIT_DECLARE_MultiLevelHashMap_sha256_RCU_Signal
+#   define CDSUNIT_TEST_MultiLevelHashMap_sha256_RCU_Signal
 #endif
 
-#define CDSUNIT_TEST_MultiLevelHashMap_stdhash  \
-    CPPUNIT_TEST(MultiLevelHashMap_hp_stdhash) \
-    CPPUNIT_TEST(MultiLevelHashMap_hp_stdhash_stat) \
-    CPPUNIT_TEST(MultiLevelHashMap_dhp_stdhash) \
-    CPPUNIT_TEST(MultiLevelHashMap_dhp_stdhash_stat) \
-    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpi_stdhash) \
-    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpi_stdhash_stat) \
-    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpb_stdhash) \
-    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpb_stdhash_stat) \
-    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpt_stdhash) \
-    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpt_stdhash_stat) \
-    CDSUNIT_TEST_MultiLevelHashMap_stdhash_RCU_Signal
 
-#define CDSUNIT_TEST_MultiLevelHashMap_hash  \
-    CPPUNIT_TEST(MultiLevelHashMap_hp_md5) \
-    CPPUNIT_TEST(MultiLevelHashMap_hp_md5_stat) \
-    CPPUNIT_TEST(MultiLevelHashMap_dhp_md5) \
-    CPPUNIT_TEST(MultiLevelHashMap_dhp_md5_stat) \
-    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpi_md5) \
-    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpi_md5_stat) \
-    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpb_md5) \
-    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpb_md5_stat) \
-    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpt_md5) \
-    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpt_md5_stat) \
+#define CDSUNIT_DECLARE_MultiLevelHashMap_sha256 \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_hp_sha256) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_hp_sha256_stat) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_dhp_sha256) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_dhp_sha256_stat) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpi_sha256) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpi_sha256_stat) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpb_sha256) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpb_sha256_stat) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpt_sha256) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpt_sha256_stat) \
+    CDSUNIT_DECLARE_MultiLevelHashMap_sha256_RCU_Signal
+
+#define CDSUNIT_TEST_MultiLevelHashMap_sha256 \
     CPPUNIT_TEST(MultiLevelHashMap_hp_sha256) \
     CPPUNIT_TEST(MultiLevelHashMap_hp_sha256_stat) \
     CPPUNIT_TEST(MultiLevelHashMap_dhp_sha256) \
     CPPUNIT_TEST(MultiLevelHashMap_rcu_gpb_sha256_stat) \
     CPPUNIT_TEST(MultiLevelHashMap_rcu_gpt_sha256) \
     CPPUNIT_TEST(MultiLevelHashMap_rcu_gpt_sha256_stat) \
-    CDSUNIT_TEST_MultiLevelHashMap_hash_RCU_Signal \
-    CDSUNIT_TEST_MultiLevelHashMap64 \
+    CDSUNIT_TEST_MultiLevelHashMap_sha256_RCU_Signal
+
+// CityHash - only for 64bit
+
+#undef CDSUNIT_DECLARE_MultiLevelHashMap_city128_RCU_Signal
+#undef CDSUNIT_TEST_MultiLevelHashMap_city128_RCU_Signal
+
+#if CDS_BUILD_BITS == 64
+
+#undef CDSUNIT_DECLARE_MultiLevelHashMap_city64
+#undef CDSUNIT_DECLARE_MultiLevelHashMap_city64_RCU_Signal
+#undef CDSUNIT_TEST_MultiLevelHashMap_city64
+#undef CDSUNIT_TEST_MultiLevelHashMap_city64_RCU_Signal
+
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+#   define CDSUNIT_DECLARE_MultiLevelHashMap_city64_RCU_Signal \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_shb_city64) \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_shb_city64_stat) \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_sht_city64) \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_sht_city64_stat) \
+
+#   define CDSUNIT_TEST_MultiLevelHashMap_city64_RCU_Signal \
+        CPPUNIT_TEST(MultiLevelHashMap_rcu_shb_city64) \
+        CPPUNIT_TEST(MultiLevelHashMap_rcu_shb_city64_stat) \
+        CPPUNIT_TEST(MultiLevelHashMap_rcu_sht_city64) \
+        CPPUNIT_TEST(MultiLevelHashMap_rcu_sht_city64_stat) \
 
-#define CDSUNIT_TEST_MultiLevelHashMap  \
+#else
+#   define CDSUNIT_DECLARE_MultiLevelHashMap_city64_RCU_Signal
+#   define CDSUNIT_TEST_MultiLevelHashMap_city64_RCU_Signal
+#endif
+
+
+#define CDSUNIT_DECLARE_MultiLevelHashMap_city64 \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_hp_city64) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_hp_city64_stat) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_dhp_city64) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_dhp_city64_stat) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpi_city64) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpi_city64_stat) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpb_city64) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpb_city64_stat) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpt_city64) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpt_city64_stat) \
+    CDSUNIT_DECLARE_MultiLevelHashMap_city64_RCU_Signal
+
+#define CDSUNIT_TEST_MultiLevelHashMap_city64 \
+    CPPUNIT_TEST(MultiLevelHashMap_hp_city64) \
+    CPPUNIT_TEST(MultiLevelHashMap_hp_city64_stat) \
+    CPPUNIT_TEST(MultiLevelHashMap_dhp_city64) \
+    CPPUNIT_TEST(MultiLevelHashMap_dhp_city64_stat) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpi_city64) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpi_city64_stat) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpb_city64) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpb_city64_stat) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpt_city64) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpt_city64_stat) \
+    CDSUNIT_TEST_MultiLevelHashMap_city64_RCU_Signal
+
+#undef CDSUNIT_DECLARE_MultiLevelHashMap_city128
+#undef CDSUNIT_DECLARE_MultiLevelHashMap_city128_RCU_Signal
+#undef CDSUNIT_TEST_MultiLevelHashMap_city128
+#undef CDSUNIT_TEST_MultiLevelHashMap_city128_RCU_Signal
+
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+#   define CDSUNIT_DECLARE_MultiLevelHashMap_city128_RCU_Signal \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_shb_city128) \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_shb_city128_stat) \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_sht_city128) \
+        TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_sht_city128_stat) \
+
+#   define CDSUNIT_TEST_MultiLevelHashMap_city128_RCU_Signal \
+        CPPUNIT_TEST(MultiLevelHashMap_rcu_shb_city128) \
+        CPPUNIT_TEST(MultiLevelHashMap_rcu_shb_city128_stat) \
+        CPPUNIT_TEST(MultiLevelHashMap_rcu_sht_city128) \
+        CPPUNIT_TEST(MultiLevelHashMap_rcu_sht_city128_stat) \
+
+#else
+#   define CDSUNIT_DECLARE_MultiLevelHashMap_city128_RCU_Signal
+#   define CDSUNIT_TEST_MultiLevelHashMap_city128_RCU_Signal
+#endif
+
+
+#define CDSUNIT_DECLARE_MultiLevelHashMap_city128 \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_hp_city128) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_hp_city128_stat) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_dhp_city128) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_dhp_city128_stat) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpi_city128) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpi_city128_stat) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpb_city128) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpb_city128_stat) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpt_city128) \
+    TEST_CASE(tag_MultiLevelHashMap, MultiLevelHashMap_rcu_gpt_city128_stat) \
+    CDSUNIT_DECLARE_MultiLevelHashMap_city128_RCU_Signal
+
+#define CDSUNIT_TEST_MultiLevelHashMap_city128 \
+    CPPUNIT_TEST(MultiLevelHashMap_hp_city128) \
+    CPPUNIT_TEST(MultiLevelHashMap_hp_city128_stat) \
+    CPPUNIT_TEST(MultiLevelHashMap_dhp_city128) \
+    CPPUNIT_TEST(MultiLevelHashMap_dhp_city128_stat) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpi_city128) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpi_city128_stat) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpb_city128) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpb_city128_stat) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpt_city128) \
+    CPPUNIT_TEST(MultiLevelHashMap_rcu_gpt_city128_stat) \
+    CDSUNIT_TEST_MultiLevelHashMap_city128_RCU_Signal
+
+#define CDSUNIT_DECLARE_MultiLevelHashMap_city \
+    CDSUNIT_DECLARE_MultiLevelHashMap_city64 \
+    CDSUNIT_DECLARE_MultiLevelHashMap_city128
+
+#define CDSUNIT_TEST_MultiLevelHashMap_city \
+    CDSUNIT_TEST_MultiLevelHashMap_city64 \
+    CDSUNIT_TEST_MultiLevelHashMap_city128
+
+#else // 32bit
+#   define CDSUNIT_DECLARE_MultiLevelHashMap_city
+#   define CDSUNIT_TEST_MultiLevelHashMap_city
+#endif // #if CDS_BUILD_BITS == 64
+
+#undef CDSUNIT_DECLARE_MultiLevelHashMap
+#undef CDSUNIT_TEST_MultiLevelHashMap
+
+#define CDSUNIT_DECLARE_MultiLevelHashMap \
+    CDSUNIT_DECLARE_MultiLevelHashMap_fixed \
+    CDSUNIT_DECLARE_MultiLevelHashMap_stdhash \
+    CDSUNIT_DECLARE_MultiLevelHashMap_md5 \
+    CDSUNIT_DECLARE_MultiLevelHashMap_sha256 \
+    CDSUNIT_DECLARE_MultiLevelHashMap_city \
+
+#define CDSUNIT_TEST_MultiLevelHashMap \
+    CDSUNIT_TEST_MultiLevelHashMap_fixed \
     CDSUNIT_TEST_MultiLevelHashMap_stdhash \
-    CDSUNIT_TEST_MultiLevelHashMap_hash \
+    CDSUNIT_TEST_MultiLevelHashMap_md5 \
+    CDSUNIT_TEST_MultiLevelHashMap_sha256 \
+    CDSUNIT_TEST_MultiLevelHashMap_city
+
index e7167db..7c90e6b 100644 (file)
@@ -280,18 +280,18 @@ namespace map2 {
             virtual void init() { cds::threading::Manager::attachThread()   ; }
             virtual void fini() { cds::threading::Manager::detachThread()   ; }
 
-            template <bool>
+            template <typename MapType, bool>
             struct eraser {
-                static bool erase(Map& map, size_t key, size_t /*insThread*/)
+                static bool erase(MapType& map, size_t key, size_t /*insThread*/)
                 {
                     return map.erase_with(key, key_less());
                 }
             };
 
-            template <>
-            struct eraser<true>
+            template <typename MapType>
+            struct eraser<MapType, true>
             {
-                static bool erase(Map& map, size_t key, size_t insThread)
+                static bool erase(MapType& map, size_t key, size_t insThread)
                 {
                     return map.erase(key_type(key, insThread));
                 }
@@ -314,14 +314,14 @@ namespace map2 {
                                 if ( arrData[i] & 1 ) {
                                     if ( Map::c_bEraseExactKey ) {
                                         for (size_t key = 0; key < nInsThreadCount; ++key) {
-                                            if ( eraser<Map::c_bEraseExactKey>::erase( rMap, arrData[i], key ))
+                                            if ( eraser<Map, Map::c_bEraseExactKey>::erase( rMap, arrData[i], key ))
                                                 ++m_nDeleteSuccess;
                                             else
                                                 ++m_nDeleteFailed;
                                         }
                                     }
                                     else {
-                                        if ( eraser<Map::c_bEraseExactKey>::erase(rMap, arrData[i], 0) )
+                                        if ( eraser<Map, Map::c_bEraseExactKey>::erase(rMap, arrData[i], 0) )
                                             ++m_nDeleteSuccess;
                                         else
                                             ++m_nDeleteFailed;
@@ -338,14 +338,14 @@ namespace map2 {
                                 if ( arrData[i] & 1 ) {
                                     if ( Map::c_bEraseExactKey ) {
                                         for (size_t key = 0; key < nInsThreadCount; ++key) {
-                                            if (eraser<Map::c_bEraseExactKey>::erase(rMap, arrData[i], key))
+                                            if (eraser<Map, Map::c_bEraseExactKey>::erase(rMap, arrData[i], key))
                                                 ++m_nDeleteSuccess;
                                             else
                                                 ++m_nDeleteFailed;
                                         }
                                     }
                                     else {
-                                        if (eraser<Map::c_bEraseExactKey>::erase(rMap, arrData[i], 0))
+                                        if (eraser<Map, Map::c_bEraseExactKey>::erase(rMap, arrData[i], 0))
                                             ++m_nDeleteSuccess;
                                         else
                                             ++m_nDeleteFailed;
@@ -392,18 +392,18 @@ namespace map2 {
             virtual void init() { cds::threading::Manager::attachThread()   ; }
             virtual void fini() { cds::threading::Manager::detachThread()   ; }
 
-            template <bool>
+            template <typename MapType, bool>
             struct extractor {
-                static typename Map::guarded_ptr extract(Map& map, size_t key, size_t /*insThread*/)
+                static typename Map::guarded_ptr extract(MapType& map, size_t key, size_t /*insThread*/)
                 {
                     return map.extract_with(key, key_less());
                 }
             };
 
-            template <>
-            struct extractor<true>
+            template <typename MapType>
+            struct extractor<MapType, true>
             {
-                static typename Map::guarded_ptr extract(Map& map, size_t key, size_t insThread)
+                static typename Map::guarded_ptr extract(MapType& map, size_t key, size_t insThread)
                 {
                     return map.extract(key_type(key, insThread));
                 }
@@ -425,7 +425,7 @@ namespace map2 {
                         for ( size_t k = 0; k < nInsThreadCount; ++k ) {
                             for ( size_t i = 0; i < arrData.size(); ++i ) {
                                 if ( arrData[i] & 1 ) {
-                                    gp = extractor< Map::c_bEraseExactKey >::extract( rMap, arrData[i], k );
+                                    gp = extractor< Map, Map::c_bEraseExactKey >::extract( rMap, arrData[i], k );
                                     if ( gp )
                                         ++m_nDeleteSuccess;
                                     else
@@ -441,7 +441,7 @@ namespace map2 {
                         for ( size_t k = 0; k < nInsThreadCount; ++k ) {
                             for ( size_t i = arrData.size() - 1; i > 0; --i ) {
                                 if ( arrData[i] & 1 ) {
-                                    gp = extractor< Map::c_bEraseExactKey >::extract( rMap, arrData[i], k);
+                                    gp = extractor< Map, Map::c_bEraseExactKey >::extract( rMap, arrData[i], k);
                                     if ( gp )
                                         ++m_nDeleteSuccess;
                                     else
@@ -488,18 +488,18 @@ namespace map2 {
             virtual void init() { cds::threading::Manager::attachThread()   ; }
             virtual void fini() { cds::threading::Manager::detachThread()   ; }
 
-            template <bool>
+            template <typename MapType, bool>
             struct extractor {
-                static typename Map::exempt_ptr extract( Map& map, size_t key, size_t /*insThread*/ )
+                static typename Map::exempt_ptr extract( MapType& map, size_t key, size_t /*insThread*/ )
                 {
                     return map.extract_with( key, key_less());
                 }
             };
 
-            template <>
-            struct extractor<true>
+            template <typename MapType>
+            struct extractor<MapType, true>
             {
-                static typename Map::exempt_ptr extract(Map& map, size_t key, size_t insThread)
+                static typename Map::exempt_ptr extract(MapType& map, size_t key, size_t insThread)
                 {
                     return map.extract( key_type(key, insThread));
                 }
@@ -523,7 +523,7 @@ namespace map2 {
                                 if ( Map::c_bExtractLockExternal ) {
                                     {
                                         typename Map::rcu_lock l;
-                                        xp = extractor<Map::c_bEraseExactKey>::extract( rMap, arrData[i], k );
+                                        xp = extractor<Map, Map::c_bEraseExactKey>::extract( rMap, arrData[i], k );
                                         if ( xp )
                                             ++m_nDeleteSuccess;
                                         else
@@ -531,7 +531,7 @@ namespace map2 {
                                     }
                                 }
                                 else {
-                                    xp = extractor<Map::c_bEraseExactKey>::extract( rMap, arrData[i], k);
+                                    xp = extractor<Map, Map::c_bEraseExactKey>::extract( rMap, arrData[i], k);
                                     if ( xp )
                                         ++m_nDeleteSuccess;
                                     else
@@ -551,7 +551,7 @@ namespace map2 {
                                 if ( Map::c_bExtractLockExternal ) {
                                     {
                                         typename Map::rcu_lock l;
-                                        xp = extractor<Map::c_bEraseExactKey>::extract(rMap, arrData[i], k);
+                                        xp = extractor<Map, Map::c_bEraseExactKey>::extract(rMap, arrData[i], k);
                                         if ( xp )
                                             ++m_nDeleteSuccess;
                                         else
@@ -559,7 +559,7 @@ namespace map2 {
                                     }
                                 }
                                 else {
-                                    xp = extractor<Map::c_bEraseExactKey>::extract(rMap, arrData[i], k);
+                                    xp = extractor<Map, Map::c_bEraseExactKey>::extract(rMap, arrData[i], k);
                                     if ( xp )
                                         ++m_nDeleteSuccess;
                                     else
@@ -773,7 +773,8 @@ namespace map2 {
         CDSUNIT_DECLARE_SkipListMap
         CDSUNIT_DECLARE_EllenBinTreeMap
         CDSUNIT_DECLARE_BronsonAVLTreeMap
-        CDSUNIT_DECLARE_MultiLevelHashMap64
+        CDSUNIT_DECLARE_MultiLevelHashMap_fixed
+        CDSUNIT_DECLARE_MultiLevelHashMap_city
         CDSUNIT_DECLARE_CuckooMap
 
         CPPUNIT_TEST_SUITE(Map_DelOdd)
@@ -782,7 +783,8 @@ namespace map2 {
             CDSUNIT_TEST_SkipListMap
             CDSUNIT_TEST_EllenBinTreeMap
             CDSUNIT_TEST_BronsonAVLTreeMap
-            CDSUNIT_TEST_MultiLevelHashMap64
+            CDSUNIT_TEST_MultiLevelHashMap_fixed
+            CDSUNIT_TEST_MultiLevelHashMap_city
             CDSUNIT_TEST_CuckooMap
         CPPUNIT_TEST_SUITE_END();
 
index 384ea26..b337daa 100644 (file)
@@ -8,5 +8,6 @@
 #include "map2/map_defs.h"
 
 namespace map2 {
-    CDSUNIT_DECLARE_MultiLevelHashMap64
+    CDSUNIT_DECLARE_MultiLevelHashMap_fixed
+    CDSUNIT_DECLARE_MultiLevelHashMap_city
 } // namespace map2
index 1a65536..36e9908 100644 (file)
@@ -216,7 +216,9 @@ namespace map2 {
         CDSUNIT_DECLARE_SkipListMap_nogc
         CDSUNIT_DECLARE_EllenBinTreeMap
         CDSUNIT_DECLARE_BronsonAVLTreeMap
-        CDSUNIT_DECLARE_MultiLevelHashMap
+        CDSUNIT_DECLARE_MultiLevelHashMap_md5
+        CDSUNIT_DECLARE_MultiLevelHashMap_sha256
+        CDSUNIT_DECLARE_MultiLevelHashMap_city
         CDSUNIT_DECLARE_StripedMap
         CDSUNIT_DECLARE_RefinableMap
         CDSUNIT_DECLARE_CuckooMap
@@ -232,7 +234,9 @@ namespace map2 {
             CDSUNIT_TEST_SkipListMap_nogc
             CDSUNIT_TEST_EllenBinTreeMap
             CDSUNIT_TEST_BronsonAVLTreeMap
-            CDSUNIT_TEST_MultiLevelHashMap
+            CDSUNIT_TEST_MultiLevelHashMap_md5
+            CDSUNIT_TEST_MultiLevelHashMap_sha256
+            CDSUNIT_TEST_MultiLevelHashMap_city
             CDSUNIT_TEST_CuckooMap
             CDSUNIT_TEST_StripedMap
             CDSUNIT_TEST_RefinableMap
index e7eb41a..92d001c 100644 (file)
@@ -8,5 +8,7 @@
 #include "map2/map_defs.h"
 
 namespace map2 {
-    CDSUNIT_DECLARE_MultiLevelHashMap
+    CDSUNIT_DECLARE_MultiLevelHashMap_md5
+    CDSUNIT_DECLARE_MultiLevelHashMap_sha256
+    CDSUNIT_DECLARE_MultiLevelHashMap_city
 } // namespace map2
index 14ca7f2..797c5e2 100644 (file)
@@ -550,7 +550,8 @@ namespace map2 {
         CDSUNIT_DECLARE_SkipListMap
         CDSUNIT_DECLARE_EllenBinTreeMap
         CDSUNIT_DECLARE_BronsonAVLTreeMap
-        CDSUNIT_DECLARE_MultiLevelHashMap
+        CDSUNIT_DECLARE_MultiLevelHashMap_fixed
+        CDSUNIT_DECLARE_MultiLevelHashMap_city
         CDSUNIT_DECLARE_StripedMap
         CDSUNIT_DECLARE_RefinableMap
         CDSUNIT_DECLARE_CuckooMap
@@ -561,7 +562,8 @@ namespace map2 {
             CDSUNIT_TEST_SkipListMap
             CDSUNIT_TEST_EllenBinTreeMap
             CDSUNIT_TEST_BronsonAVLTreeMap
-            CDSUNIT_TEST_MultiLevelHashMap
+            CDSUNIT_TEST_MultiLevelHashMap_fixed
+            CDSUNIT_TEST_MultiLevelHashMap_city
             CDSUNIT_TEST_CuckooMap
             CDSUNIT_TEST_StripedMap
             CDSUNIT_TEST_RefinableMap
index d215334..b79e71e 100644 (file)
@@ -8,5 +8,6 @@
 #include "map2/map_defs.h"
 
 namespace map2 {
-    CDSUNIT_DECLARE_MultiLevelHashMap
+    CDSUNIT_DECLARE_MultiLevelHashMap_fixed
+    CDSUNIT_DECLARE_MultiLevelHashMap_city
 } // namespace map2
index e3e67e3..2f7f8a9 100644 (file)
@@ -251,7 +251,8 @@ namespace map2 {
         CDSUNIT_DECLARE_SkipListMap
         CDSUNIT_DECLARE_EllenBinTreeMap
         CDSUNIT_DECLARE_BronsonAVLTreeMap
-        CDSUNIT_DECLARE_MultiLevelHashMap
+        CDSUNIT_DECLARE_MultiLevelHashMap_fixed
+        CDSUNIT_DECLARE_MultiLevelHashMap_city
         CDSUNIT_DECLARE_StripedMap
         CDSUNIT_DECLARE_RefinableMap
         CDSUNIT_DECLARE_CuckooMap
@@ -263,7 +264,8 @@ namespace map2 {
             CDSUNIT_TEST_SkipListMap
             CDSUNIT_TEST_EllenBinTreeMap
             CDSUNIT_TEST_BronsonAVLTreeMap
-            CDSUNIT_TEST_MultiLevelHashMap
+            CDSUNIT_TEST_MultiLevelHashMap_fixed
+            CDSUNIT_TEST_MultiLevelHashMap_city
             CDSUNIT_TEST_CuckooMap
             CDSUNIT_TEST_StripedMap
             CDSUNIT_TEST_RefinableMap
index 7ebbb33..1ac91ec 100644 (file)
@@ -8,5 +8,6 @@
 #include "map2/map_defs.h"
 
 namespace map2 {
-    CDSUNIT_DECLARE_MultiLevelHashMap
+    CDSUNIT_DECLARE_MultiLevelHashMap_fixed
+    CDSUNIT_DECLARE_MultiLevelHashMap_city
 } // namespace map2
index d38d442..fffbf8c 100644 (file)
@@ -276,7 +276,8 @@ namespace map2 {
         CDSUNIT_DECLARE_SkipListMap
         CDSUNIT_DECLARE_EllenBinTreeMap
         CDSUNIT_DECLARE_BronsonAVLTreeMap
-        CDSUNIT_DECLARE_MultiLevelHashMap
+        CDSUNIT_DECLARE_MultiLevelHashMap_fixed
+        CDSUNIT_DECLARE_MultiLevelHashMap_city
         CDSUNIT_DECLARE_StripedMap
         CDSUNIT_DECLARE_RefinableMap
         CDSUNIT_DECLARE_CuckooMap
@@ -288,7 +289,8 @@ namespace map2 {
             CDSUNIT_TEST_SkipListMap
             CDSUNIT_TEST_EllenBinTreeMap
             CDSUNIT_TEST_BronsonAVLTreeMap
-            CDSUNIT_TEST_MultiLevelHashMap
+            CDSUNIT_TEST_MultiLevelHashMap_fixed
+            CDSUNIT_TEST_MultiLevelHashMap_city
             CDSUNIT_TEST_CuckooMap
             CDSUNIT_TEST_StripedMap
             CDSUNIT_TEST_RefinableMap
index 1e1f1a4..4bd37b7 100644 (file)
@@ -8,5 +8,6 @@
 #include "map2/map_defs.h"
 
 namespace map2 {
-    CDSUNIT_DECLARE_MultiLevelHashMap
+    CDSUNIT_DECLARE_MultiLevelHashMap_fixed
+    CDSUNIT_DECLARE_MultiLevelHashMap_city
 } // namespace map2
index 94b9569..f7e41dc 100644 (file)
@@ -257,7 +257,9 @@ namespace map2 {
         CDSUNIT_DECLARE_SkipListMap
         CDSUNIT_DECLARE_EllenBinTreeMap
         CDSUNIT_DECLARE_BronsonAVLTreeMap
-        CDSUNIT_DECLARE_MultiLevelHashMap
+        CDSUNIT_DECLARE_MultiLevelHashMap_md5
+        CDSUNIT_DECLARE_MultiLevelHashMap_sha256
+        CDSUNIT_DECLARE_MultiLevelHashMap_city
         CDSUNIT_DECLARE_StripedMap
         CDSUNIT_DECLARE_RefinableMap
         CDSUNIT_DECLARE_CuckooMap
@@ -269,7 +271,9 @@ namespace map2 {
             CDSUNIT_TEST_SkipListMap
             CDSUNIT_TEST_EllenBinTreeMap
             CDSUNIT_TEST_BronsonAVLTreeMap
-            CDSUNIT_TEST_MultiLevelHashMap
+            CDSUNIT_TEST_MultiLevelHashMap_md5
+            CDSUNIT_TEST_MultiLevelHashMap_sha256
+            CDSUNIT_TEST_MultiLevelHashMap_city
             CDSUNIT_TEST_CuckooMap
             CDSUNIT_TEST_StripedMap
             CDSUNIT_TEST_RefinableMap
index c23e967..0d75f79 100644 (file)
@@ -8,5 +8,7 @@
 #include "map2/map_defs.h"
 
 namespace map2 {
-    CDSUNIT_DECLARE_MultiLevelHashMap
+    CDSUNIT_DECLARE_MultiLevelHashMap_md5
+    CDSUNIT_DECLARE_MultiLevelHashMap_sha256
+    CDSUNIT_DECLARE_MultiLevelHashMap_city
 } // namespace map2
index 0f2558a..b1fe41b 100644 (file)
@@ -256,7 +256,8 @@ namespace map2 {
         CDSUNIT_DECLARE_SkipListMap
         CDSUNIT_DECLARE_EllenBinTreeMap
         CDSUNIT_DECLARE_BronsonAVLTreeMap
-        CDSUNIT_DECLARE_MultiLevelHashMap
+        CDSUNIT_DECLARE_MultiLevelHashMap_sha256
+        CDSUNIT_DECLARE_MultiLevelHashMap_city
         CDSUNIT_DECLARE_StripedMap
         CDSUNIT_DECLARE_RefinableMap
         CDSUNIT_DECLARE_CuckooMap
@@ -268,7 +269,8 @@ namespace map2 {
             CDSUNIT_TEST_SkipListMap
             CDSUNIT_TEST_EllenBinTreeMap
             CDSUNIT_TEST_BronsonAVLTreeMap
-            CDSUNIT_TEST_MultiLevelHashMap
+            CDSUNIT_TEST_MultiLevelHashMap_sha256
+            CDSUNIT_TEST_MultiLevelHashMap_city
             CDSUNIT_TEST_CuckooMap
             CDSUNIT_TEST_StripedMap
             CDSUNIT_TEST_RefinableMap
index 202a81d..9651f0d 100644 (file)
@@ -8,5 +8,6 @@
 #include "map2/map_defs.h"
 
 namespace map2 {
-    CDSUNIT_DECLARE_MultiLevelHashMap
+    CDSUNIT_DECLARE_MultiLevelHashMap_sha256
+    CDSUNIT_DECLARE_MultiLevelHashMap_city
 } // namespace map2
index e5c5cae..102498e 100644 (file)
@@ -255,7 +255,8 @@ namespace map2 {
         CDSUNIT_DECLARE_SkipListMap
         CDSUNIT_DECLARE_EllenBinTreeMap
         CDSUNIT_DECLARE_BronsonAVLTreeMap
-        CDSUNIT_DECLARE_MultiLevelHashMap
+        CDSUNIT_DECLARE_MultiLevelHashMap_fixed
+        CDSUNIT_DECLARE_MultiLevelHashMap_city
         CDSUNIT_DECLARE_StripedMap
         CDSUNIT_DECLARE_RefinableMap
         CDSUNIT_DECLARE_CuckooMap
@@ -267,7 +268,8 @@ namespace map2 {
             CDSUNIT_TEST_SkipListMap
             CDSUNIT_TEST_EllenBinTreeMap
             CDSUNIT_TEST_BronsonAVLTreeMap
-            CDSUNIT_TEST_MultiLevelHashMap
+            CDSUNIT_TEST_MultiLevelHashMap_fixed
+            CDSUNIT_TEST_MultiLevelHashMap_city
             CDSUNIT_TEST_CuckooMap
             CDSUNIT_TEST_StripedMap
             CDSUNIT_TEST_RefinableMap
index 3799b1c..2eadd2d 100644 (file)
@@ -8,5 +8,6 @@
 #include "map2/map_defs.h"
 
 namespace map2 {
-    CDSUNIT_DECLARE_MultiLevelHashMap
+    CDSUNIT_DECLARE_MultiLevelHashMap_fixed
+    CDSUNIT_DECLARE_MultiLevelHashMap_city
 } // namespace map2
index 7e0096e..d98961d 100644 (file)
@@ -197,7 +197,8 @@ namespace map2 {
         CDSUNIT_DECLARE_SkipListMap_nogc
         CDSUNIT_DECLARE_EllenBinTreeMap
         CDSUNIT_DECLARE_BronsonAVLTreeMap
-        CDSUNIT_DECLARE_MultiLevelHashMap
+        CDSUNIT_DECLARE_MultiLevelHashMap_fixed
+        CDSUNIT_DECLARE_MultiLevelHashMap_city
         CDSUNIT_DECLARE_StripedMap
         CDSUNIT_DECLARE_RefinableMap
         CDSUNIT_DECLARE_CuckooMap
@@ -213,7 +214,8 @@ namespace map2 {
             CDSUNIT_TEST_SkipListMap_nogc
             CDSUNIT_TEST_EllenBinTreeMap
             CDSUNIT_TEST_BronsonAVLTreeMap
-            CDSUNIT_TEST_MultiLevelHashMap
+            CDSUNIT_TEST_MultiLevelHashMap_fixed
+            CDSUNIT_TEST_MultiLevelHashMap_city
             CDSUNIT_TEST_CuckooMap
             CDSUNIT_TEST_StripedMap
             CDSUNIT_TEST_RefinableMap
index 4726b18..260b1e7 100644 (file)
@@ -8,5 +8,6 @@
 #include "map2/map_defs.h"
 
 namespace map2 {
-    CDSUNIT_DECLARE_MultiLevelHashMap
+    CDSUNIT_DECLARE_MultiLevelHashMap_fixed
+    CDSUNIT_DECLARE_MultiLevelHashMap_city
 } // namespace map2
index c2705a6..1ac5a84 100644 (file)
@@ -39,29 +39,34 @@ namespace map2 {
         typedef typename base_class::compare    compare;
         typedef typename base_class::less       less;
 
-        typedef MultiLevelHashMap< cds::gc::HP,  Key, Value >    MultiLevelHashMap_hp_stdhash;
-        typedef MultiLevelHashMap< cds::gc::DHP, Key, Value >    MultiLevelHashMap_dhp_stdhash;
-        typedef MultiLevelHashMap< rcu_gpi, Key, Value >    MultiLevelHashMap_rcu_gpi_stdhash;
-        typedef MultiLevelHashMap< rcu_gpb, Key, Value >    MultiLevelHashMap_rcu_gpb_stdhash;
-        typedef MultiLevelHashMap< rcu_gpt, Key, Value >    MultiLevelHashMap_rcu_gpt_stdhash;
+        struct traits_MultiLevelHashMap_stdhash : public cc::multilevel_hashmap::traits
+        {
+            typedef std::hash< Key > hash;
+        };
+
+        typedef MultiLevelHashMap< cds::gc::HP,  Key, Value, traits_MultiLevelHashMap_stdhash >    MultiLevelHashMap_hp_stdhash;
+        typedef MultiLevelHashMap< cds::gc::DHP, Key, Value, traits_MultiLevelHashMap_stdhash >    MultiLevelHashMap_dhp_stdhash;
+        typedef MultiLevelHashMap< rcu_gpi, Key, Value, traits_MultiLevelHashMap_stdhash >    MultiLevelHashMap_rcu_gpi_stdhash;
+        typedef MultiLevelHashMap< rcu_gpb, Key, Value, traits_MultiLevelHashMap_stdhash >    MultiLevelHashMap_rcu_gpb_stdhash;
+        typedef MultiLevelHashMap< rcu_gpt, Key, Value, traits_MultiLevelHashMap_stdhash >    MultiLevelHashMap_rcu_gpt_stdhash;
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-        typedef MultiLevelHashMap< rcu_shb, Key, Value >    MultiLevelHashMap_rcu_shb_stdhash;
-        typedef MultiLevelHashMap< rcu_sht, Key, Value >    MultiLevelHashMap_rcu_sht_stdhash;
+        typedef MultiLevelHashMap< rcu_shb, Key, Value, traits_MultiLevelHashMap_stdhash >    MultiLevelHashMap_rcu_shb_stdhash;
+        typedef MultiLevelHashMap< rcu_sht, Key, Value, traits_MultiLevelHashMap_stdhash >    MultiLevelHashMap_rcu_sht_stdhash;
 #endif
 
-        struct traits_MultiLevelHashMap_stat: public cc::multilevel_hashmap::make_traits<
-                co::stat< cc::multilevel_hashmap::stat<>>
-            >::type
-        {};
+        struct traits_MultiLevelHashMap_stdhash_stat: traits_MultiLevelHashMap_stdhash
+        {
+            typedef cc::multilevel_hashmap::stat<> stat;
+        };
 
-        typedef MultiLevelHashMap< cds::gc::HP,  Key, Value, traits_MultiLevelHashMap_stat >    MultiLevelHashMap_hp_stdhash_stat;
-        typedef MultiLevelHashMap< cds::gc::DHP, Key, Value, traits_MultiLevelHashMap_stat >    MultiLevelHashMap_dhp_stdhash_stat;
-        typedef MultiLevelHashMap< rcu_gpi, Key, Value, traits_MultiLevelHashMap_stat >    MultiLevelHashMap_rcu_gpi_stdhash_stat;
-        typedef MultiLevelHashMap< rcu_gpb, Key, Value, traits_MultiLevelHashMap_stat >    MultiLevelHashMap_rcu_gpb_stdhash_stat;
-        typedef MultiLevelHashMap< rcu_gpt, Key, Value, traits_MultiLevelHashMap_stat >    MultiLevelHashMap_rcu_gpt_stdhash_stat;
+        typedef MultiLevelHashMap< cds::gc::HP,  Key, Value, traits_MultiLevelHashMap_stdhash_stat >    MultiLevelHashMap_hp_stdhash_stat;
+        typedef MultiLevelHashMap< cds::gc::DHP, Key, Value, traits_MultiLevelHashMap_stdhash_stat >    MultiLevelHashMap_dhp_stdhash_stat;
+        typedef MultiLevelHashMap< rcu_gpi, Key, Value, traits_MultiLevelHashMap_stdhash_stat >    MultiLevelHashMap_rcu_gpi_stdhash_stat;
+        typedef MultiLevelHashMap< rcu_gpb, Key, Value, traits_MultiLevelHashMap_stdhash_stat >    MultiLevelHashMap_rcu_gpb_stdhash_stat;
+        typedef MultiLevelHashMap< rcu_gpt, Key, Value, traits_MultiLevelHashMap_stdhash_stat >    MultiLevelHashMap_rcu_gpt_stdhash_stat;
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-        typedef MultiLevelHashMap< rcu_shb, Key, Value, traits_MultiLevelHashMap_stat >    MultiLevelHashMap_rcu_shb_stdhash_stat;
-        typedef MultiLevelHashMap< rcu_sht, Key, Value, traits_MultiLevelHashMap_stat >    MultiLevelHashMap_rcu_sht_stdhash_stat;
+        typedef MultiLevelHashMap< rcu_shb, Key, Value, traits_MultiLevelHashMap_stdhash_stat >    MultiLevelHashMap_rcu_shb_stdhash_stat;
+        typedef MultiLevelHashMap< rcu_sht, Key, Value, traits_MultiLevelHashMap_stdhash_stat >    MultiLevelHashMap_rcu_sht_stdhash_stat;
 #endif
 
         // SHA256
@@ -182,6 +187,33 @@ namespace map2 {
         typedef MultiLevelHashMap< rcu_sht, Key, Value, traits_MultiLevelHashMap_city128_stat >    MultiLevelHashMap_rcu_sht_city128_stat;
 #endif
 #endif // CDS_BUILD_BITS == 64
+
+
+        // for fixed-sized keys - no hash functor required
+        typedef MultiLevelHashMap< cds::gc::HP, Key, Value >    MultiLevelHashMap_hp_fixed;
+        typedef MultiLevelHashMap< cds::gc::DHP, Key, Value >   MultiLevelHashMap_dhp_fixed;
+        typedef MultiLevelHashMap< rcu_gpi, Key, Value >    MultiLevelHashMap_rcu_gpi_fixed;
+        typedef MultiLevelHashMap< rcu_gpb, Key, Value >    MultiLevelHashMap_rcu_gpb_fixed;
+        typedef MultiLevelHashMap< rcu_gpt, Key, Value >    MultiLevelHashMap_rcu_gpt_fixed;
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        typedef MultiLevelHashMap< rcu_shb, Key, Value >    MultiLevelHashMap_rcu_shb_fixed;
+        typedef MultiLevelHashMap< rcu_sht, Key, Value >    MultiLevelHashMap_rcu_sht_fixed;
+#endif
+
+        struct traits_MultiLevelHashMap_stat : public cc::multilevel_hashmap::traits
+        {
+            typedef cc::multilevel_hashmap::stat<> stat;
+        };
+        typedef MultiLevelHashMap< cds::gc::HP, Key, Value, traits_MultiLevelHashMap_stat >    MultiLevelHashMap_hp_fixed_stat;
+        typedef MultiLevelHashMap< cds::gc::DHP, Key, Value, traits_MultiLevelHashMap_stat >   MultiLevelHashMap_dhp_fixed_stat;
+        typedef MultiLevelHashMap< rcu_gpi, Key, Value, traits_MultiLevelHashMap_stat >    MultiLevelHashMap_rcu_gpi_fixed_stat;
+        typedef MultiLevelHashMap< rcu_gpb, Key, Value, traits_MultiLevelHashMap_stat >    MultiLevelHashMap_rcu_gpb_fixed_stat;
+        typedef MultiLevelHashMap< rcu_gpt, Key, Value, traits_MultiLevelHashMap_stat >    MultiLevelHashMap_rcu_gpt_fixed_stat;
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        typedef MultiLevelHashMap< rcu_shb, Key, Value, traits_MultiLevelHashMap_stat >    MultiLevelHashMap_rcu_shb_fixed_stat;
+        typedef MultiLevelHashMap< rcu_sht, Key, Value, traits_MultiLevelHashMap_stat >    MultiLevelHashMap_rcu_sht_fixed_stat;
+#endif
+
     };
 
     template <typename GC, typename K, typename T, typename Traits >
index 15d99ae..e7b7ea0 100644 (file)
@@ -29,8 +29,9 @@ set(CDSUNIT_SET_SOURCES
     set_insdelfind_std.cpp
     set_delodd.cpp
     set_delodd_cuckoo.cpp
-    set_delodd_michael.cpp
     set_delodd_ellentree.cpp
+    set_delodd_michael.cpp
+    set_delodd_multilevelhashset.cpp
     set_delodd_skip.cpp
     set_delodd_split.cpp
 )
index 9d3fbf2..478ce05 100644 (file)
 //***********************************************
 // MultiLevelHashSet
 
-#undef CDSUNIT_DECLARE_MultiLevelHashSet64
-#undef CDSUNIT_DECLARE_MultiLevelHashSet64_RCU_signal
-#undef CDSUNIT_DECLARE_MultiLevelHashSet_RCU_signal
+// For fixed-sized key - no hash function is needed
 
-#if CDS_BUILD_BITS == 64
-#   define CDSUNIT_DECLARE_MultiLevelHashSet64 \
-        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_hp_city64) \
-        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_hp_city64_stat) \
-        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_dhp_city64) \
-        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_dhp_city64_stat) \
-        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_hp_city128) \
-        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_hp_city128_stat) \
-        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_dhp_city128) \
-        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_dhp_city128_stat)
-
-#   ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-#       define CDSUNIT_DECLARE_MultiLevelHashSet64_RCU_signal \
-            TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_city64) \
-            TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_city64_stat) \
-            TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_city64) \
-            TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_city64_stat) \
-            TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_city128) \
-            TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_city128_stat) \
-            TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_city128) \
-            TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_city128_stat)
-#   else
-#       define CDSUNIT_DECLARE_MultiLevelHashSet64_RCU_signal
-#   endif
-#else
-#   define CDSUNIT_DECLARE_MultiLevelHashSet64
-#   define CDSUNIT_DECLARE_MultiLevelHashSet64_RCU_signal
-#endif
+#undef CDSUNIT_DECLARE_MultiLevelHashSet_fixed
+#undef CDSUNIT_DECLARE_MultiLevelHashSet_fixed_RCU_signal
+#undef CDSUNIT_TEST_MultiLevelHashSet_fixed
+#undef CDSUNIT_TEST_MultiLevelHashSet_fixed_RCU_signal
 
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-#   define CDSUNIT_DECLARE_MultiLevelHashSet_RCU_signal \
-    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_stdhash) \
-    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_stdhash_stat) \
-    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_stdhash) \
-    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_stdhash_stat) \
-    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_md5) \
-    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_md5_stat) \
-    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_md5) \
-    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_md5_stat) \
-    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_sha256) \
-    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_sha256_stat) \
-    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_sha256) \
-    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_sha256_stat) 
+#   define CDSUNIT_DECLARE_MultiLevelHashSet_fixed_RCU_signal  \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_fixed) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_fixed_stat) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_fixed) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_fixed_stat) \
+
+#   define CDSUNIT_TEST_MultiLevelHashSet_fixed_RCU_signal \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_fixed) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_fixed_stat) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_fixed) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_fixed_stat) \
+
 #else
-#   define CDSUNIT_DECLARE_MultiLevelHashSet_RCU_signal
+#   define CDSUNIT_DECLARE_MultiLevelHashSet_fixed_RCU_signal
+#   define CDSUNIT_TEST_MultiLevelHashSet_fixed_RCU_signal
 #endif
 
+#define CDSUNIT_DECLARE_MultiLevelHashSet_fixed  \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_hp_fixed) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_hp_fixed_stat) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_dhp_fixed) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_dhp_fixed_stat) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpi_fixed) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpi_fixed_stat) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpb_fixed) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpb_fixed_stat) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpt_fixed) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpt_fixed_stat) \
+    CDSUNIT_DECLARE_MultiLevelHashSet_fixed_RCU_signal
+
+#define CDSUNIT_TEST_MultiLevelHashSet_fixed  \
+    CPPUNIT_TEST(MultiLevelHashSet_hp_fixed) \
+    CPPUNIT_TEST(MultiLevelHashSet_hp_fixed_stat) \
+    CPPUNIT_TEST(MultiLevelHashSet_dhp_fixed) \
+    CPPUNIT_TEST(MultiLevelHashSet_dhp_fixed_stat) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpi_fixed) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpi_fixed_stat) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpb_fixed) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpb_fixed_stat) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpt_fixed) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpt_fixed_stat) \
+    CDSUNIT_TEST_MultiLevelHashSet_fixed_RCU_signal
+
+// std::hash
+#undef CDSUNIT_DECLARE_MultiLevelHashSet_stdhash
+#undef CDSUNIT_DECLARE_MultiLevelHashSet_stdhash_RCU_signal
+#undef CDSUNIT_TEST_MultiLevelHashSet_stdhash
+#undef CDSUNIT_TEST_MultiLevelHashSet_stdhash_RCU_signal
 
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+#   define CDSUNIT_DECLARE_MultiLevelHashSet_stdhash_RCU_signal  \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_stdhash) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_stdhash_stat) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_stdhash) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_stdhash_stat) \
+
+#   define CDSUNIT_TEST_MultiLevelHashSet_stdhash_RCU_signal \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_stdhash) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_stdhash_stat) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_stdhash) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_stdhash_stat) \
 
-#undef CDSUNIT_DECLARE_MultiLevelHashSet
-#define CDSUNIT_DECLARE_MultiLevelHashSet  \
+#else
+#   define CDSUNIT_DECLARE_MultiLevelHashSet_stdhash_RCU_signal
+#   define CDSUNIT_TEST_MultiLevelHashSet_stdhash_RCU_signal
+#endif
+
+#define CDSUNIT_DECLARE_MultiLevelHashSet_stdhash  \
     TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_hp_stdhash) \
     TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_hp_stdhash_stat) \
     TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_dhp_stdhash) \
     TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpb_stdhash_stat) \
     TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpt_stdhash) \
     TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpt_stdhash_stat) \
+    CDSUNIT_DECLARE_MultiLevelHashSet_stdhash_RCU_signal
+
+#define CDSUNIT_TEST_MultiLevelHashSet_stdhash  \
+    CPPUNIT_TEST(MultiLevelHashSet_hp_stdhash) \
+    CPPUNIT_TEST(MultiLevelHashSet_hp_stdhash_stat) \
+    CPPUNIT_TEST(MultiLevelHashSet_dhp_stdhash) \
+    CPPUNIT_TEST(MultiLevelHashSet_dhp_stdhash_stat) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpi_stdhash) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpi_stdhash_stat) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpb_stdhash) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpb_stdhash_stat) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpt_stdhash) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpt_stdhash_stat) \
+    CDSUNIT_TEST_MultiLevelHashSet_stdhash_RCU_signal
+
+
+// MD5
+#undef CDSUNIT_DECLARE_MultiLevelHashSet_md5
+#undef CDSUNIT_DECLARE_MultiLevelHashSet_md5_RCU_signal
+#undef CDSUNIT_TEST_MultiLevelHashSet_md5
+#undef CDSUNIT_TEST_MultiLevelHashSet_md5_RCU_signal
+
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+#   define CDSUNIT_DECLARE_MultiLevelHashSet_md5_RCU_signal  \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_md5) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_md5_stat) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_md5) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_md5_stat) \
+
+#   define CDSUNIT_TEST_MultiLevelHashSet_md5_RCU_signal \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_md5) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_md5_stat) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_md5) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_md5_stat) \
+
+#else
+#   define CDSUNIT_DECLARE_MultiLevelHashSet_md5_RCU_signal
+#   define CDSUNIT_TEST_MultiLevelHashSet_md5_RCU_signal
+#endif
+
+#define CDSUNIT_DECLARE_MultiLevelHashSet_md5  \
     TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_hp_md5) \
     TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_hp_md5_stat) \
     TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_dhp_md5) \
     TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpb_md5_stat) \
     TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpt_md5) \
     TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpt_md5_stat) \
+    CDSUNIT_DECLARE_MultiLevelHashSet_md5_RCU_signal
+
+#define CDSUNIT_TEST_MultiLevelHashSet_md5  \
+    CPPUNIT_TEST(MultiLevelHashSet_hp_md5) \
+    CPPUNIT_TEST(MultiLevelHashSet_hp_md5_stat) \
+    CPPUNIT_TEST(MultiLevelHashSet_dhp_md5) \
+    CPPUNIT_TEST(MultiLevelHashSet_dhp_md5_stat) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpi_md5) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpi_md5_stat) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpb_md5) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpb_md5_stat) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpt_md5) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpt_md5_stat) \
+    CDSUNIT_TEST_MultiLevelHashSet_md5_RCU_signal
+
+
+// SHA256
+#undef CDSUNIT_DECLARE_MultiLevelHashSet_sha256
+#undef CDSUNIT_DECLARE_MultiLevelHashSet_sha256_RCU_signal
+#undef CDSUNIT_TEST_MultiLevelHashSet_sha256
+#undef CDSUNIT_TEST_MultiLevelHashSet_sha256_RCU_signal
+
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+#   define CDSUNIT_DECLARE_MultiLevelHashSet_sha256_RCU_signal  \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_sha256) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_sha256_stat) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_sha256) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_sha256_stat) \
+
+#   define CDSUNIT_TEST_MultiLevelHashSet_sha256_RCU_signal \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_sha256) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_sha256_stat) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_sha256) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_sha256_stat) \
+
+#else
+#   define CDSUNIT_DECLARE_MultiLevelHashSet_sha256_RCU_signal
+#   define CDSUNIT_TEST_MultiLevelHashSet_sha256_RCU_signal
+#endif
+
+#define CDSUNIT_DECLARE_MultiLevelHashSet_sha256  \
     TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_hp_sha256) \
     TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_hp_sha256_stat) \
     TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_dhp_sha256) \
     TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpb_sha256_stat) \
     TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpt_sha256) \
     TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpt_sha256_stat) \
-    CDSUNIT_DECLARE_MultiLevelHashSet_RCU_signal \
-    CDSUNIT_DECLARE_MultiLevelHashSet64 \
-    CDSUNIT_DECLARE_MultiLevelHashSet64_RCU_signal \
+    CDSUNIT_DECLARE_MultiLevelHashSet_sha256_RCU_signal
+
+#define CDSUNIT_TEST_MultiLevelHashSet_sha256  \
+    CPPUNIT_TEST(MultiLevelHashSet_hp_sha256) \
+    CPPUNIT_TEST(MultiLevelHashSet_hp_sha256_stat) \
+    CPPUNIT_TEST(MultiLevelHashSet_dhp_sha256) \
+    CPPUNIT_TEST(MultiLevelHashSet_dhp_sha256_stat) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpi_sha256) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpi_sha256_stat) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpb_sha256) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpb_sha256_stat) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpt_sha256) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpt_sha256_stat) \
+    CDSUNIT_TEST_MultiLevelHashSet_sha256_RCU_signal
 
 
-#undef CDSUNIT_TEST_MultiLevelHashSet64
-#undef CDSUNIT_TEST_MultiLevelHashSet64_RCU_signal
-#undef CDSUNIT_TEST_MultiLevelHashSet_RCU_signal
+// CityHash -only for 64bit 
+#undef CDSUNIT_DECLARE_MultiLevelHashSet_city
+#undef CDSUNIT_DECLARE_MultiLevelHashSet_city_RCU_signal
+#undef CDSUNIT_TEST_MultiLevelHashSet_city
+#undef CDSUNIT_TEST_MultiLevelHashSet_city_RCU_signal
 
 #if CDS_BUILD_BITS == 64
-#   define CDSUNIT_TEST_MultiLevelHashSet64 \
+
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+#   define CDSUNIT_DECLARE_MultiLevelHashSet_city_RCU_signal  \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_city64) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_city64_stat) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_city64) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_city64_stat) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_city128) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_city128_stat) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_city128) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_city128_stat) \
+
+#   define CDSUNIT_TEST_MultiLevelHashSet_city_RCU_signal \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_city64) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_city64_stat) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_city64) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_city64_stat) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_city128) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_shb_city128_stat) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_city128) \
+        TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_sht_city128_stat) \
+
+#else
+#   define CDSUNIT_DECLARE_MultiLevelHashSet_city_RCU_signal
+#   define CDSUNIT_TEST_MultiLevelHashSet_city_RCU_signal
+#endif
+
+#define CDSUNIT_DECLARE_MultiLevelHashSet_city  \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_hp_city64) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_hp_city64_stat) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_dhp_city64) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_dhp_city64_stat) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpi_city64) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpi_city64_stat) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpb_city64) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpb_city64_stat) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpt_city64) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpt_city64_stat) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_hp_city128) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_hp_city128_stat) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_dhp_city128) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_dhp_city128_stat) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpi_city128) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpi_city128_stat) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpb_city128) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpb_city128_stat) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpt_city128) \
+    TEST_CASE(tag_MultiLevelHashSet, MultiLevelHashSet_rcu_gpt_city128_stat) \
+    CDSUNIT_DECLARE_MultiLevelHashSet_city_RCU_signal
+
+#define CDSUNIT_TEST_MultiLevelHashSet_city  \
     CPPUNIT_TEST(MultiLevelHashSet_hp_city64) \
     CPPUNIT_TEST(MultiLevelHashSet_hp_city64_stat) \
     CPPUNIT_TEST(MultiLevelHashSet_dhp_city64) \
     CPPUNIT_TEST(MultiLevelHashSet_dhp_city64_stat) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpi_city64) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpi_city64_stat) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpb_city64) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpb_city64_stat) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpt_city64) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpt_city64_stat) \
     CPPUNIT_TEST(MultiLevelHashSet_hp_city128) \
     CPPUNIT_TEST(MultiLevelHashSet_hp_city128_stat) \
     CPPUNIT_TEST(MultiLevelHashSet_dhp_city128) \
-    CPPUNIT_TEST(MultiLevelHashSet_dhp_city128_stat)
-
-#   ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-#       define CDSUNIT_TEST_MultiLevelHashSet64_RCU_signal \
-            CPPUNIT_TEST(MultiLevelHashSet_rcu_shb_city64) \
-            CPPUNIT_TEST(MultiLevelHashSet_rcu_shb_city64_stat) \
-            CPPUNIT_TEST(MultiLevelHashSet_rcu_sht_city64) \
-            CPPUNIT_TEST(MultiLevelHashSet_rcu_sht_city64_stat) \
-            CPPUNIT_TEST(MultiLevelHashSet_rcu_shb_city128) \
-            CPPUNIT_TEST(MultiLevelHashSet_rcu_shb_city128_stat) \
-            CPPUNIT_TEST(MultiLevelHashSet_rcu_sht_city128) \
-            CPPUNIT_TEST(MultiLevelHashSet_rcu_sht_city128_stat)
-#   else
-#       define CDSUNIT_TEST_MultiLevelHashSet64_RCU_signal
-#   endif
+    CPPUNIT_TEST(MultiLevelHashSet_dhp_city128_stat) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpi_city128) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpi_city128_stat) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpb_city128) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpb_city128_stat) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpt_city128) \
+    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpt_city128_stat) \
+    CDSUNIT_TEST_MultiLevelHashSet_city_RCU_signal
 
 #else
-#   define CDSUNIT_TEST_MultiLevelHashSet64
-#   define CDSUNIT_TEST_MultiLevelHashSet64_RCU_signal
-#endif
-
-#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-#   define CDSUNIT_TEST_MultiLevelHashSet_RCU_signal \
-        CPPUNIT_TEST(MultiLevelHashSet_rcu_shb_stdhash) \
-        CPPUNIT_TEST(MultiLevelHashSet_rcu_shb_stdhash_stat) \
-        CPPUNIT_TEST(MultiLevelHashSet_rcu_sht_stdhash) \
-        CPPUNIT_TEST(MultiLevelHashSet_rcu_sht_stdhash_stat) \
-        CPPUNIT_TEST(MultiLevelHashSet_rcu_shb_md5) \
-        CPPUNIT_TEST(MultiLevelHashSet_rcu_shb_md5_stat) \
-        CPPUNIT_TEST(MultiLevelHashSet_rcu_sht_md5) \
-        CPPUNIT_TEST(MultiLevelHashSet_rcu_sht_md5_stat) \
-        CPPUNIT_TEST(MultiLevelHashSet_rcu_shb_sha256) \
-        CPPUNIT_TEST(MultiLevelHashSet_rcu_shb_sha256_stat) \
-        CPPUNIT_TEST(MultiLevelHashSet_rcu_sht_sha256) \
-        CPPUNIT_TEST(MultiLevelHashSet_rcu_sht_sha256_stat)
-#else
-#   define CDSUNIT_TEST_MultiLevelHashSet_RCU_signal
-#endif
-
-#undef CDSUNIT_TEST_MultiLevelHashSet
-#define CDSUNIT_TEST_MultiLevelHashSet  \
-    CPPUNIT_TEST(MultiLevelHashSet_hp_stdhash) \
-    CPPUNIT_TEST(MultiLevelHashSet_hp_stdhash_stat) \
-    CPPUNIT_TEST(MultiLevelHashSet_dhp_stdhash) \
-    CPPUNIT_TEST(MultiLevelHashSet_dhp_stdhash_stat) \
-    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpi_stdhash) \
-    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpi_stdhash_stat) \
-    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpb_stdhash) \
-    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpb_stdhash_stat) \
-    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpt_stdhash) \
-    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpt_stdhash_stat) \
-    CPPUNIT_TEST(MultiLevelHashSet_hp_md5) \
-    CPPUNIT_TEST(MultiLevelHashSet_hp_md5_stat) \
-    CPPUNIT_TEST(MultiLevelHashSet_dhp_md5) \
-    CPPUNIT_TEST(MultiLevelHashSet_dhp_md5_stat) \
-    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpi_md5) \
-    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpi_md5_stat) \
-    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpb_md5) \
-    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpb_md5_stat) \
-    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpt_md5) \
-    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpt_md5_stat) \
-    CPPUNIT_TEST(MultiLevelHashSet_hp_sha256) \
-    CPPUNIT_TEST(MultiLevelHashSet_hp_sha256_stat) \
-    CPPUNIT_TEST(MultiLevelHashSet_dhp_sha256) \
-    CPPUNIT_TEST(MultiLevelHashSet_dhp_sha256_stat) \
-    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpi_sha256) \
-    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpi_sha256_stat) \
-    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpb_sha256) \
-    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpb_sha256_stat) \
-    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpt_sha256) \
-    CPPUNIT_TEST(MultiLevelHashSet_rcu_gpt_sha256_stat) \
-    CDSUNIT_TEST_MultiLevelHashSet_RCU_signal \
-    CDSUNIT_TEST_MultiLevelHashSet64 \
-    CDSUNIT_TEST_MultiLevelHashSet64_RCU_signal
+#   define CDSUNIT_DECLARE_MultiLevelHashSet_city
+#   define CDSUNIT_DECLARE_MultiLevelHashSet_city_RCU_signal
+#   define CDSUNIT_TEST_MultiLevelHashSet_city
+#   define CDSUNIT_TEST_MultiLevelHashSet_city_RCU_signal
+#endif // CDS_BUILD_BITS == 64
+
+
+// All 
+#define CDSUNIT_DECLARE_MultiLevelHashSet \
+    CDSUNIT_DECLARE_MultiLevelHashSet_fixed \
+    CDSUNIT_DECLARE_MultiLevelHashSet_stdhash \
+    CDSUNIT_DECLARE_MultiLevelHashSet_md5 \
+    CDSUNIT_DECLARE_MultiLevelHashSet_sha256 \
+    CDSUNIT_DECLARE_MultiLevelHashSet_city
+
+#define CDSUNIT_TEST_MultiLevelHashSet \
+    CDSUNIT_TEST_MultiLevelHashSet_fixed \
+    CDSUNIT_TEST_MultiLevelHashSet_stdhash \
+    CDSUNIT_TEST_MultiLevelHashSet_md5 \
+    CDSUNIT_TEST_MultiLevelHashSet_sha256 \
+    CDSUNIT_TEST_MultiLevelHashSet_city
index 6eab944..db24061 100644 (file)
@@ -18,6 +18,9 @@ namespace set2 {
         c_nCuckooProbesetSize = cfg.getSizeT("CuckooProbesetSize", c_nCuckooProbesetSize );
         c_nCuckooProbesetThreshold = cfg.getSizeT("CuckooProbesetThreshold", c_nCuckooProbesetThreshold );
 
+        c_nMultiLevelSet_HeadBits = cfg.getSizeT("MultiLevelMapHeadBits", c_nMultiLevelSet_HeadBits);
+        c_nMultiLevelSet_ArrayBits = cfg.getSizeT("MultiLevelMapArrayBits", c_nMultiLevelSet_ArrayBits);
+
         if ( c_nInsThreadCount == 0 )
             c_nInsThreadCount = std::thread::hardware_concurrency();
         if ( c_nDelThreadCount == 0 && c_nExtractThreadCount == 0 ) {
index 4ade55d..2edf537 100644 (file)
@@ -128,6 +128,9 @@ namespace set2 {
         size_t  c_nCuckooProbesetSize = 16; // CuckooSet probeset size (only for list-based probeset)
         size_t  c_nCuckooProbesetThreshold = 0; // CUckooSet probeset threshold (0 - use default)
 
+        size_t c_nMultiLevelSet_HeadBits = 10;
+        size_t c_nMultiLevelSet_ArrayBits = 4;
+
         size_t c_nLoadFactor = 2;
         std::vector<size_t>     m_arrData;
 
@@ -153,6 +156,9 @@ namespace set2 {
                 template <typename Q>
                 void operator()( bool /*bNew*/, key_value_pair const&, Q const& )
                 {}
+
+                void operator()(key_value_pair& /*cur*/, key_value_pair * /*prev*/)
+                {}
             };
         public:
             size_t  m_nInsertSuccess;
@@ -306,6 +312,22 @@ namespace set2 {
             virtual void init() { cds::threading::Manager::attachThread()   ; }
             virtual void fini() { cds::threading::Manager::detachThread()   ; }
 
+            template <typename SetType, bool>
+            struct eraser {
+                static bool erase( SetType& s, size_t key, size_t /*thread*/)
+                {
+                    return s.erase_with( key, key_less() );
+                }
+            };
+
+            template <typename SetType>
+            struct eraser<SetType, true> {
+                static bool erase(SetType& s, size_t key, size_t thread)
+                {
+                    return s.erase( key_type(key, thread));
+                }
+            };
+
             virtual void test()
             {
                 Set& rSet = m_Set;
@@ -317,10 +339,10 @@ namespace set2 {
                 std::vector<size_t>& arrData = getTest().m_arrData;
 
                 if ( m_nThreadNo & 1 ) {
-                    for ( size_t k = 0; k < nInsThreadCount; ++k ) {
-                        for ( size_t i = 0; i < arrData.size(); ++i ) {
-                            if ( arrData[i] & 1 ) {
-                                if ( rSet.erase_with( arrData[i], key_less() ))
+                    for (size_t i = 0; i < arrData.size(); ++i) {
+                        if (arrData[i] & 1) {
+                            for ( size_t k = 0; k < nInsThreadCount; ++k ) {
+                                if ( eraser<Set, Set::c_bEraseExactKey>::erase( rSet, arrData[i], k ))
                                     ++m_nDeleteSuccess;
                                 else
                                     ++m_nDeleteFailed;
@@ -331,10 +353,10 @@ namespace set2 {
                     }
                 }
                 else {
-                    for ( size_t k = 0; k < nInsThreadCount; ++k ) {
-                        for ( size_t i = arrData.size() - 1; i > 0; --i ) {
-                            if ( arrData[i] & 1 ) {
-                                if ( rSet.erase_with( arrData[i], key_less() ))
+                    for (size_t i = arrData.size() - 1; i > 0; --i) {
+                        if (arrData[i] & 1) {
+                            for ( size_t k = 0; k < nInsThreadCount; ++k ) {
+                                if (eraser<Set, Set::c_bEraseExactKey>::erase(rSet, arrData[i], k))
                                     ++m_nDeleteSuccess;
                                 else
                                     ++m_nDeleteFailed;
@@ -379,6 +401,22 @@ namespace set2 {
             virtual void init() { cds::threading::Manager::attachThread()   ; }
             virtual void fini() { cds::threading::Manager::detachThread()   ; }
 
+            template <typename SetType, bool>
+            struct extractor {
+                static typename SetType::guarded_ptr extract(SetType& s, size_t key, size_t /*thread*/)
+                {
+                    return s.extract_with( key, key_less());
+                }
+            };
+
+            template <typename SetType>
+            struct extractor<SetType, true> {
+                static typename SetType::guarded_ptr extract(SetType& s, size_t key, size_t thread)
+                {
+                    return s.extract( key_type(key, thread));
+                }
+            };
+
             virtual void test()
             {
                 Set& rSet = m_Set;
@@ -392,10 +430,10 @@ namespace set2 {
                 size_t const nInsThreadCount = getTest().c_nInsThreadCount;
 
                 if ( m_nThreadNo & 1 ) {
-                    for ( size_t k = 0; k < nInsThreadCount; ++k ) {
-                        for ( size_t i = 0; i < arrData.size(); ++i ) {
-                            if ( arrData[i] & 1 ) {
-                                gp = rSet.extract_with( arrData[i], key_less());
+                    for ( size_t i = 0; i < arrData.size(); ++i ) {
+                        if (arrData[i] & 1) {
+                            for ( size_t k = 0; k < nInsThreadCount; ++k ) {
+                                gp = extractor<Set, Set::c_bEraseExactKey>::extract( rSet, arrData[i], k );
                                 if ( gp )
                                     ++m_nExtractSuccess;
                                 else
@@ -408,10 +446,10 @@ namespace set2 {
                     }
                 }
                 else {
-                    for ( size_t k = 0; k < nInsThreadCount; ++k ) {
-                        for ( size_t i = arrData.size() - 1; i > 0; --i ) {
-                            if ( arrData[i] & 1 ) {
-                                gp = rSet.extract_with( arrData[i], key_less());
+                    for (size_t i = arrData.size() - 1; i > 0; --i) {
+                        if (arrData[i] & 1) {
+                            for ( size_t k = 0; k < nInsThreadCount; ++k ) {
+                                gp = extractor<Set, Set::c_bEraseExactKey>::extract( rSet, arrData[i], k);
                                 if ( gp )
                                     ++m_nExtractSuccess;
                                 else
@@ -457,6 +495,22 @@ namespace set2 {
             virtual void init() { cds::threading::Manager::attachThread()   ; }
             virtual void fini() { cds::threading::Manager::detachThread()   ; }
 
+            template <typename SetType, bool>
+            struct extractor {
+                static typename SetType::exempt_ptr extract(SetType& s, size_t key, size_t /*thread*/)
+                {
+                    return s.extract_with(key, key_less());
+                }
+            };
+
+            template <typename SetType>
+            struct extractor<SetType, true> {
+                static typename SetType::exempt_ptr extract(SetType& s, size_t key, size_t thread)
+                {
+                    return s.extract(key_type(key, thread));
+                }
+            };
+
             virtual void test()
             {
                 Set& rSet = m_Set;
@@ -470,19 +524,19 @@ namespace set2 {
                 size_t const nInsThreadCount = getTest().c_nInsThreadCount;
 
                 if ( m_nThreadNo & 1 ) {
-                    for ( size_t k = 0; k < nInsThreadCount; ++k ) {
-                        for ( size_t i = 0; i < arrData.size(); ++i ) {
-                            if ( arrData[i] & 1 ) {
+                    for (size_t i = 0; i < arrData.size(); ++i) {
+                        if (arrData[i] & 1) {
+                            for ( size_t k = 0; k < nInsThreadCount; ++k ) {
                                 if ( Set::c_bExtractLockExternal ) {
                                     typename Set::rcu_lock l;
-                                    xp = rSet.extract_with( arrData[i], key_less() );
+                                    xp = extractor<Set, Set::c_bEraseExactKey>::extract( rSet, arrData[i], k);
                                     if ( xp )
                                         ++m_nExtractSuccess;
                                     else
                                         ++m_nExtractFailed;
                                 }
                                 else {
-                                    xp = rSet.extract_with( arrData[i], key_less() );
+                                    xp = extractor<Set, Set::c_bEraseExactKey>::extract(rSet, arrData[i], k);
                                     if ( xp )
                                         ++m_nExtractSuccess;
                                     else
@@ -496,19 +550,19 @@ namespace set2 {
                     }
                 }
                 else {
-                    for ( size_t k = 0; k < nInsThreadCount; ++k ) {
-                        for ( size_t i = arrData.size() - 1; i > 0; --i ) {
-                            if ( arrData[i] & 1 ) {
+                    for (size_t i = arrData.size() - 1; i > 0; --i) {
+                        if (arrData[i] & 1) {
+                            for ( size_t k = 0; k < nInsThreadCount; ++k ) {
                                 if ( Set::c_bExtractLockExternal ) {
                                     typename Set::rcu_lock l;
-                                    xp = rSet.extract_with( arrData[i], key_less() );
+                                    xp = extractor<Set, Set::c_bEraseExactKey>::extract(rSet, arrData[i], k);
                                     if ( xp )
                                         ++m_nExtractSuccess;
                                     else
                                         ++m_nExtractFailed;
                                 }
                                 else {
-                                    xp = rSet.extract_with( arrData[i], key_less() );
+                                    xp = extractor<Set, Set::c_bEraseExactKey>::extract(rSet, arrData[i], k);
                                     if ( xp )
                                         ++m_nExtractSuccess;
                                     else
@@ -741,15 +795,17 @@ namespace set2 {
         CDSUNIT_DECLARE_SkipListSet
         CDSUNIT_DECLARE_EllenBinTreeSet
         CDSUNIT_DECLARE_CuckooSet
+        CDSUNIT_DECLARE_MultiLevelHashSet_fixed
+        CDSUNIT_DECLARE_MultiLevelHashSet_city
 
         CPPUNIT_TEST_SUITE_(Set_DelOdd, "Map_DelOdd")
             CDSUNIT_TEST_MichaelSet
             CDSUNIT_TEST_SplitList
             CDSUNIT_TEST_SkipListSet
             CDSUNIT_TEST_EllenBinTreeSet
+            CDSUNIT_TEST_MultiLevelHashSet_fixed
+            CDSUNIT_TEST_MultiLevelHashSet_city
             CDSUNIT_TEST_CuckooSet
-
-            //CDSUNIT_TEST_MultiLevelHashSet // the test is not suitable
         CPPUNIT_TEST_SUITE_END();
     };
 } // namespace set2
diff --git a/tests/unit/set2/set_delodd_multilevelhashset.cpp b/tests/unit/set2/set_delodd_multilevelhashset.cpp
new file mode 100644 (file)
index 0000000..bef43b6
--- /dev/null
@@ -0,0 +1,13 @@
+//$$CDS-header$$
+
+#include "set2/set_delodd.h"
+#include "set2/set_type_multilevel_hashset.h"
+
+#undef TEST_CASE
+#define TEST_CASE(TAG, X)  void Set_DelOdd::X() { run_test_extract<typename set_type< TAG, key_type, value_type>::X>(); }
+#include "set2/set_defs.h"
+
+namespace set2 {
+    CDSUNIT_DECLARE_MultiLevelHashSet_fixed
+    CDSUNIT_DECLARE_MultiLevelHashSet_city
+} // namespace set2
index 727f330..7aba9bb 100644 (file)
@@ -549,13 +549,15 @@ namespace set2 {
     CDSUNIT_DECLARE_RefinableSet
     CDSUNIT_DECLARE_CuckooSet
     CDSUNIT_DECLARE_EllenBinTreeSet
-    CDSUNIT_DECLARE_MultiLevelHashSet
+    CDSUNIT_DECLARE_MultiLevelHashSet_fixed
+    CDSUNIT_DECLARE_MultiLevelHashSet_city
 
     CPPUNIT_TEST_SUITE_(Set_InsDel_func, "Map_InsDel_func")
         CDSUNIT_TEST_MichaelSet
         CDSUNIT_TEST_SplitList
         CDSUNIT_TEST_SkipListSet
-        CDSUNIT_TEST_MultiLevelHashSet
+        CDSUNIT_TEST_MultiLevelHashSet_fixed
+        CDSUNIT_TEST_MultiLevelHashSet_city
         CDSUNIT_TEST_EllenBinTreeSet
         CDSUNIT_TEST_StripedSet
         CDSUNIT_TEST_RefinableSet
index 92b2dd4..f7e818b 100644 (file)
@@ -8,5 +8,6 @@
 #include "set2/set_defs.h"
 
 namespace set2 {
-    CDSUNIT_DECLARE_MultiLevelHashSet
+    CDSUNIT_DECLARE_MultiLevelHashSet_fixed
+    CDSUNIT_DECLARE_MultiLevelHashSet_city
 } // namespace set2
index 37dddb0..b76d698 100644 (file)
@@ -517,14 +517,20 @@ namespace set2 {
         CDSUNIT_DECLARE_CuckooSet
         CDSUNIT_DECLARE_SkipListSet
         CDSUNIT_DECLARE_EllenBinTreeSet
-        CDSUNIT_DECLARE_MultiLevelHashSet
+        CDSUNIT_DECLARE_MultiLevelHashSet_stdhash
+        CDSUNIT_DECLARE_MultiLevelHashSet_md5
+        CDSUNIT_DECLARE_MultiLevelHashSet_sha256
+        CDSUNIT_DECLARE_MultiLevelHashSet_city
         CDSUNIT_DECLARE_StdSet
 
         CPPUNIT_TEST_SUITE_(Set_InsDel_string, "Map_InsDel_func")
             CDSUNIT_TEST_MichaelSet
             CDSUNIT_TEST_SplitList
             CDSUNIT_TEST_SkipListSet
-            CDSUNIT_TEST_MultiLevelHashSet
+            CDSUNIT_TEST_MultiLevelHashSet_stdhash
+            CDSUNIT_TEST_MultiLevelHashSet_md5
+            CDSUNIT_TEST_MultiLevelHashSet_sha256
+            CDSUNIT_TEST_MultiLevelHashSet_city
             CDSUNIT_TEST_EllenBinTreeSet
             CDSUNIT_TEST_StripedSet
             CDSUNIT_TEST_RefinableSet
index 59c10ee..5050b87 100644 (file)
@@ -8,5 +8,8 @@
 #include "set2/set_defs.h"
 
 namespace set2 {
-    CDSUNIT_DECLARE_MultiLevelHashSet
+    CDSUNIT_DECLARE_MultiLevelHashSet_stdhash
+    CDSUNIT_DECLARE_MultiLevelHashSet_md5
+    CDSUNIT_DECLARE_MultiLevelHashSet_sha256
+    CDSUNIT_DECLARE_MultiLevelHashSet_city
 } // namespace set2
index 748a403..31010b9 100644 (file)
@@ -35,7 +35,7 @@ namespace set2 {
         // for testing
         static CDS_CONSTEXPR bool const c_bExtractSupported = false;
         static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
-
+        static CDS_CONSTEXPR bool const c_bEraseExactKey = false;
     };
 
     struct tag_CuckooSet;
index 5eb2cc5..c68ca11 100644 (file)
@@ -25,6 +25,7 @@ namespace set2 {
         // for testing
         static CDS_CONSTEXPR bool const c_bExtractSupported = true;
         static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
+        static CDS_CONSTEXPR bool const c_bEraseExactKey = false;
     };
 
     struct tag_EllenBinTreeSet;
index e5d7a2b..b6d2b90 100644 (file)
@@ -26,6 +26,7 @@ namespace set2 {
         // for testing
         static CDS_CONSTEXPR bool const c_bExtractSupported = true;
         static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true;
+        static CDS_CONSTEXPR bool const c_bEraseExactKey = false;
     };
 
     struct tag_MichaelHashSet;
index 6db4dc1..26e38c1 100644 (file)
@@ -67,6 +67,7 @@ namespace set2 {
         // for testing
         static CDS_CONSTEXPR bool const c_bExtractSupported = true;
         static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
+        static CDS_CONSTEXPR bool const c_bEraseExactKey = true;
     };
 
     struct tag_MultiLevelHashSet;
@@ -260,6 +261,73 @@ namespace set2 {
 #endif
 
 #endif // #if CDS_BUILD_BITS == 64
+
+
+        // for fixed-sized key
+        // No hash function is necessary
+
+        struct fixed_sized_key
+        {
+            typedef typename set_type_base< Key, Val >::key_type key_type;
+            struct key_val : public set_type_base< Key, Val >::key_val
+            {
+                typedef typename set_type_base< Key, Val >::key_val base_class;
+
+                /*explicit*/ key_val(key_type const& k) : base_class(k) {}
+                key_val(key_type const& k, value_type const& v) : base_class(k, v) {}
+
+                template <typename K>
+                /*explicit*/ key_val(K const& k) : base_class(k) {}
+
+                template <typename K, typename T>
+                key_val(K const& k, T const& v) : base_class(k, v) {}
+
+                // mock hasher
+                struct hasher {
+                template <typename Q>
+                    key_type operator()( Q const& k ) const
+                    {
+                        return key_type( k );
+                    }
+                };
+            };
+
+            struct traits : public cc::multilevel_hashset::traits
+            {
+                struct hash_accessor {
+                    key_type operator()(key_val const& kv)
+                    {
+                        return kv.key;
+                    }
+                };
+            };
+
+            struct traits_stat : public traits
+            {
+                typedef cc::multilevel_hashset::stat<> stat;
+            };
+        };
+
+        typedef MultiLevelHashSet< cds::gc::HP, typename fixed_sized_key::key_val, typename fixed_sized_key::traits >    MultiLevelHashSet_hp_fixed;
+        typedef MultiLevelHashSet< cds::gc::DHP, typename fixed_sized_key::key_val, typename fixed_sized_key::traits >    MultiLevelHashSet_dhp_fixed;
+        typedef MultiLevelHashSet< rcu_gpi, typename fixed_sized_key::key_val, typename fixed_sized_key::traits >    MultiLevelHashSet_rcu_gpi_fixed;
+        typedef MultiLevelHashSet< rcu_gpb, typename fixed_sized_key::key_val, typename fixed_sized_key::traits >    MultiLevelHashSet_rcu_gpb_fixed;
+        typedef MultiLevelHashSet< rcu_gpt, typename fixed_sized_key::key_val, typename fixed_sized_key::traits >    MultiLevelHashSet_rcu_gpt_fixed;
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        typedef MultiLevelHashSet< rcu_shb, typename fixed_sized_key::key_val, typename fixed_sized_key::traits >    MultiLevelHashSet_rcu_shb_fixed;
+        typedef MultiLevelHashSet< rcu_sht, typename fixed_sized_key::key_val, typename fixed_sized_key::traits >    MultiLevelHashSet_rcu_sht_fixed;
+#endif
+
+        typedef MultiLevelHashSet< cds::gc::HP, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat >    MultiLevelHashSet_hp_fixed_stat;
+        typedef MultiLevelHashSet< cds::gc::DHP, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat >    MultiLevelHashSet_dhp_fixed_stat;
+        typedef MultiLevelHashSet< rcu_gpi, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat >    MultiLevelHashSet_rcu_gpi_fixed_stat;
+        typedef MultiLevelHashSet< rcu_gpb, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat >    MultiLevelHashSet_rcu_gpb_fixed_stat;
+        typedef MultiLevelHashSet< rcu_gpt, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat >    MultiLevelHashSet_rcu_gpt_fixed_stat;
+#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+        typedef MultiLevelHashSet< rcu_shb, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat >    MultiLevelHashSet_rcu_shb_fixed_stat;
+        typedef MultiLevelHashSet< rcu_sht, typename fixed_sized_key::key_val, typename fixed_sized_key::traits_stat >    MultiLevelHashSet_rcu_sht_fixed_stat;
+#endif
+
     };
 
     template <typename GC, typename T, typename Traits >
index 0a7bc7f..3ec025f 100644 (file)
@@ -25,6 +25,7 @@ namespace set2 {
         // for testing
         static CDS_CONSTEXPR bool const c_bExtractSupported = true;
         static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
+        static CDS_CONSTEXPR bool const c_bEraseExactKey = false;
     };
 
     struct tag_SkipListSet;
index 6d4134c..0e88420 100644 (file)
@@ -32,6 +32,7 @@ namespace set2 {
         // for testing
         static CDS_CONSTEXPR bool const c_bExtractSupported = true;
         static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true;
+        static CDS_CONSTEXPR bool const c_bEraseExactKey = false;
     };
 
     struct tag_SplitListSet;
index 927334d..fce1bc7 100644 (file)
@@ -107,6 +107,7 @@ namespace set2 {
         // for testing
         static CDS_CONSTEXPR bool const c_bExtractSupported = false;
         static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
+        static CDS_CONSTEXPR bool const c_bEraseExactKey = true;
     };
 
     template <typename Value, typename Less, typename Lock,
index 15be617..7ccf7e4 100644 (file)
@@ -75,6 +75,7 @@ namespace set2 {
             // for testing
             static CDS_CONSTEXPR bool const c_bExtractSupported = false;
             static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true;
+            static CDS_CONSTEXPR bool const c_bEraseExactKey = false;
         };
 
         template <class BucketEntry, typename... Options>
@@ -110,6 +111,7 @@ namespace set2 {
             // for testing
             static CDS_CONSTEXPR bool const c_bExtractSupported = false;
             static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true;
+            static CDS_CONSTEXPR bool const c_bEraseExactKey = false;
         };
 
         // for non-sequential ordered containers
@@ -146,6 +148,7 @@ namespace set2 {
             // for testing
             static CDS_CONSTEXPR bool const c_bExtractSupported = false;
             static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
+            static CDS_CONSTEXPR bool const c_bEraseExactKey = false;
         };
 
         template <class BucketEntry, typename... Options>
@@ -181,6 +184,7 @@ namespace set2 {
             // for testing
             static CDS_CONSTEXPR bool const c_bExtractSupported = false;
             static CDS_CONSTEXPR bool const c_bLoadFactorDepended = true;
+            static CDS_CONSTEXPR bool const c_bEraseExactKey = false;
         };
 
         typedef StripedHashSet_seq<