Fixed MultiLevelHashSet MT-test
authorkhizmax <libcds.dev@gmail.com>
Sun, 13 Sep 2015 14:17:19 +0000 (17:17 +0300)
committerkhizmax <libcds.dev@gmail.com>
Sun, 13 Sep 2015 14:17:19 +0000 (17:17 +0300)
tests/unit/set2/set_insdel_func.cpp
tests/unit/set2/set_insdel_func.h
tests/unit/set2/set_insdel_string.cpp
tests/unit/set2/set_insdel_string.h
tests/unit/set2/set_insdelfind.cpp
tests/unit/set2/set_insdelfind.h
tests/unit/set2/set_type_multilevel_hashset.h

index 3bb3286ea57ec1bd31bc899633e2a23d298e20e5..02773f1e55950e7ef11b182501e72ecf9733a33a 100644 (file)
@@ -19,6 +19,9 @@ namespace set2 {
         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_nInsertThreadCount == 0 )
             c_nInsertThreadCount = std::thread::hardware_concurrency();
         if ( c_nDeleteThreadCount == 0 )
index 505c0a491695a90564c5eb99d1795841d2f7f086..727f330d9b14270cc0a65e31714bc4052554ea6d 100644 (file)
@@ -27,6 +27,9 @@ namespace set2 {
         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_nMultiLevelSet_HeadBits = 10;
+        size_t c_nMultiLevelSet_ArrayBits = 4;
+
         size_t c_nLoadFactor = 2;
 
     private:
index f84adffbb2df5cde5b6b2a6f66a29c004aa49dc8..f20d5205b9a7a98ea5776492e535b648789a1100 100644 (file)
@@ -18,6 +18,9 @@ namespace set2 {
         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_nInsertThreadCount == 0 )
             c_nInsertThreadCount = std::thread::hardware_concurrency();
         if ( c_nDeleteThreadCount == 0 )
index 8d68793a2bbeeb499afbb1769c27be5b3c02165f..7608542f8f0ddf1c8c9d63261cafc0662e9d6b31 100644 (file)
@@ -23,6 +23,9 @@ namespace set2 {
         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_nMultiLevelSet_HeadBits = 10;
+        size_t c_nMultiLevelSet_ArrayBits = 4;
+
         size_t c_nLoadFactor = 2;
 
     private:
index 3330b2785f6e64a5d5f44e3d0f9bf5d2a5f7a8b1..df6a559a5073ea7686ba26eafbdec5a71346b71d 100644 (file)
@@ -19,6 +19,9 @@ namespace set2 {
         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_nThreadCount == 0 )
             c_nThreadCount = std::thread::hardware_concurrency();
 
index 97f54de8fd9e93ba91a7917684dd35fc8e0d1e93..74971e88c787b6b94a311cadd277363ec4d255ce 100644 (file)
@@ -22,6 +22,9 @@ namespace set2 {
         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_nMultiLevelSet_HeadBits = 10;
+        size_t c_nMultiLevelSet_ArrayBits = 4;
+
         size_t c_nLoadFactor = 2;
 
     public:
index 45b3bcc38c44b89b9b7279bfff7ba4e86b271344..c022d5de9068840188ea019f55376de6881ec5e0 100644 (file)
@@ -21,7 +21,7 @@ namespace set2 {
 
         template <class Config>
         MultiLevelHashSet( Config const& cfg )
-            : base_class( cfg.c_nSetSize, cfg.c_nLoadFactor )
+            : base_class( cfg.c_nMultiLevelSet_HeadBits, cfg.c_nMultiLevelSet_ArrayBits )
         {}
 
         template <typename Q>