From 5cc8dbffef0c946e499fc06d2b0b226ba57082df Mon Sep 17 00:00:00 2001 From: Peizhao Ou Date: Thu, 15 Feb 2018 13:11:47 -0800 Subject: [PATCH] Adds iterable HP map parameters --- test/stress/map/insdelfind/map_insdelfind.cpp | 2 ++ test/stress/map/insdelfind/map_insdelfind.h | 16 ++++++++++++++++ .../insdelfind/map_insdelfind_michael_hp.cpp | 18 ++++++++++++++++++ .../map/insdelfind/map_insdelfind_split_hp.cpp | 2 +- 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/test/stress/map/insdelfind/map_insdelfind.cpp b/test/stress/map/insdelfind/map_insdelfind.cpp index 5596ae41..2e5bbe94 100644 --- a/test/stress/map/insdelfind/map_insdelfind.cpp +++ b/test/stress/map/insdelfind/map_insdelfind.cpp @@ -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; diff --git a/test/stress/map/insdelfind/map_insdelfind.h b/test/stress/map/insdelfind/map_insdelfind.h index e290d396..296b1dad 100644 --- a/test/stress/map/insdelfind/map_insdelfind.h +++ b/test/stress/map/insdelfind/map_insdelfind.h @@ -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(); } + template + void run_iterable_michael_hp() { + Map_InsDelFind::s_nPassCount = + Map_InsDelFind::s_nHpMichaelIterableMapPassCount; + Map_InsDelFind_LF::run_test(); + } + + template + void run_iterable_split_list_hp() { + Map_InsDelFind::s_nPassCount = + Map_InsDelFind::s_nHpSplitListIterableMapPassCount; + Map_InsDelFind_LF::run_test(); + } + template void run_michael_rcu() { Map_InsDelFind::s_nPassCount = diff --git a/test/stress/map/insdelfind/map_insdelfind_michael_hp.cpp b/test/stress/map/insdelfind/map_insdelfind_michael_hp.cpp index 61b8bd2d..c5210f57 100644 --- a/test/stress/map/insdelfind/map_insdelfind_michael_hp.cpp +++ b/test/stress/map/insdelfind/map_insdelfind_michael_hp.cpp @@ -32,6 +32,24 @@ #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 ) diff --git a/test/stress/map/insdelfind/map_insdelfind_split_hp.cpp b/test/stress/map/insdelfind/map_insdelfind_split_hp.cpp index 0c501bc9..7546dd22 100644 --- a/test/stress/map/insdelfind/map_insdelfind_split_hp.cpp +++ b/test/stress/map/insdelfind/map_insdelfind_split_hp.cpp @@ -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 -- 2.34.1