3 #include "set2/set_delodd.h"
6 CPPUNIT_TEST_SUITE_REGISTRATION( Set_DelOdd );
8 void Set_DelOdd::setUpParams( const CppUnitMini::TestCfg& cfg )
10 c_nSetSize = cfg.getSizeT("MapSize", c_nSetSize );
11 c_nInsThreadCount = cfg.getSizeT("InsThreadCount", c_nInsThreadCount);
12 c_nDelThreadCount = cfg.getSizeT("DelThreadCount", c_nDelThreadCount);
13 c_nExtractThreadCount = cfg.getSizeT("ExtractThreadCount", c_nExtractThreadCount);
14 c_nMaxLoadFactor = cfg.getSizeT("MaxLoadFactor", c_nMaxLoadFactor);
15 c_bPrintGCState = cfg.getBool("PrintGCStateFlag", true );
17 c_nCuckooInitialSize = cfg.getSizeT("CuckooInitialSize", c_nCuckooInitialSize );
18 c_nCuckooProbesetSize = cfg.getSizeT("CuckooProbesetSize", c_nCuckooProbesetSize );
19 c_nCuckooProbesetThreshold = cfg.getSizeT("CuckooProbesetThreshold", c_nCuckooProbesetThreshold );
21 c_nFeldmanSet_HeadBits = cfg.getSizeT("FeldmanMapHeadBits", c_nFeldmanSet_HeadBits);
22 c_nFeldmanSet_ArrayBits = cfg.getSizeT("FeldmanMapArrayBits", c_nFeldmanSet_ArrayBits);
24 if ( c_nInsThreadCount == 0 )
25 c_nInsThreadCount = std::thread::hardware_concurrency();
26 if ( c_nDelThreadCount == 0 && c_nExtractThreadCount == 0 ) {
27 c_nExtractThreadCount = std::thread::hardware_concurrency() / 2;
28 c_nDelThreadCount = std::thread::hardware_concurrency() - c_nExtractThreadCount;
31 m_arrData.resize( c_nSetSize );
32 for ( size_t i = 0; i < c_nSetSize; ++i )
34 shuffle( m_arrData.begin(), m_arrData.end() );
37 void Set_DelOdd::endTestCase()
39 m_arrData.resize( 0 );