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 5596ae41adf532b10c795b0761fd11feb2eee0c6..2e5bbe949746c7f18c324c2c09df31303ddf5e50 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 e290d3961cef1acf0f0549ade8f13e14a046159b..296b1dad3d040a25d6664489cb92a0f12e9a5c1e 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 61b8bd2dcfe328106c599895c91a1507b1c57b02..c5210f574ffd0f5a529a8815d4d8da7077e6239a 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 0c501bc90c5a82edbd7b2b251cdd1fadd3583d95..7546dd22a1c4b7fc85e230d515d88b40e8a3c580 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