*/
namespace michael_set {
- /// Type traits for MichaelHashSet class (typedef for cds::intrusive::michael_set::type_traits)
- typedef intrusive::michael_set::type_traits type_traits;
+ /// MichaelHashSet traits
+ typedef cds::intrusive::michael_set::traits traits;
- /// Metafunction converting option list to traits struct
- /**
- This is a synonym for intrusive::michael_set::make_traits
- */
+ /// Metafunction converting option list to \p MichaelHashSet traits
template <typename... Options>
- struct make_traits {
- typedef typename intrusive::michael_set::make_traits<Options...>::type type ; ///< Result of metafunction
- };
+ using make_traits = cds::intrusive::michael_set::make_traits< Options... >;
//@cond
namespace details {
- using intrusive::michael_set::details::init_hash_bitmask;
- using intrusive::michael_set::details::list_iterator_selector;
- using intrusive::michael_set::details::iterator;
+ using cds::intrusive::michael_set::details::init_hash_bitmask;
+ using cds::intrusive::michael_set::details::list_iterator_selector;
+ using cds::intrusive::michael_set::details::iterator;
}
//@endcond
}
//@cond
// Forward declarations
- template <class GC, class OrderedList, class Traits = michael_set::type_traits>
+ template <class GC, class OrderedList, class Traits = michael_set::traits>
class MichaelHashSet;
//@endcond
Template parameters are:
- \p GC - Garbage collector used. You may use any \ref cds_garbage_collector "Garbage collector"
from the \p libcds library.
- Note the \p GC must be the same as the GC used for \p OrderedList
- - \p OrderedList - ordered list implementation used as bucket for hash set, for example, MichaelList.
- The ordered list implementation specifies the type \p T stored in the hash-set, the reclamation
- schema \p GC used by hash-set, the comparison functor for the type \p T and other features specific for
- the ordered list.
- - \p Traits - type traits. See michael_set::type_traits for explanation.
-
- Instead of defining \p Traits struct you may use option-based syntax with michael_set::make_traits metafunction.
- For michael_set::make_traits the following option may be used:
- - opt::hash - mandatory option, specifies hash functor.
- - opt::item_counter - optional, specifies item counting policy. See michael_set::type_traits for explanation.
- - opt::allocator - optional, bucket table allocator. Default is \ref CDS_DEFAULT_ALLOCATOR.
+ Note the \p GC must be the same as the \p GC used for \p OrderedList
+ - \p OrderedList - ordered list implementation used as bucket for hash set, for example, \p MichaelList.
+ The ordered list implementation specifies the type \p T to be stored in the hash-set,
+ the comparing functor for the type \p T and other features specific for the ordered list.
+ - \p Traits - set traits, default is \p michael_set::traits.
+ Instead of defining \p Traits struct you may use option-based syntax with \p michael_set::make_traits metafunction.
There are the specializations:
- for \ref cds_urcu_desc "RCU" - declared in <tt>cd/container/michael_set_rcu.h</tt>,
It is expected that type \p Q contains full key of node type \p value_type, and if keys of type \p Q and \p value_type
are equal the hash values of these keys must be equal too.
- The hash functor <tt>Traits::hash</tt> should accept parameters of both type:
+ The hash functor \p Traits::hash should accept parameters of both type:
\code
// Our node type
struct Foo {
so, the element cannot be reclaimed while the iterator object is alive.
However, passing an iterator object between threads is dangerous.
- \warning Due to concurrent nature of Michael's set it is not guarantee that you can iterate
+ @warning Due to concurrent nature of Michael's set it is not guarantee that you can iterate
all elements in the set: any concurrent deletion can exclude the element
pointed by the iterator from the set, and your iteration can be terminated
before end of the set. Therefore, such iteration is more suitable for debugging purpose only
Remember, each iterator object requires an additional hazard pointer, that may be
- a limited resource for \p GC like \p gc::HP (for gc::PTB the count of
+ a limited resource for \p GC like \p gc::HP (for \p gc::DHP the total count of
guards is unlimited).
The iterator class supports the following minimalistic interface:
<b>How to use</b>
- Suppose, we have the following type \p Foo that we want to store in our MichaelHashSet:
+ Suppose, we have the following type \p Foo that we want to store in our \p %MichaelHashSet:
\code
struct Foo {
int nKey ; // key field
\endcode
To use \p %MichaelHashSet for \p Foo values, you should first choose suitable ordered list class
- that will be used as a bucket for the set. We will use gc::PTB reclamation schema and
- MichaelList as a bucket type. Also, for ordered list we should develop a comparator for our \p Foo
+ that will be used as a bucket for the set. We will use \p gc::DHP reclamation schema and
+ \p MichaelList as a bucket type. Also, for ordered list we should develop a comparator for our \p Foo
struct.
\code
#include <cds/container/michael_list_dhp.h>
};
// Our ordered list
- typedef cc::MichaelList< cds::gc::PTB, Foo,
+ typedef cc::MichaelList< cds::gc::DHP, Foo,
typename cc::michael_list::make_traits<
cc::opt::compare< Foo_cmp > // item comparator option
>::type
// Declare set type.
// Note that \p GC template parameter of ordered list must be equal \p GC for the set.
- typedef cc::MichaelHashSet< cds::gc::PTB, bucket_list,
+ typedef cc::MichaelHashSet< cds::gc::DHP, bucket_list,
cc::michael_set::make_traits<
cc::opt::hash< foo_hash >
>::type
class GC,
class OrderedList,
#ifdef CDS_DOXYGEN_INVOKED
- class Traits = michael_set::type_traits
+ class Traits = michael_set::traits
#else
class Traits
#endif
class MichaelHashSet
{
public:
- typedef OrderedList bucket_type ; ///< type of ordered list used as a bucket implementation
- typedef Traits options ; ///< Traits template parameters
+ typedef GC gc; ///< Garbage collector
+ typedef OrderedList bucket_type; ///< type of ordered list used as a bucket implementation
+ typedef Traits traits; ///< Set traits
- typedef typename bucket_type::value_type value_type ; ///< type of value stored in the list
- typedef GC gc ; ///< Garbage collector
- typedef typename bucket_type::key_comparator key_comparator ; ///< key comparison functor
+ typedef typename bucket_type::value_type value_type; ///< type of value to be stored in the list
+ typedef typename bucket_type::key_comparator key_comparator; ///< key comparison functor
/// Hash functor for \ref value_type and all its derivatives that you use
- typedef typename cds::opt::v::hash_selector< typename options::hash >::type hash;
- typedef typename options::item_counter item_counter ; ///< Item counter type
+ typedef typename cds::opt::v::hash_selector< typename traits::hash >::type hash;
+ typedef typename traits::item_counter item_counter; ///< Item counter type
/// Bucket table allocator
- typedef cds::details::Allocator< bucket_type, typename options::allocator > bucket_table_allocator;
+ typedef cds::details::Allocator< bucket_type, typename traits::allocator > bucket_table_allocator;
- typedef typename bucket_type::guarded_ptr guarded_ptr; ///< Guarded pointer
+ typedef typename bucket_type::guarded_ptr guarded_ptr; ///< Guarded pointer
protected:
- item_counter m_ItemCounter ; ///< Item counter
- hash m_HashFunctor ; ///< Hash functor
-
- bucket_type * m_Buckets ; ///< bucket table
+ item_counter m_ItemCounter; ///< Item counter
+ hash m_HashFunctor; ///< Hash functor
+ bucket_type * m_Buckets; ///< bucket table
private:
//@cond
//@endcond
protected:
+ //@cond
/// Calculates hash value of \p key
template <typename Q>
size_t hash_value( Q const& key ) const
{
return m_Buckets[ hash_value( key ) ];
}
+ //@endcond
public:
/// Forward iterator
public:
/// Initialize hash set
- /**
+ /** @anchor cds_nonintrusive_MichaelHashSet_hp_ctor
The Michael's hash set is non-expandable container. You should point the average count of items \p nMaxItemCount
when you create an object.
\p nLoadFactor parameter defines average count of items per bucket and it should be small number between 1 and 10.
Remember, since the bucket implementation is an ordered list, searching in the bucket is linear [<tt>O(nLoadFactor)</tt>].
- Note, that many popular STL hash map implementation uses load factor 1.
- The ctor defines hash table size as rounding <tt>nMacItemCount / nLoadFactor</tt> up to nearest power of two.
+ The ctor defines hash table size as rounding <tt>nMaxItemCount / nLoadFactor</tt> up to nearest power of two.
*/
MichaelHashSet(
size_t nMaxItemCount, ///< estimation of max item count in the hash set
) : m_nHashBitmask( michael_set::details::init_hash_bitmask( nMaxItemCount, nLoadFactor ))
{
// GC and OrderedList::gc must be the same
- static_assert(( std::is_same<gc, typename bucket_type::gc>::value ), "GC and OrderedList::gc must be the same");
+ static_assert( std::is_same<gc, typename bucket_type::gc>::value, "GC and OrderedList::gc must be the same");
// atomicity::empty_item_counter is not allowed as a item counter
- static_assert(( !std::is_same<item_counter, atomicity::empty_item_counter>::value ), "atomicity::empty_item_counter is not allowed as a item counter");
+ static_assert( !std::is_same<item_counter, atomicity::empty_item_counter>::value,
+ "cds::atomicity::empty_item_counter is not allowed as a item counter");
m_Buckets = bucket_table_allocator().NewArray( bucket_count() );
}
- /// Clear hash set and destroy it
+ /// Clears hash set and destroys it
~MichaelHashSet()
{
clear();
\code
void func( value_type& val );
\endcode
- where \p val is the item inserted. User-defined functor \p f should guarantee that during changing
- \p val no any other changes could be made on this set's item by concurrent threads.
- The user-defined functor is called only if the inserting is success. It may be passed by reference
- using \p std::ref
+ where \p val is the item inserted.
+ The user-defined functor is called only if the inserting is success.
+
+ @warning For \ref cds_nonintrusive_MichaelList_gc "MichaelList" as the bucket see \ref cds_intrusive_item_creating "insert item troubleshooting".
+ \ref cds_nonintrusive_LazyList_gc "LazyList" provides exclusive access to inserted item and does not require any node-level
+ synchronization.
*/
template <typename Q, typename Func>
bool insert( Q const& val, Func f )
If the \p val key not found in the set, then the new item created from \p val
is inserted into the set. Otherwise, the functor \p func is called with the item found.
- The functor \p Func should be a function with signature:
- \code
- void func( bool bNew, value_type& item, const Q& val );
- \endcode
- or a functor:
+ The functor \p Func signature is:
\code
struct my_functor {
void operator()( bool bNew, value_type& item, const Q& val );
- \p item - item of the set
- \p val - argument \p key passed into the \p ensure function
- The functor may change non-key fields of the \p item; however, \p func must guarantee
- that during changing no any other modifications could be made on this item by concurrent threads.
-
- You may pass \p func argument by reference using \p std::ref
+ The functor may change non-key fields of the \p item.
Returns <tt> std::pair<bool, bool> </tt> where \p first is true if operation is successfull,
\p second is true if new item has been added or \p false if the item with \p key
already is in the set.
- */
+
+ @warning For \ref cds_nonintrusive_MichaelList_gc "MichaelList" as the bucket see \ref cds_intrusive_item_creating "insert item troubleshooting".
+ \ref cds_nonintrusive_LazyList_gc "LazyList" provides exclusive access to inserted item and does not require any node-level
+ synchronization.
+ */
template <typename Q, typename Func>
std::pair<bool, bool> ensure( const Q& val, Func func )
{
return bRet;
}
- /// Inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
+ /// Inserts data of type \p value_type constructed from \p args
/**
Returns \p true if inserting successful, \p false otherwise.
*/
The functor \p Func interface:
\code
struct extractor {
- void operator()(value_type const& val);
+ void operator()(value_type& item);
};
\endcode
- The functor may be passed by reference using <tt>boost:ref</tt>
+ where \p item - the item found.
Since the key of %MichaelHashSet's \p value_type is not explicitly specified,
template parameter \p Q defines the key type searching in the list.
return bRet;
}
- /// Finds the key \p val
+ /// Finds the key \p key
/** \anchor cds_nonintrusive_MichaelSet_find_func
- The function searches the item with key equal to \p val and calls the functor \p f for item found.
+ The function searches the item with key equal to \p key and calls the functor \p f for item found.
The interface of \p Func functor is:
\code
struct functor {
- void operator()( value_type& item, Q& val );
+ void operator()( value_type& item, Q& key );
};
\endcode
- where \p item is the item found, \p val is the <tt>find</tt> function argument.
+ where \p item is the item found, \p key is the <tt>find</tt> function argument.
You may pass \p f argument by reference using \p std::ref.
The functor does not serialize simultaneous access to the set's \p item. If such access is
possible you must provide your own synchronization schema on item level to exclude unsafe item modifications.
- The \p val argument is non-const since it can be used as \p f functor destination i.e., the functor
+ The \p key argument is non-const since it can be used as \p f functor destination i.e., the functor
can modify both arguments.
Note the hash functor specified for class \p Traits template parameter
should accept a parameter of type \p Q that may be not the same as \p value_type.
- The function returns \p true if \p val is found, \p false otherwise.
+ The function returns \p true if \p key is found, \p false otherwise.
*/
template <typename Q, typename Func>
- bool find( Q& val, Func f )
+ bool find( Q& key, Func f )
{
- return bucket( val ).find( val, f );
+ return bucket( key ).find( key, f );
}
- /// Finds the key \p val using \p pred predicate for searching
+ /// Finds the key \p key using \p pred predicate for searching
/**
The function is an analog of \ref cds_nonintrusive_MichaelSet_find_func "find(Q&, Func)"
but \p pred is used for key comparing.
\p Less must imply the same element order as the comparator used for building the set.
*/
template <typename Q, typename Less, typename Func>
- bool find_with( Q& val, Less pred, Func f )
- {
- return bucket( val ).find_with( val, pred, f );
- }
-
- /// Finds the key \p val
- /** \anchor cds_nonintrusive_MichaelSet_find_cfunc
-
- The function searches the item with key equal to \p val and calls the functor \p f for item found.
- The interface of \p Func functor is:
- \code
- struct functor {
- void operator()( value_type& item, Q const& val );
- };
- \endcode
- where \p item is the item found, \p val is the <tt>find</tt> function argument.
-
- You may pass \p f argument by reference using \p std::ref.
-
- The functor may change non-key fields of \p item. Note that the functor is only guarantee
- that \p item cannot be disposed during functor is executing.
- The functor does not serialize simultaneous access to the set's \p item. If such access is
- possible you must provide your own synchronization schema on item level to exclude unsafe item modifications.
-
- Note the hash functor specified for class \p Traits template parameter
- should accept a parameter of type \p Q that may be not the same as \p value_type.
-
- The function returns \p true if \p val is found, \p false otherwise.
- */
- template <typename Q, typename Func>
- bool find( Q const& val, Func f )
- {
- return bucket( val ).find( val, f );
- }
-
- /// Finds the key \p val using \p pred predicate for searching
- /**
- The function is an analog of \ref cds_nonintrusive_MichaelSet_find_cfunc "find(Q const&, Func)"
- but \p pred is used for key comparing.
- \p Less functor has the interface like \p std::less.
- \p Less must imply the same element order as the comparator used for building the set.
- */
- template <typename Q, typename Less, typename Func>
- bool find_with( Q const& val, Less pred, Func f )
+ bool find_with( Q& key, Less pred, Func f )
{
- return bucket( val ).find_with( val, pred, f );
+ return bucket( key ).find_with( key, pred, f );
}
- /// Finds the key \p val
+ /// Finds the key \p key
/** \anchor cds_nonintrusive_MichaelSet_find_val
- The function searches the item with key equal to \p val
+ The function searches the item with key equal to \p key
and returns \p true if it is found, and \p false otherwise.
Note the hash functor specified for class \p Traits template parameter
should accept a parameter of type \p Q that may be not the same as \ref value_type.
*/
template <typename Q>
- bool find( Q const& val )
+ bool find( Q const& key )
{
- return bucket( val ).find( val );
+ return bucket( key ).find( key );
}
- /// Finds the key \p val using \p pred predicate for searching
+ /// Finds the key \p key using \p pred predicate for searching
/**
The function is an analog of \ref cds_nonintrusive_MichaelSet_find_val "find(Q const&)"
but \p pred is used for key comparing.
\p Less must imply the same element order as the comparator used for building the set.
*/
template <typename Q, typename Less>
- bool find_with( Q const& val, Less pred )
+ bool find_with( Q const& key, Less pred )
{
- return bucket( val ).find_with( val, pred );
+ return bucket( key ).find_with( key, pred );
}
- /// Finds the key \p val and return the item found
+ /// Finds the key \p key and return the item found
/** \anchor cds_nonintrusive_MichaelHashSet_hp_get
- The function searches the item with key equal to \p val
+ The function searches the item with key equal to \p key
and assigns the item found to guarded pointer \p ptr.
- The function returns \p true if \p val is found, and \p false otherwise.
- If \p val is not found the \p ptr parameter is not changed.
+ The function returns \p true if \p key is found, and \p false otherwise.
+ If \p key is not found the \p ptr parameter is not changed.
@note Each \p guarded_ptr object uses one GC's guard which can be limited resource.
should accept a parameter of type \p Q that can be not the same as \p value_type.
*/
template <typename Q>
- bool get( guarded_ptr& ptr, Q const& val )
+ bool get( guarded_ptr& ptr, Q const& key )
{
- return bucket( val ).get( ptr, val );
+ return bucket( key ).get( ptr, key );
}
- /// Finds the key \p val and return the item found
+ /// Finds the key \p key and return the item found
/**
The function is an analog of \ref cds_nonintrusive_MichaelHashSet_hp_get "get( guarded_ptr& ptr, Q const&)"
but \p pred is used for comparing the keys.
\p pred must imply the same element order as the comparator used for building the set.
*/
template <typename Q, typename Less>
- bool get_with( guarded_ptr& ptr, Q const& val, Less pred )
+ bool get_with( guarded_ptr& ptr, Q const& key, Less pred )
{
- return bucket( val ).get_with( ptr, val, pred );
+ return bucket( key ).get_with( ptr, key, pred );
}
/// Clears the set (non-atomic)
/** @ingroup cds_nonintrusive_set
\anchor cds_nonintrusive_MichaelHashSet_nogc
- This specialization is intended for so-called persistent usage when no item
+ This specialization is so-called append-only when no item
reclamation may be performed. The class does not support deleting of list item.
See \ref cds_nonintrusive_MichaelHashSet_hp "MichaelHashSet" for description of template parameters.
- The template parameter \p OrderedList should be any gc::nogc-derived ordered list, for example,
- \ref cds_nonintrusive_MichaelList_nogc "persistent MichaelList".
-
- The interface of the specialization is a slightly different.
+ The template parameter \p OrderedList should be any \p gc::nogc -derived ordered list, for example,
+ \ref cds_nonintrusive_MichaelList_nogc "append-only MichaelList".
*/
template <
class OrderedList,
#ifdef CDS_DOXYGEN_INVOKED
- class Traits = michael_set::type_traits
+ class Traits = michael_set::traits
#else
class Traits
#endif
>
- class MichaelHashSet< gc::nogc, OrderedList, Traits >
+ class MichaelHashSet< cds::gc::nogc, OrderedList, Traits >
{
public:
- typedef OrderedList bucket_type ; ///< type of ordered list used as a bucket implementation
- typedef Traits options ; ///< Traits template parameters
+ typedef cds::gc::nogc gc; ///< Garbage collector
+ typedef OrderedList bucket_type; ///< type of ordered list to be used as a bucket implementation
+ typedef Traits traits; ///< Set traits
- typedef typename bucket_type::value_type value_type ; ///< type of value stored in the list
- typedef gc::nogc gc ; ///< Garbage collector
- typedef typename bucket_type::key_comparator key_comparator ; ///< key comparison functor
+ typedef typename bucket_type::value_type value_type; ///< type of value stored in the list
+ typedef typename bucket_type::key_comparator key_comparator; ///< key comparison functor
/// Hash functor for \ref value_type and all its derivatives that you use
- typedef typename cds::opt::v::hash_selector< typename options::hash >::type hash;
- typedef typename options::item_counter item_counter ; ///< Item counter type
+ typedef typename cds::opt::v::hash_selector< typename traits::hash >::type hash;
+ typedef typename traits::item_counter item_counter; ///< Item counter type
/// Bucket table allocator
- typedef cds::details::Allocator< bucket_type, typename options::allocator > bucket_table_allocator;
+ typedef cds::details::Allocator< bucket_type, typename traits::allocator > bucket_table_allocator;
protected:
//@cond
- typedef typename bucket_type::iterator bucket_iterator;
- typedef typename bucket_type::const_iterator bucket_const_iterator;
+ typedef typename bucket_type::iterator bucket_iterator;
+ typedef typename bucket_type::const_iterator bucket_const_iterator;
//@endcond
protected:
- item_counter m_ItemCounter ; ///< Item counter
- hash m_HashFunctor ; ///< Hash functor
-
- bucket_type * m_Buckets ; ///< bucket table
+ item_counter m_ItemCounter; ///< Item counter
+ hash m_HashFunctor; ///< Hash functor
+ bucket_type * m_Buckets; ///< bucket table
private:
//@cond
//@endcond
protected:
+ //@cond
/// Calculates hash value of \p key
template <typename Q>
size_t hash_value( const Q& key ) const
{
return m_Buckets[ hash_value( key ) ];
}
+ //@endcond
public:
/// Forward iterator
//@}
private:
- //@{
+ //@cond
const_iterator get_const_begin() const
{
return const_iterator( const_cast<bucket_type const&>(m_Buckets[0]).begin(), m_Buckets, m_Buckets + bucket_count() );
{
return const_iterator( const_cast<bucket_type const&>(m_Buckets[bucket_count() - 1]).end(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count() );
}
- //@}
+ //@endcond
public:
/// Initialize hash set
- /**
- See \ref cds_nonintrusive_MichaelHashSet_hp "MichaelHashSet" ctor for explanation
+ /** @copydetails cds_nonintrusive_MichaelHashSet_hp_ctor
*/
MichaelHashSet(
size_t nMaxItemCount, ///< estimation of max item count in the hash set
) : m_nHashBitmask( michael_set::details::init_hash_bitmask( nMaxItemCount, nLoadFactor ))
{
// GC and OrderedList::gc must be the same
- static_assert(( std::is_same<gc, typename bucket_type::gc>::value ), "GC and OrderedList::gc must be the same");
+ static_assert( std::is_same<gc, typename bucket_type::gc>::value, "GC and OrderedList::gc must be the same");
// atomicity::empty_item_counter is not allowed as a item counter
- static_assert(( !std::is_same<item_counter, atomicity::empty_item_counter>::value ), "atomicity::empty_item_counter is not allowed as a item counter");
+ static_assert( !std::is_same<item_counter, atomicity::empty_item_counter>::value,
+ "cds::atomicity::empty_item_counter is not allowed as a item counter");
m_Buckets = bucket_table_allocator().NewArray( bucket_count() );
}
- /// Clear hash set and destroy it
+ /// Clears hash set and destroys it
~MichaelHashSet()
{
clear();
The operation inserts new item if the key \p val is not found in the set.
Otherwise, the function returns an iterator that points to item found.
- Returns <tt> std::pair<iterator, bool> </tt> where \p first is an iterator pointing to
+ Returns <tt> std::pair<iterator, bool> </tt> where \p first is an iterator pointing to
item found or inserted, \p second is true if new item has been added or \p false if the item
already is in the set.
+
+ @warning For \ref cds_nonintrusive_MichaelList_nogc "MichaelList" as the bucket see \ref cds_intrusive_item_creating "insert item troubleshooting".
+ \ref cds_nonintrusive_LazyList_nogc "LazyList" provides exclusive access to inserted item and does not require any node-level
+ synchronization.
*/
template <typename Q>
std::pair<iterator, bool> ensure( const Q& val )
return end();
}
-
- /// Clears the set (non-atomic, not thread-safe)
- /**
- The function deletes all items from the set.
- The function is not atomic and even not thread-safe.
- It cleans up each bucket and then resets the item counter to zero.
- If there are a thread that performs insertion while \p clear is working the result is undefined in general case:
- <tt> empty() </tt> may return \p true but the set may contain item(s).
- */
+ /// Clears the set (not atomic)
void clear()
{
for ( size_t i = 0; i < bucket_count(); ++i )
m_ItemCounter.reset();
}
-
/// Checks if the set is empty
/**
- Emptiness is checked by item counting: if item count is zero then the set is empty.
+ The emptiness is checked by the item counting: if item count is zero then the set is empty.
Thus, the correct item counting feature is an important part of Michael's set implementation.
*/
bool empty() const
/// Returns the size of hash table
/**
- Since MichaelHashSet cannot dynamically extend the hash table size,
+ Since \p %MichaelHashSet cannot dynamically extend the hash table size,
the value returned is an constant depending on object initialization parameters;
see MichaelHashSet::MichaelHashSet for explanation.
*/
Template parameters are:
- \p RCU - one of \ref cds_urcu_gc "RCU type"
- - \p OrderedList - ordered list implementation used as bucket for hash set, for example, MichaelList.
+ - \p OrderedList - ordered list implementation used as the bucket for hash set, for example,
+ \ref cds_nonintrusive_MichaelList_rcu "MichaelList".
The ordered list implementation specifies the type \p T stored in the hash-set,
the comparison functor for the type \p T and other features specific for
the ordered list.
- - \p Traits - type traits. See michael_set::type_traits for explanation.
+ - \p Traits - set traits, default is michael_set::traits.
+ Instead of defining \p Traits struct you may use option-based syntax with michael_set::make_traits metafunction.
- Instead of defining \p Traits struct you may use option-based syntax with michael_set::make_traits metafunction.
- For michael_set::make_traits the following option may be used:
- - opt::hash - mandatory option, specifies hash functor.
- - opt::item_counter - optional, specifies item counting policy. See michael_set::type_traits for explanation.
- - opt::allocator - optional, bucket table allocator. Default is \ref CDS_DEFAULT_ALLOCATOR.
-
- \note About hash functor see \ref cds_nonintrusive_MichaelHashSet_hash_functor "MichaelSet".
+ About hash functor see \ref cds_nonintrusive_MichaelHashSet_hash_functor "MichaelSet hash functor".
<b>How to use</b>
- Suppose, we have the following type \p Foo that we want to store in our MichaelHashSet:
+ Suppose, we have the following type \p Foo that we want to store in your \p %MichaelHashSet:
\code
struct Foo {
int nKey ; // key field
}
};
- // Our ordered list
+ // Ordered list
typedef cc::MichaelList< cds::urcu::gc< cds::urcu::general_buffered<> >, Foo,
typename cc::michael_list::make_traits<
cc::opt::compare< Foo_cmp > // item comparator option
}
};
- // Declare set type.
+ // Declare the set
// Note that \p RCU template parameter of ordered list must be equal \p RCU for the set.
typedef cc::MichaelHashSet< cds::urcu::gc< cds::urcu::general_buffered<> >, bucket_list,
cc::michael_set::make_traits<
>::type
> foo_set;
- // Set variable
foo_set fooSet;
\endcode
*/
class RCU,
class OrderedList,
#ifdef CDS_DOXYGEN_INVOKED
- class Traits = michael_set::type_traits
+ class Traits = michael_set::traits
#else
class Traits
#endif
class MichaelHashSet< cds::urcu::gc< RCU >, OrderedList, Traits >
{
public:
- typedef OrderedList bucket_type ; ///< type of ordered list used as a bucket implementation
- typedef Traits options ; ///< Traits template parameters
+ typedef cds::urcu::gc< RCU > gc; ///< RCU used as garbage collector
+ typedef OrderedList bucket_type; ///< type of ordered list to be used as a bucket implementation
+ typedef Traits traits; ///< Set traits
- typedef typename bucket_type::value_type value_type ; ///< type of value stored in the list
- typedef cds::urcu::gc< RCU > gc ; ///< RCU used as garbage collector
- typedef typename bucket_type::key_comparator key_comparator ; ///< key comparing functor
+ typedef typename bucket_type::value_type value_type; ///< type of value to be stored in the list
+ typedef typename bucket_type::key_comparator key_comparator; ///< key comparing functor
/// Hash functor for \ref value_type and all its derivatives that you use
- typedef typename cds::opt::v::hash_selector< typename options::hash >::type hash;
- typedef typename options::item_counter item_counter ; ///< Item counter type
+ typedef typename cds::opt::v::hash_selector< typename traits::hash >::type hash;
+ typedef typename traits::item_counter item_counter; ///< Item counter type
/// Bucket table allocator
- typedef cds::details::Allocator< bucket_type, typename options::allocator > bucket_table_allocator;
+ typedef cds::details::Allocator< bucket_type, typename traits::allocator > bucket_table_allocator;
- typedef typename bucket_type::rcu_lock rcu_lock ; ///< RCU scoped lock
- typedef typename bucket_type::exempt_ptr exempt_ptr ; ///< pointer to extracted node
+ typedef typename bucket_type::rcu_lock rcu_lock; ///< RCU scoped lock
+ typedef typename bucket_type::exempt_ptr exempt_ptr; ///< pointer to extracted node
/// Group of \p extract_xxx functions require external locking if underlying ordered list requires that
static CDS_CONSTEXPR const bool c_bExtractLockExternal = bucket_type::c_bExtractLockExternal;
protected:
- item_counter m_ItemCounter ; ///< Item counter
- hash m_HashFunctor ; ///< Hash functor
-
- bucket_type * m_Buckets ; ///< bucket table
+ item_counter m_ItemCounter; ///< Item counter
+ hash m_HashFunctor; ///< Hash functor
+ bucket_type * m_Buckets; ///< bucket table
private:
//@cond
//@endcond
protected:
+ //@cond
/// Calculates hash value of \p key
template <typename Q>
size_t hash_value( Q const& key ) const
}
/// Returns the bucket (ordered list) for \p key
- //@{
template <typename Q>
bucket_type& bucket( Q const& key )
{
{
return m_Buckets[ hash_value( key ) ];
}
- //@}
+ //@endcond
public:
/// Forward iterator
/**
public:
/// Initialize hash set
- /**
- The Michael's hash set is non-expandable container. You should point the average count of items \p nMaxItemCount
- when you create an object.
- \p nLoadFactor parameter defines average count of items per bucket and it should be small number between 1 and 10.
- Remember, since the bucket implementation is an ordered list, searching in the bucket is linear [<tt>O(nLoadFactor)</tt>].
- Note, that many popular STL hash map implementation uses load factor 1.
-
- The ctor defines hash table size as rounding <tt>nMacItemCount / nLoadFactor</tt> up to nearest power of two.
+ /** @copydetails cds_nonintrusive_MichaelHashSet_hp_ctor
*/
MichaelHashSet(
size_t nMaxItemCount, ///< estimation of max item count in the hash set
) : m_nHashBitmask( michael_set::details::init_hash_bitmask( nMaxItemCount, nLoadFactor ))
{
// GC and OrderedList::gc must be the same
- static_assert(( std::is_same<gc, typename bucket_type::gc>::value ), "GC and OrderedList::gc must be the same");
+ static_assert( std::is_same<gc, typename bucket_type::gc>::value, "GC and OrderedList::gc must be the same");
// atomicity::empty_item_counter is not allowed as a item counter
- static_assert(( !std::is_same<item_counter, atomicity::empty_item_counter>::value ), "atomicity::empty_item_counter is not allowed as a item counter");
+ static_assert( !std::is_same<item_counter, atomicity::empty_item_counter>::value,
+ "atomicity::empty_item_counter is not allowed as a item counter");
m_Buckets = bucket_table_allocator().NewArray( bucket_count() );
}
- /// Clear hash set and destroy it
+ /// Clears hash set and destroys it
~MichaelHashSet()
{
clear();
\code
void func( value_type& val );
\endcode
- where \p val is the item inserted. User-defined functor \p f should guarantee that during changing
- \p val no any other changes could be made on this set's item by concurrent threads.
- The user-defined functor is called only if the inserting is success. It may be passed by reference
- using \p std::ref
+ where \p val is the item inserted.
+ The user-defined functor is called only if the inserting is success.
The function applies RCU lock internally.
- */
+
+ @warning For \ref cds_nonintrusive_MichaelList_rcu "MichaelList" as the bucket see \ref cds_intrusive_item_creating "insert item troubleshooting".
+ \ref cds_nonintrusive_LazyList_rcu "LazyList" provides exclusive access to inserted item and does not require any node-level
+ synchronization.
+ */
template <typename Q, typename Func>
bool insert( Q const& val, Func f )
{
If the \p val key not found in the set, then the new item created from \p val
is inserted into the set. Otherwise, the functor \p func is called with the item found.
- The functor \p Func should be a function with signature:
- \code
- void func( bool bNew, value_type& item, const Q& val );
- \endcode
- or a functor:
+ The functor \p Func signature is:
\code
struct my_functor {
void operator()( bool bNew, value_type& item, const Q& val );
- \p item - item of the set
- \p val - argument \p key passed into the \p ensure function
- The functor may change non-key fields of the \p item; however, \p func must guarantee
- that during changing no any other modifications could be made on this item by concurrent threads.
-
- You may pass \p func argument by reference using \p std::ref
+ The functor may change non-key fields of the \p item.
The function applies RCU lock internally.
Returns <tt> std::pair<bool, bool> </tt> where \p first is true if operation is successfull,
\p second is true if new item has been added or \p false if the item with \p key
already is in the set.
+
+ @warning For \ref cds_nonintrusive_MichaelList_rcu "MichaelList" as the bucket see \ref cds_intrusive_item_creating "insert item troubleshooting".
+ \ref cds_nonintrusive_LazyList_rcu "LazyList" provides exclusive access to inserted item and does not require any node-level
+ synchronization.
*/
template <typename Q, typename Func>
std::pair<bool, bool> ensure( const Q& val, Func func )
return bRet;
}
- /// Inserts data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
+ /// Inserts data of type \p value_type created from \p args
/**
Returns \p true if inserting successful, \p false otherwise.
/// Deletes \p key from the set
/** \anchor cds_nonintrusive_MichealSet_rcu_erase_val
- Since the key of MichaelHashSet's item type \ref value_type is not explicitly specified,
+ Since the key of MichaelHashSet's item type \p value_type is not explicitly specified,
template parameter \p Q defines the key type searching in the list.
The set item comparator should be able to compare the type \p value_type
and the type \p Q.
void operator()(value_type const& val);
};
\endcode
- The functor may be passed by reference using <tt>boost:ref</tt>
Since the key of %MichaelHashSet's \p value_type is not explicitly specified,
template parameter \p Q defines the key type searching in the list.
/// Extracts an item from the set
/** \anchor cds_nonintrusive_MichaelHashSet_rcu_extract
- The function searches an item with key equal to \p val in the set,
+ The function searches an item with key equal to \p key in the set,
unlinks it from the set, places item pointer into \p dest argument, and returns \p true.
- If the item with the key equal to \p val is not found the function return \p false.
+ If the item with the key equal to \p key is not found the function return \p false.
@note The function does NOT call RCU read-side lock or synchronization,
and does NOT dispose the item found. It just excludes the item from the set
\endcode
*/
template <typename Q>
- bool extract( exempt_ptr& dest, Q const& val )
+ bool extract( exempt_ptr& dest, Q const& key )
{
- if ( bucket( val ).extract( dest, val )) {
+ if ( bucket( key ).extract( dest, key )) {
--m_ItemCounter;
return true;
}
\p pred must imply the same element order as the comparator used for building the set.
*/
template <typename Q, typename Less>
- bool extract_with( exempt_ptr& dest, Q const& val, Less pred )
+ bool extract_with( exempt_ptr& dest, Q const& key, Less pred )
{
- if ( bucket( val ).extract_with( dest, val, pred )) {
+ if ( bucket( key ).extract_with( dest, key, pred )) {
--m_ItemCounter;
return true;
}
return false;
}
- /// Finds the key \p val
+ /// Finds the key \p key
/** \anchor cds_nonintrusive_MichealSet_rcu_find_func
- The function searches the item with key equal to \p val and calls the functor \p f for item found.
+ The function searches the item with key equal to \p key and calls the functor \p f for item found.
The interface of \p Func functor is:
\code
struct functor {
- void operator()( value_type& item, Q& val );
+ void operator()( value_type& item, Q& key );
};
\endcode
- where \p item is the item found, \p val is the <tt>find</tt> function argument.
-
- You may pass \p f argument by reference using \p std::ref.
+ where \p item is the item found, \p key is the <tt>find</tt> function argument.
The functor may change non-key fields of \p item. Note that the functor is only guarantee
that \p item cannot be disposed during functor is executing.
The functor does not serialize simultaneous access to the set's \p item. If such access is
possible you must provide your own synchronization schema on item level to exclude unsafe item modifications.
- The \p val argument is non-const since it can be used as \p f functor destination i.e., the functor
+ The \p key argument is non-const since it can be used as \p f functor destination i.e., the functor
can modify both arguments.
Note the hash functor specified for class \p Traits template parameter
The function applies RCU lock internally.
- The function returns \p true if \p val is found, \p false otherwise.
+ The function returns \p true if \p key is found, \p false otherwise.
*/
template <typename Q, typename Func>
- bool find( Q& val, Func f ) const
+ bool find( Q& key, Func f ) const
{
- return bucket( val ).find( val, f );
+ return bucket( key ).find( key, f );
}
- /// Finds the key \p val using \p pred predicate for searching
+ /// Finds the key \p key using \p pred predicate for searching
/**
The function is an analog of \ref cds_nonintrusive_MichealSet_rcu_find_func "find(Q&, Func)"
but \p pred is used for key comparing.
\p Less must imply the same element order as the comparator used for building the set.
*/
template <typename Q, typename Less, typename Func>
- bool find_with( Q& val, Less pred, Func f ) const
+ bool find_with( Q& key, Less pred, Func f ) const
{
- return bucket( val ).find_with( val, pred, f );
+ return bucket( key ).find_with( key, pred, f );
}
- /// Finds the key \p val
- /** \anchor cds_nonintrusive_MichealSet_rcu_find_cfunc
-
- The function searches the item with key equal to \p val and calls the functor \p f for item found.
- The interface of \p Func functor is:
- \code
- struct functor {
- void operator()( value_type& item, Q const& val );
- };
- \endcode
- where \p item is the item found, \p val is the <tt>find</tt> function argument.
-
- You may pass \p f argument by reference using \p std::ref.
-
- The functor may change non-key fields of \p item. Note that the functor is only guarantee
- that \p item cannot be disposed during functor is executing.
- The functor does not serialize simultaneous access to the set's \p item. If such access is
- possible you must provide your own synchronization schema on item level to exclude unsafe item modifications.
-
- Note the hash functor specified for class \p Traits template parameter
- should accept a parameter of type \p Q that may be not the same as \p value_type.
-
- The function applies RCU lock internally.
-
- The function returns \p true if \p val is found, \p false otherwise.
- */
- template <typename Q, typename Func>
- bool find( Q const& val, Func f ) const
- {
- return bucket( val ).find( val, f );
- }
-
- /// Finds the key \p val using \p pred predicate for searching
- /**
- The function is an analog of \ref cds_nonintrusive_MichealSet_rcu_find_cfunc "find(Q const&, Func)"
- but \p pred is used for key comparing.
- \p Less functor has the interface like \p std::less.
- \p Less must imply the same element order as the comparator used for building the set.
- */
- template <typename Q, typename Less, typename Func>
- bool find_with( Q const& val, Less pred, Func f ) const
- {
- return bucket( val ).find_with( val, pred, f );
- }
-
- /// Finds the key \p val
+ /// Finds the key \p key
/** \anchor cds_nonintrusive_MichealSet_rcu_find_val
- The function searches the item with key equal to \p val
+ The function searches the item with key equal to \p key
and returns \p true if it is found, and \p false otherwise.
Note the hash functor specified for class \p Traits template parameter
- should accept a parameter of type \p Q that may be not the same as \ref value_type.
+ should accept a parameter of type \p Q that may be not the same as \p value_type.
*/
template <typename Q>
- bool find( Q const & val ) const
+ bool find( Q const & key ) const
{
- return bucket( val ).find( val );
+ return bucket( key ).find( key );
}
- /// Finds the key \p val using \p pred predicate for searching
+ /// Finds the key \p key using \p pred predicate for searching
/**
The function is an analog of \ref cds_nonintrusive_MichealSet_rcu_find_val "find(Q const&)"
but \p pred is used for key comparing.
\p Less must imply the same element order as the comparator used for building the set.
*/
template <typename Q, typename Less>
- bool find_with( Q const & val, Less pred ) const
+ bool find_with( Q const & key, Less pred ) const
{
- return bucket( val ).find_with( val, pred );
+ return bucket( key ).find_with( key, pred );
}
- /// Finds the key \p val and return the item found
+ /// Finds the key \p key and return the item found
/** \anchor cds_nonintrusive_MichaelHashSet_rcu_get
- The function searches the item with key equal to \p val and returns the pointer to item found.
- If \p val is not found it returns \p nullptr.
+ The function searches the item with key equal to \p key and returns the pointer to item found.
+ If \p key is not found it returns \p nullptr.
Note the compare functor should accept a parameter of type \p Q that can be not the same as \p value_type.
\endcode
*/
template <typename Q>
- value_type * get( Q const& val ) const
+ value_type * get( Q const& key ) const
{
- return bucket( val ).get( val );
+ return bucket( key ).get( key );
}
- /// Finds the key \p val and return the item found
+ /// Finds the key \p key and return the item found
/**
The function is an analog of \ref cds_nonintrusive_MichaelHashSet_rcu_get "get(Q const&)"
but \p pred is used for comparing the keys.
\p pred must imply the same element order as the comparator used for building the set.
*/
template <typename Q, typename Less>
- value_type * get_with( Q const& val, Less pred ) const
+ value_type * get_with( Q const& key, Less pred ) const
{
- return bucket( val ).get_with( val, pred );
+ return bucket( key ).get_with( key, pred );
}
- /// Clears the set (non-atomic)
- /**
- The function erases all items from the set.
-
- The function is not atomic. It cleans up each bucket and then resets the item counter to zero.
- If there are a thread that performs insertion while \p clear is working the result is undefined in general case:
- <tt> empty() </tt> may return \p true but the set may contain item(s).
- Therefore, \p clear may be used only for debugging purposes.
-
- RCU \p synchronize method can be called. RCU should not be locked.
- */
+ /// Clears the set (not atomic)
void clear()
{
for ( size_t i = 0; i < bucket_count(); ++i )
/// Returns the size of hash table
/**
- Since MichaelHashSet cannot dynamically extend the hash table size,
+ Since \p %MichaelHashSet cannot dynamically extend the hash table size,
the value returned is an constant depending on object initialization parameters;
see MichaelHashSet::MichaelHashSet for explanation.
*/
}} // namespace cds::container
-#endif // ifndef __CDS_CONTAINER_MICHAEL_SET_H
+#endif // ifndef __CDS_CONTAINER_MICHAEL_SET_RCU_H
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_shb_lazy.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_sht.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_splitlist_set_rcu_sht_lazy.cpp" />\r
+ <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_dhp.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_hp.cpp" />\r
+ <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_dhp.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_hp.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_nogc.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_ptb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_rcu_gpb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_rcu_gpi.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_rcu_gpt.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_rcu_shb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_rcu_sht.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_nogc.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_ptb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_rcu_gpb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_rcu_gpi.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_rcu_gpt.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_nogc.cpp">\r
<Filter>container\michael_set</Filter>\r
</ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_ptb.cpp">\r
- <Filter>container\michael_set</Filter>\r
- </ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_rcu_gpb.cpp">\r
- <Filter>container\michael_set</Filter>\r
- </ClCompile>\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_rcu_gpi.cpp">\r
<Filter>container\michael_set</Filter>\r
</ClCompile>\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_nogc.cpp">\r
<Filter>container\michael_set</Filter>\r
</ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_ptb.cpp">\r
- <Filter>container\michael_set</Filter>\r
- </ClCompile>\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_rcu_gpb.cpp">\r
<Filter>container\michael_set</Filter>\r
</ClCompile>\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_dhp_lazy.cpp">\r
<Filter>intrusive\michael_set</Filter>\r
</ClCompile>\r
+ <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_dhp.cpp">\r
+ <Filter>container\michael_set</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_dhp.cpp">\r
+ <Filter>container\michael_set</Filter>\r
+ </ClCompile>\r
+ <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_lazy_rcu_gpb.cpp">\r
+ <Filter>container\michael_set</Filter>\r
+ </ClCompile>\r
</ItemGroup>\r
</Project>
\ No newline at end of file
--- /dev/null
+//$$CDS-header$$
+
+#include "set/hdr_set.h"
+#include <cds/container/michael_list_dhp.h>
+#include <cds/container/michael_set.h>
+
+namespace set {
+
+ namespace {
+ struct set_traits: public cc::michael_set::traits
+ {
+ typedef HashSetHdrTest::hash_int hash;
+ typedef HashSetHdrTest::simple_item_counter item_counter;
+ };
+
+ struct DHP_cmp_traits: public cc::michael_list::traits
+ {
+ typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
+ };
+
+ struct DHP_less_traits: public cc::michael_list::traits
+ {
+ typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
+ };
+
+ struct DHP_cmpmix_traits: public cc::michael_list::traits
+ {
+ typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
+ typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
+ };
+ }
+
+ void HashSetHdrTest::Michael_DHP_cmp()
+ {
+ typedef cc::MichaelList< cds::gc::DHP, item, DHP_cmp_traits > list;
+
+ // traits-based version
+ typedef cc::MichaelHashSet< cds::gc::DHP, list, set_traits > set;
+ test_int< set >();
+
+ // option-based version
+ typedef cc::MichaelHashSet< cds::gc::DHP, list,
+ cc::michael_set::make_traits<
+ cc::opt::hash< hash_int >
+ ,cc::opt::item_counter< simple_item_counter >
+ >::type
+ > opt_set;
+ test_int< opt_set >();
+ }
+
+ void HashSetHdrTest::Michael_DHP_less()
+ {
+ typedef cc::MichaelList< cds::gc::DHP, item, DHP_less_traits > list;
+
+ // traits-based version
+ typedef cc::MichaelHashSet< cds::gc::DHP, list, set_traits > set;
+ test_int< set >();
+
+ // option-based version
+ typedef cc::MichaelHashSet< cds::gc::DHP, list,
+ cc::michael_set::make_traits<
+ cc::opt::hash< hash_int >
+ ,cc::opt::item_counter< simple_item_counter >
+ >::type
+ > opt_set;
+ test_int< opt_set >();
+ }
+
+ void HashSetHdrTest::Michael_DHP_cmpmix()
+ {
+ typedef cc::MichaelList< cds::gc::DHP, item, DHP_cmpmix_traits > list;
+
+ // traits-based version
+ typedef cc::MichaelHashSet< cds::gc::DHP, list, set_traits > set;
+ test_int< set >();
+
+ // option-based version
+ typedef cc::MichaelHashSet< cds::gc::DHP, list,
+ cc::michael_set::make_traits<
+ cc::opt::hash< hash_int >
+ ,cc::opt::item_counter< simple_item_counter >
+ >::type
+ > opt_set;
+ test_int< opt_set >();
+ }
+
+
+} // namespace set
namespace set {
namespace {
- struct set_traits: public cc::michael_set::type_traits
+ struct set_traits: public cc::michael_set::traits
{
typedef HashSetHdrTest::hash_int hash;
typedef HashSetHdrTest::simple_item_counter item_counter;
};
- struct HP_cmp_traits: public cc::michael_list::type_traits
+ struct HP_cmp_traits: public cc::michael_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
};
- struct HP_less_traits: public cc::michael_list::type_traits
+ struct HP_less_traits: public cc::michael_list::traits
{
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
};
- struct HP_cmpmix_traits: public cc::michael_list::type_traits
+ struct HP_cmpmix_traits: public cc::michael_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
--- /dev/null
+//$$CDS-header$$
+
+#include "set/hdr_set.h"
+#include <cds/container/lazy_list_dhp.h>
+#include <cds/container/michael_set.h>
+
+namespace set {
+
+ namespace {
+ struct set_traits: public cc::michael_set::traits
+ {
+ typedef HashSetHdrTest::hash_int hash;
+ typedef HashSetHdrTest::simple_item_counter item_counter;
+ };
+
+ struct DHP_cmp_traits: public cc::lazy_list::traits
+ {
+ typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
+ };
+
+ struct DHP_less_traits: public cc::lazy_list::traits
+ {
+ typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
+ };
+
+ struct DHP_cmpmix_traits: public cc::lazy_list::traits
+ {
+ typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
+ typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
+ };
+ }
+
+ void HashSetHdrTest::Lazy_DHP_cmp()
+ {
+ typedef cc::LazyList< cds::gc::DHP, item, DHP_cmp_traits > list;
+
+ // traits-based version
+ typedef cc::MichaelHashSet< cds::gc::DHP, list, set_traits > set;
+ test_int< set >();
+
+ // option-based version
+ typedef cc::MichaelHashSet< cds::gc::DHP, list,
+ cc::michael_set::make_traits<
+ cc::opt::hash< hash_int >
+ ,cc::opt::item_counter< simple_item_counter >
+ >::type
+ > opt_set;
+ test_int< opt_set >();
+ }
+
+ void HashSetHdrTest::Lazy_DHP_less()
+ {
+ typedef cc::LazyList< cds::gc::DHP, item, DHP_less_traits > list;
+
+ // traits-based version
+ typedef cc::MichaelHashSet< cds::gc::DHP, list, set_traits > set;
+ test_int< set >();
+
+ // option-based version
+ typedef cc::MichaelHashSet< cds::gc::DHP, list,
+ cc::michael_set::make_traits<
+ cc::opt::hash< hash_int >
+ ,cc::opt::item_counter< simple_item_counter >
+ >::type
+ > opt_set;
+ test_int< opt_set >();
+ }
+
+ void HashSetHdrTest::Lazy_DHP_cmpmix()
+ {
+ typedef cc::LazyList< cds::gc::DHP, item, DHP_cmpmix_traits > list;
+
+ // traits-based version
+ typedef cc::MichaelHashSet< cds::gc::DHP, list, set_traits > set;
+ test_int< set >();
+
+ // option-based version
+ typedef cc::MichaelHashSet< cds::gc::DHP, list,
+ cc::michael_set::make_traits<
+ cc::opt::hash< hash_int >
+ ,cc::opt::item_counter< simple_item_counter >
+ >::type
+ > opt_set;
+ test_int< opt_set >();
+ }
+
+
+} // namespace set
namespace set {
namespace {
- struct set_traits: public cc::michael_set::type_traits
+ struct set_traits: public cc::michael_set::traits
{
typedef HashSetHdrTest::hash_int hash;
typedef HashSetHdrTest::simple_item_counter item_counter;
};
- struct HP_cmp_traits: public cc::lazy_list::type_traits
+ struct HP_cmp_traits: public cc::lazy_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
};
- struct HP_less_traits: public cc::lazy_list::type_traits
+ struct HP_less_traits: public cc::lazy_list::traits
{
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
};
- struct HP_cmpmix_traits: public cc::lazy_list::type_traits
+ struct HP_cmpmix_traits: public cc::lazy_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
namespace set {
namespace {
- struct set_traits: public cc::michael_set::type_traits
+ struct set_traits: public cc::michael_set::traits
{
typedef HashSetHdrTest::hash_int hash;
typedef HashSetHdrTest::simple_item_counter item_counter;
};
- struct nogc_cmp_traits: public cc::lazy_list::type_traits
+ struct nogc_cmp_traits: public cc::lazy_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
};
- struct nogc_less_traits: public cc::lazy_list::type_traits
+ struct nogc_less_traits: public cc::lazy_list::traits
{
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
};
- struct nogc_cmpmix_traits: public cc::lazy_list::type_traits
+ struct nogc_cmpmix_traits: public cc::lazy_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
+++ /dev/null
-//$$CDS-header$$
-
-#include "set/hdr_set.h"
-#include <cds/container/lazy_list_dhp.h>
-#include <cds/container/michael_set.h>
-
-namespace set {
-
- namespace {
- struct set_traits: public cc::michael_set::type_traits
- {
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- };
-
- struct PTB_cmp_traits: public cc::lazy_list::type_traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
-
- struct PTB_less_traits: public cc::lazy_list::type_traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
-
- struct PTB_cmpmix_traits: public cc::lazy_list::type_traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- }
-
- void HashSetHdrTest::Lazy_PTB_cmp()
- {
- typedef cc::LazyList< cds::gc::PTB, item, PTB_cmp_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::PTB, list, set_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::PTB, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Lazy_PTB_less()
- {
- typedef cc::LazyList< cds::gc::PTB, item, PTB_less_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::PTB, list, set_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::PTB, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Lazy_PTB_cmpmix()
- {
- typedef cc::LazyList< cds::gc::PTB, item, PTB_cmpmix_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::PTB, list, set_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::PTB, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
-
-} // namespace set
namespace {
typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type;
- struct set_traits: public cc::michael_set::type_traits
+ struct set_traits: public cc::michael_set::traits
{
typedef HashSetHdrTest::hash_int hash;
typedef HashSetHdrTest::simple_item_counter item_counter;
};
- struct RCU_GPB_cmp_traits: public cc::lazy_list::type_traits
+ struct RCU_GPB_cmp_traits: public cc::lazy_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
};
- struct RCU_GPB_less_traits: public cc::lazy_list::type_traits
+ struct RCU_GPB_less_traits: public cc::lazy_list::traits
{
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
};
- struct RCU_GPB_cmpmix_traits: public cc::lazy_list::type_traits
+ struct RCU_GPB_cmpmix_traits: public cc::lazy_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
namespace {
typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type;
- struct set_traits: public cc::michael_set::type_traits
+ struct set_traits: public cc::michael_set::traits
{
typedef HashSetHdrTest::hash_int hash;
typedef HashSetHdrTest::simple_item_counter item_counter;
};
- struct RCU_GPI_cmp_traits: public cc::lazy_list::type_traits
+ struct RCU_GPI_cmp_traits: public cc::lazy_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
};
- struct RCU_GPI_less_traits: public cc::lazy_list::type_traits
+ struct RCU_GPI_less_traits: public cc::lazy_list::traits
{
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
};
- struct RCU_GPI_cmpmix_traits: public cc::lazy_list::type_traits
+ struct RCU_GPI_cmpmix_traits: public cc::lazy_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
namespace {
typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type;
- struct set_traits: public cc::michael_set::type_traits
+ struct set_traits: public cc::michael_set::traits
{
typedef HashSetHdrTest::hash_int hash;
typedef HashSetHdrTest::simple_item_counter item_counter;
};
- struct RCU_GPT_cmp_traits: public cc::lazy_list::type_traits
+ struct RCU_GPT_cmp_traits: public cc::lazy_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
};
- struct RCU_GPT_less_traits: public cc::lazy_list::type_traits
+ struct RCU_GPT_less_traits: public cc::lazy_list::traits
{
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
};
- struct RCU_GPT_cmpmix_traits: public cc::lazy_list::type_traits
+ struct RCU_GPT_cmpmix_traits: public cc::lazy_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
namespace {
typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type;
- struct set_traits: public cc::michael_set::type_traits
+ struct set_traits: public cc::michael_set::traits
{
typedef HashSetHdrTest::hash_int hash;
typedef HashSetHdrTest::simple_item_counter item_counter;
};
- struct RCU_SHB_cmp_traits: public cc::lazy_list::type_traits
+ struct RCU_SHB_cmp_traits: public cc::lazy_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
};
- struct RCU_SHB_less_traits: public cc::lazy_list::type_traits
+ struct RCU_SHB_less_traits: public cc::lazy_list::traits
{
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
};
- struct RCU_SHB_cmpmix_traits: public cc::lazy_list::type_traits
+ struct RCU_SHB_cmpmix_traits: public cc::lazy_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
namespace {
typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type;
- struct set_traits: public cc::michael_set::type_traits
+ struct set_traits: public cc::michael_set::traits
{
typedef HashSetHdrTest::hash_int hash;
typedef HashSetHdrTest::simple_item_counter item_counter;
};
- struct RCU_SHT_cmp_traits: public cc::lazy_list::type_traits
+ struct RCU_SHT_cmp_traits: public cc::lazy_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
};
- struct RCU_SHT_less_traits: public cc::lazy_list::type_traits
+ struct RCU_SHT_less_traits: public cc::lazy_list::traits
{
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
};
- struct RCU_SHT_cmpmix_traits: public cc::lazy_list::type_traits
+ struct RCU_SHT_cmpmix_traits: public cc::lazy_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
namespace set {
namespace {
- struct set_traits: public cc::michael_set::type_traits
+ struct set_traits: public cc::michael_set::traits
{
typedef HashSetHdrTest::hash_int hash;
typedef HashSetHdrTest::simple_item_counter item_counter;
};
- struct nogc_cmp_traits: public cc::michael_list::type_traits
+ struct nogc_cmp_traits: public cc::michael_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
};
- struct nogc_less_traits: public cc::michael_list::type_traits
+ struct nogc_less_traits: public cc::michael_list::traits
{
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
};
- struct nogc_cmpmix_traits: public cc::michael_list::type_traits
+ struct nogc_cmpmix_traits: public cc::michael_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
+++ /dev/null
-//$$CDS-header$$
-
-#include "set/hdr_set.h"
-#include <cds/container/michael_list_dhp.h>
-#include <cds/container/michael_set.h>
-
-namespace set {
-
- namespace {
- struct set_traits: public cc::michael_set::type_traits
- {
- typedef HashSetHdrTest::hash_int hash;
- typedef HashSetHdrTest::simple_item_counter item_counter;
- };
-
- struct PTB_cmp_traits: public cc::michael_list::type_traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- };
-
- struct PTB_less_traits: public cc::michael_list::type_traits
- {
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
-
- struct PTB_cmpmix_traits: public cc::michael_list::type_traits
- {
- typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
- typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
- };
- }
-
- void HashSetHdrTest::Michael_PTB_cmp()
- {
- typedef cc::MichaelList< cds::gc::PTB, item, PTB_cmp_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::PTB, list, set_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::PTB, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Michael_PTB_less()
- {
- typedef cc::MichaelList< cds::gc::PTB, item, PTB_less_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::PTB, list, set_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::PTB, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
- void HashSetHdrTest::Michael_PTB_cmpmix()
- {
- typedef cc::MichaelList< cds::gc::PTB, item, PTB_cmpmix_traits > list;
-
- // traits-based version
- typedef cc::MichaelHashSet< cds::gc::PTB, list, set_traits > set;
- test_int< set >();
-
- // option-based version
- typedef cc::MichaelHashSet< cds::gc::PTB, list,
- cc::michael_set::make_traits<
- cc::opt::hash< hash_int >
- ,cc::opt::item_counter< simple_item_counter >
- >::type
- > opt_set;
- test_int< opt_set >();
- }
-
-
-} // namespace set
namespace {
typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type;
- struct set_traits: public cc::michael_set::type_traits
+ struct set_traits: public cc::michael_set::traits
{
typedef HashSetHdrTest::hash_int hash;
typedef HashSetHdrTest::simple_item_counter item_counter;
};
- struct RCU_GPB_cmp_traits: public cc::michael_list::type_traits
+ struct RCU_GPB_cmp_traits: public cc::michael_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
};
- struct RCU_GPB_less_traits: public cc::michael_list::type_traits
+ struct RCU_GPB_less_traits: public cc::michael_list::traits
{
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
};
- struct RCU_GPB_cmpmix_traits: public cc::michael_list::type_traits
+ struct RCU_GPB_cmpmix_traits: public cc::michael_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
namespace {
typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type;
- struct set_traits: public cc::michael_set::type_traits
+ struct set_traits: public cc::michael_set::traits
{
typedef HashSetHdrTest::hash_int hash;
typedef HashSetHdrTest::simple_item_counter item_counter;
};
- struct RCU_GPI_cmp_traits: public cc::michael_list::type_traits
+ struct RCU_GPI_cmp_traits: public cc::michael_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
};
- struct RCU_GPI_less_traits: public cc::michael_list::type_traits
+ struct RCU_GPI_less_traits: public cc::michael_list::traits
{
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
};
- struct RCU_GPI_cmpmix_traits: public cc::michael_list::type_traits
+ struct RCU_GPI_cmpmix_traits: public cc::michael_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
namespace {
typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type;
- struct set_traits: public cc::michael_set::type_traits
+ struct set_traits: public cc::michael_set::traits
{
typedef HashSetHdrTest::hash_int hash;
typedef HashSetHdrTest::simple_item_counter item_counter;
};
- struct RCU_GPT_cmp_traits: public cc::michael_list::type_traits
+ struct RCU_GPT_cmp_traits: public cc::michael_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
};
- struct RCU_GPT_less_traits: public cc::michael_list::type_traits
+ struct RCU_GPT_less_traits: public cc::michael_list::traits
{
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
};
- struct RCU_GPT_cmpmix_traits: public cc::michael_list::type_traits
+ struct RCU_GPT_cmpmix_traits: public cc::michael_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
namespace {
typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type;
- struct set_traits: public cc::michael_set::type_traits
+ struct set_traits: public cc::michael_set::traits
{
typedef HashSetHdrTest::hash_int hash;
typedef HashSetHdrTest::simple_item_counter item_counter;
};
- struct RCU_SHB_cmp_traits: public cc::michael_list::type_traits
+ struct RCU_SHB_cmp_traits: public cc::michael_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
};
- struct RCU_SHB_less_traits: public cc::michael_list::type_traits
+ struct RCU_SHB_less_traits: public cc::michael_list::traits
{
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
};
- struct RCU_SHB_cmpmix_traits: public cc::michael_list::type_traits
+ struct RCU_SHB_cmpmix_traits: public cc::michael_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
namespace {
typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type;
- struct set_traits: public cc::michael_set::type_traits
+ struct set_traits: public cc::michael_set::traits
{
typedef HashSetHdrTest::hash_int hash;
typedef HashSetHdrTest::simple_item_counter item_counter;
};
- struct RCU_SHT_cmp_traits: public cc::michael_list::type_traits
+ struct RCU_SHT_cmp_traits: public cc::michael_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
};
- struct RCU_SHT_less_traits: public cc::michael_list::type_traits
+ struct RCU_SHT_less_traits: public cc::michael_list::traits
{
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
};
- struct RCU_SHT_cmpmix_traits: public cc::michael_list::type_traits
+ struct RCU_SHT_cmpmix_traits: public cc::michael_list::traits
{
typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
void Michael_HP_less();
void Michael_HP_cmpmix();
- void Michael_PTB_cmp();
- void Michael_PTB_less();
- void Michael_PTB_cmpmix();
+ void Michael_DHP_cmp();
+ void Michael_DHP_less();
+ void Michael_DHP_cmpmix();
void Michael_RCU_GPI_cmp();
void Michael_RCU_GPI_less();
void Lazy_HP_less();
void Lazy_HP_cmpmix();
- void Lazy_PTB_cmp();
- void Lazy_PTB_less();
- void Lazy_PTB_cmpmix();
+ void Lazy_DHP_cmp();
+ void Lazy_DHP_less();
+ void Lazy_DHP_cmpmix();
void Lazy_RCU_GPI_cmp();
void Lazy_RCU_GPI_less();
CPPUNIT_TEST(Michael_HP_less)
CPPUNIT_TEST(Michael_HP_cmpmix)
- CPPUNIT_TEST(Michael_PTB_cmp)
- CPPUNIT_TEST(Michael_PTB_less)
- CPPUNIT_TEST(Michael_PTB_cmpmix)
+ CPPUNIT_TEST(Michael_DHP_cmp)
+ CPPUNIT_TEST(Michael_DHP_less)
+ CPPUNIT_TEST(Michael_DHP_cmpmix)
CPPUNIT_TEST(Michael_RCU_GPI_cmp)
CPPUNIT_TEST(Michael_RCU_GPI_less)
CPPUNIT_TEST(Lazy_HP_less)
CPPUNIT_TEST(Lazy_HP_cmpmix)
- CPPUNIT_TEST(Lazy_PTB_cmp)
- CPPUNIT_TEST(Lazy_PTB_less)
- CPPUNIT_TEST(Lazy_PTB_cmpmix)
+ CPPUNIT_TEST(Lazy_DHP_cmp)
+ CPPUNIT_TEST(Lazy_DHP_less)
+ CPPUNIT_TEST(Lazy_DHP_cmpmix)
CPPUNIT_TEST(Lazy_RCU_GPI_cmp)
CPPUNIT_TEST(Lazy_RCU_GPI_less)