Like STL map class, %SkipListMap stores its key-value pair as <tt>std:pair< K const, T></tt>.
\warning The skip-list requires up to 67 hazard pointers that may be critical for some GCs for which
- the guard count is limited (like as gc::HP, gc::HRC). Those GCs should be explicitly initialized with
+ the guard count is limited (like \p gc::HP). Those GCs should be explicitly initialized with
hazard pointer enough: \code cds::gc::HP myhp( 67 ) \endcode. Otherwise an run-time exception may be raised
when you try to create skip-list object.
before end of the map. Therefore, such iteration is more suitable for debugging purpose only
Remember, each iterator object requires 2 additional hazard pointers, that may be
- a limited resource for \p GC like as gc::HP and gc::HRC (however, for gc::PTB the count of
+ a limited resource for \p GC like \p gc::HP (for gc::PTB the count of
guards is unlimited).
The iterator class supports the following minimalistic interface:
- opt::stat - internal statistics. Available types: skip_list::stat, skip_list::empty_stat (the default)
\warning The skip-list requires up to 67 hazard pointers that may be critical for some GCs for which
- the guard count is limited (like as gc::HP, gc::HRC). Those GCs should be explicitly initialized with
+ the guard count is limited (like as \p gc::HP). Those GCs should be explicitly initialized with
hazard pointer enough: \code cds::gc::HP myhp( 67 ) \endcode. Otherwise an run-time exception may be raised
when you try to create skip-list object.
before end of the set. Therefore, such iteration is more suitable for debugging purpose only
Remember, each iterator object requires 2 additional hazard pointers, that may be
- a limited resource for \p GC like as gc::HP and gc::HRC (for gc::PTB the count of
+ a limited resource for \p GC like \p gc::HP (for \p gc::PTB the count of
guards is unlimited).
The iterator class supports the following minimalistic interface:
+++ /dev/null
-//$$CDS-header$$
-
-#ifndef __CDS_CONTAINER_SKIP_LIST_MAP_HRC_H
-#define __CDS_CONTAINER_SKIP_LIST_MAP_HRC_H
-
-#include <cds/container/details/skip_list_base.h>
-#include <cds/intrusive/skip_list_hrc.h>
-#include <cds/container/details/make_skip_list_map.h>
-#include <cds/container/impl/skip_list_map.h>
-
-#endif // #ifndef __CDS_CONTAINER_SKIP_LIST_MAP_HRC_H
+++ /dev/null
-//$$CDS-header$$
-
-#ifndef __CDS_CONTAINER_SKIP_LIST_SET_HRC_H
-#define __CDS_CONTAINER_SKIP_LIST_SET_HRC_H
-
-#include <cds/container/details/skip_list_base.h>
-#include <cds/intrusive/skip_list_hrc.h>
-#include <cds/container/details/make_skip_list_set.h>
-#include <cds/container/impl/skip_list_set.h>
-
-#endif // #ifndef __CDS_CONTAINER_SKIP_LIST_SET_HRC_H
- opt::stat - internal statistics. Available types: skip_list::stat, skip_list::empty_stat (the default)
\warning The skip-list requires up to 67 hazard pointers that may be critical for some GCs for which
- the guard count is limited (like as gc::HP, gc::HRC). Those GCs should be explicitly initialized with
+ the guard count is limited (like as \p gc::HP). Those GCs should be explicitly initialized with
hazard pointer enough: \code cds::gc::HP myhp( 67 ) \endcode. Otherwise an run-time exception may be raised
when you try to create skip-list object.
\note There are several specializations of \p %SkipListSet for each \p GC. You should include:
- <tt><cds/intrusive/skip_list_hp.h></tt> for gc::HP garbage collector
- - <tt><cds/intrusive/skip_list_hrc.h></tt> for gc::HRC garbage collector
- <tt><cds/intrusive/skip_list_ptb.h></tt> for gc::PTB garbage collector
- <tt><cds/intrusive/skip_list_nogc.h></tt> for \ref cds_intrusive_SkipListSet_nogc for persistent set
- <tt><cds/intrusive/skip_list_rcu.h></tt> for \ref cds_intrusive_SkipListSet_rcu "RCU type"
before end of the set. Therefore, such iteration is more suitable for debugging purpose only
Remember, each iterator object requires 2 additional hazard pointers, that may be
- a limited resource for \p GC like as gc::HP and gc::HRC (for gc::PTB the count of
+ a limited resource for \p GC like as \p gc::HP (for \p gc::PTB the count of
guards is unlimited).
The iterator class supports the following minimalistic interface:
+++ /dev/null
-//$$CDS-header$$
-
-#ifndef __CDS_INTRUSIVE_SKIP_LIST_HRC_H
-#define __CDS_INTRUSIVE_SKIP_LIST_HRC_H
-
-#include <cds/intrusive/impl/skip_list.h>
-#include <cds/gc/hrc.h>
-
-//@cond
-namespace cds { namespace intrusive { namespace skip_list {
- // Specialization for HRC GC
- template <typename Tag>
- class node< cds::gc::HRC, Tag>: public cds::gc::HRC::container_node
- {
- public:
- typedef gc::HRC gc ; ///< Garbage collector
- typedef Tag tag ; ///< tag
-
- typedef cds::details::marked_ptr<node, 1> marked_ptr ; ///< marked pointer
- typedef typename gc::template atomic_marked_ptr< marked_ptr> atomic_marked_ptr ; ///< atomic marked pointer specific for GC
- typedef atomic_marked_ptr tower_item_type;
-
- protected:
- atomic_marked_ptr m_pNext ; ///< Next item in bottom-list (list at level 0)
- unsigned int m_nHeight ; ///< Node height (size of m_arrNext array). For node at level 0 the height is 1.
- atomic_marked_ptr * m_arrNext ; ///< Array of next items for levels 1 .. m_nHeight - 1. For node at level 0 \p m_arrNext is \p nullptr
-
- public:
- bool m_bDel;
-
- public:
- /// Constructs a node of height 1 (a bottom-list node)
- node()
- : m_pNext( nullptr )
- , m_nHeight(1)
- , m_arrNext( nullptr )
- , m_bDel( false )
- {}
-
- ~node()
- {
- release_tower();
- m_pNext.store( marked_ptr(), atomics::memory_order_relaxed );
- }
-
- /// Constructs a node of height \p nHeight
- void make_tower( unsigned int nHeight, atomic_marked_ptr * nextTower )
- {
- assert( nHeight > 0 );
- assert( (nHeight == 1 && nextTower == nullptr) // bottom-list node
- || (nHeight > 1 && nextTower != nullptr) // node at level of more than 0
- );
-
- m_arrNext = nextTower;
- m_nHeight = nHeight;
- }
-
- atomic_marked_ptr * release_tower()
- {
- unsigned int nHeight = m_nHeight - 1;
- atomic_marked_ptr * pTower = m_arrNext;
- if ( pTower ) {
- m_arrNext = nullptr;
- m_nHeight = 1;
- for ( unsigned int i = 0; i < nHeight; ++i )
- pTower[i].store( marked_ptr(), atomics::memory_order_release );
- }
- return pTower;
- }
-
- atomic_marked_ptr * get_tower() const
- {
- return m_arrNext;
- }
-
- /// Access to element of next pointer array
- atomic_marked_ptr& next( unsigned int nLevel )
- {
- assert( nLevel < height() );
- assert( nLevel == 0 || (nLevel > 0 && m_arrNext != nullptr) );
-
- return nLevel ? m_arrNext[ nLevel - 1] : m_pNext;
- }
-
- /// Access to element of next pointer array (const version)
- atomic_marked_ptr const& next( unsigned int nLevel ) const
- {
- assert( nLevel < height() );
- assert( nLevel == 0 || (nLevel > 0 && m_arrNext != nullptr) );
-
- return nLevel ? m_arrNext[ nLevel - 1] : m_pNext;
- }
-
- /// Access to element of next pointer array (same as \ref next function)
- atomic_marked_ptr& operator[]( unsigned int nLevel )
- {
- return next( nLevel );
- }
-
- /// Access to element of next pointer array (same as \ref next function)
- atomic_marked_ptr const& operator[]( unsigned int nLevel ) const
- {
- return next( nLevel );
- }
-
- /// Height of the node
- unsigned int height() const
- {
- return m_nHeight;
- }
-
- protected:
- virtual void cleanUp( cds::gc::hrc::ThreadGC * pGC )
- {
- assert( pGC );
- typename gc::GuardArray<2> aGuards( *pGC );
-
- unsigned int const nHeight = height();
- for (unsigned int i = 0; i < nHeight; ++i ) {
- while ( true ) {
- marked_ptr pNextMarked( aGuards.protect( 0, next(i) ));
- node * pNext = pNextMarked.ptr();
- if ( pNext && pNext->m_bDeleted.load(atomics::memory_order_acquire) ) {
- marked_ptr p = aGuards.protect( 1, pNext->next(i) );
- next(i).compare_exchange_strong( pNextMarked, p, atomics::memory_order_acquire, atomics::memory_order_relaxed );
- continue;
- }
- else {
- break;
- }
- }
- }
- }
-
- virtual void terminate( cds::gc::hrc::ThreadGC * pGC, bool bConcurrent )
- {
- unsigned int const nHeight = height();
- if ( bConcurrent ) {
- for (unsigned int i = 0; i < nHeight; ++i ) {
- marked_ptr pNext = next(i).load(atomics::memory_order_relaxed);
- while ( !next(i).compare_exchange_weak( pNext, marked_ptr(), atomics::memory_order_release, atomics::memory_order_relaxed ) );
- }
- }
- else {
- for (unsigned int i = 0; i < nHeight; ++i )
- next(i).store( marked_ptr(), atomics::memory_order_relaxed );
- }
- }
- };
-
- namespace details {
-
- template <typename Tag>
- class head_node< node< cds::gc::HRC, Tag > >
- {
- typedef node< cds::gc::HRC, Tag > node_type;
-
- struct head_tower: public node_type
- {
- typename node_type::atomic_marked_ptr m_Tower[skip_list::c_nHeightLimit];
- };
-
- head_tower * m_pHead;
-
- struct head_disposer {
- void operator()( head_tower * p )
- {
- delete p;
- }
- };
- public:
- head_node( unsigned int nHeight )
- : m_pHead( new head_tower() )
- {
- for ( size_t i = 0; i < sizeof(m_pHead->m_Tower) / sizeof(m_pHead->m_Tower[0]); ++i )
- m_pHead->m_Tower[i].store( typename node_type::marked_ptr(), atomics::memory_order_relaxed );
-
- m_pHead->make_tower( nHeight, m_pHead->m_Tower );
- }
-
- ~head_node()
- {
- cds::gc::HRC::template retire<head_disposer>( m_pHead );
- }
-
- node_type * head()
- {
- return static_cast<node_type *>( m_pHead );
- }
- node_type const * head() const
- {
- return static_cast<node_type const *>( m_pHead );
- }
-
- };
- } // namespace details
-
-}}} // namespace cds::intrusive::skip_list
-//@endcond
-
-#endif
<ClInclude Include="..\..\..\cds\container\michael_set_rcu.h" />\r
<ClInclude Include="..\..\..\cds\container\mspriority_queue.h" />\r
<ClInclude Include="..\..\..\cds\container\skip_list_map_hp.h" />\r
- <ClInclude Include="..\..\..\cds\container\skip_list_map_hrc.h" />\r
<ClInclude Include="..\..\..\cds\container\skip_list_map_nogc.h" />\r
<ClInclude Include="..\..\..\cds\container\skip_list_map_ptb.h" />\r
<ClInclude Include="..\..\..\cds\container\skip_list_map_rcu.h" />\r
<ClInclude Include="..\..\..\cds\container\skip_list_set_hp.h" />\r
- <ClInclude Include="..\..\..\cds\container\skip_list_set_hrc.h" />\r
<ClInclude Include="..\..\..\cds\container\skip_list_set_nogc.h" />\r
<ClInclude Include="..\..\..\cds\container\skip_list_set_ptb.h" />\r
<ClInclude Include="..\..\..\cds\container\skip_list_set_rcu.h" />\r
<ClInclude Include="..\..\..\cds\intrusive\mspriority_queue.h" />\r
<ClInclude Include="..\..\..\cds\intrusive\options.h" />\r
<ClInclude Include="..\..\..\cds\intrusive\skip_list_hp.h" />\r
- <ClInclude Include="..\..\..\cds\intrusive\skip_list_hrc.h" />\r
<ClInclude Include="..\..\..\cds\intrusive\skip_list_nogc.h" />\r
<ClInclude Include="..\..\..\cds\intrusive\skip_list_ptb.h" />\r
<ClInclude Include="..\..\..\cds\intrusive\skip_list_rcu.h" />\r
<ClInclude Include="..\..\..\cds\intrusive\skip_list_hp.h">\r
<Filter>Header Files\cds\intrusive</Filter>\r
</ClInclude>\r
- <ClInclude Include="..\..\..\cds\intrusive\skip_list_hrc.h">\r
- <Filter>Header Files\cds\intrusive</Filter>\r
- </ClInclude>\r
<ClInclude Include="..\..\..\cds\intrusive\skip_list_ptb.h">\r
<Filter>Header Files\cds\intrusive</Filter>\r
</ClInclude>\r
<ClInclude Include="..\..\..\cds\container\skip_list_set_hp.h">\r
<Filter>Header Files\cds\container</Filter>\r
</ClInclude>\r
- <ClInclude Include="..\..\..\cds\container\skip_list_set_hrc.h">\r
- <Filter>Header Files\cds\container</Filter>\r
- </ClInclude>\r
<ClInclude Include="..\..\..\cds\container\skip_list_set_ptb.h">\r
<Filter>Header Files\cds\container</Filter>\r
</ClInclude>\r
<ClInclude Include="..\..\..\cds\container\skip_list_map_hp.h">\r
<Filter>Header Files\cds\container</Filter>\r
</ClInclude>\r
- <ClInclude Include="..\..\..\cds\container\skip_list_map_hrc.h">\r
- <Filter>Header Files\cds\container</Filter>\r
- </ClInclude>\r
<ClInclude Include="..\..\..\cds\container\skip_list_map_ptb.h">\r
<Filter>Header Files\cds\container</Filter>\r
</ClInclude>\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_michael_set_rcu_sht_lazy.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_hp.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_hp_member.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_hrc.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_nogc.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_nogc_member.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_ptb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_rcu_shb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_michael_set_rcu_sht.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_hp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_hrc.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_nogc.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_ptb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_rcu_gpb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_hp_member.cpp">\r
<Filter>intrusive\skip_list</Filter>\r
</ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_hrc.cpp">\r
- <Filter>intrusive\skip_list</Filter>\r
- </ClCompile>\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_intrusive_skiplist_ptb.cpp">\r
<Filter>intrusive\skip_list</Filter>\r
</ClCompile>\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_hp.cpp">\r
<Filter>container\skip_list</Filter>\r
</ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_hrc.cpp">\r
- <Filter>container\skip_list</Filter>\r
- </ClCompile>\r
<ClCompile Include="..\..\..\tests\test-hdr\set\hdr_skiplist_set_ptb.cpp">\r
<Filter>container\skip_list</Filter>\r
</ClCompile>\r
+++ /dev/null
-//$$CDS-header$$
-
-#include "set/hdr_intrusive_skiplist_set.h"
-
-#include <cds/intrusive/skip_list_hrc.h>
-#include "map/print_skiplist_stat.h"
-
-namespace set {
-
- void IntrusiveSkipListSet::skiplist_hrc_base_cmp()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HRC> > item;
-
- typedef ci::SkipListSet< cds::gc::HRC, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hrc_base_less()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HRC> > item;
-
- typedef ci::SkipListSet< cds::gc::HRC, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hrc_base_cmpmix()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HRC> > item;
-
- typedef ci::SkipListSet< cds::gc::HRC, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hrc_base_cmp_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HRC> > item;
-
- typedef ci::SkipListSet< cds::gc::HRC, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hrc_base_less_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HRC> > item;
-
- typedef ci::SkipListSet< cds::gc::HRC, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hrc_base_cmpmix_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HRC> > item;
-
- typedef ci::SkipListSet< cds::gc::HRC, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hrc_base_cmp_xorshift()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HRC> > item;
-
- typedef ci::SkipListSet< cds::gc::HRC, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hrc_base_less_xorshift()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HRC> > item;
-
- typedef ci::SkipListSet< cds::gc::HRC, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hrc_base_cmpmix_xorshift()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HRC> > item;
-
- typedef ci::SkipListSet< cds::gc::HRC, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hrc_base_cmp_xorshift_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HRC> > item;
-
- typedef ci::SkipListSet< cds::gc::HRC, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hrc_base_less_xorshift_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HRC> > item;
-
- typedef ci::SkipListSet< cds::gc::HRC, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hrc_base_cmpmix_xorshift_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HRC> > item;
-
- typedef ci::SkipListSet< cds::gc::HRC, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::xorshift >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-
- //*********
- void IntrusiveSkipListSet::skiplist_hrc_base_cmp_pascal()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HRC> > item;
-
- typedef ci::SkipListSet< cds::gc::HRC, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hrc_base_less_pascal()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HRC> > item;
-
- typedef ci::SkipListSet< cds::gc::HRC, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hrc_base_cmpmix_pascal()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HRC> > item;
-
- typedef ci::SkipListSet< cds::gc::HRC, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hrc_base_cmp_pascal_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HRC> > item;
-
- typedef ci::SkipListSet< cds::gc::HRC, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hrc_base_less_pascal_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HRC> > item;
-
- typedef ci::SkipListSet< cds::gc::HRC, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
- void IntrusiveSkipListSet::skiplist_hrc_base_cmpmix_pascal_stat()
- {
- typedef base_int_item< ci::skip_list::node< cds::gc::HRC> > item;
-
- typedef ci::SkipListSet< cds::gc::HRC, item,
- ci::skip_list::make_traits<
- ci::opt::hook< ci::skip_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::compare< cmp<item> >
- ,ci::skip_list::random_level_generator< ci::skip_list::turbo_pascal >
- ,co::stat< ci::skip_list::stat<> >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > set_type;
-
- test_skiplist<set_type, misc::print_skiplist_stat<set_type::stat> >();
- }
-
-} // namespace set
void skiplist_hp_member_less_pascal_stat();
void skiplist_hp_member_cmpmix_pascal_stat();
- // Skip-list - gc::HRC
- void skiplist_hrc_base_cmp();
- void skiplist_hrc_base_less();
- void skiplist_hrc_base_cmpmix();
- void skiplist_hrc_base_cmp_stat();
- void skiplist_hrc_base_less_stat();
- void skiplist_hrc_base_cmpmix_stat();
- void skiplist_hrc_base_cmp_xorshift();
- void skiplist_hrc_base_less_xorshift();
- void skiplist_hrc_base_cmpmix_xorshift();
- void skiplist_hrc_base_cmp_xorshift_stat();
- void skiplist_hrc_base_less_xorshift_stat();
- void skiplist_hrc_base_cmpmix_xorshift_stat();
- void skiplist_hrc_base_cmp_pascal();
- void skiplist_hrc_base_less_pascal();
- void skiplist_hrc_base_cmpmix_pascal();
- void skiplist_hrc_base_cmp_pascal_stat();
- void skiplist_hrc_base_less_pascal_stat();
- void skiplist_hrc_base_cmpmix_pascal_stat();
-
// Skip-list - gc::PTB
void skiplist_ptb_base_cmp();
void skiplist_ptb_base_less();
CPPUNIT_TEST(skiplist_hp_member_less_pascal_stat)
CPPUNIT_TEST(skiplist_hp_member_cmpmix_pascal_stat)
- CPPUNIT_TEST(skiplist_hrc_base_cmp)
- CPPUNIT_TEST(skiplist_hrc_base_less)
- CPPUNIT_TEST(skiplist_hrc_base_cmpmix)
- CPPUNIT_TEST(skiplist_hrc_base_cmp_stat)
- CPPUNIT_TEST(skiplist_hrc_base_less_stat)
- CPPUNIT_TEST(skiplist_hrc_base_cmpmix_stat)
- CPPUNIT_TEST(skiplist_hrc_base_cmp_xorshift)
- CPPUNIT_TEST(skiplist_hrc_base_less_xorshift)
- CPPUNIT_TEST(skiplist_hrc_base_cmpmix_xorshift)
- CPPUNIT_TEST(skiplist_hrc_base_cmp_xorshift_stat)
- CPPUNIT_TEST(skiplist_hrc_base_less_xorshift_stat)
- CPPUNIT_TEST(skiplist_hrc_base_cmpmix_xorshift_stat)
- CPPUNIT_TEST(skiplist_hrc_base_cmp_pascal)
- CPPUNIT_TEST(skiplist_hrc_base_less_pascal)
- CPPUNIT_TEST(skiplist_hrc_base_cmpmix_pascal)
- CPPUNIT_TEST(skiplist_hrc_base_cmp_pascal_stat)
- CPPUNIT_TEST(skiplist_hrc_base_less_pascal_stat)
- CPPUNIT_TEST(skiplist_hrc_base_cmpmix_pascal_stat)
-
CPPUNIT_TEST(skiplist_ptb_base_cmp)
CPPUNIT_TEST(skiplist_ptb_base_less)
CPPUNIT_TEST(skiplist_ptb_base_cmpmix)
void SkipList_HP_michaelalloc_cmp_stat();
void SkipList_HP_michaelalloc_cmpless_stat();
- void SkipList_HRC_less();
- void SkipList_HRC_cmp();
- void SkipList_HRC_cmpless();
- void SkipList_HRC_less_stat();
- void SkipList_HRC_cmp_stat();
- void SkipList_HRC_cmpless_stat();
- void SkipList_HRC_xorshift_less();
- void SkipList_HRC_xorshift_cmp();
- void SkipList_HRC_xorshift_cmpless();
- void SkipList_HRC_xorshift_less_stat();
- void SkipList_HRC_xorshift_cmp_stat();
- void SkipList_HRC_xorshift_cmpless_stat();
- void SkipList_HRC_turbopas_less();
- void SkipList_HRC_turbopas_cmp();
- void SkipList_HRC_turbopas_cmpless();
- void SkipList_HRC_turbopas_less_stat();
- void SkipList_HRC_turbopas_cmp_stat();
- void SkipList_HRC_turbopas_cmpless_stat();
- void SkipList_HRC_michaelalloc_less();
- void SkipList_HRC_michaelalloc_cmp();
- void SkipList_HRC_michaelalloc_cmpless();
- void SkipList_HRC_michaelalloc_less_stat();
- void SkipList_HRC_michaelalloc_cmp_stat();
- void SkipList_HRC_michaelalloc_cmpless_stat();
-
void SkipList_PTB_less();
void SkipList_PTB_cmp();
void SkipList_PTB_cmpless();
CPPUNIT_TEST(SkipList_HP_michaelalloc_cmp_stat)
CPPUNIT_TEST(SkipList_HP_michaelalloc_cmpless_stat)
- CPPUNIT_TEST(SkipList_HRC_less)
- CPPUNIT_TEST(SkipList_HRC_cmp)
- CPPUNIT_TEST(SkipList_HRC_cmpless)
- CPPUNIT_TEST(SkipList_HRC_less_stat)
- CPPUNIT_TEST(SkipList_HRC_cmp_stat)
- CPPUNIT_TEST(SkipList_HRC_cmpless_stat)
- CPPUNIT_TEST(SkipList_HRC_xorshift_less)
- CPPUNIT_TEST(SkipList_HRC_xorshift_cmp)
- CPPUNIT_TEST(SkipList_HRC_xorshift_cmpless)
- CPPUNIT_TEST(SkipList_HRC_xorshift_less_stat)
- CPPUNIT_TEST(SkipList_HRC_xorshift_cmp_stat)
- CPPUNIT_TEST(SkipList_HRC_xorshift_cmpless_stat)
- CPPUNIT_TEST(SkipList_HRC_turbopas_less)
- CPPUNIT_TEST(SkipList_HRC_turbopas_cmp)
- CPPUNIT_TEST(SkipList_HRC_turbopas_cmpless)
- CPPUNIT_TEST(SkipList_HRC_turbopas_less_stat)
- CPPUNIT_TEST(SkipList_HRC_turbopas_cmp_stat)
- CPPUNIT_TEST(SkipList_HRC_turbopas_cmpless_stat)
- CPPUNIT_TEST(SkipList_HRC_michaelalloc_less)
- CPPUNIT_TEST(SkipList_HRC_michaelalloc_cmp)
- CPPUNIT_TEST(SkipList_HRC_michaelalloc_cmpless)
- CPPUNIT_TEST(SkipList_HRC_michaelalloc_less_stat)
- CPPUNIT_TEST(SkipList_HRC_michaelalloc_cmp_stat)
- CPPUNIT_TEST(SkipList_HRC_michaelalloc_cmpless_stat)
-
CPPUNIT_TEST(SkipList_PTB_less)
CPPUNIT_TEST(SkipList_PTB_cmp)
CPPUNIT_TEST(SkipList_PTB_cmpless)
+++ /dev/null
-//$$CDS-header$$
-
-#include "set/hdr_skiplist_set.h"
-#include <cds/container/skip_list_set_hrc.h>
-#include "unit/michael_alloc.h"
-#include "map/print_skiplist_stat.h"
-
-namespace set {
-
- void SkipListSetHdrTest::SkipList_HRC_less()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_cmp()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_cmpless()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_less_stat()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_cmp_stat()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_cmpless_stat()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_xorshift_less()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_xorshift_cmp()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_xorshift_cmpless()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_xorshift_less_stat()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_xorshift_cmp_stat()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_xorshift_cmpless_stat()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::xorshift >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_turbopas_less()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_turbopas_cmp()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_turbopas_cmpless()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_turbopas_less_stat()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_turbopas_cmp_stat()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_turbopas_cmpless_stat()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_michaelalloc_less()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_michaelalloc_cmp()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_michaelalloc_cmpless()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_michaelalloc_less_stat()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_michaelalloc_cmp_stat()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-
- void SkipListSetHdrTest::SkipList_HRC_michaelalloc_cmpless_stat()
- {
- typedef cc::SkipListSet< cds::gc::HRC, item,
- cc::skip_list::make_traits<
- co::less< less<item > >
- ,co::compare< cmp<item > >
- ,co::item_counter< simple_item_counter >
- ,co::stat< cc::skip_list::stat<> >
- ,co::allocator< memory::MichaelAllocator<int> >
- >::type
- > set;
- test< set, misc::print_skiplist_stat<set::stat> >();
- }
-} // namespace set