namespace set2 {
CPPUNIT_TEST_SUITE_REGISTRATION( Set_DelOdd );
- size_t Set_DelOdd::c_nSetSize = 1000000;
- size_t Set_DelOdd::c_nInsThreadCount;
- size_t Set_DelOdd::c_nDelThreadCount;
- size_t Set_DelOdd::c_nExtractThreadCount;
- size_t Set_DelOdd::c_nMaxLoadFactor;
- bool Set_DelOdd::c_bPrintGCState;
-
void Set_DelOdd::setUpParams( const CppUnitMini::TestCfg& cfg )
{
c_nSetSize = cfg.getSizeT("MapSize", c_nSetSize );
c_nMaxLoadFactor = cfg.getSizeT("MaxLoadFactor", c_nMaxLoadFactor);
c_bPrintGCState = cfg.getBool("PrintGCStateFlag", true );
+ c_nCuckooInitialSize = cfg.getSizeT("CuckooInitialSize", c_nCuckooInitialSize );
+ c_nCuckooProbesetSize = cfg.getSizeT("CuckooProbesetSize", c_nCuckooProbesetSize );
+ c_nCuckooProbesetThreshold = cfg.getSizeT("CuckooProbesetThreshold", c_nCuckooProbesetThreshold );
+
+ c_nMultiLevelSet_HeadBits = cfg.getSizeT("MultiLevelMapHeadBits", c_nMultiLevelSet_HeadBits);
+ c_nMultiLevelSet_ArrayBits = cfg.getSizeT("MultiLevelMapArrayBits", c_nMultiLevelSet_ArrayBits);
+
if ( c_nInsThreadCount == 0 )
- c_nInsThreadCount = cds::OS::topology::processor_count();
+ c_nInsThreadCount = std::thread::hardware_concurrency();
if ( c_nDelThreadCount == 0 && c_nExtractThreadCount == 0 ) {
- c_nExtractThreadCount = cds::OS::topology::processor_count() / 2;
- c_nDelThreadCount = cds::OS::topology::processor_count() - c_nExtractThreadCount;
+ c_nExtractThreadCount = std::thread::hardware_concurrency() / 2;
+ c_nDelThreadCount = std::thread::hardware_concurrency() - c_nExtractThreadCount;
}
m_arrData.resize( c_nSetSize );
m_arrData[i] = i;
shuffle( m_arrData.begin(), m_arrData.end() );
}
-
- void Set_DelOdd::myRun(const char *in_name, bool invert /*= false*/)
- {
- setUpParams( m_Cfg.get( "Map_DelOdd" ));
-
- run_MichaelSet(in_name, invert);
- run_SplitList(in_name, invert);
- run_SkipListSet(in_name, invert);
- run_EllenBinTreeSet(in_name, invert);
- run_CuckooSet(in_name, invert);
-
- endTestCase();
- }
} // namespace set2