From 9f9f9f1695656ca21d618b2f88ccd5b4f76218f7 Mon Sep 17 00:00:00 2001 From: khizmax Date: Sat, 22 Apr 2017 17:46:46 +0300 Subject: [PATCH] [SkipList] Added random-lvel generators for max height 32/24/16 --- cds/container/details/skip_list_base.h | 41 +- cds/container/skip_list_set_nogc.h | 4 +- cds/container/skip_list_set_rcu.h | 6 +- cds/intrusive/details/skip_list_base.h | 79 +++- projects/Win/vc141/gtest-map-skip.vcxproj | 1 + projects/Win/vc141/gtest-set-skip.vcxproj | 1 + test/stress/map/map_type_skip_list.h | 440 ++++++++++++------ test/stress/pqueue/pop.cpp | 32 +- test/stress/pqueue/pqueue_type.h | 154 +++++- test/stress/pqueue/push.cpp | 32 +- test/stress/pqueue/push_pop.cpp | 52 ++- test/stress/set/set_type_skip_list.h | 388 ++++++++++----- .../intrusive-set/intrusive_skiplist_dhp.cpp | 167 ++++++- .../intrusive-set/intrusive_skiplist_hp.cpp | 167 ++++++- .../intrusive-set/intrusive_skiplist_nogc.cpp | 167 ++++++- .../test_intrusive_skiplist_rcu.h | 237 +++++++++- test/unit/map/skiplist_dhp.cpp | 100 +--- test/unit/map/skiplist_hp.cpp | 99 +--- test/unit/map/skiplist_hp_inl.h | 191 ++++++++ test/unit/map/skiplist_nogc.cpp | 84 +++- test/unit/map/test_skiplist_rcu.h | 94 +++- test/unit/set/skiplist_dhp.cpp | 99 +--- test/unit/set/skiplist_hp.cpp | 103 +--- test/unit/set/skiplist_hp_inl.h | 207 ++++++++ test/unit/set/skiplist_nogc.cpp | 84 +++- test/unit/set/test_skiplist_rcu.h | 99 +++- tools/tsan-suppression | 4 - 27 files changed, 2329 insertions(+), 803 deletions(-) create mode 100644 test/unit/map/skiplist_hp_inl.h create mode 100644 test/unit/set/skiplist_hp_inl.h diff --git a/cds/container/details/skip_list_base.h b/cds/container/details/skip_list_base.h index 5a343afe..c622234a 100644 --- a/cds/container/details/skip_list_base.h +++ b/cds/container/details/skip_list_base.h @@ -45,10 +45,40 @@ namespace cds { namespace container { using random_level_generator = cds::intrusive::skip_list::random_level_generator; /// Xor-shift random level generator - typedef cds::intrusive::skip_list::xorshift xorshift; + template + using xor_shift = cds::intrusive::skip_list::xor_shift; + + /// Xor-shift random level generator, max height 32 + typedef cds::intrusive::skip_list::xorshift32 xorshift32; + + /// Xor-shift random level generator, max height 24 + typedef cds::intrusive::skip_list::xorshift24 xorshift24; + + /// Xor-shift random level generator, max height 16 + typedef cds::intrusive::skip_list::xorshift16 xorshift16; + + //@cond + // for backward compatibility + using cds::intrusive::skip_list::xorshift; + //@endcond /// Turbo-pascal random level generator - typedef cds::intrusive::skip_list::turbo_pascal turbo_pascal; + template + using turbo = cds::intrusive::skip_list::turbo; + + /// Turbo-pascal random level generator, max height 32 + typedef cds::intrusive::skip_list::turbo32 turbo32; + + /// Turbo-pascal random level generator, max height 24 + typedef cds::intrusive::skip_list::turbo24 turbo24; + + /// Turbo-pascal random level generator, max height 16 + typedef cds::intrusive::skip_list::turbo16 turbo16; + + //@cond + // for backward compatibility + using cds::intrusive::skip_list::turbo_pascal; + //@endcond /// Skip list internal statistics template @@ -94,7 +124,7 @@ namespace cds { namespace container { See \p skip_list::random_level_generator option setter. */ - typedef turbo_pascal random_level_generator; + typedef turbo32 random_level_generator; /// Allocator for skip-list nodes, \p std::allocator interface typedef CDS_DEFAULT_ALLOCATOR allocator; @@ -126,9 +156,8 @@ namespace cds { namespace container { - \p opt::item_counter - the type of item counting feature. Default is \p atomicity::empty_item_counter that is no item counting. - \p opt::memory_model - C++ memory ordering model. Can be \p opt::v::relaxed_ordering (relaxed memory model, the default) or \p opt::v::sequential_consistent (sequentially consisnent memory model). - - \p skip_list::random_level_generator - random level generator. Can be \p skip_list::xorshift, \p skip_list::turbo_pascal or - user-provided one. - Default is \p %skip_list::turbo_pascal. + - \p skip_list::random_level_generator - random level generator. Can be \p skip_list::xor_shift, \p skip_list::turbo or + user-provided one. Default is \p %skip_list::turbo32. - \p opt::allocator - allocator for skip-list node. Default is \ref CDS_DEFAULT_ALLOCATOR. - \p opt::back_off - back-off strategy used. If the option is not specified, the \p cds::backoff::Default is used. - \p opt::stat - internal statistics. Available types: \p skip_list::stat, \p skip_list::empty_stat (the default) diff --git a/cds/container/skip_list_set_nogc.h b/cds/container/skip_list_set_nogc.h index fb79ed95..7c6d306c 100644 --- a/cds/container/skip_list_set_nogc.h +++ b/cds/container/skip_list_set_nogc.h @@ -146,9 +146,9 @@ namespace cds { namespace container { - opt::item_counter - the type of item counting feature. Default is \ref atomicity::empty_item_counter that is no item counting. - opt::memory_model - C++ memory ordering model. Can be opt::v::relaxed_ordering (relaxed memory model, the default) or opt::v::sequential_consistent (sequentially consisnent memory model). - - skip_list::random_level_generator - random level generator. Can be skip_list::xorshift, skip_list::turbo_pascal or + - skip_list::random_level_generator - random level generator. Can be \p skip_list::xor_shift, \p skip_list::turbo or user-provided one. See skip_list::random_level_generator option description for explanation. - Default is \p %skip_list::turbo_pascal. + Default is \p skip_list::turbo32. - opt::allocator - allocator for skip-list node. Default is \ref CDS_DEFAULT_ALLOCATOR. - opt::back_off - back-off strategy used. If the option is not specified, the cds::backoff::Default is used. - opt::stat - internal statistics. Available types: skip_list::stat, skip_list::empty_stat (the default) diff --git a/cds/container/skip_list_set_rcu.h b/cds/container/skip_list_set_rcu.h index 9c9b4f0e..daf05f2b 100644 --- a/cds/container/skip_list_set_rcu.h +++ b/cds/container/skip_list_set_rcu.h @@ -74,9 +74,9 @@ namespace cds { namespace container { - opt::item_counter - the type of item counting feature. Default is \ref atomicity::empty_item_counter that is no item counting. - opt::memory_model - C++ memory ordering model. Can be opt::v::relaxed_ordering (relaxed memory model, the default) or opt::v::sequential_consistent (sequentially consisnent memory model). - - skip_list::random_level_generator - random level generator. Can be skip_list::xorshift, skip_list::turbo_pascal or - user-provided one. See skip_list::random_level_generator option description for explanation. - Default is \p %skip_list::turbo_pascal. + - skip_list::random_level_generator - random level generator. Can be \p skip_list::xor_shift, \p skip_list::turbo or + user-provided one. See \p skip_list::random_level_generator option description for explanation. + Default is \p skip_list::turbo32. - opt::allocator - allocator for skip-list node. Default is \ref CDS_DEFAULT_ALLOCATOR. - opt::back_off - back-off strategy used. If the option is not specified, the cds::backoff::Default is used. - opt::stat - internal statistics. Available types: skip_list::stat, skip_list::empty_stat (the default) diff --git a/cds/intrusive/details/skip_list_base.h b/cds/intrusive/details/skip_list_base.h index 252ea7b9..c902c770 100644 --- a/cds/intrusive/details/skip_list_base.h +++ b/cds/intrusive/details/skip_list_base.h @@ -275,13 +275,14 @@ namespace cds { namespace intrusive { The generator produces a number from range [0 .. c_nUpperBound) (upper bound excluded). \p c_nUpperBound must be no more than 32. - random_generator() - the constructor of generator object initialises the generator instance (its internal state). - - unsigned int operator()() - the main generating function. Returns random level from range 0..31. + - unsigned int operator()() - the main generating function. Returns random level from range [0 .. c_nUpperBound - 1] + Stateful generators are supported. Available \p Type implementations: - - \p skip_list::xorshift - - \p skip_list::turbo_pascal + - \p skip_list::xor_shift + - \p skip_list::turbo */ template struct random_level_generator { @@ -296,24 +297,29 @@ namespace cds { namespace intrusive { /// Xor-shift random level generator /** - The simplest of the generators described in George - Marsaglia's "Xorshift RNGs" paper. This is not a high-quality - generator but is acceptable for skip-list. + The simplest of the generators described in George Marsaglia's "Xorshift RNGs" paper. + This is not a high-quality generator but is acceptable for skip-list. - The random generator should return numbers from range [0..31]. + The random generator should return numbers from range [0 .. MaxHeight - 1]. From Doug Lea's ConcurrentSkipListMap.java. */ - class xorshift { + template + class xor_shift { //@cond atomics::atomic m_nSeed; + + static_assert( MaxHeight > 1, "MaxHeight" ); + static_assert( MaxHeight <= c_nHeightLimit, "MaxHeight is too large" ); + static unsigned int const c_nBitMask = (1u << ( MaxHeight - 1 )) - 1; //@endcond + public: /// The upper bound of generator's return value. The generator produces random number in range [0..c_nUpperBound) - static unsigned int const c_nUpperBound = c_nHeightLimit; + static unsigned int const c_nUpperBound = MaxHeight; /// Initializes the generator instance - xorshift() + xor_shift() { m_nSeed.store( (unsigned int) cds::OS::Timer::random_seed(), atomics::memory_order_relaxed ); } @@ -339,12 +345,27 @@ namespace cds { namespace intrusive { x ^= x >> 17; x ^= x << 5; m_nSeed.store( x, atomics::memory_order_relaxed ); - unsigned int nLevel = ((x & 0x00000001) != 0) ? 0 : cds::bitop::LSB( (~(x >> 1)) & 0x7FFFFFFF ); + unsigned int nLevel = ((x & 0x00000001) != 0) ? 0 : cds::bitop::LSB( (~(x >> 1)) & c_nBitMask ); + assert( nLevel < c_nUpperBound ); return nLevel; } }; + /// Xor-shift random level generator, max height 32 + typedef xor_shift xorshift32; + + //@cond + // For backward compatibility + typedef xorshift32 xorshift; + //@endcond + + /// \ref xor_shift generator, max height 24 + typedef xor_shift< 24 > xorshift24; + + /// \ref xor_shift generator, max height = 16 + typedef xor_shift< 16 > xorshift16; + /// Turbo-pascal random level generator /** This uses a cheap pseudo-random function that was used in Turbo Pascal. @@ -353,17 +374,22 @@ namespace cds { namespace intrusive { From Doug Lea's ConcurrentSkipListMap.java. */ - class turbo_pascal + template + class turbo { //@cond atomics::atomic m_nSeed; + + static_assert( MaxHeight > 1, "MaxHeight" ); + static_assert( MaxHeight <= c_nHeightLimit, "MaxHeight is too large" ); + static unsigned int const c_nBitMask = (1u << ( MaxHeight - 1 )) - 1; //@endcond public: /// The upper bound of generator's return value. The generator produces random number in range [0..c_nUpperBound) - static unsigned int const c_nUpperBound = c_nHeightLimit; + static unsigned int const c_nUpperBound = MaxHeight; /// Initializes the generator instance - turbo_pascal() + turbo() { m_nSeed.store( (unsigned int) cds::OS::Timer::random_seed(), atomics::memory_order_relaxed ); } @@ -390,12 +416,27 @@ namespace cds { namespace intrusive { */ unsigned int x = m_nSeed.load( atomics::memory_order_relaxed ) * 134775813 + 1; m_nSeed.store( x, atomics::memory_order_relaxed ); - unsigned int nLevel = ( x & 0x80000000 ) ? (31 - cds::bitop::MSBnz( (x & 0x7FFFFFFF) | 1 )) : 0; + unsigned int nLevel = ( x & 0x80000000 ) ? ( c_nUpperBound - 1 - cds::bitop::MSBnz( (x & c_nBitMask ) | 1 )) : 0; + assert( nLevel < c_nUpperBound ); return nLevel; } }; + /// Turbo-Pascal random level generator, max height 32 + typedef turbo turbo32; + + //@cond + // For backward compatibility + typedef turbo32 turbo_pascal; + //@endcond + + /// Turbo-Pascal generator, max height 24 + typedef turbo< 24 > turbo24; + + /// Turbo-Pascal generator, max height 16 + typedef turbo< 16 > turbo16; + /// \p SkipListSet internal statistics template struct stat { @@ -591,7 +632,7 @@ namespace cds { namespace intrusive { See \p skip_list::random_level_generator option setter. */ - typedef turbo_pascal random_level_generator; + typedef turbo32 random_level_generator; /// Allocator /** @@ -642,9 +683,9 @@ namespace cds { namespace intrusive { To enable it use \p atomicity::item_counter - \p opt::memory_model - C++ memory ordering model. Can be \p opt::v::relaxed_ordering (relaxed memory model, the default) or \p opt::v::sequential_consistent (sequentially consisnent memory model). - - \p skip_list::random_level_generator - random level generator. Can be \p skip_list::xorshift, - \p skip_list::turbo_pascal (the default) or - user-provided one. See \p skip_list::random_level_generator option description for explanation. + - \p skip_list::random_level_generator - random level generator. Can be \p skip_list::xor_shift, + \p skip_list::turbo32 (the default) or user-provided one. + See \p skip_list::random_level_generator option description for explanation. - \p opt::allocator - although the skip-list is an intrusive container, an allocator should be provided to maintain variable randomly-calculated height of the node since the node can contain up to 32 next pointers. The allocator option is used to allocate an array of next pointers diff --git a/projects/Win/vc141/gtest-map-skip.vcxproj b/projects/Win/vc141/gtest-map-skip.vcxproj index 2e3acacb..b2305a9d 100644 --- a/projects/Win/vc141/gtest-map-skip.vcxproj +++ b/projects/Win/vc141/gtest-map-skip.vcxproj @@ -51,6 +51,7 @@ + diff --git a/projects/Win/vc141/gtest-set-skip.vcxproj b/projects/Win/vc141/gtest-set-skip.vcxproj index deb41a17..5847f87b 100644 --- a/projects/Win/vc141/gtest-set-skip.vcxproj +++ b/projects/Win/vc141/gtest-set-skip.vcxproj @@ -51,6 +51,7 @@ + diff --git a/test/stress/map/map_type_skip_list.h b/test/stress/map/map_type_skip_list.h index f0344a1c..7802a08c 100644 --- a/test/stress/map/map_type_skip_list.h +++ b/test/stress/map/map_type_skip_list.h @@ -83,153 +83,285 @@ namespace map { typedef typename base_class::key_compare compare; typedef typename base_class::key_less less; - class traits_SkipListMap_less_pascal: public cc::skip_list::make_traits < + class traits_SkipListMap_less_turbo32: public cc::skip_list::make_traits < co::less< less > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > + ,cc::skip_list::random_level_generator< cc::skip_list::turbo32 > ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_hp_less_pascal; - typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_dhp_less_pascal; - typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_nogc_less_pascal; - typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_gpi_less_pascal; - typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_gpb_less_pascal; - typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_gpt_less_pascal; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_turbo32 > SkipListMap_hp_less_turbo32; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_turbo32 > SkipListMap_dhp_less_turbo32; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_turbo32 > SkipListMap_nogc_less_turbo32; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_turbo32 > SkipListMap_rcu_gpi_less_turbo32; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_turbo32 > SkipListMap_rcu_gpb_less_turbo32; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_turbo32 > SkipListMap_rcu_gpt_less_turbo32; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_pascal > SkipListMap_rcu_shb_less_pascal; + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_turbo32 > SkipListMap_rcu_shb_less_turbo32; #endif - class traits_SkipListMap_less_pascal_seqcst: public cc::skip_list::make_traits < + class traits_SkipListMap_less_turbo24: public cc::skip_list::make_traits < + co::less< less > + , cc::skip_list::random_level_generator< cc::skip_list::turbo24 > + , co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_turbo24 > SkipListMap_hp_less_turbo24; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_turbo24 > SkipListMap_dhp_less_turbo24; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_turbo24 > SkipListMap_nogc_less_turbo24; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_turbo24 > SkipListMap_rcu_gpi_less_turbo24; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_turbo24 > SkipListMap_rcu_gpb_less_turbo24; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_turbo24 > SkipListMap_rcu_gpt_less_turbo24; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_turbo24 > SkipListMap_rcu_shb_less_turbo24; +#endif + + class traits_SkipListMap_less_turbo16: public cc::skip_list::make_traits < + co::less< less > + , cc::skip_list::random_level_generator< cc::skip_list::turbo16 > + , co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_turbo16 > SkipListMap_hp_less_turbo16; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_turbo16 > SkipListMap_dhp_less_turbo16; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_turbo16 > SkipListMap_nogc_less_turbo16; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_turbo16 > SkipListMap_rcu_gpi_less_turbo16; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_turbo16 > SkipListMap_rcu_gpb_less_turbo16; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_turbo16 > SkipListMap_rcu_gpt_less_turbo16; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_turbo16 > SkipListMap_rcu_shb_less_turbo16; +#endif + + class traits_SkipListMap_less_turbo32_seqcst: public cc::skip_list::make_traits < co::less< less > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > + ,cc::skip_list::random_level_generator< cc::skip_list::turbo32 > ,co::memory_model< co::v::sequential_consistent > ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_hp_less_pascal_seqcst; - typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_dhp_less_pascal_seqcst; - typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_nogc_less_pascal_seqcst; - typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_gpi_less_pascal_seqcst; - typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_gpb_less_pascal_seqcst; - typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_gpt_less_pascal_seqcst; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_turbo32_seqcst > SkipListMap_hp_less_turbo32_seqcst; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_turbo32_seqcst > SkipListMap_dhp_less_turbo32_seqcst; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_turbo32_seqcst > SkipListMap_nogc_less_turbo32_seqcst; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_turbo32_seqcst > SkipListMap_rcu_gpi_less_turbo32_seqcst; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_turbo32_seqcst > SkipListMap_rcu_gpb_less_turbo32_seqcst; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_turbo32_seqcst > SkipListMap_rcu_gpt_less_turbo32_seqcst; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_pascal_seqcst > SkipListMap_rcu_shb_less_pascal_seqcst; + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_turbo32_seqcst > SkipListMap_rcu_shb_less_turbo32_seqcst; #endif - class traits_SkipListMap_less_pascal_stat: public cc::skip_list::make_traits < + class traits_SkipListMap_less_turbo32_stat: public cc::skip_list::make_traits < co::less< less > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > + ,cc::skip_list::random_level_generator< cc::skip_list::turbo32 > ,co::stat< cc::skip_list::stat<> > ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_hp_less_pascal_stat; - typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_dhp_less_pascal_stat; - typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_nogc_less_pascal_stat; - typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_gpi_less_pascal_stat; - typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_gpb_less_pascal_stat; - typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_gpt_less_pascal_stat; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_turbo32_stat > SkipListMap_hp_less_turbo32_stat; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_turbo32_stat > SkipListMap_dhp_less_turbo32_stat; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_turbo32_stat > SkipListMap_nogc_less_turbo32_stat; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_turbo32_stat > SkipListMap_rcu_gpi_less_turbo32_stat; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_turbo32_stat > SkipListMap_rcu_gpb_less_turbo32_stat; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_turbo32_stat > SkipListMap_rcu_gpt_less_turbo32_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_turbo32_stat > SkipListMap_rcu_shb_less_turbo32_stat; +#endif + + class traits_SkipListMap_less_turbo24_stat: public cc::skip_list::make_traits < + co::less< less > + , cc::skip_list::random_level_generator< cc::skip_list::turbo24 > + , co::stat< cc::skip_list::stat<> > + , co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_turbo24_stat > SkipListMap_hp_less_turbo24_stat; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_turbo24_stat > SkipListMap_dhp_less_turbo24_stat; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_turbo24_stat > SkipListMap_nogc_less_turbo24_stat; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_turbo24_stat > SkipListMap_rcu_gpi_less_turbo24_stat; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_turbo24_stat > SkipListMap_rcu_gpb_less_turbo24_stat; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_turbo24_stat > SkipListMap_rcu_gpt_less_turbo24_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_turbo24_stat > SkipListMap_rcu_shb_less_turbo24_stat; +#endif + + class traits_SkipListMap_less_turbo16_stat: public cc::skip_list::make_traits < + co::less< less > + , cc::skip_list::random_level_generator< cc::skip_list::turbo16 > + , co::stat< cc::skip_list::stat<> > + , co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_turbo16_stat > SkipListMap_hp_less_turbo16_stat; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_turbo16_stat > SkipListMap_dhp_less_turbo16_stat; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_turbo16_stat > SkipListMap_nogc_less_turbo16_stat; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_turbo16_stat > SkipListMap_rcu_gpi_less_turbo16_stat; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_turbo16_stat > SkipListMap_rcu_gpb_less_turbo16_stat; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_turbo16_stat > SkipListMap_rcu_gpt_less_turbo16_stat; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_pascal_stat > SkipListMap_rcu_shb_less_pascal_stat; + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_turbo16_stat > SkipListMap_rcu_shb_less_turbo16_stat; #endif - class traits_SkipListMap_cmp_pascal: public cc::skip_list::make_traits < + class traits_SkipListMap_cmp_turbo32: public cc::skip_list::make_traits < co::compare< compare > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > + ,cc::skip_list::random_level_generator< cc::skip_list::turbo32 > ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_hp_cmp_pascal; - typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_dhp_cmp_pascal; - typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_nogc_cmp_pascal; - typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_gpi_cmp_pascal; - typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_gpb_cmp_pascal; - typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_gpt_cmp_pascal; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_turbo32 > SkipListMap_hp_cmp_turbo32; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_turbo32 > SkipListMap_dhp_cmp_turbo32; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_turbo32 > SkipListMap_nogc_cmp_turbo32; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_turbo32 > SkipListMap_rcu_gpi_cmp_turbo32; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_turbo32 > SkipListMap_rcu_gpb_cmp_turbo32; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_turbo32 > SkipListMap_rcu_gpt_cmp_turbo32; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_pascal > SkipListMap_rcu_shb_cmp_pascal; + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_turbo32 > SkipListMap_rcu_shb_cmp_turbo32; #endif - class traits_SkipListMap_cmp_pascal_stat: public cc::skip_list::make_traits < + class traits_SkipListMap_cmp_turbo32_stat: public cc::skip_list::make_traits < co::compare< compare > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > + ,cc::skip_list::random_level_generator< cc::skip_list::turbo32 > ,co::stat< cc::skip_list::stat<> > ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_hp_cmp_pascal_stat; - typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_dhp_cmp_pascal_stat; - typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_nogc_cmp_pascal_stat; - typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_gpi_cmp_pascal_stat; - typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_gpb_cmp_pascal_stat; - typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_gpt_cmp_pascal_stat; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_turbo32_stat > SkipListMap_hp_cmp_turbo32_stat; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_turbo32_stat > SkipListMap_dhp_cmp_turbo32_stat; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_turbo32_stat > SkipListMap_nogc_cmp_turbo32_stat; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_turbo32_stat > SkipListMap_rcu_gpi_cmp_turbo32_stat; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_turbo32_stat > SkipListMap_rcu_gpb_cmp_turbo32_stat; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_turbo32_stat > SkipListMap_rcu_gpt_cmp_turbo32_stat; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_pascal_stat > SkipListMap_rcu_shb_cmp_pascal_stat; + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_turbo32_stat > SkipListMap_rcu_shb_cmp_turbo32_stat; #endif - class traits_SkipListMap_less_xorshift: public cc::skip_list::make_traits < + class traits_SkipListMap_less_xorshift32: public cc::skip_list::make_traits < co::less< less > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > + ,cc::skip_list::random_level_generator< cc::skip_list::xorshift32 > ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_hp_less_xorshift; - typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_dhp_less_xorshift; - typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_nogc_less_xorshift; - typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_gpi_less_xorshift; - typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_gpb_less_xorshift; - typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_gpt_less_xorshift; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_xorshift32 > SkipListMap_hp_less_xorshift32; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_xorshift32 > SkipListMap_dhp_less_xorshift32; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_xorshift32 > SkipListMap_nogc_less_xorshift32; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_xorshift32 > SkipListMap_rcu_gpi_less_xorshift32; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_xorshift32 > SkipListMap_rcu_gpb_less_xorshift32; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_xorshift32 > SkipListMap_rcu_gpt_less_xorshift32; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_xorshift > SkipListMap_rcu_shb_less_xorshift; + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_xorshift32 > SkipListMap_rcu_shb_less_xorshift32; #endif - class traits_SkipListMap_less_xorshift_stat: public cc::skip_list::make_traits < + class traits_SkipListMap_less_xorshift24: public cc::skip_list::make_traits < + co::less< less > + , cc::skip_list::random_level_generator< cc::skip_list::xorshift24 > + , co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_xorshift24 > SkipListMap_hp_less_xorshift24; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_xorshift24 > SkipListMap_dhp_less_xorshift24; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_xorshift24 > SkipListMap_nogc_less_xorshift24; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_xorshift24 > SkipListMap_rcu_gpi_less_xorshift24; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_xorshift24 > SkipListMap_rcu_gpb_less_xorshift24; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_xorshift24 > SkipListMap_rcu_gpt_less_xorshift24; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_xorshift24 > SkipListMap_rcu_shb_less_xorshift24; +#endif + + class traits_SkipListMap_less_xorshift16: public cc::skip_list::make_traits < + co::less< less > + , cc::skip_list::random_level_generator< cc::skip_list::xorshift16 > + , co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_xorshift16 > SkipListMap_hp_less_xorshift16; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_xorshift16 > SkipListMap_dhp_less_xorshift16; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_xorshift16 > SkipListMap_nogc_less_xorshift16; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_xorshift16 > SkipListMap_rcu_gpi_less_xorshift16; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_xorshift16 > SkipListMap_rcu_gpb_less_xorshift16; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_xorshift16 > SkipListMap_rcu_gpt_less_xorshift16; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_xorshift16 > SkipListMap_rcu_shb_less_xorshift16; +#endif + + class traits_SkipListMap_less_xorshift32_stat: public cc::skip_list::make_traits < co::less< less > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > + ,cc::skip_list::random_level_generator< cc::skip_list::xorshift32 > ,co::stat< cc::skip_list::stat<> > ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_hp_less_xorshift_stat; - typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_dhp_less_xorshift_stat; - typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_nogc_less_xorshift_stat; - typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_gpi_less_xorshift_stat; - typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_gpb_less_xorshift_stat; - typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_gpt_less_xorshift_stat; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_xorshift32_stat > SkipListMap_hp_less_xorshift32_stat; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_xorshift32_stat > SkipListMap_dhp_less_xorshift32_stat; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_xorshift32_stat > SkipListMap_nogc_less_xorshift32_stat; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_xorshift32_stat > SkipListMap_rcu_gpi_less_xorshift32_stat; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_xorshift32_stat > SkipListMap_rcu_gpb_less_xorshift32_stat; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_xorshift32_stat > SkipListMap_rcu_gpt_less_xorshift32_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_xorshift32_stat > SkipListMap_rcu_shb_less_xorshift32_stat; +#endif + + class traits_SkipListMap_less_xorshift24_stat: public cc::skip_list::make_traits < + co::less< less > + , cc::skip_list::random_level_generator< cc::skip_list::xorshift24 > + , co::stat< cc::skip_list::stat<> > + , co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_xorshift24_stat > SkipListMap_hp_less_xorshift24_stat; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_xorshift24_stat > SkipListMap_dhp_less_xorshift24_stat; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_xorshift24_stat > SkipListMap_nogc_less_xorshift24_stat; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_xorshift24_stat > SkipListMap_rcu_gpi_less_xorshift24_stat; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_xorshift24_stat > SkipListMap_rcu_gpb_less_xorshift24_stat; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_xorshift24_stat > SkipListMap_rcu_gpt_less_xorshift24_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_xorshift24_stat > SkipListMap_rcu_shb_less_xorshift24_stat; +#endif + + class traits_SkipListMap_less_xorshift16_stat: public cc::skip_list::make_traits < + co::less< less > + , cc::skip_list::random_level_generator< cc::skip_list::xorshift16 > + , co::stat< cc::skip_list::stat<> > + , co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_less_xorshift16_stat > SkipListMap_hp_less_xorshift16_stat; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_less_xorshift16_stat > SkipListMap_dhp_less_xorshift16_stat; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_less_xorshift16_stat > SkipListMap_nogc_less_xorshift16_stat; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_less_xorshift16_stat > SkipListMap_rcu_gpi_less_xorshift16_stat; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_less_xorshift16_stat > SkipListMap_rcu_gpb_less_xorshift16_stat; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_less_xorshift16_stat > SkipListMap_rcu_gpt_less_xorshift16_stat; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_xorshift_stat > SkipListMap_rcu_shb_less_xorshift_stat; + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_less_xorshift16_stat > SkipListMap_rcu_shb_less_xorshift16_stat; #endif - class traits_SkipListMap_cmp_xorshift: public cc::skip_list::make_traits < + class traits_SkipListMap_cmp_xorshift32: public cc::skip_list::make_traits < co::compare< compare > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > + ,cc::skip_list::random_level_generator< cc::skip_list::xorshift32 > ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_hp_cmp_xorshift; - typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_dhp_cmp_xorshift; - typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_nogc_cmp_xorshift; - typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_gpi_cmp_xorshift; - typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_gpb_cmp_xorshift; - typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_gpt_cmp_xorshift; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_xorshift32 > SkipListMap_hp_cmp_xorshift32; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_xorshift32 > SkipListMap_dhp_cmp_xorshift32; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_xorshift32 > SkipListMap_nogc_cmp_xorshift32; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_xorshift32 > SkipListMap_rcu_gpi_cmp_xorshift32; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_xorshift32 > SkipListMap_rcu_gpb_cmp_xorshift32; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_xorshift32 > SkipListMap_rcu_gpt_cmp_xorshift32; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_xorshift > SkipListMap_rcu_shb_cmp_xorshift; + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_xorshift32 > SkipListMap_rcu_shb_cmp_xorshift32; #endif - class traits_SkipListMap_cmp_xorshift_stat: public cc::skip_list::make_traits < + class traits_SkipListMap_cmp_xorshift32_stat: public cc::skip_list::make_traits < co::compare< compare > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > + ,cc::skip_list::random_level_generator< cc::skip_list::xorshift32 > ,co::stat< cc::skip_list::stat<> > ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_hp_cmp_xorshift_stat; - typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_dhp_cmp_xorshift_stat; - typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_nogc_cmp_xorshift_stat; - typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_gpi_cmp_xorshift_stat; - typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_gpb_cmp_xorshift_stat; - typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_gpt_cmp_xorshift_stat; + typedef SkipListMap< cds::gc::HP, Key, Value, traits_SkipListMap_cmp_xorshift32_stat > SkipListMap_hp_cmp_xorshift32_stat; + typedef SkipListMap< cds::gc::DHP, Key, Value, traits_SkipListMap_cmp_xorshift32_stat > SkipListMap_dhp_cmp_xorshift32_stat; + typedef SkipListMap< cds::gc::nogc, Key, Value, traits_SkipListMap_cmp_xorshift32_stat > SkipListMap_nogc_cmp_xorshift32_stat; + typedef SkipListMap< rcu_gpi, Key, Value, traits_SkipListMap_cmp_xorshift32_stat > SkipListMap_rcu_gpi_cmp_xorshift32_stat; + typedef SkipListMap< rcu_gpb, Key, Value, traits_SkipListMap_cmp_xorshift32_stat > SkipListMap_rcu_gpb_cmp_xorshift32_stat; + typedef SkipListMap< rcu_gpt, Key, Value, traits_SkipListMap_cmp_xorshift32_stat > SkipListMap_rcu_gpt_cmp_xorshift32_stat; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_xorshift_stat > SkipListMap_rcu_shb_cmp_xorshift_stat; + typedef SkipListMap< rcu_shb, Key, Value, traits_SkipListMap_cmp_xorshift32_stat > SkipListMap_rcu_shb_cmp_xorshift32_stat; #endif }; @@ -253,7 +385,7 @@ namespace map { #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL > 1 # define CDSSTRESS_SkipListMap_SHRCU_2( fixture, test_case, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_less_pascal_seqcst, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_less_turbo32_seqcst, key_type, value_type ) \ #else # define CDSSTRESS_SkipListMap_SHRCU_2( fixture, test_case, key_type, value_type ) @@ -261,11 +393,11 @@ namespace map { #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL == 1 # define CDSSTRESS_SkipListMap_SHRCU_1( fixture, test_case, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_less_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_cmp_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_cmp_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_less_xorshift_stat, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_cmp_xorshift, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_less_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_cmp_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_cmp_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_less_xorshift32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_cmp_xorshift32, key_type, value_type ) \ #else # define CDSSTRESS_SkipListMap_SHRCU_1( fixture, test_case, key_type, value_type ) @@ -273,9 +405,9 @@ namespace map { # define CDSSTRESS_SkipListMap_SHRCU( fixture, test_case, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_less_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_less_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_cmp_xorshift_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_less_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_less_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_shb_cmp_xorshift32_stat, key_type, value_type ) \ CDSSTRESS_SkipListMap_SHRCU_1( fixture, test_case, key_type, value_type ) \ CDSSTRESS_SkipListMap_SHRCU_2( fixture, test_case, key_type, value_type ) \ @@ -285,13 +417,13 @@ namespace map { #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL > 1 # define CDSSTRESS_SkipListMap_HP_2( fixture, test_case, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_pascal_seqcst, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_pascal_seqcst, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_turbo32_seqcst, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_turbo32_seqcst, key_type, value_type ) \ # define CDSSTRESS_SkipListMap_RCU_2( fixture, test_case, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_less_pascal_seqcst, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_pascal_seqcst, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_less_pascal_seqcst, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_less_turbo32_seqcst, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_turbo32_seqcst, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_less_turbo32_seqcst, key_type, value_type ) \ # define CDSSTRESS_SkipListMap_2( fixture, test_case, key_type, value_type ) \ CDSSTRESS_SkipListMap_HP_2( fixture, test_case, key_type, value_type ) \ @@ -305,28 +437,28 @@ namespace map { #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL == 1 # define CDSSTRESS_SkipListMap_HP_1( fixture, test_case, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_cmp_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_cmp_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_xorshift_stat, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_cmp_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_cmp_xorshift_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_cmp_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_cmp_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_xorshift32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_cmp_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_cmp_xorshift32_stat, key_type, value_type ) \ # define CDSSTRESS_SkipListMap_RCU_1( fixture, test_case, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_less_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_less_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_cmp_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_cmp_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_cmp_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_less_xorshift_stat, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_less_xorshift_stat, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_cmp_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_cmp_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_cmp_xorshift_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_less_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_less_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_cmp_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_cmp_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_cmp_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_less_xorshift32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_less_xorshift32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_cmp_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_cmp_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_cmp_xorshift32_stat, key_type, value_type ) \ CDSSTRESS_SkipListMap_SHRCU( fixture, test_case, key_type, value_type ) # define CDSSTRESS_SkipListMap_1( fixture, test_case, key_type, value_type ) \ @@ -341,30 +473,42 @@ namespace map { #define CDSSTRESS_SkipListMap_HP( fixture, test_case, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_cmp_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_cmp_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_xorshift_stat, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_cmp_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_cmp_xorshift_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_turbo24, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_turbo16, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_turbo24_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_turbo16_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_cmp_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_cmp_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_xorshift24, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_less_xorshift16, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_xorshift32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_xorshift24_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_less_xorshift16_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_dhp_cmp_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_hp_cmp_xorshift32_stat, key_type, value_type ) \ CDSSTRESS_SkipListMap_HP_1( fixture, test_case, key_type, value_type ) \ CDSSTRESS_SkipListMap_HP_2( fixture, test_case, key_type, value_type ) \ #define CDSSTRESS_SkipListMap_RCU( fixture, test_case, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_less_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_less_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_cmp_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_cmp_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_cmp_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_less_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_less_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_xorshift_stat, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_cmp_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_cmp_xorshift_stat, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_cmp_xorshift_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_less_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_less_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_turbo24_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_turbo16_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_cmp_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_cmp_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_cmp_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_less_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_less_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_xorshift32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_xorshift24_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_less_xorshift16_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpb_cmp_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpi_cmp_xorshift32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_rcu_gpt_cmp_xorshift32_stat, key_type, value_type ) \ CDSSTRESS_SkipListMap_RCU_1( fixture, test_case, key_type, value_type ) \ CDSSTRESS_SkipListMap_RCU_2( fixture, test_case, key_type, value_type ) \ @@ -373,14 +517,22 @@ namespace map { CDSSTRESS_SkipListMap_RCU( fixture, test_case, key_type, value_type ) \ #define CDSSTRESS_SkipListMap_nogc( fixture, test_case, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_pascal_seqcst, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_cmp_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_cmp_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_xorshift_stat, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_cmp_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_cmp_xorshift_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_turbo24, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_turbo16, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_turbo32_seqcst, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_turbo24_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_turbo16_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_cmp_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_cmp_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_xorshift24, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_xorshift16, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_xorshift32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_xorshift24_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_less_xorshift16_stat, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_cmp_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListMap_case( fixture, test_case, SkipListMap_nogc_cmp_xorshift32_stat, key_type, value_type ) \ #endif // ifndef CDSUNIT_MAP_TYPE_SKIP_LIST_H diff --git a/test/stress/pqueue/pop.cpp b/test/stress/pqueue/pop.cpp index 577db2a9..f1d3d14b 100644 --- a/test/stress/pqueue/pop.cpp +++ b/test/stress/pqueue/pop.cpp @@ -269,23 +269,23 @@ namespace { CDSSTRESS_PriorityQueue( pqueue_pop, EllenBinTree_RCU_shb_min_stat ) #endif - CDSSTRESS_PriorityQueue( pqueue_pop, SkipList_HP_max ) - CDSSTRESS_PriorityQueue( pqueue_pop, SkipList_HP_max_stat ) - CDSSTRESS_PriorityQueue( pqueue_pop, SkipList_HP_min ) - CDSSTRESS_PriorityQueue( pqueue_pop, SkipList_HP_min_stat ) - CDSSTRESS_PriorityQueue( pqueue_pop, SkipList_DHP_max ) - CDSSTRESS_PriorityQueue( pqueue_pop, SkipList_DHP_max_stat ) - CDSSTRESS_PriorityQueue( pqueue_pop, SkipList_DHP_min ) - CDSSTRESS_PriorityQueue( pqueue_pop, SkipList_DHP_min_stat ) - CDSSTRESS_PriorityQueue( pqueue_pop, SkipList_RCU_gpi_max ) - CDSSTRESS_PriorityQueue( pqueue_pop, SkipList_RCU_gpi_min ) - CDSSTRESS_PriorityQueue( pqueue_pop, SkipList_RCU_gpb_max ) - CDSSTRESS_PriorityQueue( pqueue_pop, SkipList_RCU_gpb_min ) - CDSSTRESS_PriorityQueue( pqueue_pop, SkipList_RCU_gpt_max ) - CDSSTRESS_PriorityQueue( pqueue_pop, SkipList_RCU_gpt_min ) + CDSSTRESS_PriorityQueue( pqueue_pop, SkipList32_HP_max ) + CDSSTRESS_PriorityQueue( pqueue_pop, SkipList32_HP_max_stat ) + CDSSTRESS_PriorityQueue( pqueue_pop, SkipList32_HP_min ) + CDSSTRESS_PriorityQueue( pqueue_pop, SkipList32_HP_min_stat ) + CDSSTRESS_PriorityQueue( pqueue_pop, SkipList32_DHP_max ) + CDSSTRESS_PriorityQueue( pqueue_pop, SkipList32_DHP_max_stat ) + CDSSTRESS_PriorityQueue( pqueue_pop, SkipList32_DHP_min ) + CDSSTRESS_PriorityQueue( pqueue_pop, SkipList32_DHP_min_stat ) + CDSSTRESS_PriorityQueue( pqueue_pop, SkipList32_RCU_gpi_max ) + CDSSTRESS_PriorityQueue( pqueue_pop, SkipList32_RCU_gpi_min ) + CDSSTRESS_PriorityQueue( pqueue_pop, SkipList32_RCU_gpb_max ) + CDSSTRESS_PriorityQueue( pqueue_pop, SkipList32_RCU_gpb_min ) + CDSSTRESS_PriorityQueue( pqueue_pop, SkipList32_RCU_gpt_max ) + CDSSTRESS_PriorityQueue( pqueue_pop, SkipList32_RCU_gpt_min ) #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - CDSSTRESS_PriorityQueue( pqueue_pop, SkipList_RCU_shb_max ) - CDSSTRESS_PriorityQueue( pqueue_pop, SkipList_RCU_shb_min ) + CDSSTRESS_PriorityQueue( pqueue_pop, SkipList32_RCU_shb_max ) + CDSSTRESS_PriorityQueue( pqueue_pop, SkipList32_RCU_shb_min ) #endif CDSSTRESS_PriorityQueue( pqueue_pop, StdPQueue_vector_spin ) diff --git a/test/stress/pqueue/pqueue_type.h b/test/stress/pqueue/pqueue_type.h index aa33e8ac..66188da8 100644 --- a/test/stress/pqueue/pqueue_type.h +++ b/test/stress/pqueue/pqueue_type.h @@ -487,16 +487,42 @@ namespace pqueue { // Priority queue based on SkipListSet struct traits_SkipList_max : public cc::skip_list::make_traits < - cc::opt::less < std::less > + cc::opt::less < std::less > > ::type {}; - typedef details::SkipListPQueue< cds::gc::HP, Value, traits_SkipList_max > SkipList_HP_max; - typedef details::SkipListPQueue< cds::gc::DHP, Value, traits_SkipList_max > SkipList_DHP_max; - typedef details::SkipListPQueue< rcu_gpi, Value, traits_SkipList_max > SkipList_RCU_gpi_max; - typedef details::SkipListPQueue< rcu_gpb, Value, traits_SkipList_max > SkipList_RCU_gpb_max; - typedef details::SkipListPQueue< rcu_gpt, Value, traits_SkipList_max > SkipList_RCU_gpt_max; + typedef details::SkipListPQueue< cds::gc::HP, Value, traits_SkipList_max > SkipList32_HP_max; + typedef details::SkipListPQueue< cds::gc::DHP, Value, traits_SkipList_max > SkipList32_DHP_max; + typedef details::SkipListPQueue< rcu_gpi, Value, traits_SkipList_max > SkipList32_RCU_gpi_max; + typedef details::SkipListPQueue< rcu_gpb, Value, traits_SkipList_max > SkipList32_RCU_gpb_max; + typedef details::SkipListPQueue< rcu_gpt, Value, traits_SkipList_max > SkipList32_RCU_gpt_max; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef details::SkipListPQueue< rcu_shb, Value, traits_SkipList_max > SkipList_RCU_shb_max; + typedef details::SkipListPQueue< rcu_shb, Value, traits_SkipList_max > SkipList32_RCU_shb_max; +#endif + + struct traits_SkipList24_max: public traits_SkipList_max + { + typedef cc::skip_list::turbo24 random_level_generator; + }; + typedef details::SkipListPQueue< cds::gc::HP, Value, traits_SkipList24_max > SkipList24_HP_max; + typedef details::SkipListPQueue< cds::gc::DHP, Value, traits_SkipList24_max > SkipList24_DHP_max; + typedef details::SkipListPQueue< rcu_gpi, Value, traits_SkipList24_max > SkipList24_RCU_gpi_max; + typedef details::SkipListPQueue< rcu_gpb, Value, traits_SkipList24_max > SkipList24_RCU_gpb_max; + typedef details::SkipListPQueue< rcu_gpt, Value, traits_SkipList24_max > SkipList24_RCU_gpt_max; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef details::SkipListPQueue< rcu_shb, Value, traits_SkipList24_max > SkipList24_RCU_shb_max; +#endif + + struct traits_SkipList16_max: public traits_SkipList_max + { + typedef cc::skip_list::turbo16 random_level_generator; + }; + typedef details::SkipListPQueue< cds::gc::HP, Value, traits_SkipList16_max > SkipList16_HP_max; + typedef details::SkipListPQueue< cds::gc::DHP, Value, traits_SkipList16_max > SkipList16_DHP_max; + typedef details::SkipListPQueue< rcu_gpi, Value, traits_SkipList16_max > SkipList16_RCU_gpi_max; + typedef details::SkipListPQueue< rcu_gpb, Value, traits_SkipList16_max > SkipList16_RCU_gpb_max; + typedef details::SkipListPQueue< rcu_gpt, Value, traits_SkipList16_max > SkipList16_RCU_gpt_max; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef details::SkipListPQueue< rcu_shb, Value, traits_SkipList16_max > SkipList16_RCU_shb_max; #endif struct traits_SkipList_max_stat : @@ -505,13 +531,39 @@ namespace pqueue { ,co::stat< cc::skip_list::stat<> > >::type {}; - typedef details::SkipListPQueue< cds::gc::HP, Value, traits_SkipList_max_stat > SkipList_HP_max_stat; - typedef details::SkipListPQueue< cds::gc::DHP, Value, traits_SkipList_max_stat > SkipList_DHP_max_stat; - typedef details::SkipListPQueue< rcu_gpi, Value, traits_SkipList_max_stat > SkipList_RCU_gpi_max_stat; - typedef details::SkipListPQueue< rcu_gpb, Value, traits_SkipList_max_stat > SkipList_RCU_gpb_max_stat; - typedef details::SkipListPQueue< rcu_gpt, Value, traits_SkipList_max_stat > SkipList_RCU_gpt_max_stat; + typedef details::SkipListPQueue< cds::gc::HP, Value, traits_SkipList_max_stat > SkipList32_HP_max_stat; + typedef details::SkipListPQueue< cds::gc::DHP, Value, traits_SkipList_max_stat > SkipList32_DHP_max_stat; + typedef details::SkipListPQueue< rcu_gpi, Value, traits_SkipList_max_stat > SkipList32_RCU_gpi_max_stat; + typedef details::SkipListPQueue< rcu_gpb, Value, traits_SkipList_max_stat > SkipList32_RCU_gpb_max_stat; + typedef details::SkipListPQueue< rcu_gpt, Value, traits_SkipList_max_stat > SkipList32_RCU_gpt_max_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef details::SkipListPQueue< rcu_shb, Value, traits_SkipList_max_stat > SkipList32_RCU_shb_max_stat; +#endif + + struct traits_SkipList24_max_stat: public traits_SkipList_max_stat + { + typedef cc::skip_list::turbo24 random_level_generator; + }; + typedef details::SkipListPQueue< cds::gc::HP, Value, traits_SkipList24_max_stat > SkipList24_HP_max_stat; + typedef details::SkipListPQueue< cds::gc::DHP, Value, traits_SkipList24_max_stat > SkipList24_DHP_max_stat; + typedef details::SkipListPQueue< rcu_gpi, Value, traits_SkipList24_max_stat > SkipList24_RCU_gpi_max_stat; + typedef details::SkipListPQueue< rcu_gpb, Value, traits_SkipList24_max_stat > SkipList24_RCU_gpb_max_stat; + typedef details::SkipListPQueue< rcu_gpt, Value, traits_SkipList24_max_stat > SkipList24_RCU_gpt_max_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef details::SkipListPQueue< rcu_shb, Value, traits_SkipList24_max_stat > SkipList24_RCU_shb_max_stat; +#endif + + struct traits_SkipList16_max_stat: public traits_SkipList_max_stat + { + typedef cc::skip_list::turbo16 random_level_generator; + }; + typedef details::SkipListPQueue< cds::gc::HP, Value, traits_SkipList16_max_stat > SkipList16_HP_max_stat; + typedef details::SkipListPQueue< cds::gc::DHP, Value, traits_SkipList16_max_stat > SkipList16_DHP_max_stat; + typedef details::SkipListPQueue< rcu_gpi, Value, traits_SkipList16_max_stat > SkipList16_RCU_gpi_max_stat; + typedef details::SkipListPQueue< rcu_gpb, Value, traits_SkipList16_max_stat > SkipList16_RCU_gpb_max_stat; + typedef details::SkipListPQueue< rcu_gpt, Value, traits_SkipList16_max_stat > SkipList16_RCU_gpt_max_stat; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef details::SkipListPQueue< rcu_shb, Value, traits_SkipList_max_stat > SkipList_RCU_shb_max_stat; + typedef details::SkipListPQueue< rcu_shb, Value, traits_SkipList16_max_stat > SkipList16_RCU_shb_max_stat; #endif struct traits_SkipList_min : @@ -519,13 +571,39 @@ namespace pqueue { cc::opt::less< std::greater > >::type {}; - typedef details::SkipListPQueue< cds::gc::HP, Value, traits_SkipList_min, false > SkipList_HP_min; - typedef details::SkipListPQueue< cds::gc::DHP, Value, traits_SkipList_min, false > SkipList_DHP_min; - typedef details::SkipListPQueue< rcu_gpi, Value, traits_SkipList_min, false > SkipList_RCU_gpi_min; - typedef details::SkipListPQueue< rcu_gpb, Value, traits_SkipList_min, false > SkipList_RCU_gpb_min; - typedef details::SkipListPQueue< rcu_gpt, Value, traits_SkipList_min, false > SkipList_RCU_gpt_min; + typedef details::SkipListPQueue< cds::gc::HP, Value, traits_SkipList_min, false > SkipList32_HP_min; + typedef details::SkipListPQueue< cds::gc::DHP, Value, traits_SkipList_min, false > SkipList32_DHP_min; + typedef details::SkipListPQueue< rcu_gpi, Value, traits_SkipList_min, false > SkipList32_RCU_gpi_min; + typedef details::SkipListPQueue< rcu_gpb, Value, traits_SkipList_min, false > SkipList32_RCU_gpb_min; + typedef details::SkipListPQueue< rcu_gpt, Value, traits_SkipList_min, false > SkipList32_RCU_gpt_min; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef details::SkipListPQueue< rcu_shb, Value, traits_SkipList_min, false > SkipList_RCU_shb_min; + typedef details::SkipListPQueue< rcu_shb, Value, traits_SkipList_min, false > SkipList32_RCU_shb_min; +#endif + + struct traits_SkipList24_min: public traits_SkipList_min + { + typedef cc::skip_list::turbo24 random_level_generator; + }; + typedef details::SkipListPQueue< cds::gc::HP, Value, traits_SkipList24_min > SkipList24_HP_min; + typedef details::SkipListPQueue< cds::gc::DHP, Value, traits_SkipList24_min > SkipList24_DHP_min; + typedef details::SkipListPQueue< rcu_gpi, Value, traits_SkipList24_min > SkipList24_RCU_gpi_min; + typedef details::SkipListPQueue< rcu_gpb, Value, traits_SkipList24_min > SkipList24_RCU_gpb_min; + typedef details::SkipListPQueue< rcu_gpt, Value, traits_SkipList24_min > SkipList24_RCU_gpt_min; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef details::SkipListPQueue< rcu_shb, Value, traits_SkipList24_min > SkipList24_RCU_shb_min; +#endif + + struct traits_SkipList16_min: public traits_SkipList_min + { + typedef cc::skip_list::turbo16 random_level_generator; + }; + typedef details::SkipListPQueue< cds::gc::HP, Value, traits_SkipList16_min > SkipList16_HP_min; + typedef details::SkipListPQueue< cds::gc::DHP, Value, traits_SkipList16_min > SkipList16_DHP_min; + typedef details::SkipListPQueue< rcu_gpi, Value, traits_SkipList16_min > SkipList16_RCU_gpi_min; + typedef details::SkipListPQueue< rcu_gpb, Value, traits_SkipList16_min > SkipList16_RCU_gpb_min; + typedef details::SkipListPQueue< rcu_gpt, Value, traits_SkipList16_min > SkipList16_RCU_gpt_min; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef details::SkipListPQueue< rcu_shb, Value, traits_SkipList16_min > SkipList16_RCU_shb_min; #endif struct traits_SkipList_min_stat : @@ -534,13 +612,39 @@ namespace pqueue { ,co::stat< cc::skip_list::stat<> > >::type {}; - typedef details::SkipListPQueue< cds::gc::HP, Value, traits_SkipList_min_stat, false > SkipList_HP_min_stat; - typedef details::SkipListPQueue< cds::gc::DHP, Value, traits_SkipList_min_stat, false > SkipList_DHP_min_stat; - typedef details::SkipListPQueue< rcu_gpi, Value, traits_SkipList_min_stat, false > SkipList_RCU_gpi_min_stat; - typedef details::SkipListPQueue< rcu_gpb, Value, traits_SkipList_min_stat, false > SkipList_RCU_gpb_min_stat; - typedef details::SkipListPQueue< rcu_gpt, Value, traits_SkipList_min_stat, false > SkipList_RCU_gpt_min_stat; + typedef details::SkipListPQueue< cds::gc::HP, Value, traits_SkipList_min_stat, false > SkipList32_HP_min_stat; + typedef details::SkipListPQueue< cds::gc::DHP, Value, traits_SkipList_min_stat, false > SkipList32_DHP_min_stat; + typedef details::SkipListPQueue< rcu_gpi, Value, traits_SkipList_min_stat, false > SkipList32_RCU_gpi_min_stat; + typedef details::SkipListPQueue< rcu_gpb, Value, traits_SkipList_min_stat, false > SkipList32_RCU_gpb_min_stat; + typedef details::SkipListPQueue< rcu_gpt, Value, traits_SkipList_min_stat, false > SkipList32_RCU_gpt_min_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef details::SkipListPQueue< rcu_shb, Value, traits_SkipList_min_stat, false > SkipList32_RCU_shb_min_stat; +#endif + + struct traits_SkipList24_min_stat: public traits_SkipList_min_stat + { + typedef cc::skip_list::turbo24 random_level_generator; + }; + typedef details::SkipListPQueue< cds::gc::HP, Value, traits_SkipList24_min_stat > SkipList24_HP_min_stat; + typedef details::SkipListPQueue< cds::gc::DHP, Value, traits_SkipList24_min_stat > SkipList24_DHP_min_stat; + typedef details::SkipListPQueue< rcu_gpi, Value, traits_SkipList24_min_stat > SkipList24_RCU_gpi_min_stat; + typedef details::SkipListPQueue< rcu_gpb, Value, traits_SkipList24_min_stat > SkipList24_RCU_gpb_min_stat; + typedef details::SkipListPQueue< rcu_gpt, Value, traits_SkipList24_min_stat > SkipList24_RCU_gpt_min_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef details::SkipListPQueue< rcu_shb, Value, traits_SkipList24_min_stat > SkipList24_RCU_shb_min_stat; +#endif + + struct traits_SkipList16_min_stat: public traits_SkipList_min_stat + { + typedef cc::skip_list::turbo16 random_level_generator; + }; + typedef details::SkipListPQueue< cds::gc::HP, Value, traits_SkipList16_min_stat > SkipList16_HP_min_stat; + typedef details::SkipListPQueue< cds::gc::DHP, Value, traits_SkipList16_min_stat > SkipList16_DHP_min_stat; + typedef details::SkipListPQueue< rcu_gpi, Value, traits_SkipList16_min_stat > SkipList16_RCU_gpi_min_stat; + typedef details::SkipListPQueue< rcu_gpb, Value, traits_SkipList16_min_stat > SkipList16_RCU_gpb_min_stat; + typedef details::SkipListPQueue< rcu_gpt, Value, traits_SkipList16_min_stat > SkipList16_RCU_gpt_min_stat; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef details::SkipListPQueue< rcu_shb, Value, traits_SkipList_min_stat, false > SkipList_RCU_shb_min_stat; + typedef details::SkipListPQueue< rcu_shb, Value, traits_SkipList16_min_stat > SkipList16_RCU_shb_min_stat; #endif diff --git a/test/stress/pqueue/push.cpp b/test/stress/pqueue/push.cpp index 2d3b4db7..71640a9a 100644 --- a/test/stress/pqueue/push.cpp +++ b/test/stress/pqueue/push.cpp @@ -230,23 +230,23 @@ namespace pqueue { CDSSTRESS_PriorityQueue( pqueue_push, EllenBinTree_RCU_shb_min_stat ) #endif - CDSSTRESS_PriorityQueue( pqueue_push, SkipList_HP_max ) - CDSSTRESS_PriorityQueue( pqueue_push, SkipList_HP_max_stat ) - CDSSTRESS_PriorityQueue( pqueue_push, SkipList_HP_min ) - CDSSTRESS_PriorityQueue( pqueue_push, SkipList_HP_min_stat ) - CDSSTRESS_PriorityQueue( pqueue_push, SkipList_DHP_max ) - CDSSTRESS_PriorityQueue( pqueue_push, SkipList_DHP_max_stat ) - CDSSTRESS_PriorityQueue( pqueue_push, SkipList_DHP_min ) - CDSSTRESS_PriorityQueue( pqueue_push, SkipList_DHP_min_stat ) - CDSSTRESS_PriorityQueue( pqueue_push, SkipList_RCU_gpi_max ) - CDSSTRESS_PriorityQueue( pqueue_push, SkipList_RCU_gpi_min ) - CDSSTRESS_PriorityQueue( pqueue_push, SkipList_RCU_gpb_max ) - CDSSTRESS_PriorityQueue( pqueue_push, SkipList_RCU_gpb_min ) - CDSSTRESS_PriorityQueue( pqueue_push, SkipList_RCU_gpt_max ) - CDSSTRESS_PriorityQueue( pqueue_push, SkipList_RCU_gpt_min ) + CDSSTRESS_PriorityQueue( pqueue_push, SkipList32_HP_max ) + CDSSTRESS_PriorityQueue( pqueue_push, SkipList32_HP_max_stat ) + CDSSTRESS_PriorityQueue( pqueue_push, SkipList32_HP_min ) + CDSSTRESS_PriorityQueue( pqueue_push, SkipList32_HP_min_stat ) + CDSSTRESS_PriorityQueue( pqueue_push, SkipList32_DHP_max ) + CDSSTRESS_PriorityQueue( pqueue_push, SkipList32_DHP_max_stat ) + CDSSTRESS_PriorityQueue( pqueue_push, SkipList32_DHP_min ) + CDSSTRESS_PriorityQueue( pqueue_push, SkipList32_DHP_min_stat ) + CDSSTRESS_PriorityQueue( pqueue_push, SkipList32_RCU_gpi_max ) + CDSSTRESS_PriorityQueue( pqueue_push, SkipList32_RCU_gpi_min ) + CDSSTRESS_PriorityQueue( pqueue_push, SkipList32_RCU_gpb_max ) + CDSSTRESS_PriorityQueue( pqueue_push, SkipList32_RCU_gpb_min ) + CDSSTRESS_PriorityQueue( pqueue_push, SkipList32_RCU_gpt_max ) + CDSSTRESS_PriorityQueue( pqueue_push, SkipList32_RCU_gpt_min ) #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - CDSSTRESS_PriorityQueue( pqueue_push, SkipList_RCU_shb_max ) - CDSSTRESS_PriorityQueue( pqueue_push, SkipList_RCU_shb_min ) + CDSSTRESS_PriorityQueue( pqueue_push, SkipList32_RCU_shb_max ) + CDSSTRESS_PriorityQueue( pqueue_push, SkipList32_RCU_shb_min ) #endif CDSSTRESS_PriorityQueue( pqueue_push, StdPQueue_vector_spin ) diff --git a/test/stress/pqueue/push_pop.cpp b/test/stress/pqueue/push_pop.cpp index 4e048365..0b99adc6 100644 --- a/test/stress/pqueue/push_pop.cpp +++ b/test/stress/pqueue/push_pop.cpp @@ -284,23 +284,43 @@ namespace { CDSSTRESS_PriorityQueue( pqueue_push_pop, EllenBinTree_RCU_shb_min_stat ) #endif - CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList_HP_max ) - CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList_HP_max_stat ) - CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList_HP_min ) - CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList_HP_min_stat ) - CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList_DHP_max ) - CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList_DHP_max_stat ) - CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList_DHP_min ) - CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList_DHP_min_stat ) - CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList_RCU_gpi_max ) - CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList_RCU_gpi_min ) - CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList_RCU_gpb_max ) - CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList_RCU_gpb_min ) - CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList_RCU_gpt_max ) - CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList_RCU_gpt_min ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList32_HP_max ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList24_HP_max ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList16_HP_max ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList32_HP_max_stat ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList24_HP_max_stat ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList16_HP_max_stat ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList32_HP_min ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList24_HP_min ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList16_HP_min ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList32_HP_min_stat ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList24_HP_min_stat ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList16_HP_min_stat ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList32_DHP_max ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList24_DHP_max ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList16_DHP_max ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList32_DHP_max_stat ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList24_DHP_max_stat ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList16_DHP_max_stat ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList32_DHP_min ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList24_DHP_min ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList16_DHP_min ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList32_DHP_min_stat ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList24_DHP_min_stat ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList16_DHP_min_stat ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList32_RCU_gpi_max ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList32_RCU_gpi_min ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList32_RCU_gpb_max ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList24_RCU_gpb_max ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList16_RCU_gpb_max ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList32_RCU_gpb_min ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList24_RCU_gpb_min ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList16_RCU_gpb_min ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList32_RCU_gpt_max ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList32_RCU_gpt_min ) #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList_RCU_shb_max ) - CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList_RCU_shb_min ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList32_RCU_shb_max ) + CDSSTRESS_PriorityQueue( pqueue_push_pop, SkipList32_RCU_shb_min ) #endif CDSSTRESS_PriorityQueue( pqueue_push_pop, StdPQueue_vector_spin ) diff --git a/test/stress/set/set_type_skip_list.h b/test/stress/set/set_type_skip_list.h index 539f3014..02232098 100644 --- a/test/stress/set/set_type_skip_list.h +++ b/test/stress/set/set_type_skip_list.h @@ -67,144 +67,268 @@ namespace set { typedef typename base_class::less less; typedef typename base_class::hash hash; - class traits_SkipListSet_less_pascal: public cc::skip_list::make_traits < + class traits_SkipListSet_less_turbo32: public cc::skip_list::make_traits < co::less< less > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > + ,cc::skip_list::random_level_generator< cc::skip_list::turbo32 > ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_pascal > SkipListSet_hp_less_pascal; - typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_pascal > SkipListSet_dhp_less_pascal; - typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_pascal > SkipListSet_rcu_gpi_less_pascal; - typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_pascal > SkipListSet_rcu_gpb_less_pascal; - typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_pascal > SkipListSet_rcu_gpt_less_pascal; + typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_turbo32 > SkipListSet_hp_less_turbo32; + typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_turbo32 > SkipListSet_dhp_less_turbo32; + typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_turbo32 > SkipListSet_rcu_gpi_less_turbo32; + typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_turbo32 > SkipListSet_rcu_gpb_less_turbo32; + typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_turbo32 > SkipListSet_rcu_gpt_less_turbo32; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_pascal > SkipListSet_rcu_shb_less_pascal; + typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_turbo32 > SkipListSet_rcu_shb_less_turbo32; #endif - class traits_SkipListSet_less_pascal_seqcst: public cc::skip_list::make_traits < + class traits_SkipListSet_less_turbo24: public cc::skip_list::make_traits < co::less< less > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > + ,cc::skip_list::random_level_generator< cc::skip_list::turbo24 > + ,co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_turbo24 > SkipListSet_hp_less_turbo24; + typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_turbo24 > SkipListSet_dhp_less_turbo24; + typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_turbo24 > SkipListSet_rcu_gpi_less_turbo24; + typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_turbo24 > SkipListSet_rcu_gpb_less_turbo24; + typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_turbo24 > SkipListSet_rcu_gpt_less_turbo24; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_turbo24 > SkipListSet_rcu_shb_less_turbo24; +#endif + + class traits_SkipListSet_less_turbo16: public cc::skip_list::make_traits < + co::less< less > + ,cc::skip_list::random_level_generator< cc::skip_list::turbo16 > + ,co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_turbo16 > SkipListSet_hp_less_turbo16; + typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_turbo16 > SkipListSet_dhp_less_turbo16; + typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_turbo16 > SkipListSet_rcu_gpi_less_turbo16; + typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_turbo16 > SkipListSet_rcu_gpb_less_turbo16; + typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_turbo16 > SkipListSet_rcu_gpt_less_turbo16; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_turbo16 > SkipListSet_rcu_shb_less_turbo16; +#endif + + class traits_SkipListSet_less_turbo32_seqcst: public cc::skip_list::make_traits < + co::less< less > + ,cc::skip_list::random_level_generator< cc::skip_list::turbo32 > ,co::memory_model< co::v::sequential_consistent > ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_pascal_seqcst > SkipListSet_hp_less_pascal_seqcst; - typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_pascal_seqcst > SkipListSet_dhp_less_pascal_seqcst; - typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_pascal_seqcst > SkipListSet_rcu_gpi_less_pascal_seqcst; - typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_pascal_seqcst > SkipListSet_rcu_gpb_less_pascal_seqcst; - typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_pascal_seqcst > SkipListSet_rcu_gpt_less_pascal_seqcst; + typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_turbo32_seqcst > SkipListSet_hp_less_turbo32_seqcst; + typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_turbo32_seqcst > SkipListSet_dhp_less_turbo32_seqcst; + typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_turbo32_seqcst > SkipListSet_rcu_gpi_less_turbo32_seqcst; + typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_turbo32_seqcst > SkipListSet_rcu_gpb_less_turbo32_seqcst; + typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_turbo32_seqcst > SkipListSet_rcu_gpt_less_turbo32_seqcst; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_pascal_seqcst > SkipListSet_rcu_shb_less_pascal_seqcst; + typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_turbo32_seqcst > SkipListSet_rcu_shb_less_turbo32_seqcst; #endif - class traits_SkipListSet_less_pascal_stat: public cc::skip_list::make_traits < + class traits_SkipListSet_less_turbo32_stat: public cc::skip_list::make_traits < co::less< less > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > + ,cc::skip_list::random_level_generator< cc::skip_list::turbo32 > ,co::stat< cc::skip_list::stat<> > ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_pascal_stat > SkipListSet_hp_less_pascal_stat; - typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_pascal_stat > SkipListSet_dhp_less_pascal_stat; - typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_pascal_stat > SkipListSet_rcu_gpi_less_pascal_stat; - typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_pascal_stat > SkipListSet_rcu_gpb_less_pascal_stat; - typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_pascal_stat > SkipListSet_rcu_gpt_less_pascal_stat; + typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_turbo32_stat > SkipListSet_hp_less_turbo32_stat; + typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_turbo32_stat > SkipListSet_dhp_less_turbo32_stat; + typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_turbo32_stat > SkipListSet_rcu_gpi_less_turbo32_stat; + typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_turbo32_stat > SkipListSet_rcu_gpb_less_turbo32_stat; + typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_turbo32_stat > SkipListSet_rcu_gpt_less_turbo32_stat; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_pascal_stat > SkipListSet_rcu_shb_less_pascal_stat; + typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_turbo32_stat > SkipListSet_rcu_shb_less_turbo32_stat; #endif - class traits_SkipListSet_cmp_pascal: public cc::skip_list::make_traits < + class traits_SkipListSet_less_turbo24_stat: public cc::skip_list::make_traits < + co::less< less > + ,cc::skip_list::random_level_generator< cc::skip_list::turbo24 > + ,co::stat< cc::skip_list::stat<> > + ,co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_turbo24_stat > SkipListSet_hp_less_turbo24_stat; + typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_turbo24_stat > SkipListSet_dhp_less_turbo24_stat; + typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_turbo24_stat > SkipListSet_rcu_gpi_less_turbo24_stat; + typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_turbo24_stat > SkipListSet_rcu_gpb_less_turbo24_stat; + typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_turbo24_stat > SkipListSet_rcu_gpt_less_turbo24_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_turbo24_stat > SkipListSet_rcu_shb_less_turbo24_stat; +#endif + + class traits_SkipListSet_less_turbo16_stat: public cc::skip_list::make_traits < + co::less< less > + ,cc::skip_list::random_level_generator< cc::skip_list::turbo16 > + ,co::stat< cc::skip_list::stat<> > + ,co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_turbo16_stat > SkipListSet_hp_less_turbo16_stat; + typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_turbo16_stat > SkipListSet_dhp_less_turbo16_stat; + typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_turbo16_stat > SkipListSet_rcu_gpi_less_turbo16_stat; + typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_turbo16_stat > SkipListSet_rcu_gpb_less_turbo16_stat; + typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_turbo16_stat > SkipListSet_rcu_gpt_less_turbo16_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_turbo16_stat > SkipListSet_rcu_shb_less_turbo16_stat; +#endif + + class traits_SkipListSet_cmp_turbo32: public cc::skip_list::make_traits < co::compare< compare > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > + ,cc::skip_list::random_level_generator< cc::skip_list::turbo32 > ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_cmp_pascal > SkipListSet_hp_cmp_pascal; - typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_cmp_pascal > SkipListSet_dhp_cmp_pascal; - typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_cmp_pascal > SkipListSet_rcu_gpi_cmp_pascal; - typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_cmp_pascal > SkipListSet_rcu_gpb_cmp_pascal; - typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_cmp_pascal > SkipListSet_rcu_gpt_cmp_pascal; + typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_cmp_turbo32 > SkipListSet_hp_cmp_turbo32; + typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_cmp_turbo32 > SkipListSet_dhp_cmp_turbo32; + typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_cmp_turbo32 > SkipListSet_rcu_gpi_cmp_turbo32; + typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_cmp_turbo32 > SkipListSet_rcu_gpb_cmp_turbo32; + typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_cmp_turbo32 > SkipListSet_rcu_gpt_cmp_turbo32; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_cmp_pascal > SkipListSet_rcu_shb_cmp_pascal; + typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_cmp_turbo32 > SkipListSet_rcu_shb_cmp_turbo32; #endif - class traits_SkipListSet_cmp_pascal_stat: public cc::skip_list::make_traits < + class traits_SkipListSet_cmp_turbo32_stat: public cc::skip_list::make_traits < co::compare< compare > - ,cc::skip_list::random_level_generator< cc::skip_list::turbo_pascal > + ,cc::skip_list::random_level_generator< cc::skip_list::turbo32 > ,co::stat< cc::skip_list::stat<> > ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_cmp_pascal_stat > SkipListSet_hp_cmp_pascal_stat; - typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_cmp_pascal_stat > SkipListSet_dhp_cmp_pascal_stat; - typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_cmp_pascal_stat > SkipListSet_rcu_gpi_cmp_pascal_stat; - typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_cmp_pascal_stat > SkipListSet_rcu_gpb_cmp_pascal_stat; - typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_cmp_pascal_stat > SkipListSet_rcu_gpt_cmp_pascal_stat; + typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_cmp_turbo32_stat > SkipListSet_hp_cmp_turbo32_stat; + typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_cmp_turbo32_stat > SkipListSet_dhp_cmp_turbo32_stat; + typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_cmp_turbo32_stat > SkipListSet_rcu_gpi_cmp_turbo32_stat; + typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_cmp_turbo32_stat > SkipListSet_rcu_gpb_cmp_turbo32_stat; + typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_cmp_turbo32_stat > SkipListSet_rcu_gpt_cmp_turbo32_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_cmp_turbo32_stat > SkipListSet_rcu_shb_cmp_turbo32_stat; +#endif + + class traits_SkipListSet_less_xorshift32: public cc::skip_list::make_traits < + co::less< less > + ,cc::skip_list::random_level_generator< cc::skip_list::xorshift32 > + ,co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_xorshift32 > SkipListSet_hp_less_xorshift32; + typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_xorshift32 > SkipListSet_dhp_less_xorshift32; + typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_xorshift32 > SkipListSet_rcu_gpi_less_xorshift32; + typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_xorshift32 > SkipListSet_rcu_gpb_less_xorshift32; + typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_xorshift32 > SkipListSet_rcu_gpt_less_xorshift32; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_cmp_pascal_stat > SkipListSet_rcu_shb_cmp_pascal_stat; + typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_xorshift32 > SkipListSet_rcu_shb_less_xorshift32; #endif - class traits_SkipListSet_less_xorshift: public cc::skip_list::make_traits < + class traits_SkipListSet_less_xorshift24: public cc::skip_list::make_traits < co::less< less > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > + ,cc::skip_list::random_level_generator< cc::skip_list::xorshift24 > ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_xorshift > SkipListSet_hp_less_xorshift; - typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_xorshift > SkipListSet_dhp_less_xorshift; - typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_xorshift > SkipListSet_rcu_gpi_less_xorshift; - typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_xorshift > SkipListSet_rcu_gpb_less_xorshift; - typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_xorshift > SkipListSet_rcu_gpt_less_xorshift; + typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_xorshift24 > SkipListSet_hp_less_xorshift24; + typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_xorshift24 > SkipListSet_dhp_less_xorshift24; + typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_xorshift24 > SkipListSet_rcu_gpi_less_xorshift24; + typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_xorshift24 > SkipListSet_rcu_gpb_less_xorshift24; + typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_xorshift24 > SkipListSet_rcu_gpt_less_xorshift24; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_xorshift > SkipListSet_rcu_shb_less_xorshift; + typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_xorshift24 > SkipListSet_rcu_shb_less_xorshift24; #endif - class traits_SkipListSet_less_xorshift_stat: public cc::skip_list::make_traits < + class traits_SkipListSet_less_xorshift16: public cc::skip_list::make_traits < co::less< less > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > + , cc::skip_list::random_level_generator< cc::skip_list::xorshift16 > + , co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_xorshift16 > SkipListSet_hp_less_xorshift16; + typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_xorshift16 > SkipListSet_dhp_less_xorshift16; + typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_xorshift16 > SkipListSet_rcu_gpi_less_xorshift16; + typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_xorshift16 > SkipListSet_rcu_gpb_less_xorshift16; + typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_xorshift16 > SkipListSet_rcu_gpt_less_xorshift16; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_xorshift16 > SkipListSet_rcu_shb_less_xorshift16; +#endif + + class traits_SkipListSet_less_xorshift32_stat: public cc::skip_list::make_traits < + co::less< less > + ,cc::skip_list::random_level_generator< cc::skip_list::xorshift32 > ,co::stat< cc::skip_list::stat<> > ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_xorshift_stat > SkipListSet_hp_less_xorshift_stat; - typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_xorshift_stat > SkipListSet_dhp_less_xorshift_stat; - typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_xorshift_stat > SkipListSet_rcu_gpi_less_xorshift_stat; - typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_xorshift_stat > SkipListSet_rcu_gpb_less_xorshift_stat; - typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_xorshift_stat > SkipListSet_rcu_gpt_less_xorshift_stat; + typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_xorshift32_stat > SkipListSet_hp_less_xorshift32_stat; + typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_xorshift32_stat > SkipListSet_dhp_less_xorshift32_stat; + typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_xorshift32_stat > SkipListSet_rcu_gpi_less_xorshift32_stat; + typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_xorshift32_stat > SkipListSet_rcu_gpb_less_xorshift32_stat; + typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_xorshift32_stat > SkipListSet_rcu_gpt_less_xorshift32_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_xorshift32_stat > SkipListSet_rcu_shb_less_xorshift32_stat; +#endif + + class traits_SkipListSet_less_xorshift24_stat: public cc::skip_list::make_traits < + co::less< less > + , cc::skip_list::random_level_generator< cc::skip_list::xorshift24 > + , co::stat< cc::skip_list::stat<> > + , co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_xorshift24_stat > SkipListSet_hp_less_xorshift24_stat; + typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_xorshift24_stat > SkipListSet_dhp_less_xorshift24_stat; + typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_xorshift24_stat > SkipListSet_rcu_gpi_less_xorshift24_stat; + typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_xorshift24_stat > SkipListSet_rcu_gpb_less_xorshift24_stat; + typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_xorshift24_stat > SkipListSet_rcu_gpt_less_xorshift24_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_xorshift24_stat > SkipListSet_rcu_shb_less_xorshift24_stat; +#endif + + class traits_SkipListSet_less_xorshift16_stat: public cc::skip_list::make_traits < + co::less< less > + , cc::skip_list::random_level_generator< cc::skip_list::xorshift16 > + , co::stat< cc::skip_list::stat<> > + , co::item_counter< cds::atomicity::item_counter > + >::type + {}; + typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_less_xorshift16_stat > SkipListSet_hp_less_xorshift16_stat; + typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_less_xorshift16_stat > SkipListSet_dhp_less_xorshift16_stat; + typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_less_xorshift16_stat > SkipListSet_rcu_gpi_less_xorshift16_stat; + typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_less_xorshift16_stat > SkipListSet_rcu_gpb_less_xorshift16_stat; + typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_less_xorshift16_stat > SkipListSet_rcu_gpt_less_xorshift16_stat; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_xorshift_stat > SkipListSet_rcu_shb_less_xorshift_stat; + typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_less_xorshift16_stat > SkipListSet_rcu_shb_less_xorshift16_stat; #endif - class traits_SkipListSet_cmp_xorshift: public cc::skip_list::make_traits < + class traits_SkipListSet_cmp_xorshift32: public cc::skip_list::make_traits < co::compare< compare > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > + ,cc::skip_list::random_level_generator< cc::skip_list::xorshift32 > ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_cmp_xorshift > SkipListSet_hp_cmp_xorshift; - typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_cmp_xorshift > SkipListSet_dhp_cmp_xorshift; - typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_cmp_xorshift > SkipListSet_rcu_gpi_cmp_xorshift; - typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_cmp_xorshift > SkipListSet_rcu_gpb_cmp_xorshift; - typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_cmp_xorshift > SkipListSet_rcu_gpt_cmp_xorshift; + typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_cmp_xorshift32 > SkipListSet_hp_cmp_xorshift32; + typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_cmp_xorshift32 > SkipListSet_dhp_cmp_xorshift32; + typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_cmp_xorshift32 > SkipListSet_rcu_gpi_cmp_xorshift32; + typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_cmp_xorshift32 > SkipListSet_rcu_gpb_cmp_xorshift32; + typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_cmp_xorshift32 > SkipListSet_rcu_gpt_cmp_xorshift32; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_cmp_xorshift > SkipListSet_rcu_shb_cmp_xorshift; + typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_cmp_xorshift32 > SkipListSet_rcu_shb_cmp_xorshift32; #endif - class traits_SkipListSet_cmp_xorshift_stat: public cc::skip_list::make_traits < + class traits_SkipListSet_cmp_xorshift32_stat: public cc::skip_list::make_traits < co::compare< compare > - ,cc::skip_list::random_level_generator< cc::skip_list::xorshift > + ,cc::skip_list::random_level_generator< cc::skip_list::xorshift32 > ,co::stat< cc::skip_list::stat<> > ,co::item_counter< cds::atomicity::item_counter > >::type {}; - typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_cmp_xorshift_stat > SkipListSet_hp_cmp_xorshift_stat; - typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_cmp_xorshift_stat > SkipListSet_dhp_cmp_xorshift_stat; - typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_cmp_xorshift_stat > SkipListSet_rcu_gpi_cmp_xorshift_stat; - typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_cmp_xorshift_stat > SkipListSet_rcu_gpb_cmp_xorshift_stat; - typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_cmp_xorshift_stat > SkipListSet_rcu_gpt_cmp_xorshift_stat; + typedef SkipListSet< cds::gc::HP, key_val, traits_SkipListSet_cmp_xorshift32_stat > SkipListSet_hp_cmp_xorshift32_stat; + typedef SkipListSet< cds::gc::DHP, key_val, traits_SkipListSet_cmp_xorshift32_stat > SkipListSet_dhp_cmp_xorshift32_stat; + typedef SkipListSet< rcu_gpi, key_val, traits_SkipListSet_cmp_xorshift32_stat > SkipListSet_rcu_gpi_cmp_xorshift32_stat; + typedef SkipListSet< rcu_gpb, key_val, traits_SkipListSet_cmp_xorshift32_stat > SkipListSet_rcu_gpb_cmp_xorshift32_stat; + typedef SkipListSet< rcu_gpt, key_val, traits_SkipListSet_cmp_xorshift32_stat > SkipListSet_rcu_gpt_cmp_xorshift32_stat; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_cmp_xorshift_stat > SkipListSet_rcu_shb_cmp_xorshift_stat; + typedef SkipListSet< rcu_shb, key_val, traits_SkipListSet_cmp_xorshift32_stat > SkipListSet_rcu_shb_cmp_xorshift32_stat; #endif }; @@ -227,7 +351,7 @@ namespace set { #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL > 1 # define CDSSTRESS_SkipListSet_SHRCU_2( fixture, test_case, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_less_pascal_seqcst, key_type, value_type) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_less_turbo32_seqcst, key_type, value_type) \ #else # define CDSSTRESS_SkipListSet_SHRCU_2( fixture, test_case, key_type, value_type ) @@ -235,10 +359,10 @@ namespace set { #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL == 1 # define CDSSTRESS_SkipListSet_SHRCU_1( fixture, test_case, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_less_pascal_stat, key_type, value_type) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_cmp_pascal, key_type, value_type) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_less_xorshift_stat, key_type, value_type) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_cmp_xorshift_stat, key_type, value_type) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_less_turbo32_stat, key_type, value_type) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_cmp_turbo32, key_type, value_type) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_less_xorshift32_stat, key_type, value_type) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_cmp_xorshift32_stat, key_type, value_type) \ #else # define CDSSTRESS_SkipListSet_SHRCU_1( fixture, test_case, key_type, value_type ) @@ -246,10 +370,10 @@ namespace set { # define CDSSTRESS_SkipListSet_SHRCU( fixture, test_case, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_less_pascal, key_type, value_type) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_cmp_pascal_stat, key_type, value_type) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_less_xorshift, key_type, value_type) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_cmp_xorshift, key_type, value_type) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_less_turbo32, key_type, value_type) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_cmp_turbo32_stat, key_type, value_type) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_less_xorshift32, key_type, value_type) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_shb_cmp_xorshift32, key_type, value_type) \ CDSSTRESS_SkipListSet_SHRCU_1( fixture, test_case, key_type, value_type ) \ CDSSTRESS_SkipListSet_SHRCU_2( fixture, test_case, key_type, value_type ) \ @@ -259,13 +383,13 @@ namespace set { #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL > 1 # define CDSSTRESS_SkipListSet_HP_2( fixture, test_case, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_pascal_seqcst, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_pascal_seqcst, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_turbo32_seqcst, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_turbo32_seqcst, key_type, value_type ) \ # define CDSSTRESS_SkipListSet_RCU_2( fixture, test_case, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_less_pascal_seqcst, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_pascal_seqcst, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_less_pascal_seqcst, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_less_turbo32_seqcst, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_turbo32_seqcst, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_less_turbo32_seqcst, key_type, value_type ) \ #else # define CDSSTRESS_SkipListSet_HP_2( fixture, test_case, key_type, value_type ) @@ -274,28 +398,28 @@ namespace set { #if defined(CDS_STRESS_TEST_LEVEL) && CDS_STRESS_TEST_LEVEL == 1 # define CDSSTRESS_SkipListSet_HP_1( fixture, test_case, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_cmp_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_cmp_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_xorshift_stat, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_cmp_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_cmp_xorshift_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_cmp_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_cmp_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_xorshift32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_cmp_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_cmp_xorshift32_stat, key_type, value_type ) \ # define CDSSTRESS_SkipListSet_RCU_1( fixture, test_case, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_less_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_less_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_cmp_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_cmp_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_cmp_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_less_xorshift_stat, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_less_xorshift_stat, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_cmp_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_cmp_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_cmp_xorshift_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_less_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_less_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_cmp_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_cmp_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_cmp_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_less_xorshift32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_less_xorshift32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_cmp_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_cmp_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_cmp_xorshift32_stat, key_type, value_type ) \ CDSSTRESS_SkipListSet_SHRCU( fixture, test_case, key_type, value_type ) \ #else @@ -305,30 +429,42 @@ namespace set { #define CDSSTRESS_SkipListSet_HP( fixture, test_case, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_cmp_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_cmp_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_xorshift_stat, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_cmp_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_cmp_xorshift_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_turbo24, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_turbo16, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_turbo24_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_turbo16_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_cmp_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_cmp_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_xorshift24, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_less_xorshift16, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_xorshift32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_xorshift24_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_less_xorshift16_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_dhp_cmp_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_hp_cmp_xorshift32_stat, key_type, value_type ) \ CDSSTRESS_SkipListSet_HP_1( fixture, test_case, key_type, value_type ) \ CDSSTRESS_SkipListSet_HP_2( fixture, test_case, key_type, value_type ) \ #define CDSSTRESS_SkipListSet_RCU( fixture, test_case, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_less_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_less_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_cmp_pascal, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_cmp_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_cmp_pascal_stat, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_less_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_less_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_xorshift_stat, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_cmp_xorshift, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_cmp_xorshift_stat, key_type, value_type ) \ - CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_cmp_xorshift_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_less_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_less_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_turbo24_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_turbo16_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_cmp_turbo32, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_cmp_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_cmp_turbo32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_less_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_less_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_xorshift32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_xorshift24_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_less_xorshift16_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpb_cmp_xorshift32, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpi_cmp_xorshift32_stat, key_type, value_type ) \ + CDSSTRESS_SkipListSet_case( fixture, test_case, SkipListSet_rcu_gpt_cmp_xorshift32_stat, key_type, value_type ) \ CDSSTRESS_SkipListSet_RCU_1( fixture, test_case, key_type, value_type ) \ CDSSTRESS_SkipListSet_RCU_2( fixture, test_case, key_type, value_type ) \ diff --git a/test/unit/intrusive-set/intrusive_skiplist_dhp.cpp b/test/unit/intrusive-set/intrusive_skiplist_dhp.cpp index 92d8320a..3b2adf9f 100644 --- a/test/unit/intrusive-set/intrusive_skiplist_dhp.cpp +++ b/test/unit/intrusive-set/intrusive_skiplist_dhp.cpp @@ -115,14 +115,14 @@ namespace { test( s ); } - TEST_F( IntrusiveSkipListSet_DHP, base_xorshift ) + TEST_F( IntrusiveSkipListSet_DHP, base_xorshift32 ) { struct traits : public ci::skip_list::traits { typedef ci::skip_list::base_hook< ci::opt::gc< gc_type >> hook; typedef mock_disposer disposer; typedef cmp compare; - typedef ci::skip_list::xorshift random_level_generator; + typedef ci::skip_list::xorshift32 random_level_generator; }; typedef ci::SkipListSet< gc_type, base_item_type, traits > set_type; @@ -131,6 +131,85 @@ namespace { test( s ); } + TEST_F( IntrusiveSkipListSet_DHP, base_xorshift24 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::base_hook< ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::xorshift24 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, base_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_DHP, base_xorshift16 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::base_hook< ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::xorshift16 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, base_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_DHP, base_turbo32 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::base_hook< ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::turbo32 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, base_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_DHP, base_turbo24 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::base_hook< ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::turbo24 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, base_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_DHP, base_turbo16 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::base_hook< ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::turbo16 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, base_item_type, traits > set_type; + + set_type s; + test( s ); + } TEST_F( IntrusiveSkipListSet_DHP, member_cmp ) { @@ -181,14 +260,94 @@ namespace { test( s ); } - TEST_F( IntrusiveSkipListSet_DHP, member_xorshift ) + TEST_F( IntrusiveSkipListSet_DHP, member_xorshift32 ) { struct traits : public ci::skip_list::traits { typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< gc_type >> hook; typedef mock_disposer disposer; typedef cmp compare; - typedef ci::skip_list::xorshift random_level_generator; + typedef ci::skip_list::xorshift32 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, member_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_DHP, member_xorshift24 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::xorshift24 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, member_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_DHP, member_xorshift16 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::xorshift16 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, member_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_DHP, member_turbo32 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::turbo32 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, member_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_DHP, member_turbo24 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::turbo24 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, member_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_DHP, member_turbo16 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::turbo16 random_level_generator; }; typedef ci::SkipListSet< gc_type, member_item_type, traits > set_type; diff --git a/test/unit/intrusive-set/intrusive_skiplist_hp.cpp b/test/unit/intrusive-set/intrusive_skiplist_hp.cpp index 9c6f36d3..9e7cda9a 100644 --- a/test/unit/intrusive-set/intrusive_skiplist_hp.cpp +++ b/test/unit/intrusive-set/intrusive_skiplist_hp.cpp @@ -116,14 +116,14 @@ namespace { test( s ); } - TEST_F( IntrusiveSkipListSet_HP, base_xorshift ) + TEST_F( IntrusiveSkipListSet_HP, base_xorshift32 ) { struct traits : public ci::skip_list::traits { typedef ci::skip_list::base_hook< ci::opt::gc< gc_type >> hook; typedef mock_disposer disposer; typedef cmp compare; - typedef ci::skip_list::xorshift random_level_generator; + typedef ci::skip_list::xorshift32 random_level_generator; }; typedef ci::SkipListSet< gc_type, base_item_type, traits > set_type; @@ -132,6 +132,85 @@ namespace { test( s ); } + TEST_F( IntrusiveSkipListSet_HP, base_xorshift24 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::base_hook< ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::xorshift24 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, base_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_HP, base_xorshift16 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::base_hook< ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::xorshift16 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, base_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_HP, base_turbo32 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::base_hook< ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::turbo32 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, base_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_HP, base_turbo24 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::base_hook< ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::turbo24 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, base_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_HP, base_turbo16 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::base_hook< ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::turbo16 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, base_item_type, traits > set_type; + + set_type s; + test( s ); + } TEST_F( IntrusiveSkipListSet_HP, member_cmp ) { @@ -182,14 +261,94 @@ namespace { test( s ); } - TEST_F( IntrusiveSkipListSet_HP, member_xorshift ) + TEST_F( IntrusiveSkipListSet_HP, member_xorshift32 ) { struct traits : public ci::skip_list::traits { typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< gc_type >> hook; typedef mock_disposer disposer; typedef cmp compare; - typedef ci::skip_list::xorshift random_level_generator; + typedef ci::skip_list::xorshift32 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, member_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_HP, member_xorshift24 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::xorshift24 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, member_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_HP, member_xorshift16 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::xorshift16 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, member_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_HP, member_turbo32 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::turbo32 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, member_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_HP, member_turbo24 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::turbo24 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, member_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_HP, member_turbo16 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::turbo16 random_level_generator; }; typedef ci::SkipListSet< gc_type, member_item_type, traits > set_type; diff --git a/test/unit/intrusive-set/intrusive_skiplist_nogc.cpp b/test/unit/intrusive-set/intrusive_skiplist_nogc.cpp index 70f5898d..bcd230db 100644 --- a/test/unit/intrusive-set/intrusive_skiplist_nogc.cpp +++ b/test/unit/intrusive-set/intrusive_skiplist_nogc.cpp @@ -101,14 +101,14 @@ namespace { test( s ); } - TEST_F( IntrusiveSkipListSet_NoGC, base_xorshift ) + TEST_F( IntrusiveSkipListSet_NoGC, base_xorshift32 ) { struct traits : public ci::skip_list::traits { typedef ci::skip_list::base_hook< ci::opt::gc< gc_type >> hook; typedef mock_disposer disposer; typedef cmp compare; - typedef ci::skip_list::xorshift random_level_generator; + typedef ci::skip_list::xorshift32 random_level_generator; }; typedef ci::SkipListSet< gc_type, base_item_type, traits > set_type; @@ -117,6 +117,85 @@ namespace { test( s ); } + TEST_F( IntrusiveSkipListSet_NoGC, base_xorshift24 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::base_hook< ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::xorshift24 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, base_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_NoGC, base_xorshift16 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::base_hook< ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::xorshift16 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, base_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_NoGC, base_turbo32 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::base_hook< ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::turbo32 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, base_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_NoGC, base_turbo24 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::base_hook< ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::turbo24 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, base_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_NoGC, base_turbo16 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::base_hook< ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::turbo16 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, base_item_type, traits > set_type; + + set_type s; + test( s ); + } TEST_F( IntrusiveSkipListSet_NoGC, member_cmp ) { @@ -167,14 +246,94 @@ namespace { test( s ); } - TEST_F( IntrusiveSkipListSet_NoGC, member_xorshift ) + TEST_F( IntrusiveSkipListSet_NoGC, member_xorshift32 ) { struct traits : public ci::skip_list::traits { typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< gc_type >> hook; typedef mock_disposer disposer; typedef cmp compare; - typedef ci::skip_list::xorshift random_level_generator; + typedef ci::skip_list::xorshift32 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, member_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_NoGC, member_xorshift24 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::xorshift24 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, member_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_NoGC, member_xorshift16 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::xorshift16 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, member_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_NoGC, member_turbo32 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::turbo32 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, member_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_NoGC, member_turbo24 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::turbo24 random_level_generator; + }; + + typedef ci::SkipListSet< gc_type, member_item_type, traits > set_type; + + set_type s; + test( s ); + } + + TEST_F( IntrusiveSkipListSet_NoGC, member_turbo16 ) + { + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< gc_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::turbo16 random_level_generator; }; typedef ci::SkipListSet< gc_type, member_item_type, traits > set_type; diff --git a/test/unit/intrusive-set/test_intrusive_skiplist_rcu.h b/test/unit/intrusive-set/test_intrusive_skiplist_rcu.h index 306ebfa1..ee62fc27 100644 --- a/test/unit/intrusive-set/test_intrusive_skiplist_rcu.h +++ b/test/unit/intrusive-set/test_intrusive_skiplist_rcu.h @@ -124,7 +124,7 @@ TYPED_TEST_P( IntrusiveSkipListSet, base_cmpmix ) this->test( s ); } -TYPED_TEST_P( IntrusiveSkipListSet, base_xorshift ) +TYPED_TEST_P( IntrusiveSkipListSet, base_xorshift32 ) { typedef typename TestFixture::rcu_type rcu_type; typedef typename TestFixture::base_item_type base_item_type; @@ -136,7 +136,112 @@ TYPED_TEST_P( IntrusiveSkipListSet, base_xorshift ) typedef ci::skip_list::base_hook< ci::opt::gc< rcu_type >> hook; typedef mock_disposer disposer; typedef cmp compare; - typedef ci::skip_list::xorshift random_level_generator; + typedef ci::skip_list::xorshift32 random_level_generator; + }; + + typedef ci::SkipListSet< rcu_type, base_item_type, traits > set_type; + + set_type s; + this->test( s ); +} + +TYPED_TEST_P( IntrusiveSkipListSet, base_xorshift24 ) +{ + typedef typename TestFixture::rcu_type rcu_type; + typedef typename TestFixture::base_item_type base_item_type; + typedef typename TestFixture::mock_disposer mock_disposer; + typedef typename TestFixture::template cmp cmp; + + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::base_hook< ci::opt::gc< rcu_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::xorshift24 random_level_generator; + }; + + typedef ci::SkipListSet< rcu_type, base_item_type, traits > set_type; + + set_type s; + this->test( s ); +} + +TYPED_TEST_P( IntrusiveSkipListSet, base_xorshift16 ) +{ + typedef typename TestFixture::rcu_type rcu_type; + typedef typename TestFixture::base_item_type base_item_type; + typedef typename TestFixture::mock_disposer mock_disposer; + typedef typename TestFixture::template cmp cmp; + + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::base_hook< ci::opt::gc< rcu_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::xorshift16 random_level_generator; + }; + + typedef ci::SkipListSet< rcu_type, base_item_type, traits > set_type; + + set_type s; + this->test( s ); +} + +TYPED_TEST_P( IntrusiveSkipListSet, base_turbo32 ) +{ + typedef typename TestFixture::rcu_type rcu_type; + typedef typename TestFixture::base_item_type base_item_type; + typedef typename TestFixture::mock_disposer mock_disposer; + typedef typename TestFixture::template cmp cmp; + + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::base_hook< ci::opt::gc< rcu_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::turbo32 random_level_generator; + }; + + typedef ci::SkipListSet< rcu_type, base_item_type, traits > set_type; + + set_type s; + this->test( s ); +} + +TYPED_TEST_P( IntrusiveSkipListSet, base_turbo24 ) +{ + typedef typename TestFixture::rcu_type rcu_type; + typedef typename TestFixture::base_item_type base_item_type; + typedef typename TestFixture::mock_disposer mock_disposer; + typedef typename TestFixture::template cmp cmp; + + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::base_hook< ci::opt::gc< rcu_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::turbo24 random_level_generator; + }; + + typedef ci::SkipListSet< rcu_type, base_item_type, traits > set_type; + + set_type s; + this->test( s ); +} + +TYPED_TEST_P( IntrusiveSkipListSet, base_turbo16 ) +{ + typedef typename TestFixture::rcu_type rcu_type; + typedef typename TestFixture::base_item_type base_item_type; + typedef typename TestFixture::mock_disposer mock_disposer; + typedef typename TestFixture::template cmp cmp; + + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::base_hook< ci::opt::gc< rcu_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef ci::skip_list::turbo16 random_level_generator; }; typedef ci::SkipListSet< rcu_type, base_item_type, traits > set_type; @@ -212,7 +317,7 @@ TYPED_TEST_P( IntrusiveSkipListSet, member_cmpmix ) this->test( s ); } -TYPED_TEST_P( IntrusiveSkipListSet, member_xorshift ) +TYPED_TEST_P( IntrusiveSkipListSet, member_xorshift32 ) { typedef typename TestFixture::rcu_type rcu_type; typedef typename TestFixture::member_item_type member_item_type; @@ -227,7 +332,127 @@ TYPED_TEST_P( IntrusiveSkipListSet, member_xorshift ) typedef cmp compare; typedef less_predicate less; typedef ci::skip_list::stat<> stat; - typedef ci::skip_list::xorshift random_level_generator; + typedef ci::skip_list::xorshift32 random_level_generator; + }; + + typedef ci::SkipListSet< rcu_type, member_item_type, traits > set_type; + + set_type s; + this->test( s ); +} + +TYPED_TEST_P( IntrusiveSkipListSet, member_xorshift24 ) +{ + typedef typename TestFixture::rcu_type rcu_type; + typedef typename TestFixture::member_item_type member_item_type; + typedef typename TestFixture::mock_disposer mock_disposer; + typedef typename TestFixture::template less less_predicate; + typedef typename TestFixture::template cmp cmp; + + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< rcu_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef less_predicate less; + typedef ci::skip_list::stat<> stat; + typedef ci::skip_list::xorshift24 random_level_generator; + }; + + typedef ci::SkipListSet< rcu_type, member_item_type, traits > set_type; + + set_type s; + this->test( s ); +} + +TYPED_TEST_P( IntrusiveSkipListSet, member_xorshift16 ) +{ + typedef typename TestFixture::rcu_type rcu_type; + typedef typename TestFixture::member_item_type member_item_type; + typedef typename TestFixture::mock_disposer mock_disposer; + typedef typename TestFixture::template less less_predicate; + typedef typename TestFixture::template cmp cmp; + + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< rcu_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef less_predicate less; + typedef ci::skip_list::stat<> stat; + typedef ci::skip_list::xorshift16 random_level_generator; + }; + + typedef ci::SkipListSet< rcu_type, member_item_type, traits > set_type; + + set_type s; + this->test( s ); +} + +TYPED_TEST_P( IntrusiveSkipListSet, member_turbo32 ) +{ + typedef typename TestFixture::rcu_type rcu_type; + typedef typename TestFixture::member_item_type member_item_type; + typedef typename TestFixture::mock_disposer mock_disposer; + typedef typename TestFixture::template less less_predicate; + typedef typename TestFixture::template cmp cmp; + + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< rcu_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef less_predicate less; + typedef ci::skip_list::stat<> stat; + typedef ci::skip_list::turbo32 random_level_generator; + }; + + typedef ci::SkipListSet< rcu_type, member_item_type, traits > set_type; + + set_type s; + this->test( s ); +} + +TYPED_TEST_P( IntrusiveSkipListSet, member_turbo24 ) +{ + typedef typename TestFixture::rcu_type rcu_type; + typedef typename TestFixture::member_item_type member_item_type; + typedef typename TestFixture::mock_disposer mock_disposer; + typedef typename TestFixture::template less less_predicate; + typedef typename TestFixture::template cmp cmp; + + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< rcu_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef less_predicate less; + typedef ci::skip_list::stat<> stat; + typedef ci::skip_list::turbo24 random_level_generator; + }; + + typedef ci::SkipListSet< rcu_type, member_item_type, traits > set_type; + + set_type s; + this->test( s ); +} + +TYPED_TEST_P( IntrusiveSkipListSet, member_turbo16 ) +{ + typedef typename TestFixture::rcu_type rcu_type; + typedef typename TestFixture::member_item_type member_item_type; + typedef typename TestFixture::mock_disposer mock_disposer; + typedef typename TestFixture::template less less_predicate; + typedef typename TestFixture::template cmp cmp; + + struct traits: public ci::skip_list::traits + { + typedef ci::skip_list::member_hook< offsetof( member_item_type, hMember ), ci::opt::gc< rcu_type >> hook; + typedef mock_disposer disposer; + typedef cmp compare; + typedef less_predicate less; + typedef ci::skip_list::stat<> stat; + typedef ci::skip_list::turbo16 random_level_generator; }; typedef ci::SkipListSet< rcu_type, member_item_type, traits > set_type; @@ -237,10 +462,10 @@ TYPED_TEST_P( IntrusiveSkipListSet, member_xorshift ) } -// GCC 5: All test names should be written on single line, otherwise a runtime error will be encountered like as +// All test names should be written on single line, otherwise a runtime error will be encountered like as // "No test named can be found in this test case" REGISTER_TYPED_TEST_CASE_P( IntrusiveSkipListSet, - base_cmp, base_less, base_cmpmix, base_xorshift, member_cmp, member_less, member_cmpmix, member_xorshift + base_cmp, base_less, base_cmpmix, base_xorshift32, base_xorshift24, base_xorshift16, base_turbo32, base_turbo24, base_turbo16, member_cmp, member_less, member_cmpmix, member_xorshift32, member_xorshift24, member_xorshift16, member_turbo32, member_turbo24, member_turbo16 ); diff --git a/test/unit/map/skiplist_dhp.cpp b/test/unit/map/skiplist_dhp.cpp index 410beed7..451b91bb 100644 --- a/test/unit/map/skiplist_dhp.cpp +++ b/test/unit/map/skiplist_dhp.cpp @@ -55,103 +55,7 @@ namespace { cds::gc::dhp::smr::destruct(); } }; - - TEST_F( SkipListMap_DHP, compare ) - { - typedef cc::SkipListMap< gc_type, key_type, value_type, - typename cc::skip_list::make_traits< - cds::opt::compare< cmp > - >::type - > map_type; - - map_type m; - test( m ); - } - - TEST_F( SkipListMap_DHP, less ) - { - typedef cc::SkipListMap< gc_type, key_type, value_type, - typename cc::skip_list::make_traits< - cds::opt::less< base_class::less > - >::type - > map_type; - - map_type m; - test( m ); - } - - TEST_F( SkipListMap_DHP, cmpmix ) - { - typedef cc::SkipListMap< gc_type, key_type, value_type, - typename cc::skip_list::make_traits< - cds::opt::less< base_class::less > - ,cds::opt::compare< cmp > - >::type - > map_type; - - map_type m; - test( m ); - } - - TEST_F( SkipListMap_DHP, item_counting ) - { - struct map_traits: public cc::skip_list::traits - { - typedef cmp compare; - typedef base_class::less less; - typedef cds::atomicity::item_counter item_counter; - }; - typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; - - map_type m; - test( m ); - } - - TEST_F( SkipListMap_DHP, backoff ) - { - struct map_traits: public cc::skip_list::traits - { - typedef cmp compare; - typedef base_class::less less; - typedef cds::atomicity::item_counter item_counter; - typedef cds::backoff::yield back_off; - }; - typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; - - map_type m; - test( m ); - } - - TEST_F( SkipListMap_DHP, stat ) - { - struct map_traits: public cc::skip_list::traits - { - typedef cmp compare; - typedef base_class::less less; - typedef cds::atomicity::item_counter item_counter; - typedef cds::backoff::yield back_off; - typedef cc::skip_list::stat<> stat; - }; - typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; - - map_type m; - test( m ); - } - - TEST_F( SkipListMap_DHP, random_level_generator ) - { - struct map_traits: public cc::skip_list::traits - { - typedef cmp compare; - typedef base_class::less less; - typedef cds::atomicity::item_counter item_counter; - typedef cc::skip_list::stat<> stat; - typedef cc::skip_list::xorshift random_level_generator; - }; - typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; - - map_type m; - test( m ); - } +# define CDSTEST_FIXTURE_NAME SkipListMap_DHP +# include "skiplist_hp_inl.h" } // namespace diff --git a/test/unit/map/skiplist_hp.cpp b/test/unit/map/skiplist_hp.cpp index e66b0388..a5d4a0da 100644 --- a/test/unit/map/skiplist_hp.cpp +++ b/test/unit/map/skiplist_hp.cpp @@ -57,102 +57,7 @@ namespace { } }; - TEST_F( SkipListMap_HP, compare ) - { - typedef cc::SkipListMap< gc_type, key_type, value_type, - typename cc::skip_list::make_traits< - cds::opt::compare< cmp > - >::type - > map_type; - - map_type m; - test( m ); - } - - TEST_F( SkipListMap_HP, less ) - { - typedef cc::SkipListMap< gc_type, key_type, value_type, - typename cc::skip_list::make_traits< - cds::opt::less< base_class::less > - >::type - > map_type; - - map_type m; - test( m ); - } - - TEST_F( SkipListMap_HP, cmpmix ) - { - typedef cc::SkipListMap< gc_type, key_type, value_type, - typename cc::skip_list::make_traits< - cds::opt::less< base_class::less > - ,cds::opt::compare< cmp > - >::type - > map_type; - - map_type m; - test( m ); - } - - TEST_F( SkipListMap_HP, item_counting ) - { - struct map_traits: public cc::skip_list::traits - { - typedef cmp compare; - typedef base_class::less less; - typedef cds::atomicity::item_counter item_counter; - }; - typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; - - map_type m; - test( m ); - } - - TEST_F( SkipListMap_HP, backoff ) - { - struct map_traits: public cc::skip_list::traits - { - typedef cmp compare; - typedef base_class::less less; - typedef cds::atomicity::item_counter item_counter; - typedef cds::backoff::yield back_off; - }; - typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; - - map_type m; - test( m ); - } - - TEST_F( SkipListMap_HP, stat ) - { - struct map_traits: public cc::skip_list::traits - { - typedef cmp compare; - typedef base_class::less less; - typedef cds::atomicity::item_counter item_counter; - typedef cds::backoff::yield back_off; - typedef cc::skip_list::stat<> stat; - }; - typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; - - map_type m; - test( m ); - } - - TEST_F( SkipListMap_HP, random_level_generator ) - { - struct map_traits: public cc::skip_list::traits - { - typedef cmp compare; - typedef base_class::less less; - typedef cds::atomicity::item_counter item_counter; - typedef cc::skip_list::stat<> stat; - typedef cc::skip_list::xorshift random_level_generator; - }; - typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; - - map_type m; - test( m ); - } +# define CDSTEST_FIXTURE_NAME SkipListMap_HP +# include "skiplist_hp_inl.h" } // namespace diff --git a/test/unit/map/skiplist_hp_inl.h b/test/unit/map/skiplist_hp_inl.h new file mode 100644 index 00000000..8baa9e1a --- /dev/null +++ b/test/unit/map/skiplist_hp_inl.h @@ -0,0 +1,191 @@ +/* + This file is a part of libcds - Concurrent Data Structures library + + (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017 + + Source code repo: http://github.com/khizmax/libcds/ + Download: http://sourceforge.net/projects/libcds/files/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + + +TEST_F( CDSTEST_FIXTURE_NAME, compare ) +{ + typedef cc::SkipListMap< gc_type, key_type, value_type, + typename cc::skip_list::make_traits< + cds::opt::compare< cmp > + >::type + > map_type; + + map_type m; + test( m ); +} + +TEST_F( CDSTEST_FIXTURE_NAME, less ) +{ + typedef cc::SkipListMap< gc_type, key_type, value_type, + typename cc::skip_list::make_traits< + cds::opt::less< base_class::less > + >::type + > map_type; + + map_type m; + test( m ); +} + +TEST_F( CDSTEST_FIXTURE_NAME, cmpmix ) +{ + typedef cc::SkipListMap< gc_type, key_type, value_type, + typename cc::skip_list::make_traits< + cds::opt::less< base_class::less > + ,cds::opt::compare< cmp > + >::type + > map_type; + + map_type m; + test( m ); +} + +TEST_F( CDSTEST_FIXTURE_NAME, item_counting ) +{ + struct map_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef base_class::less less; + typedef cds::atomicity::item_counter item_counter; + }; + typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; + + map_type m; + test( m ); +} + +TEST_F( CDSTEST_FIXTURE_NAME, backoff ) +{ + struct map_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef base_class::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cds::backoff::yield back_off; + }; + typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; + + map_type m; + test( m ); +} + +TEST_F( CDSTEST_FIXTURE_NAME, stat ) +{ + struct map_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef base_class::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cds::backoff::yield back_off; + typedef cc::skip_list::stat<> stat; + }; + typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; + + map_type m; + test( m ); +} + +TEST_F( CDSTEST_FIXTURE_NAME, xorshift32 ) +{ + struct map_traits: public cc::skip_list::traits + { + typedef base_class::less less; + typedef cc::skip_list::xorshift32 random_level_generator; + }; + typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; + + map_type m; + test( m ); +} + +TEST_F( CDSTEST_FIXTURE_NAME, xorshift24 ) +{ + struct map_traits: public cc::skip_list::traits + { + typedef base_class::less less; + typedef cc::skip_list::stat<> stat; + typedef cc::skip_list::xorshift24 random_level_generator; + }; + typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; + + map_type m; + test( m ); +} + +TEST_F( CDSTEST_FIXTURE_NAME, xorshift16 ) +{ + struct map_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef cc::skip_list::xorshift16 random_level_generator; + }; + typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; + + map_type m; + test( m ); +} + +TEST_F( CDSTEST_FIXTURE_NAME, turbo32 ) +{ + struct map_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef cc::skip_list::turbo32 random_level_generator; + }; + typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; + + map_type m; + test( m ); +} + +TEST_F( CDSTEST_FIXTURE_NAME, turbo24 ) +{ + struct map_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef cc::skip_list::turbo24 random_level_generator; + }; + typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; + + map_type m; + test( m ); +} + +TEST_F( CDSTEST_FIXTURE_NAME, turbo16 ) +{ + struct map_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef cc::skip_list::turbo16 random_level_generator; + }; + typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; + + map_type m; + test( m ); +} diff --git a/test/unit/map/skiplist_nogc.cpp b/test/unit/map/skiplist_nogc.cpp index 0c29eb8a..c40abc70 100644 --- a/test/unit/map/skiplist_nogc.cpp +++ b/test/unit/map/skiplist_nogc.cpp @@ -177,7 +177,7 @@ namespace { test( m ); } - TEST_F( SkipListMap_NoGC, random_level_generator ) + TEST_F( SkipListMap_NoGC, xorshift32 ) { struct map_traits: public cc::skip_list::traits { @@ -185,7 +185,87 @@ namespace { typedef base_class::less less; typedef cds::atomicity::item_counter item_counter; typedef cc::skip_list::stat<> stat; - typedef cc::skip_list::xorshift random_level_generator; + typedef cc::skip_list::xorshift32 random_level_generator; + }; + typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; + + map_type m; + test( m ); + } + + TEST_F( SkipListMap_NoGC, xorshift24 ) + { + struct map_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef base_class::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cc::skip_list::stat<> stat; + typedef cc::skip_list::xorshift24 random_level_generator; + }; + typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; + + map_type m; + test( m ); + } + + TEST_F( SkipListMap_NoGC, xorshift16 ) + { + struct map_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef base_class::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cc::skip_list::stat<> stat; + typedef cc::skip_list::xorshift16 random_level_generator; + }; + typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; + + map_type m; + test( m ); + } + + TEST_F( SkipListMap_NoGC, turbo32 ) + { + struct map_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef base_class::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cc::skip_list::stat<> stat; + typedef cc::skip_list::turbo32 random_level_generator; + }; + typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; + + map_type m; + test( m ); + } + + TEST_F( SkipListMap_NoGC, turbo24 ) + { + struct map_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef base_class::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cc::skip_list::stat<> stat; + typedef cc::skip_list::turbo24 random_level_generator; + }; + typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; + + map_type m; + test( m ); + } + + TEST_F( SkipListMap_NoGC, turbo16 ) + { + struct map_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef base_class::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cc::skip_list::stat<> stat; + typedef cc::skip_list::turbo16 random_level_generator; }; typedef cc::SkipListMap< gc_type, key_type, value_type, map_traits > map_type; diff --git a/test/unit/map/test_skiplist_rcu.h b/test/unit/map/test_skiplist_rcu.h index 61a44cd9..39014ce5 100644 --- a/test/unit/map/test_skiplist_rcu.h +++ b/test/unit/map/test_skiplist_rcu.h @@ -223,7 +223,7 @@ TYPED_TEST_P( SkipListMap, stat ) this->test( m ); } -TYPED_TEST_P( SkipListMap, random_level_generator ) +TYPED_TEST_P( SkipListMap, xorshift32 ) { typedef typename TestFixture::rcu_type rcu_type; typedef typename TestFixture::key_type key_type; @@ -231,12 +231,25 @@ TYPED_TEST_P( SkipListMap, random_level_generator ) struct map_traits: public cc::skip_list::traits { - typedef typename TestFixture::cmp compare; typedef typename TestFixture::less less; - typedef cds::atomicity::item_counter item_counter; - typedef cc::skip_list::stat<> stat; - typedef cc::skip_list::xorshift random_level_generator; - typedef cds::opt::v::rcu_assert_deadlock rcu_check_deadlock; + typedef cc::skip_list::xorshift32 random_level_generator; + }; + typedef cc::SkipListMap< rcu_type, key_type, value_type, map_traits > map_type; + + map_type m; + this->test( m ); +} + +TYPED_TEST_P( SkipListMap, xorshift24 ) +{ + typedef typename TestFixture::rcu_type rcu_type; + typedef typename TestFixture::key_type key_type; + typedef typename TestFixture::value_type value_type; + + struct map_traits: public cc::skip_list::traits + { + typedef typename TestFixture::less less; + typedef cc::skip_list::xorshift24 random_level_generator; }; typedef cc::SkipListMap< rcu_type, key_type, value_type, map_traits > map_type; @@ -244,9 +257,76 @@ TYPED_TEST_P( SkipListMap, random_level_generator ) this->test( m ); } +TYPED_TEST_P( SkipListMap, xorshift16 ) +{ + typedef typename TestFixture::rcu_type rcu_type; + typedef typename TestFixture::key_type key_type; + typedef typename TestFixture::value_type value_type; + + struct map_traits: public cc::skip_list::traits + { + typedef typename TestFixture::less less; + typedef cc::skip_list::xorshift16 random_level_generator; + }; + typedef cc::SkipListMap< rcu_type, key_type, value_type, map_traits > map_type; + + map_type m; + this->test( m ); +} + +TYPED_TEST_P( SkipListMap, turbo32 ) +{ + typedef typename TestFixture::rcu_type rcu_type; + typedef typename TestFixture::key_type key_type; + typedef typename TestFixture::value_type value_type; + + struct map_traits: public cc::skip_list::traits + { + typedef typename TestFixture::less less; + typedef cc::skip_list::turbo32 random_level_generator; + }; + typedef cc::SkipListMap< rcu_type, key_type, value_type, map_traits > map_type; + + map_type m; + this->test( m ); +} + +TYPED_TEST_P( SkipListMap, turbo24 ) +{ + typedef typename TestFixture::rcu_type rcu_type; + typedef typename TestFixture::key_type key_type; + typedef typename TestFixture::value_type value_type; + + struct map_traits: public cc::skip_list::traits + { + typedef typename TestFixture::less less; + typedef cc::skip_list::turbo24 random_level_generator; + }; + typedef cc::SkipListMap< rcu_type, key_type, value_type, map_traits > map_type; + + map_type m; + this->test( m ); +} + +TYPED_TEST_P( SkipListMap, turbo16 ) +{ + typedef typename TestFixture::rcu_type rcu_type; + typedef typename TestFixture::key_type key_type; + typedef typename TestFixture::value_type value_type; + + struct map_traits: public cc::skip_list::traits + { + typedef typename TestFixture::less less; + typedef cc::skip_list::turbo16 random_level_generator; + }; + typedef cc::SkipListMap< rcu_type, key_type, value_type, map_traits > map_type; + + map_type m; + this->test( m ); +} REGISTER_TYPED_TEST_CASE_P( SkipListMap, - compare, less, cmpmix, item_counting, backoff, stat, random_level_generator + compare, less, cmpmix, item_counting, backoff, stat, xorshift32, xorshift24, xorshift16, turbo32, turbo24, turbo16 ); diff --git a/test/unit/set/skiplist_dhp.cpp b/test/unit/set/skiplist_dhp.cpp index cd34b788..a1031f25 100644 --- a/test/unit/set/skiplist_dhp.cpp +++ b/test/unit/set/skiplist_dhp.cpp @@ -56,102 +56,7 @@ namespace { } }; - TEST_F( SkipListSet_DHP, compare ) - { - typedef cc::SkipListSet< gc_type, int_item, - typename cc::skip_list::make_traits< - cds::opt::compare< cmp > - >::type - > set_type; - - set_type s; - test( s ); - } - - TEST_F( SkipListSet_DHP, less ) - { - typedef cc::SkipListSet< gc_type, int_item, - typename cc::skip_list::make_traits< - cds::opt::less< base_class::less > - >::type - > set_type; - - set_type s; - test( s ); - } - - TEST_F( SkipListSet_DHP, cmpmix ) - { - typedef cc::SkipListSet< gc_type, int_item, - typename cc::skip_list::make_traits< - cds::opt::less< base_class::less > - ,cds::opt::compare< cmp > - >::type - > set_type; - - set_type s; - test( s ); - } - - TEST_F( SkipListSet_DHP, item_counting ) - { - struct set_traits: public cc::skip_list::traits - { - typedef cmp compare; - typedef base_class::less less; - typedef cds::atomicity::item_counter item_counter; - }; - typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; - - set_type s; - test( s ); - } - - TEST_F( SkipListSet_DHP, backoff ) - { - struct set_traits: public cc::skip_list::traits - { - typedef cmp compare; - typedef base_class::less less; - typedef cds::atomicity::item_counter item_counter; - typedef cds::backoff::yield back_off; - }; - typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; - - set_type s; - test( s ); - } - - TEST_F( SkipListSet_DHP, stat ) - { - struct set_traits: public cc::skip_list::traits - { - typedef cmp compare; - typedef base_class::less less; - typedef cds::atomicity::item_counter item_counter; - typedef cds::backoff::yield back_off; - typedef cc::skip_list::stat<> stat; - }; - typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; - - set_type s; - test( s ); - } - - TEST_F( SkipListSet_DHP, random_level_generator ) - { - struct set_traits: public cc::skip_list::traits - { - typedef cmp compare; - typedef base_class::less less; - typedef cds::atomicity::item_counter item_counter; - typedef cc::skip_list::stat<> stat; - typedef cc::skip_list::xorshift random_level_generator; - }; - typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; - - set_type s; - test( s ); - } +# define CDSTEST_FIXTURE_NAME SkipListSet_DHP +# include "skiplist_hp_inl.h" } // namespace diff --git a/test/unit/set/skiplist_hp.cpp b/test/unit/set/skiplist_hp.cpp index 7d5c3061..944f8518 100644 --- a/test/unit/set/skiplist_hp.cpp +++ b/test/unit/set/skiplist_hp.cpp @@ -36,7 +36,7 @@ namespace { namespace cc = cds::container; typedef cds::gc::HP gc_type; - class SkipListSet_HP : public cds_test::container_ordered_set_hp + class SkipListSet_HP: public cds_test::container_ordered_set_hp { protected: typedef cds_test::container_ordered_set_hp base_class; @@ -57,102 +57,7 @@ namespace { } }; - TEST_F( SkipListSet_HP, compare ) - { - typedef cc::SkipListSet< gc_type, int_item, - typename cc::skip_list::make_traits< - cds::opt::compare< cmp > - >::type - > set_type; - - set_type s; - test( s ); - } - - TEST_F( SkipListSet_HP, less ) - { - typedef cc::SkipListSet< gc_type, int_item, - typename cc::skip_list::make_traits< - cds::opt::less< base_class::less > - >::type - > set_type; - - set_type s; - test( s ); - } - - TEST_F( SkipListSet_HP, cmpmix ) - { - typedef cc::SkipListSet< gc_type, int_item, - typename cc::skip_list::make_traits< - cds::opt::less< base_class::less > - ,cds::opt::compare< cmp > - >::type - > set_type; - - set_type s; - test( s ); - } - - TEST_F( SkipListSet_HP, item_counting ) - { - struct set_traits: public cc::skip_list::traits - { - typedef cmp compare; - typedef base_class::less less; - typedef cds::atomicity::item_counter item_counter; - }; - typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; - - set_type s; - test( s ); - } - - TEST_F( SkipListSet_HP, backoff ) - { - struct set_traits: public cc::skip_list::traits - { - typedef cmp compare; - typedef base_class::less less; - typedef cds::atomicity::item_counter item_counter; - typedef cds::backoff::yield back_off; - }; - typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; - - set_type s; - test( s ); - } - - TEST_F( SkipListSet_HP, stat ) - { - struct set_traits: public cc::skip_list::traits - { - typedef cmp compare; - typedef base_class::less less; - typedef cds::atomicity::item_counter item_counter; - typedef cds::backoff::yield back_off; - typedef cc::skip_list::stat<> stat; - }; - typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; - - set_type s; - test( s ); - } - - TEST_F( SkipListSet_HP, random_level_generator ) - { - struct set_traits: public cc::skip_list::traits - { - typedef cmp compare; - typedef base_class::less less; - typedef cds::atomicity::item_counter item_counter; - typedef cc::skip_list::stat<> stat; - typedef cc::skip_list::xorshift random_level_generator; - }; - typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; - - set_type s; - test( s ); - } +# define CDSTEST_FIXTURE_NAME SkipListSet_HP +# include "skiplist_hp_inl.h" -} // namespace +} diff --git a/test/unit/set/skiplist_hp_inl.h b/test/unit/set/skiplist_hp_inl.h new file mode 100644 index 00000000..7a5754ed --- /dev/null +++ b/test/unit/set/skiplist_hp_inl.h @@ -0,0 +1,207 @@ +/* + This file is a part of libcds - Concurrent Data Structures library + + (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017 + + Source code repo: http://github.com/khizmax/libcds/ + Download: http://sourceforge.net/projects/libcds/files/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +TEST_F( CDSTEST_FIXTURE_NAME, compare ) +{ + typedef cc::SkipListSet< gc_type, int_item, + typename cc::skip_list::make_traits< + cds::opt::compare< cmp > + >::type + > set_type; + + set_type s; + test( s ); +} + +TEST_F( CDSTEST_FIXTURE_NAME, less ) +{ + typedef cc::SkipListSet< gc_type, int_item, + typename cc::skip_list::make_traits< + cds::opt::less< base_class::less > + >::type + > set_type; + + set_type s; + test( s ); +} + +TEST_F( CDSTEST_FIXTURE_NAME, cmpmix ) +{ + typedef cc::SkipListSet< gc_type, int_item, + typename cc::skip_list::make_traits< + cds::opt::less< base_class::less > + ,cds::opt::compare< cmp > + >::type + > set_type; + + set_type s; + test( s ); +} + +TEST_F( CDSTEST_FIXTURE_NAME, item_counting ) +{ + struct set_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef base_class::less less; + typedef cds::atomicity::item_counter item_counter; + }; + typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; + + set_type s; + test( s ); +} + +TEST_F( CDSTEST_FIXTURE_NAME, backoff ) +{ + struct set_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef base_class::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cds::backoff::yield back_off; + }; + typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; + + set_type s; + test( s ); +} + +TEST_F( CDSTEST_FIXTURE_NAME, stat ) +{ + struct set_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef base_class::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cds::backoff::yield back_off; + typedef cc::skip_list::stat<> stat; + }; + typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; + + set_type s; + test( s ); +} + +TEST_F( CDSTEST_FIXTURE_NAME, xorshift32 ) +{ + struct set_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef base_class::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cc::skip_list::stat<> stat; + typedef cc::skip_list::xorshift32 random_level_generator; + }; + typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; + + set_type s; + test( s ); +} + +TEST_F( CDSTEST_FIXTURE_NAME, xorshift24 ) +{ + struct set_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef base_class::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cc::skip_list::stat<> stat; + typedef cc::skip_list::xorshift24 random_level_generator; + }; + typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; + + set_type s; + test( s ); +} + +TEST_F( CDSTEST_FIXTURE_NAME, xorshift16 ) +{ + struct set_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef base_class::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cc::skip_list::stat<> stat; + typedef cc::skip_list::xorshift16 random_level_generator; + }; + typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; + + set_type s; + test( s ); +} + +TEST_F( CDSTEST_FIXTURE_NAME, turbo32 ) +{ + struct set_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef base_class::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cc::skip_list::stat<> stat; + typedef cc::skip_list::turbo32 random_level_generator; + }; + typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; + + set_type s; + test( s ); +} + +TEST_F( CDSTEST_FIXTURE_NAME, turbo24 ) +{ + struct set_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef base_class::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cc::skip_list::stat<> stat; + typedef cc::skip_list::turbo24 random_level_generator; + }; + typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; + + set_type s; + test( s ); +} + +TEST_F( CDSTEST_FIXTURE_NAME, turbo16 ) +{ + struct set_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef base_class::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cc::skip_list::stat<> stat; + typedef cc::skip_list::turbo16 random_level_generator; + }; + typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; + + set_type s; + test( s ); +} diff --git a/test/unit/set/skiplist_nogc.cpp b/test/unit/set/skiplist_nogc.cpp index 8a2d6477..f4d4f65c 100644 --- a/test/unit/set/skiplist_nogc.cpp +++ b/test/unit/set/skiplist_nogc.cpp @@ -130,7 +130,7 @@ namespace { test( s ); } - TEST_F( SkipListSet_NoGC, random_level_generator ) + TEST_F( SkipListSet_NoGC, xorshift32 ) { struct set_traits: public cc::skip_list::traits { @@ -138,7 +138,87 @@ namespace { typedef base_class::less less; typedef cds::atomicity::item_counter item_counter; typedef cc::skip_list::stat<> stat; - typedef cc::skip_list::xorshift random_level_generator; + typedef cc::skip_list::xorshift32 random_level_generator; + }; + typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; + + set_type s; + test( s ); + } + + TEST_F( SkipListSet_NoGC, xorshift24 ) + { + struct set_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef base_class::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cc::skip_list::stat<> stat; + typedef cc::skip_list::xorshift24 random_level_generator; + }; + typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; + + set_type s; + test( s ); + } + + TEST_F( SkipListSet_NoGC, xorshift16 ) + { + struct set_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef base_class::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cc::skip_list::stat<> stat; + typedef cc::skip_list::xorshift16 random_level_generator; + }; + typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; + + set_type s; + test( s ); + } + + TEST_F( SkipListSet_NoGC, turbo32 ) + { + struct set_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef base_class::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cc::skip_list::stat<> stat; + typedef cc::skip_list::turbo32 random_level_generator; + }; + typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; + + set_type s; + test( s ); + } + + TEST_F( SkipListSet_NoGC, turbo24 ) + { + struct set_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef base_class::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cc::skip_list::stat<> stat; + typedef cc::skip_list::turbo24 random_level_generator; + }; + typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; + + set_type s; + test( s ); + } + + TEST_F( SkipListSet_NoGC, turbo16 ) + { + struct set_traits: public cc::skip_list::traits + { + typedef cmp compare; + typedef base_class::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cc::skip_list::stat<> stat; + typedef cc::skip_list::turbo16 random_level_generator; }; typedef cc::SkipListSet< gc_type, int_item, set_traits >set_type; diff --git a/test/unit/set/test_skiplist_rcu.h b/test/unit/set/test_skiplist_rcu.h index 805e8546..16f65c95 100644 --- a/test/unit/set/test_skiplist_rcu.h +++ b/test/unit/set/test_skiplist_rcu.h @@ -231,18 +231,16 @@ TYPED_TEST_P( SkipListSet, stat ) this->test( s ); } -TYPED_TEST_P( SkipListSet, random_level_generator ) +TYPED_TEST_P( SkipListSet, xorshift32 ) { typedef typename TestFixture::rcu_type rcu_type; typedef typename TestFixture::int_item int_item; struct set_traits: public cc::skip_list::traits { - typedef typename TestFixture::cmp compare; typedef typename TestFixture::less less; typedef cds::atomicity::item_counter item_counter; - typedef cc::skip_list::stat<> stat; - typedef cc::skip_list::xorshift random_level_generator; + typedef cc::skip_list::xorshift32 random_level_generator; typedef cds::opt::v::rcu_assert_deadlock rcu_check_deadlock; }; typedef cc::SkipListSet< rcu_type, int_item, set_traits >set_type; @@ -251,11 +249,100 @@ TYPED_TEST_P( SkipListSet, random_level_generator ) this->test( s ); } +TYPED_TEST_P( SkipListSet, xorshift24 ) +{ + typedef typename TestFixture::rcu_type rcu_type; + typedef typename TestFixture::int_item int_item; + + struct set_traits: public cc::skip_list::traits + { + typedef typename TestFixture::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cc::skip_list::xorshift24 random_level_generator; + typedef cds::opt::v::rcu_assert_deadlock rcu_check_deadlock; + }; + typedef cc::SkipListSet< rcu_type, int_item, set_traits >set_type; + + set_type s; + this->test( s ); +} + +TYPED_TEST_P( SkipListSet, xorshift16 ) +{ + typedef typename TestFixture::rcu_type rcu_type; + typedef typename TestFixture::int_item int_item; + + struct set_traits: public cc::skip_list::traits + { + typedef typename TestFixture::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cc::skip_list::xorshift16 random_level_generator; + typedef cds::opt::v::rcu_assert_deadlock rcu_check_deadlock; + }; + typedef cc::SkipListSet< rcu_type, int_item, set_traits >set_type; + + set_type s; + this->test( s ); +} + +TYPED_TEST_P( SkipListSet, turbo32 ) +{ + typedef typename TestFixture::rcu_type rcu_type; + typedef typename TestFixture::int_item int_item; + + struct set_traits: public cc::skip_list::traits + { + typedef typename TestFixture::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cc::skip_list::turbo32 random_level_generator; + typedef cds::opt::v::rcu_assert_deadlock rcu_check_deadlock; + }; + typedef cc::SkipListSet< rcu_type, int_item, set_traits >set_type; + + set_type s; + this->test( s ); +} + +TYPED_TEST_P( SkipListSet, turbo24 ) +{ + typedef typename TestFixture::rcu_type rcu_type; + typedef typename TestFixture::int_item int_item; + + struct set_traits: public cc::skip_list::traits + { + typedef typename TestFixture::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cc::skip_list::turbo24 random_level_generator; + typedef cds::opt::v::rcu_assert_deadlock rcu_check_deadlock; + }; + typedef cc::SkipListSet< rcu_type, int_item, set_traits >set_type; + + set_type s; + this->test( s ); +} + +TYPED_TEST_P( SkipListSet, turbo16 ) +{ + typedef typename TestFixture::rcu_type rcu_type; + typedef typename TestFixture::int_item int_item; + + struct set_traits: public cc::skip_list::traits + { + typedef typename TestFixture::less less; + typedef cds::atomicity::item_counter item_counter; + typedef cc::skip_list::turbo16 random_level_generator; + typedef cds::opt::v::rcu_assert_deadlock rcu_check_deadlock; + }; + typedef cc::SkipListSet< rcu_type, int_item, set_traits >set_type; + + set_type s; + this->test( s ); +} -// GCC 5: All this->test names should be written on single line, otherwise a runtime error will be encountered like as +// All this->test names should be written on single line, otherwise a runtime error will be encountered like as // "No this->test named can be found in this this->test case" REGISTER_TYPED_TEST_CASE_P( SkipListSet, - compare, less, cmpmix, item_counting, backoff, stat, random_level_generator + compare, less, cmpmix, item_counting, backoff, stat, xorshift32, xorshift24, xorshift16, turbo32, turbo24, turbo16 ); diff --git a/tools/tsan-suppression b/tools/tsan-suppression index 909b04ca..e2771632 100644 --- a/tools/tsan-suppression +++ b/tools/tsan-suppression @@ -18,7 +18,3 @@ deadlock:cds/container/impl/bronson_avltree_map_rcu.h #TODO: temporary suppressed. Must be researched later race:cds/container/impl/bronson_avltree_map_rcu.h - -#TODO: MSPriorityQueue - temporary suppressed. Must be researched later -# Seems, TSan don't see spinlock blocking. How to learn TSan to see non-traditional locking algo?.. -race:cds::intrusive::MSPriorityQueue -- 2.34.1