<ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_cuckoo.cpp" />\r
<ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_ellentree.cpp" />\r
<ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_michael.cpp" />\r
- <ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_refinable.cpp" />\r
<ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_skip.cpp" />\r
<ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_split.cpp" />\r
<ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_std.cpp" />\r
<ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_michael.cpp">\r
<Filter>set_insdel_string</Filter>\r
</ClCompile>\r
- <ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_refinable.cpp">\r
- <Filter>set_insdel_string</Filter>\r
- </ClCompile>\r
<ClCompile Include="..\..\..\tests\unit\set2\set_insdel_string_skip.cpp">\r
<Filter>set_insdel_string</Filter>\r
</ClCompile>\r
tests/unit/set2/set_insdel_func_split.cpp \
tests/unit/set2/set_insdel_func_striped.cpp \
tests/unit/set2/set_insdel_string.cpp \
- tests/unit/set2/set_insdel_string_michael.cpp \
tests/unit/set2/set_insdel_string_cuckoo.cpp \
tests/unit/set2/set_insdel_string_ellentree.cpp \
- tests/unit/set2/set_insdel_string_refinable.cpp \
+ tests/unit/set2/set_insdel_string_michael.cpp \
tests/unit/set2/set_insdel_string_skip.cpp \
tests/unit/set2/set_insdel_string_split.cpp \
tests/unit/set2/set_insdel_string_striped.cpp \
set_insdel_func_split.cpp
set_insdel_func_striped.cpp
set_insdel_string.cpp
- set_insdel_string_michael.cpp
set_insdel_string_cuckoo.cpp
set_insdel_string_ellentree.cpp
- set_insdel_string_refinable.cpp
+ set_insdel_string_michael.cpp
set_insdel_string_skip.cpp
set_insdel_string_split.cpp
set_insdel_string_striped.cpp
#define CDSUNIT_SET_DEFS_H
#define CDSUNIT_DECLARE_StdSet \
- TEST_CASE(StdSet_Spin) \
- TEST_CASE(StdHashSet_Spin)
+ TEST_CASE( tag_StdSet, StdSet_Spin) \
+ TEST_CASE( tag_StdSet, StdSet_Mutex) \
+ TEST_CASE( tag_StdSet, StdHashSet_Spin)
#define CDSUNIT_TEST_StdSet \
CPPUNIT_TEST(StdSet_Spin) \
+ CPPUNIT_TEST(StdSet_Mutex) \
CPPUNIT_TEST(StdHashSet_Spin)
+//********************************************************************
+// MichaelHashSet
+
#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
# define CDSUNIT_DECLARE_MichaelSet_RCU_signal \
TEST_CASE(tag_MichaelHashSet, MichaelSet_RCU_SHB_cmp_stdAlloc) \
CPPUNIT_TEST(MichaelSet_Lazy_RCU_GPT_less_michaelAlloc) \
CDSUNIT_TEST_MichaelSet_RCU_signal
+//********************************************************************
+// SplitListSet
#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
# define CDSUNIT_DECLARE_SplitList_RCU_signal \
CPPUNIT_TEST(SplitList_Lazy_RCU_GPT_st_less_stat)\
CDSUNIT_TEST_SplitList_RCU_signal
+//********************************************************************
+// CuckooSet
#define CDSUNIT_DECLARE_CuckooSet \
TEST_CASE(tag_CuckooSet, CuckooStripedSet_list_unord)\
CPPUNIT_TEST(CuckooRefinableSet_vector_ord_stat) \
CPPUNIT_TEST(CuckooRefinableSet_vector_ord_storehash)
-
+//********************************************************************
+// SkipListSet
#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
# define CDSUNIT_DECLARE_SkipListSet_RCU_signal \
CPPUNIT_TEST(SkipListSet_rcu_gpt_cmp_xorshift_stat)\
CDSUNIT_TEST_SkipListSet_RCU_signal
+//********************************************************************
+// EllenBinTreeSet
#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
# define CDSUNIT_DECLARE_EllenBinTreeSet_RCU_signal \
CPPUNIT_TEST(EllenBinTreeSet_rcu_gpt_stat)\
CDSUNIT_TEST_EllenBinTreeSet_RCU_signal
-
+//********************************************************************
+// StripedSet
#define CDSUNIT_DECLARE_StripedSet_common \
TEST_CASE( tag_StripedSet, StripedSet_list) \
TEST_CASE( tag_StripedSet, RefinableSet_rational_hashset) \
TEST_CASE( tag_StripedSet, RefinableSet_rational_boost_unordered_set)
+
+//********************************************************************
+// RefinableSet
+
#define CDSUNIT_TEST_RefinableSet_common \
CPPUNIT_TEST(RefinableSet_list) \
CPPUNIT_TEST(RefinableSet_vector) \
if ( Set::c_bLoadFactorDepended ) {
for ( c_nLoadFactor = 1; c_nLoadFactor <= c_nMaxLoadFactor; c_nLoadFactor *= 2 ) {
+ CPPUNIT_MSG(" LoadFactor = " << c_nLoadFactor );
Set s( *this );
do_test( s );
if ( c_bPrintGCState )
namespace set2 {
CPPUNIT_TEST_SUITE_REGISTRATION( Set_InsDel_string );
- size_t Set_InsDel_string::c_nMapSize = 1000000;
- size_t Set_InsDel_string::c_nInsertThreadCount = 4;
- size_t Set_InsDel_string::c_nDeleteThreadCount = 4;
- size_t Set_InsDel_string::c_nThreadPassCount = 4;
- size_t Set_InsDel_string::c_nMaxLoadFactor = 8;
- bool Set_InsDel_string::c_bPrintGCState = true;
-
void Set_InsDel_string::setUpParams( const CppUnitMini::TestCfg& cfg )
{
+ c_nSetSize = cfg.getSizeT("MapSize", c_nSetSize );
c_nInsertThreadCount = cfg.getSizeT("InsertThreadCount", c_nInsertThreadCount );
c_nDeleteThreadCount = cfg.getSizeT("DeleteThreadCount", c_nDeleteThreadCount );
c_nThreadPassCount = cfg.getSizeT("ThreadPassCount", c_nThreadPassCount );
- c_nMapSize = cfg.getSizeT("MapSize", c_nMapSize );
c_nMaxLoadFactor = cfg.getSizeT("MaxLoadFactor", c_nMaxLoadFactor );
- c_bPrintGCState = cfg.getBool("PrintGCStateFlag", true );
- }
-
- void Set_InsDel_string::myRun(const char *in_name, bool invert /*= false*/)
- {
- setUpParams( m_Cfg.get( "Map_InsDel_string" ));
+ c_bPrintGCState = cfg.getBool("PrintGCStateFlag", c_bPrintGCState );
- run_MichaelSet(in_name, invert);
- run_SplitList(in_name, invert);
- run_SkipListSet(in_name, invert);
- run_EllenBinTreeSet(in_name, invert);
- run_StripedSet(in_name, invert);
- run_RefinableSet(in_name, invert);
- run_CuckooSet(in_name, invert);
- run_StdSet(in_name, invert);
+ c_nCuckooInitialSize = cfg.getSizeT("CuckooInitialSize", c_nCuckooInitialSize );
+ c_nCuckooProbesetSize = cfg.getSizeT("CuckooProbesetSize", c_nCuckooProbesetSize );
+ c_nCuckooProbesetThreshold = cfg.getSizeT("CuckooProbesetThreshold", c_nCuckooProbesetThreshold );
- endTestCase();
+ if ( c_nInsertThreadCount == 0 )
+ c_nInsertThreadCount = std::thread::hardware_concurrency();
+ if ( c_nDeleteThreadCount == 0 )
+ c_nDeleteThreadCount = std::thread::hardware_concurrency();
}
} // namespace set2
namespace set2 {
-# define TEST_SET(IMPL, C, X) void C::X() { test<set_type<IMPL, key_type, value_type>::X >(); }
-# define TEST_SET_EXTRACT(IMPL, C, X) void C::X() { test_extract<set_type<IMPL, key_type, value_type>::X >(); }
-# define TEST_SET_NOLF(IMPL, C, X) void C::X() { test_nolf<set_type<IMPL, key_type, value_type>::X >(); }
-# define TEST_SET_NOLF_EXTRACT(IMPL, C, X) void C::X() { test_nolf_extract<set_type<IMPL, key_type, value_type>::X >(); }
+#define TEST_CASE(TAG, X) void X();
class Set_InsDel_string: public CppUnitMini::TestCase
{
- static size_t c_nMapSize; // set size
- static size_t c_nInsertThreadCount; // count of insertion thread
- static size_t c_nDeleteThreadCount; // count of deletion thread
- static size_t c_nThreadPassCount; // pass count for each thread
- static size_t c_nMaxLoadFactor; // maximum load factor
- static bool c_bPrintGCState;
+ public:
+ size_t c_nSetSize = 1000000; // set size
+ size_t c_nInsertThreadCount = 4; // count of insertion thread
+ size_t c_nDeleteThreadCount = 4; // count of deletion thread
+ size_t c_nThreadPassCount = 4; // pass count for each thread
+ size_t c_nMaxLoadFactor = 8; // maximum load factor
+ bool c_bPrintGCState = true;
+ size_t c_nCuckooInitialSize = 1024;// initial size for CuckooSet
+ size_t c_nCuckooProbesetSize = 16; // CuckooSet probeset size (only for list-based probeset)
+ size_t c_nCuckooProbesetThreshold = 0; // CUckooSet probeset threshold (0 - use default)
+
+ size_t c_nLoadFactor = 2;
+
+ private:
typedef CppUnitMini::TestCase Base;
typedef std::string key_type;
typedef size_t value_type;
const std::vector<std::string>& arrString = *getTest().m_parrString;
size_t nArrSize = arrString.size();
+ size_t const nSetSize = getTest().c_nSetSize;
+ size_t const nPassCount = getTest().c_nThreadPassCount;
if ( m_nThreadNo & 1 ) {
- for ( size_t nPass = 0; nPass < c_nThreadPassCount; ++nPass ) {
- for ( size_t nItem = 0; nItem < c_nMapSize; ++nItem ) {
+ for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
+ for ( size_t nItem = 0; nItem < nSetSize; ++nItem ) {
if ( rSet.insert( keyval_type(arrString[nItem % nArrSize], nItem * 8) ) )
++m_nInsertSuccess;
else
}
}
else {
- for ( size_t nPass = 0; nPass < c_nThreadPassCount; ++nPass ) {
- for ( size_t nItem = c_nMapSize; nItem > 0; --nItem ) {
+ for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
+ for ( size_t nItem = nSetSize; nItem > 0; --nItem ) {
if ( rSet.insert( keyval_type( arrString[nItem % nArrSize], nItem * 8) ) )
++m_nInsertSuccess;
else
const std::vector<std::string>& arrString = *getTest().m_parrString;
size_t nArrSize = arrString.size();
+ size_t const nSetSize = getTest().c_nSetSize;
+ size_t const nPassCount = getTest().c_nThreadPassCount;
if ( m_nThreadNo & 1 ) {
- for ( size_t nPass = 0; nPass < c_nThreadPassCount; ++nPass ) {
- for ( size_t nItem = 0; nItem < c_nMapSize; ++nItem ) {
+ for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
+ for ( size_t nItem = 0; nItem < nSetSize; ++nItem ) {
if ( rSet.erase( arrString[nItem % nArrSize] ) )
++m_nDeleteSuccess;
else
}
}
else {
- for ( size_t nPass = 0; nPass < c_nThreadPassCount; ++nPass ) {
- for ( size_t nItem = c_nMapSize; nItem > 0; --nItem ) {
+ for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
+ for ( size_t nItem = nSetSize; nItem > 0; --nItem ) {
if ( rSet.erase( arrString[nItem % nArrSize] ) )
++m_nDeleteSuccess;
else
const std::vector<std::string>& arrString = *getTest().m_parrString;
size_t nArrSize = arrString.size();
+ size_t const nSetSize = getTest().c_nSetSize;
+ size_t const nPassCount = getTest().c_nThreadPassCount;
if ( m_nThreadNo & 1 ) {
- for ( size_t nPass = 0; nPass < c_nThreadPassCount; ++nPass ) {
- for ( size_t nItem = 0; nItem < c_nMapSize; ++nItem ) {
+ for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
+ for ( size_t nItem = 0; nItem < nSetSize; ++nItem ) {
gp = rSet.extract( arrString[nItem % nArrSize]);
if ( gp )
++m_nDeleteSuccess;
}
}
else {
- for ( size_t nPass = 0; nPass < c_nThreadPassCount; ++nPass ) {
- for ( size_t nItem = c_nMapSize; nItem > 0; --nItem ) {
+ for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
+ for ( size_t nItem = nSetSize; nItem > 0; --nItem ) {
gp = rSet.extract( arrString[nItem % nArrSize]);
if ( gp )
++m_nDeleteSuccess;
const std::vector<std::string>& arrString = *getTest().m_parrString;
size_t nArrSize = arrString.size();
+ size_t const nSetSize = getTest().c_nSetSize;
+ size_t const nPassCount = getTest().c_nThreadPassCount;
if ( m_nThreadNo & 1 ) {
- for ( size_t nPass = 0; nPass < c_nThreadPassCount; ++nPass ) {
- for ( size_t nItem = 0; nItem < c_nMapSize; ++nItem ) {
+ for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
+ for ( size_t nItem = 0; nItem < nSetSize; ++nItem ) {
if ( Set::c_bExtractLockExternal ) {
{
typename Set::rcu_lock l;
}
}
else {
- for ( size_t nPass = 0; nPass < c_nThreadPassCount; ++nPass ) {
- for ( size_t nItem = c_nMapSize; nItem > 0; --nItem ) {
+ for ( size_t nPass = 0; nPass < nPassCount; ++nPass ) {
+ for ( size_t nItem = nSetSize; nItem > 0; --nItem ) {
if ( Set::c_bExtractLockExternal ) {
{
typename Set::rcu_lock l;
};
protected:
-
template <class Set>
- void do_test( size_t nLoadFactor )
- {
- CPPUNIT_MSG( "Load factor=" << nLoadFactor );
-
- Set testSet( c_nMapSize, nLoadFactor );
- do_test_with( testSet );
- }
-
- template <class Set>
- void do_test_extract( size_t nLoadFactor )
- {
- CPPUNIT_MSG( "Load factor=" << nLoadFactor );
-
- Set testSet( c_nMapSize, nLoadFactor );
- do_test_extract_with( testSet );
- }
-
- template <class Set>
- void do_test_with( Set& testSet )
+ void do_test( Set& testSet )
{
typedef Inserter<Set> InserterThread;
typedef Deleter<Set> DeleterThread;
}
template <class Set>
- void do_test_extract_with( Set& testSet )
+ void do_test_extract( Set& testSet )
{
typedef Inserter<Set> InserterThread;
typedef Deleter<Set> DeleterThread;
}
template <class Set>
- void test()
+ void run_test()
{
m_parrString = &CppUnitMini::TestCase::getTestStrings();
CPPUNIT_MSG( "Thread count: insert=" << c_nInsertThreadCount
<< " delete=" << c_nDeleteThreadCount
<< " pass count=" << c_nThreadPassCount
- << " set size=" << c_nMapSize
+ << " set size=" << c_nSetSize
);
- for ( size_t nLoadFactor = 1; nLoadFactor <= c_nMaxLoadFactor; nLoadFactor *= 2 ) {
- do_test<Set>( nLoadFactor );
+ if ( Set::c_bLoadFactorDepended ) {
+ for ( c_nLoadFactor = 1; c_nLoadFactor <= c_nMaxLoadFactor; c_nLoadFactor *= 2 ) {
+ CPPUNIT_MSG(" LoadFactor = " << c_nLoadFactor );
+ Set s( *this );
+ do_test( s );
+ if ( c_bPrintGCState )
+ print_gc_state();
+ }
+ }
+ else {
+ Set s( *this );
+ do_test( s );
if ( c_bPrintGCState )
print_gc_state();
}
}
template <class Set>
- void test_extract()
+ void run_test_extract()
{
m_parrString = &CppUnitMini::TestCase::getTestStrings();
CPPUNIT_MSG( "Thread count: insert=" << c_nInsertThreadCount
<< " delete=" << c_nDeleteThreadCount
<< " pass count=" << c_nThreadPassCount
- << " set size=" << c_nMapSize
+ << " set size=" << c_nSetSize
);
- for ( size_t nLoadFactor = 1; nLoadFactor <= c_nMaxLoadFactor; nLoadFactor *= 2 ) {
- do_test_extract<Set>( nLoadFactor );
+ if ( Set::c_bLoadFactorDepended ) {
+ for ( size_t nLoadFactor = 1; nLoadFactor <= c_nMaxLoadFactor; nLoadFactor *= 2 ) {
+ CPPUNIT_MSG(" LoadFactor = " << c_nLoadFactor );
+ Set s( *this );
+ do_test_extract( s );
+ if ( c_bPrintGCState )
+ print_gc_state();
+ }
+ }
+ else {
+ Set s( *this );
+ do_test_extract( s );
if ( c_bPrintGCState )
print_gc_state();
}
}
- template <class Set>
- void test_nolf()
- {
- m_parrString = &CppUnitMini::TestCase::getTestStrings();
-
- CPPUNIT_MSG( "Thread count: insert=" << c_nInsertThreadCount
- << " delete=" << c_nDeleteThreadCount
- << " pass count=" << c_nThreadPassCount
- << " set size=" << c_nMapSize
- );
-
- Set s;
- do_test_with( s );
- if ( c_bPrintGCState )
- print_gc_state();
- }
-
- template <class Set>
- void test_nolf_extract()
- {
- m_parrString = &CppUnitMini::TestCase::getTestStrings();
-
- CPPUNIT_MSG( "Thread count: insert=" << c_nInsertThreadCount
- << " delete=" << c_nDeleteThreadCount
- << " pass count=" << c_nThreadPassCount
- << " set size=" << c_nMapSize
- );
-
- Set s;
- do_test_extract_with( s );
- if ( c_bPrintGCState )
- print_gc_state();
- }
-
void setUpParams( const CppUnitMini::TestCfg& cfg );
- void run_MichaelSet(const char *in_name, bool invert = false);
- void run_SplitList(const char *in_name, bool invert = false);
- void run_SkipListSet(const char *in_name, bool invert = false);
- void run_CuckooSet(const char *in_name, bool invert = false);
- void run_StripedSet(const char *in_name, bool invert = false);
- void run_RefinableSet(const char *in_name, bool invert = false);
- void run_EllenBinTreeSet(const char *in_name, bool invert = false);
- void run_StdSet(const char *in_name, bool invert = false);
-
- virtual void myRun(const char *in_name, bool invert = false);
-
# include "set2/set_defs.h"
CDSUNIT_DECLARE_MichaelSet
CDSUNIT_DECLARE_SplitList
CDSUNIT_DECLARE_SkipListSet
CDSUNIT_DECLARE_EllenBinTreeSet
CDSUNIT_DECLARE_StdSet
+
+ CPPUNIT_TEST_SUITE_(Set_InsDel_func, "Map_InsDel_func")
+ CDSUNIT_TEST_MichaelSet
+ CDSUNIT_TEST_SplitList
+ CDSUNIT_TEST_SkipListSet
+ CDSUNIT_TEST_EllenBinTreeSet
+ CDSUNIT_TEST_StripedSet
+ CDSUNIT_TEST_RefinableSet
+ CDSUNIT_TEST_CuckooSet
+ CDSUNIT_TEST_StdSet
+ CPPUNIT_TEST_SUITE_END();
};
} // namespace set2
#include "set2/set_insdel_string.h"
#include "set2/set_type_cuckoo.h"
-namespace set2 {
- CDSUNIT_DEFINE_CuckooSet( cc::cuckoo::implementation_tag, Set_InsDel_string )
+#undef TEST_CASE
+#define TEST_CASE(TAG, X) void Set_InsDel_string::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
+#include "set2/set_defs.h"
- CPPUNIT_TEST_SUITE_PART( Set_InsDel_string, run_CuckooSet )
- CDSUNIT_TEST_CuckooSet
- CPPUNIT_TEST_SUITE_END_PART()
+namespace set2 {
+ CDSUNIT_DECLARE_CuckooSet
} // namespace set2
#include "set2/set_insdel_string.h"
#include "set2/set_type_ellen_bintree.h"
-namespace set2 {
- CDSUNIT_DEFINE_EllenBinTreeSet( cc::ellen_bintree::implementation_tag, Set_InsDel_string )
+#undef TEST_CASE
+#define TEST_CASE(TAG, X) void Set_InsDel_string::X() { run_test_extract<typename set_type< TAG, key_type, value_type>::X>(); }
+#include "set2/set_defs.h"
- CPPUNIT_TEST_SUITE_PART( Set_InsDel_string, run_EllenBinTreeSet )
- CDSUNIT_TEST_EllenBinTreeSet
- CPPUNIT_TEST_SUITE_END_PART()
+namespace set2 {
+ CDSUNIT_DECLARE_EllenBinTreeSet
} // namespace set2
#include "set2/set_insdel_string.h"
#include "set2/set_type_michael.h"
-namespace set2 {
- CDSUNIT_DEFINE_MichaelSet( cc::michael_set::implementation_tag, Set_InsDel_string )
+#undef TEST_CASE
+#define TEST_CASE(TAG, X) void Set_InsDel_string::X() { run_test_extract<typename set_type< TAG, key_type, value_type>::X>(); }
+#include "set2/set_defs.h"
- CPPUNIT_TEST_SUITE_PART( Set_InsDel_string, run_MichaelSet )
- CDSUNIT_TEST_MichaelSet
- CPPUNIT_TEST_SUITE_END_PART()
+namespace set2 {
+ CDSUNIT_DECLARE_MichaelSet
} // namespace set2
+++ /dev/null
-//$$CDS-header$$
-
-#include "set2/set_insdel_string.h"
-#include "set2/set_type_striped.h"
-
-namespace set2 {
- CDSUNIT_DEFINE_RefinableSet( cc::striped_set::implementation_tag, Set_InsDel_string )
-
- CPPUNIT_TEST_SUITE_PART( Set_InsDel_string, run_RefinableSet )
- CDSUNIT_TEST_RefinableSet
- CPPUNIT_TEST_SUITE_END_PART()
-} // namespace set2
#include "set2/set_insdel_string.h"
#include "set2/set_type_skip_list.h"
-namespace set2 {
- CDSUNIT_DEFINE_SkipListSet(cc::skip_list::implementation_tag, Set_InsDel_string)
+#undef TEST_CASE
+#define TEST_CASE(TAG, X) void Set_InsDel_string::X() { run_test_extract<typename set_type< TAG, key_type, value_type>::X>(); }
+#include "set2/set_defs.h"
- CPPUNIT_TEST_SUITE_PART( Set_InsDel_string, run_SkipListSet )
- CDSUNIT_TEST_SkipListSet
- CPPUNIT_TEST_SUITE_END_PART()
+namespace set2 {
+ CDSUNIT_DECLARE_SkipListSet
} // namespace set2
#include "set2/set_insdel_string.h"
#include "set2/set_type_split_list.h"
-namespace set2 {
- CDSUNIT_DEFINE_SplitList(cc::split_list::implementation_tag, Set_InsDel_string)
+#undef TEST_CASE
+#define TEST_CASE(TAG, X) void Set_InsDel_string::X() { run_test_extract<typename set_type< TAG, key_type, value_type>::X>(); }
+#include "set2/set_defs.h"
- CPPUNIT_TEST_SUITE_PART( Set_InsDel_string, run_SplitList )
- CDSUNIT_TEST_SplitList
- CPPUNIT_TEST_SUITE_END_PART()
+namespace set2 {
+ CDSUNIT_DECLARE_SplitList
} // namespace set2
#include "set2/set_insdel_string.h"
#include "set2/set_type_std.h"
-namespace set2 {
- CDSUNIT_DEFINE_StdSet(std_implementation_tag, Set_InsDel_string)
+#undef TEST_CASE
+#define TEST_CASE(TAG, X) void Set_InsDel_string::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
+#include "set2/set_defs.h"
- CPPUNIT_TEST_SUITE_PART( Set_InsDel_string, run_StdSet )
- CDSUNIT_TEST_StdSet
- CPPUNIT_TEST_SUITE_END_PART()
+namespace set2 {
+ CDSUNIT_DECLARE_StdSet
} // namespace set2
#include "set2/set_insdel_string.h"
#include "set2/set_type_striped.h"
-namespace set2 {
- CDSUNIT_DEFINE_StripedSet( cc::striped_set::implementation_tag, Set_InsDel_string )
+#undef TEST_CASE
+#define TEST_CASE(TAG, X) void Set_InsDel_string::X() { run_test<typename set_type< TAG, key_type, value_type>::X>(); }
+#include "set2/set_defs.h"
- CPPUNIT_TEST_SUITE_PART( Set_InsDel_string, run_StripedSet )
- CDSUNIT_TEST_StripedSet
- CPPUNIT_TEST_SUITE_END_PART()
+namespace set2 {
+ CDSUNIT_DECLARE_StripedSet
+ CDSUNIT_DECLARE_RefinableSet
} // namespace set2
namespace set2 {
- struct std_implementation_tag;
+ struct tag_StdSet;
template <typename Value, typename Hash, typename Less, typename EqualTo, typename Lock,
class Alloc = typename CDS_DEFAULT_ALLOCATOR::template rebind<Value>::other
public:
typedef typename base_class::value_type value_type;
- typedef std_implementation_tag implementation_tag;
- StdHashSet( size_t /*nSetSize*/, size_t /*nLoadFactor*/ )
+ template <class Config>
+ StdHashSet( Config const& )
{}
template <typename Key>
}
std::ostream& dump( std::ostream& stm ) { return stm; }
+
+ // for testing
+ static CDS_CONSTEXPR bool const c_bExtractSupported = false;
+ static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
};
template <typename Value, typename Less, typename Lock,
typedef std::set<Value, Less, Alloc> base_class;
public:
typedef typename base_class::key_type value_type;
- typedef std_implementation_tag implementation_tag;
- StdSet( size_t /*nMapSize*/, size_t /*nLoadFactor*/ )
+ template <class Config>
+ StdSet( Config const& )
{}
template <typename Key>
}
std::ostream& dump( std::ostream& stm ) { return stm; }
+
+ // for testing
+ static CDS_CONSTEXPR bool const c_bExtractSupported = false;
+ static CDS_CONSTEXPR bool const c_bLoadFactorDepended = false;
};
template <typename Key, typename Val>
- struct set_type< std_implementation_tag, Key, Val >: public set_type_base< Key, Val >
+ struct set_type< tag_StdSet, Key, Val >: public set_type_base< Key, Val >
{
typedef set_type_base< Key, Val > base_class;
typedef typename base_class::key_val key_val;
typedef typename base_class::equal_to equal_to;
typedef StdSet< key_val, less, cds::sync::spin > StdSet_Spin;
+ typedef StdSet< key_val, less, std::mutex > StdSet_Mutex;
typedef StdSet< key_val, less, lock::NoLock> StdSet_NoLock;
typedef StdHashSet< key_val, hash, less, equal_to, cds::sync::spin > StdHashSet_Spin;
+ typedef StdHashSet< key_val, hash, less, equal_to, std::mutex > StdHashSet_Mutex;
typedef StdHashSet< key_val, hash, less, equal_to, lock::NoLock > StdHashSet_NoLock;
};