From d0eb9e0849eac0d1e7fba6b245a5e065ceb814bb Mon Sep 17 00:00:00 2001 From: khizmax Date: Sun, 13 Sep 2015 16:38:21 +0300 Subject: [PATCH] Incorporated MultiLevelHashSet into set's MT-test --- cds/compiler/clang/defs.h | 10 +- cds/compiler/gcc/defs.h | 10 +- cds/opt/options.h | 2 +- projects/Win/vc12/cds.sln | 1 + projects/Win/vc12/unit-prerequisites.vcxproj | 2 +- projects/Win/vc12/unit-set-insdel.vcxproj | 2 + .../Win/vc12/unit-set-insdel.vcxproj.filters | 6 + projects/source.test-common.mk | 2 +- projects/source.unit.set.mk | 2 + tests/CMakeLists.txt | 2 +- tests/hashing/{city.cc => city.cpp} | 0 tests/unit/set2/CMakeLists.txt | 2 + tests/unit/set2/set_defs.h | 55 +++++- tests/unit/set2/set_insdel_func.h | 10 +- .../set_insdel_func_multilevelhashset.cpp | 12 ++ tests/unit/set2/set_insdel_string.h | 4 +- .../set_insdel_string_multilevelhashset.cpp | 12 ++ tests/unit/set2/set_type_multilevel_hashset.h | 178 ++++++++++++++++++ 18 files changed, 297 insertions(+), 15 deletions(-) rename tests/hashing/{city.cc => city.cpp} (100%) create mode 100644 tests/unit/set2/set_insdel_func_multilevelhashset.cpp create mode 100644 tests/unit/set2/set_insdel_string_multilevelhashset.cpp create mode 100644 tests/unit/set2/set_type_multilevel_hashset.h diff --git a/cds/compiler/clang/defs.h b/cds/compiler/clang/defs.h index ce0874c0..5a92cf5b 100644 --- a/cds/compiler/clang/defs.h +++ b/cds/compiler/clang/defs.h @@ -55,8 +55,14 @@ // Attributes #if CDS_COMPILER_VERSION >= 30400 -# define CDS_DEPRECATED( reason ) [[deprecated(reason)]] -else +# if __cplusplus < 201103 +# define CDS_DEPRECATED( reason ) __attribute__((deprecated( reason ))) +# elif __cplusplus == 201103 // C++11 +# define CDS_DEPRECATED( reason ) [[gnu::deprecated(reason)]] +# else // C++14 +# define CDS_DEPRECATED( reason ) [[deprecated(reason)]] +# endif +#else # define CDS_DEPRECATED( reason ) __attribute__((deprecated( reason ))) #endif diff --git a/cds/compiler/gcc/defs.h b/cds/compiler/gcc/defs.h index bd3fcbd0..36f26f2f 100644 --- a/cds/compiler/gcc/defs.h +++ b/cds/compiler/gcc/defs.h @@ -58,8 +58,14 @@ // Attributes #if CDS_COMPILER_VERSION >= 40900 -# define CDS_DEPRECATED( reason ) [[deprecated(reason)]] -else +# if __cplusplus < 201103 +# define CDS_DEPRECATED( reason ) __attribute__((deprecated( reason ))) +# elif __cplusplus == 201103 // C++11 +# define CDS_DEPRECATED( reason ) [[gnu::deprecated(reason)]] +# else // C++14 +# define CDS_DEPRECATED( reason ) [[deprecated(reason)]] +# endif +#else # define CDS_DEPRECATED( reason ) __attribute__((deprecated( reason ))) #endif diff --git a/cds/opt/options.h b/cds/opt/options.h index 9fa817c2..135da12f 100644 --- a/cds/opt/options.h +++ b/cds/opt/options.h @@ -978,7 +978,7 @@ namespace cds { namespace opt { /// Metafunction to find opt::type_traits option in \p Options list /** @headerfile cds/opt/options.h - If \p Options contains opt::type_traits option then it is the metafunction result. + If \p Options contains \p opt::type_traits option then it is the metafunction result. Otherwise the result is \p DefaultOptons. */ template diff --git a/projects/Win/vc12/cds.sln b/projects/Win/vc12/cds.sln index a203d44c..5b7477b7 100644 --- a/projects/Win/vc12/cds.sln +++ b/projects/Win/vc12/cds.sln @@ -98,6 +98,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "set", "set", "{A64449B7-90F ..\..\..\tests\unit\set2\set_type_lazy_list.h = ..\..\..\tests\unit\set2\set_type_lazy_list.h ..\..\..\tests\unit\set2\set_type_michael.h = ..\..\..\tests\unit\set2\set_type_michael.h ..\..\..\tests\unit\set2\set_type_michael_list.h = ..\..\..\tests\unit\set2\set_type_michael_list.h + ..\..\..\tests\unit\set2\set_type_multilevel_hashset.h = ..\..\..\tests\unit\set2\set_type_multilevel_hashset.h ..\..\..\tests\unit\set2\set_type_skip_list.h = ..\..\..\tests\unit\set2\set_type_skip_list.h ..\..\..\tests\unit\set2\set_type_split_list.h = ..\..\..\tests\unit\set2\set_type_split_list.h ..\..\..\tests\unit\set2\set_type_std.h = ..\..\..\tests\unit\set2\set_type_std.h diff --git a/projects/Win/vc12/unit-prerequisites.vcxproj b/projects/Win/vc12/unit-prerequisites.vcxproj index 848ab3a8..7c1bc845 100644 --- a/projects/Win/vc12/unit-prerequisites.vcxproj +++ b/projects/Win/vc12/unit-prerequisites.vcxproj @@ -425,7 +425,7 @@ - + diff --git a/projects/Win/vc12/unit-set-insdel.vcxproj b/projects/Win/vc12/unit-set-insdel.vcxproj index b4bd97fe..8e0830af 100644 --- a/projects/Win/vc12/unit-set-insdel.vcxproj +++ b/projects/Win/vc12/unit-set-insdel.vcxproj @@ -47,6 +47,7 @@ + @@ -54,6 +55,7 @@ + diff --git a/projects/Win/vc12/unit-set-insdel.vcxproj.filters b/projects/Win/vc12/unit-set-insdel.vcxproj.filters index 9dd1ddb5..74851368 100644 --- a/projects/Win/vc12/unit-set-insdel.vcxproj.filters +++ b/projects/Win/vc12/unit-set-insdel.vcxproj.filters @@ -46,6 +46,12 @@ set_insdel_func + + set_insdel_func + + + set_insdel_string + diff --git a/projects/source.test-common.mk b/projects/source.test-common.mk index 99b66930..97aca01d 100644 --- a/projects/source.test-common.mk +++ b/projects/source.test-common.mk @@ -4,7 +4,7 @@ CDS_TESTCOMMON_SOURCES := \ tests/cppunit/thread.cpp \ tests/unit/michael_alloc.cpp \ tests/unit/ellen_bintree_update_desc_pool.cpp \ - tests/hashing/city.cc \ + tests/hashing/city.cpp \ tests/hashing/md5.cpp \ tests/hashing/sha256.cpp diff --git a/projects/source.unit.set.mk b/projects/source.unit.set.mk index bcd4f3ff..abbdd95d 100644 --- a/projects/source.unit.set.mk +++ b/projects/source.unit.set.mk @@ -4,6 +4,7 @@ CDSUNIT_SET_SOURCES := \ tests/unit/set2/set_insdel_func_cuckoo.cpp \ tests/unit/set2/set_insdel_func_ellentree.cpp \ tests/unit/set2/set_insdel_func_michael.cpp \ + tests/unit/set2/set_insdel_func_multilevelhashset.cpp \ tests/unit/set2/set_insdel_func_skip.cpp \ tests/unit/set2/set_insdel_func_split.cpp \ tests/unit/set2/set_insdel_func_striped.cpp \ @@ -11,6 +12,7 @@ CDSUNIT_SET_SOURCES := \ tests/unit/set2/set_insdel_string_cuckoo.cpp \ tests/unit/set2/set_insdel_string_ellentree.cpp \ tests/unit/set2/set_insdel_string_michael.cpp \ + tests/unit/set2/set_insdel_string_multilevelhashset.cpp \ tests/unit/set2/set_insdel_string_skip.cpp \ tests/unit/set2/set_insdel_string_split.cpp \ tests/unit/set2/set_insdel_string_striped.cpp \ diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3c77e1af..8bbd6f53 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -6,7 +6,7 @@ set(SOURCES cppunit/test_main.cpp cppunit/thread.cpp unit/michael_alloc.cpp unit/ellen_bintree_update_desc_pool.cpp - hashing/city.cc + hashing/city.cpp hashing/md5.cpp hashing/sha256.cpp) diff --git a/tests/hashing/city.cc b/tests/hashing/city.cpp similarity index 100% rename from tests/hashing/city.cc rename to tests/hashing/city.cpp diff --git a/tests/unit/set2/CMakeLists.txt b/tests/unit/set2/CMakeLists.txt index c375a3fd..408b5f79 100644 --- a/tests/unit/set2/CMakeLists.txt +++ b/tests/unit/set2/CMakeLists.txt @@ -5,6 +5,7 @@ set(CDSUNIT_SET_SOURCES set_insdel_func_cuckoo.cpp set_insdel_func_ellentree.cpp set_insdel_func_michael.cpp + set_insdel_func_multilevelhashset.cpp set_insdel_func_skip.cpp set_insdel_func_split.cpp set_insdel_func_striped.cpp @@ -12,6 +13,7 @@ set(CDSUNIT_SET_SOURCES set_insdel_string_cuckoo.cpp set_insdel_string_ellentree.cpp set_insdel_string_michael.cpp + set_insdel_string_multilevelhashset.cpp set_insdel_string_skip.cpp set_insdel_string_split.cpp set_insdel_string_striped.cpp diff --git a/tests/unit/set2/set_defs.h b/tests/unit/set2/set_defs.h index 5412a968..be2bcf02 100644 --- a/tests/unit/set2/set_defs.h +++ b/tests/unit/set2/set_defs.h @@ -1,8 +1,5 @@ //$$CDS-header$$ -#ifndef CDSUNIT_SET_DEFS_H -#define CDSUNIT_SET_DEFS_H - #define CDSUNIT_DECLARE_StdSet \ TEST_CASE( tag_StdSet, StdSet_Spin) \ TEST_CASE( tag_StdSet, StdSet_Mutex) \ @@ -617,4 +614,54 @@ CDSUNIT_TEST_RefinableSet_boost_container \ CDSUNIT_TEST_RefinableSet_boost_flat_container -#endif // #ifndef CDSUNIT_SET_DEFS_H + +//*********************************************** +// MultiLevelHashSet + +#undef CDSUNIT_DECLARE_MultiLevelHashSet +#define CDSUNIT_DECLARE_MultiLevelHashSet \ + 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_dhp_stdhash_stat) \ + 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_dhp_md5_stat) \ + 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_dhp_sha256_stat) \ + 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) + + +#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_hp_md5) \ + CPPUNIT_TEST(MultiLevelHashSet_hp_md5_stat) \ + CPPUNIT_TEST(MultiLevelHashSet_dhp_md5) \ + CPPUNIT_TEST(MultiLevelHashSet_dhp_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_hp_city64) \ + CPPUNIT_TEST(MultiLevelHashSet_hp_city64_stat) \ + CPPUNIT_TEST(MultiLevelHashSet_dhp_city64) \ + CPPUNIT_TEST(MultiLevelHashSet_dhp_city64_stat) \ + CPPUNIT_TEST(MultiLevelHashSet_hp_city128) \ + CPPUNIT_TEST(MultiLevelHashSet_hp_city128_stat) \ + CPPUNIT_TEST(MultiLevelHashSet_dhp_city128) \ + CPPUNIT_TEST(MultiLevelHashSet_dhp_city128_stat) + diff --git a/tests/unit/set2/set_insdel_func.h b/tests/unit/set2/set_insdel_func.h index ad8e0a74..505c0a49 100644 --- a/tests/unit/set2/set_insdel_func.h +++ b/tests/unit/set2/set_insdel_func.h @@ -207,6 +207,12 @@ namespace set2 { ++nModified; } } + + void operator()( keyval_type& cur, keyval_type * old ) + { + operator()( old == nullptr, cur, 0 ); + } + private: update_functor(const update_functor& ); }; @@ -540,17 +546,17 @@ namespace set2 { CDSUNIT_DECLARE_RefinableSet CDSUNIT_DECLARE_CuckooSet CDSUNIT_DECLARE_EllenBinTreeSet + CDSUNIT_DECLARE_MultiLevelHashSet CPPUNIT_TEST_SUITE_(Set_InsDel_func, "Map_InsDel_func") CDSUNIT_TEST_MichaelSet CDSUNIT_TEST_SplitList CDSUNIT_TEST_SkipListSet + CDSUNIT_TEST_MultiLevelHashSet CDSUNIT_TEST_EllenBinTreeSet CDSUNIT_TEST_StripedSet CDSUNIT_TEST_RefinableSet CDSUNIT_TEST_CuckooSet - - //CDSUNIT_TEST_MultiLevelHashSet // the test is not suitable CPPUNIT_TEST_SUITE_END(); }; diff --git a/tests/unit/set2/set_insdel_func_multilevelhashset.cpp b/tests/unit/set2/set_insdel_func_multilevelhashset.cpp new file mode 100644 index 00000000..92b2dd48 --- /dev/null +++ b/tests/unit/set2/set_insdel_func_multilevelhashset.cpp @@ -0,0 +1,12 @@ +//$$CDS-header$$ + +#include "set2/set_insdel_func.h" +#include "set2/set_type_multilevel_hashset.h" + +#undef TEST_CASE +#define TEST_CASE(TAG, X) void Set_InsDel_func::X() { run_test::X>(); } +#include "set2/set_defs.h" + +namespace set2 { + CDSUNIT_DECLARE_MultiLevelHashSet +} // namespace set2 diff --git a/tests/unit/set2/set_insdel_string.h b/tests/unit/set2/set_insdel_string.h index 6e818f80..8d68793a 100644 --- a/tests/unit/set2/set_insdel_string.h +++ b/tests/unit/set2/set_insdel_string.h @@ -515,12 +515,14 @@ namespace set2 { CDSUNIT_DECLARE_CuckooSet CDSUNIT_DECLARE_SkipListSet CDSUNIT_DECLARE_EllenBinTreeSet + CDSUNIT_DECLARE_MultiLevelHashSet CDSUNIT_DECLARE_StdSet - CPPUNIT_TEST_SUITE_(Set_InsDel_func, "Map_InsDel_func") + CPPUNIT_TEST_SUITE_(Set_InsDel_string, "Map_InsDel_func") CDSUNIT_TEST_MichaelSet CDSUNIT_TEST_SplitList CDSUNIT_TEST_SkipListSet + CDSUNIT_TEST_MultiLevelHashSet CDSUNIT_TEST_EllenBinTreeSet CDSUNIT_TEST_StripedSet CDSUNIT_TEST_RefinableSet diff --git a/tests/unit/set2/set_insdel_string_multilevelhashset.cpp b/tests/unit/set2/set_insdel_string_multilevelhashset.cpp new file mode 100644 index 00000000..59c10ee8 --- /dev/null +++ b/tests/unit/set2/set_insdel_string_multilevelhashset.cpp @@ -0,0 +1,12 @@ +//$$CDS-header$$ + +#include "set2/set_insdel_string.h" +#include "set2/set_type_multilevel_hashset.h" + +#undef TEST_CASE +#define TEST_CASE(TAG, X) void Set_InsDel_string::X() { run_test_extract::X>(); } +#include "set2/set_defs.h" + +namespace set2 { + CDSUNIT_DECLARE_MultiLevelHashSet +} // namespace set2 diff --git a/tests/unit/set2/set_type_multilevel_hashset.h b/tests/unit/set2/set_type_multilevel_hashset.h new file mode 100644 index 00000000..c13d1fc4 --- /dev/null +++ b/tests/unit/set2/set_type_multilevel_hashset.h @@ -0,0 +1,178 @@ +//$$CDS-header$$ + +#ifndef CDSUNIT_SET_TYPE_MICHAEL_H +#define CDSUNIT_SET_TYPE_MICHAEL_H + +#include +#include + +#include "print_multilevel_hashset_stat.h" +#include "hashing/hash_func.h" + +namespace set2 { + + template + class MultiLevelHashSet : public cc::MultiLevelHashSet< GC, T, Traits > + { + typedef cc::MultiLevelHashSet< GC, T, Traits > base_class; + public: + typedef typename T::hasher hasher ; + typedef typename base_class::guarded_ptr guarded_ptr; + + template + MultiLevelHashSet( Config const& cfg ) + : base_class( cfg.c_nSetSize, cfg.c_nLoadFactor ) + {} + + template + bool erase( Q const& key ) + { + return base_class::erase( hasher()( key )); + } + + template + bool erase( Q const& key, Func f ) + { + return base_class::erase( hasher()( key ), f ); + } + + template + guarded_ptr extract(Q const& key) + { + return base_class::extract( hasher()(key) ); + } + + // for testing + static CDS_CONSTEXPR bool const c_bExtractSupported = true; + static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false; + }; + + struct tag_MultiLevelHashSet; + + template + struct set_type< tag_MultiLevelHashSet, Key, Val >: public set_type_base< Key, Val > + { + typedef set_type_base< Key, Val > base_class; + typedef typename base_class::compare compare; + typedef typename base_class::less less; + typedef typename base_class::hash hash; + typedef typename base_class::key_type key_type; + typedef typename base_class::value_type value_type; + + template + struct hash_type + { + typedef Hasher hasher; + typedef typename hasher::hash_type type; + }; + + template + struct hash_type> + { + typedef std::hash hasher; + typedef size_t type; + }; + + template + struct key_val: base_class::key_val + { + typedef typename base_class::key_val base; + typedef Hasher hasher; + typedef typename hash_type::type hash_type; + + hash_type hash; + + /*explicit*/ key_val( key_type const& k ): base(k), hash( hasher()( k )) {} + key_val( key_type const& k, value_type const& v ): base(k, v), hash( hasher()( k )) {} + + template + /*explicit*/ key_val( K const& k ): base(k), hash( hasher()( k )) {} + + template + key_val( K const& k, T const& v ): base(k, v), hash( hasher()( k )) {} + }; + + struct default_traits : public cc::multilevel_hashset::traits + { + struct hash_accessor { + template + typename key_val::hash_type const& operator()( key_val const& kv ) + { + return kv.hash; + } + }; + }; + + typedef MultiLevelHashSet< cds::gc::HP, key_val>, default_traits > MultiLevelHashSet_hp_stdhash; + typedef MultiLevelHashSet< cds::gc::DHP, key_val>, default_traits > MultiLevelHashSet_dhp_stdhash; + + struct traits_MultiLevelHashSet_stat: public cc::multilevel_hashset::make_traits< + co::type_traits< default_traits >, + co::stat< cc::multilevel_hashset::stat<>> + >::type + {}; + + typedef MultiLevelHashSet< cds::gc::HP, key_val>, traits_MultiLevelHashSet_stat > MultiLevelHashSet_hp_stdhash_stat; + typedef MultiLevelHashSet< cds::gc::DHP, key_val>, traits_MultiLevelHashSet_stat > MultiLevelHashSet_dhp_stdhash_stat; + + // SHA256 + typedef MultiLevelHashSet< cds::gc::HP, key_val<::hashing::sha256>, default_traits > MultiLevelHashSet_hp_sha256; + typedef MultiLevelHashSet< cds::gc::DHP, key_val<::hashing::sha256>, default_traits > MultiLevelHashSet_dhp_sha256; + + struct traits_MultiLevelHashSet_sha256_stat : public default_traits + { + typedef cc::multilevel_hashset::stat<> stat; + }; + typedef MultiLevelHashSet< cds::gc::HP, key_val<::hashing::sha256>, traits_MultiLevelHashSet_sha256_stat > MultiLevelHashSet_hp_sha256_stat; + typedef MultiLevelHashSet< cds::gc::DHP, key_val<::hashing::sha256>, traits_MultiLevelHashSet_sha256_stat > MultiLevelHashSet_dhp_sha256_stat; + + //MD5 + typedef MultiLevelHashSet< cds::gc::HP, key_val<::hashing::md5>, default_traits > MultiLevelHashSet_hp_md5; + typedef MultiLevelHashSet< cds::gc::DHP, key_val<::hashing::md5>, default_traits > MultiLevelHashSet_dhp_md5; + + struct traits_MultiLevelHashSet_md5_stat : public default_traits + { + typedef cc::multilevel_hashset::stat<> stat; + }; + typedef MultiLevelHashSet< cds::gc::HP, key_val<::hashing::md5>, traits_MultiLevelHashSet_md5_stat > MultiLevelHashSet_hp_md5_stat; + typedef MultiLevelHashSet< cds::gc::DHP, key_val<::hashing::md5>, traits_MultiLevelHashSet_md5_stat > MultiLevelHashSet_dhp_md5_stat; + + // CityHash + struct traits_MultiLevelHashSet_city64 : public default_traits + { + typedef ::hashing::city64::less less; + }; + typedef MultiLevelHashSet< cds::gc::HP, key_val<::hashing::city64>, traits_MultiLevelHashSet_city64 > MultiLevelHashSet_hp_city64; + typedef MultiLevelHashSet< cds::gc::DHP, key_val<::hashing::city64>, traits_MultiLevelHashSet_city64 > MultiLevelHashSet_dhp_city64; + + struct traits_MultiLevelHashSet_city64_stat : public traits_MultiLevelHashSet_city64 + { + typedef cc::multilevel_hashset::stat<> stat; + }; + typedef MultiLevelHashSet< cds::gc::HP, key_val<::hashing::city64>, traits_MultiLevelHashSet_city64_stat > MultiLevelHashSet_hp_city64_stat; + typedef MultiLevelHashSet< cds::gc::DHP, key_val<::hashing::city64>, traits_MultiLevelHashSet_city64_stat > MultiLevelHashSet_dhp_city64_stat; + + struct traits_MultiLevelHashSet_city128 : public default_traits + { + typedef ::hashing::city128::less less; + }; + typedef MultiLevelHashSet< cds::gc::HP, key_val<::hashing::city128>, traits_MultiLevelHashSet_city128 > MultiLevelHashSet_hp_city128; + typedef MultiLevelHashSet< cds::gc::DHP, key_val<::hashing::city128>, traits_MultiLevelHashSet_city128 > MultiLevelHashSet_dhp_city128; + + struct traits_MultiLevelHashSet_city128_stat : public traits_MultiLevelHashSet_city128 + { + typedef cc::multilevel_hashset::stat<> stat; + }; + typedef MultiLevelHashSet< cds::gc::HP, key_val<::hashing::city128>, traits_MultiLevelHashSet_city128_stat > MultiLevelHashSet_hp_city128_stat; + typedef MultiLevelHashSet< cds::gc::DHP, key_val<::hashing::city128>, traits_MultiLevelHashSet_city128_stat > MultiLevelHashSet_dhp_city128_stat; + }; + + template + static inline void print_stat( cc::MultiLevelHashSet< GC, T, Traits > const& s ) + { + CPPUNIT_MSG( s.statistics() ); + } + +} // namespace set2 + +#endif // #ifndef CDSUNIT_SET_TYPE_MICHAEL_H -- 2.34.1