Fixed MultiLevelHashSet MT-test
[libcds.git] / tests / unit / set2 / set_insdel_func.cpp
1 //$$CDS-header$$
2
3 #include "set2/set_insdel_func.h"
4
5 namespace set2 {
6     CPPUNIT_TEST_SUITE_REGISTRATION( Set_InsDel_func );
7
8     void Set_InsDel_func::setUpParams( const CppUnitMini::TestCfg& cfg )
9     {
10         c_nSetSize = cfg.getSizeT("MapSize", c_nSetSize );
11         c_nInsertThreadCount = cfg.getSizeT("InsertThreadCount", c_nInsertThreadCount );
12         c_nDeleteThreadCount = cfg.getSizeT("DeleteThreadCount", c_nDeleteThreadCount );
13         c_nUpdateThreadCount = cfg.getSizeT("EnsureThreadCount", c_nUpdateThreadCount );
14         c_nThreadPassCount = cfg.getSizeT("ThreadPassCount", c_nThreadPassCount );
15         c_nMaxLoadFactor = cfg.getSizeT("MaxLoadFactor", c_nMaxLoadFactor );
16         c_bPrintGCState = cfg.getBool("PrintGCStateFlag", c_bPrintGCState );
17
18         c_nCuckooInitialSize = cfg.getSizeT("CuckooInitialSize", c_nCuckooInitialSize );
19         c_nCuckooProbesetSize = cfg.getSizeT("CuckooProbesetSize", c_nCuckooProbesetSize );
20         c_nCuckooProbesetThreshold = cfg.getSizeT("CuckooProbesetThreshold", c_nCuckooProbesetThreshold );
21
22         c_nMultiLevelSet_HeadBits = cfg.getSizeT("MultiLevelMapHeadBits", c_nMultiLevelSet_HeadBits);
23         c_nMultiLevelSet_ArrayBits = cfg.getSizeT("MultiLevelMapArrayBits", c_nMultiLevelSet_ArrayBits);
24
25         if ( c_nInsertThreadCount == 0 )
26             c_nInsertThreadCount = std::thread::hardware_concurrency();
27         if ( c_nDeleteThreadCount == 0 )
28             c_nDeleteThreadCount = std::thread::hardware_concurrency();
29         if ( c_nUpdateThreadCount == 0 )
30             c_nUpdateThreadCount = std::thread::hardware_concurrency();
31     }
32 } // namespace set2