Adds iterable HP map parameters
authorPeizhao Ou <peizhaoo@uci.edu>
Thu, 15 Feb 2018 21:11:47 +0000 (13:11 -0800)
committerPeizhao Ou <peizhaoo@uci.edu>
Thu, 15 Feb 2018 21:11:47 +0000 (13:11 -0800)
test/stress/map/insdelfind/map_insdelfind.cpp
test/stress/map/insdelfind/map_insdelfind.h
test/stress/map/insdelfind/map_insdelfind_michael_hp.cpp
test/stress/map/insdelfind/map_insdelfind_split_hp.cpp

index 5596ae4..2e5bbe9 100644 (file)
@@ -40,8 +40,10 @@ namespace map {
     size_t Map_InsDelFind::s_nHpFeldmanPassCount = 100;
     size_t Map_InsDelFind::s_nHpEllenBinTreeMapPassCount = 100;
     size_t Map_InsDelFind::s_nHpMichaelMapPassCount = 100;
+    size_t Map_InsDelFind::s_nHpMichaelIterableMapPassCount = 100;
     size_t Map_InsDelFind::s_nHpSkipListMapPassCount = 100;
     size_t Map_InsDelFind::s_nHpSplitListMapPassCount = 100;
+    size_t Map_InsDelFind::s_nHpSplitListIterableMapPassCount = 100;
 
     size_t Map_InsDelFind::s_nRcuFeldmanPassCount = 100;
     size_t Map_InsDelFind::s_nRcuEllenBinTreeMapPassCount = 100;
index e290d39..296b1da 100644 (file)
@@ -45,8 +45,10 @@ namespace map {
         static size_t s_nHpEllenBinTreeMapPassCount;
         static size_t s_nHpFeldmanPassCount;
         static size_t s_nHpMichaelMapPassCount;
+        static size_t s_nHpMichaelIterableMapPassCount;
         static size_t s_nHpSkipListMapPassCount;
         static size_t s_nHpSplitListMapPassCount;
+        static size_t s_nHpSplitListIterableMapPassCount;
 
         static size_t s_nRcuEllenBinTreeMapPassCount;
         static size_t s_nRcuFeldmanPassCount;
@@ -317,6 +319,20 @@ namespace map {
           Map_InsDelFind_LF::run_test<Map>();
         }
 
+        template <class Map>
+        void run_iterable_michael_hp() {
+          Map_InsDelFind::s_nPassCount =
+              Map_InsDelFind::s_nHpMichaelIterableMapPassCount;
+          Map_InsDelFind_LF::run_test<Map>();
+        }
+
+        template <class Map>
+        void run_iterable_split_list_hp() {
+          Map_InsDelFind::s_nPassCount =
+              Map_InsDelFind::s_nHpSplitListIterableMapPassCount;
+          Map_InsDelFind_LF::run_test<Map>();
+        }
+
         template <class Map>
         void run_michael_rcu() {
           Map_InsDelFind::s_nPassCount =
index 61b8bd2..c5210f5 100644 (file)
 #include "map_type_michael.h"
 
 namespace map {
+               #undef CDSSTRESS_MichaelMap_HP
+
+               #define CDSSTRESS_MichaelMap_HP( fixture, test_case, key_type, value_type ) \
+    CDSSTRESS_MichaelMap_Iterable( fixture, test_case, key_type, value_type )
+
+               CDSSTRESS_MichaelMap_HP( Map_InsDelFind_LF, run_iterable_michael_hp, size_t, size_t )
+
+               #undef CDSSTRESS_MichaelMap_HP
+
+               #define CDSSTRESS_MichaelMap_HP( fixture, test_case, key_type, value_type ) \
+    CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_HP_cmp,                      key_type, value_type ) \
+    CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_DHP_less,                    key_type, value_type ) \
+    \
+    CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_HP_cmp,                 key_type, value_type ) \
+    CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_DHP_less,               key_type, value_type ) \
+    \
+    CDSSTRESS_MichaelMap_HP_1( fixture, test_case, key_type, value_type ) \
+    CDSSTRESS_MichaelMap_HP_2( fixture, test_case, key_type, value_type ) \
 
     CDSSTRESS_MichaelMap_HP( Map_InsDelFind_LF, run_michael_hp, size_t, size_t )
 
index 0c501bc..7546dd2 100644 (file)
@@ -34,6 +34,6 @@
 namespace map {
 
     CDSSTRESS_SplitListMap_HP( Map_InsDelFind_LF, run_split_list_hp, size_t, size_t )
-    CDSSTRESS_SplitListIterableMap( Map_InsDelFind_LF, run_split_list_hp, size_t, size_t )
+    CDSSTRESS_SplitListIterableMap( Map_InsDelFind_LF, run_iterable_split_list_hp, size_t, size_t )
 
 } // namespace map