-/tools/doxygen.log
/doc
/sandbox
/projects/Win/vc12/cds.opensdf
*.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
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 \
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 \
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 \
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 \
/// \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;
//@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
{
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;
};
<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.
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
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
<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.
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
{
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
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
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
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 )
};
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;
{
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
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);
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 )
{
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 {
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
/// 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
:: 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
--- /dev/null
+call "%VS140COMNTOOLS%"\vsvars32.bat\r
+call build-msbuild.cmd vc14 Release /tv:14.0 /m\r
<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
<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
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 \
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();
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();
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();
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();
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();
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();
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();
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)
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)
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)
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)
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)
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)
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)
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 {
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;
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;
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);
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);
> map_type2;
test_hp<map_type2>(4, 3);
}
-
} // namespace map
+
+CPPUNIT_TEST_SUITE_REGISTRATION(map::MultiLevelHashMapHdrTest);
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 {
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;
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;
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);
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);
> map_type2;
test_hp<map_type2>(4, 3);
}
-
} // namespace map
CPPUNIT_TEST_SUITE_REGISTRATION(map::MultiLevelHashMapHdrTest);
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 {
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;
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);
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);
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);
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 {
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;
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);
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);
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);
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 {
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;
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);
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);
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);
} // 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;
#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
#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;
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 {
> 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);
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);
} // 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;
#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
#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;
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 {
> 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);
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);
}
};
+ 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 )
}
};
+ template <typename Key>
+ struct nohash {
+ Key operator()(Key k) const
+ {
+ return k;
+ }
+ };
+
struct hash128
{
size_t lo;
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();
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();
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();
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();
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();
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();
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();
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)
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)
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)
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)
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)
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)
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)
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
#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
#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
#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
#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
#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
#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
#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
#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
}
};
+ 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;
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();
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();
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();
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();
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();
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();
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();
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)
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)
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)
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)
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)
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)
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)
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;
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;
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;
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;
test_hp<set_type2, hash_type::make>(4, 3);
}
+
} // 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;
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;
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;
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;
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;
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;
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;
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;
> set_type2;
test_rcu<set_type2, hash_type::make>(4, 3);
}
+
+
} // 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;
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;
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;
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;
> set_type2;
test_rcu<set_type2, hash_type::make>(4, 3);
}
+
+
} // 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;
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;
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;
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;
> set_type2;
test_rcu<set_type2, hash_type::make>(4, 3);
}
+
+
} // 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
#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
#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
#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
} // 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
#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
#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
#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
// **************************************************************************************
// 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
+
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));
}
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;
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;
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));
}
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
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
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));
}
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
}
}
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
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
}
}
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
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)
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();
#include "map2/map_defs.h"
namespace map2 {
- CDSUNIT_DECLARE_MultiLevelHashMap64
+ CDSUNIT_DECLARE_MultiLevelHashMap_fixed
+ CDSUNIT_DECLARE_MultiLevelHashMap_city
} // 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
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
#include "map2/map_defs.h"
namespace map2 {
- CDSUNIT_DECLARE_MultiLevelHashMap
+ CDSUNIT_DECLARE_MultiLevelHashMap_md5
+ CDSUNIT_DECLARE_MultiLevelHashMap_sha256
+ CDSUNIT_DECLARE_MultiLevelHashMap_city
} // 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
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
#include "map2/map_defs.h"
namespace map2 {
- CDSUNIT_DECLARE_MultiLevelHashMap
+ CDSUNIT_DECLARE_MultiLevelHashMap_fixed
+ CDSUNIT_DECLARE_MultiLevelHashMap_city
} // 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
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
#include "map2/map_defs.h"
namespace map2 {
- CDSUNIT_DECLARE_MultiLevelHashMap
+ CDSUNIT_DECLARE_MultiLevelHashMap_fixed
+ CDSUNIT_DECLARE_MultiLevelHashMap_city
} // 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
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
#include "map2/map_defs.h"
namespace map2 {
- CDSUNIT_DECLARE_MultiLevelHashMap
+ CDSUNIT_DECLARE_MultiLevelHashMap_fixed
+ CDSUNIT_DECLARE_MultiLevelHashMap_city
} // 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
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
#include "map2/map_defs.h"
namespace map2 {
- CDSUNIT_DECLARE_MultiLevelHashMap
+ CDSUNIT_DECLARE_MultiLevelHashMap_md5
+ CDSUNIT_DECLARE_MultiLevelHashMap_sha256
+ CDSUNIT_DECLARE_MultiLevelHashMap_city
} // 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
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
#include "map2/map_defs.h"
namespace map2 {
- CDSUNIT_DECLARE_MultiLevelHashMap
+ CDSUNIT_DECLARE_MultiLevelHashMap_sha256
+ CDSUNIT_DECLARE_MultiLevelHashMap_city
} // 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
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
#include "map2/map_defs.h"
namespace map2 {
- CDSUNIT_DECLARE_MultiLevelHashMap
+ CDSUNIT_DECLARE_MultiLevelHashMap_fixed
+ CDSUNIT_DECLARE_MultiLevelHashMap_city
} // 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
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
#include "map2/map_defs.h"
namespace map2 {
- CDSUNIT_DECLARE_MultiLevelHashMap
+ CDSUNIT_DECLARE_MultiLevelHashMap_fixed
+ CDSUNIT_DECLARE_MultiLevelHashMap_city
} // 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
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 >
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
)
//***********************************************
// 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
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 ) {
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;
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;
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;
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;
}
}
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;
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;
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
}
}
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
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;
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
}
}
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
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
--- /dev/null
+//$$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
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
#include "set2/set_defs.h"
namespace set2 {
- CDSUNIT_DECLARE_MultiLevelHashSet
+ CDSUNIT_DECLARE_MultiLevelHashSet_fixed
+ CDSUNIT_DECLARE_MultiLevelHashSet_city
} // 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
#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
// 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;
// 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;
// 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;
// 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;
#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 >
// 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;
// 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;
// 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,
// 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>
// 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
// 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>
// 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<