namespace map2 {
CPPUNIT_TEST_SUITE_REGISTRATION( Map_DelOdd );
- size_t Map_DelOdd::c_nMapSize = 1000000 ; // max map size
- size_t Map_DelOdd::c_nInsThreadCount = 4 ; // insert thread count
- size_t Map_DelOdd::c_nDelThreadCount = 4 ; // delete thread count
- size_t Map_DelOdd::c_nExtractThreadCount = 4 ; // extract thread count
- size_t Map_DelOdd::c_nMaxLoadFactor = 8 ; // maximum load factor
- bool Map_DelOdd::c_bPrintGCState = true;
-
void Map_DelOdd::setUpParams( const CppUnitMini::TestCfg& cfg ) {
- c_nMapSize = cfg.getULong("MapSize", static_cast<unsigned long>(c_nMapSize) );
- c_nInsThreadCount = cfg.getULong("InsThreadCount", static_cast<unsigned long>(c_nInsThreadCount) );
- c_nDelThreadCount = cfg.getULong("DelThreadCount", static_cast<unsigned long>(c_nDelThreadCount) );
- c_nExtractThreadCount = cfg.getULong("ExtractThreadCount", static_cast<unsigned long>(c_nExtractThreadCount) );
- c_nMaxLoadFactor = cfg.getULong("MaxLoadFactor", static_cast<unsigned long>(c_nMaxLoadFactor) );
+ c_nMapSize = cfg.getSizeT("MapSize", c_nMapSize );
+ c_nInsThreadCount = cfg.getSizeT("InsThreadCount", c_nInsThreadCount );
+ c_nDelThreadCount = cfg.getSizeT("DelThreadCount", c_nDelThreadCount );
+ c_nExtractThreadCount = cfg.getSizeT("ExtractThreadCount", c_nExtractThreadCount );
+ 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_nFeldmanMap_HeadBits = cfg.getSizeT("FeldmanMapHeadBits", c_nFeldmanMap_HeadBits);
+ c_nFeldmanMap_ArrayBits = cfg.getSizeT("FeldmanMapArrayBits", c_nFeldmanMap_ArrayBits);
+
if ( c_nInsThreadCount == 0 )
c_nInsThreadCount = cds::OS::topology::processor_count();
if ( c_nDelThreadCount == 0 && c_nExtractThreadCount == 0 ) {
m_arrInsert[i] = i;
m_arrRemove[i] = i;
}
- std::random_shuffle( m_arrInsert.begin(), m_arrInsert.end() );
- std::random_shuffle( m_arrRemove.begin(), m_arrRemove.end() );
- }
-
- void Map_DelOdd::myRun(const char *in_name, bool invert /*= false*/)
- {
- setUpParams( m_Cfg.get( "Map_DelOdd" ));
-
- run_MichaelMap(in_name, invert);
- run_SplitList(in_name, invert);
- run_SkipListMap(in_name, invert);
- run_EllenBinTreeMap(in_name, invert);
- run_BronsonAVLTreeMap(in_name, invert);
- //run_StripedMap(in_name, invert);
- //run_RefinableMap(in_name, invert);
- run_CuckooMap(in_name, invert);
- //run_StdMap(in_name, invert);
-
- endTestCase();
+ shuffle( m_arrInsert.begin(), m_arrInsert.end() );
+ shuffle( m_arrRemove.begin(), m_arrRemove.end() );
}
} // namespace map2