From 371b04ee28c0fd3d75f899999da6d08f5a84545f Mon Sep 17 00:00:00 2001 From: khizmax Date: Sun, 21 Aug 2016 19:29:14 +0300 Subject: [PATCH] Added MichaelMap based on IterableList to map stress tests --- projects/Win/vc14/cds.sln | 1 + .../map/delodd/map_delodd_feldman_hashset.cpp | 2 +- test/stress/map/delodd/map_delodd_michael.cpp | 2 +- test/stress/map/map_type_iterable_list.h | 172 ++++++++++++++++++ test/stress/map/map_type_lazy_list.h | 33 +++- test/stress/map/map_type_michael.h | 131 ++++++++++++- test/stress/map/map_type_michael_list.h | 32 +++- 7 files changed, 363 insertions(+), 10 deletions(-) create mode 100644 test/stress/map/map_type_iterable_list.h diff --git a/projects/Win/vc14/cds.sln b/projects/Win/vc14/cds.sln index 8fbe3138..ace405a4 100644 --- a/projects/Win/vc14/cds.sln +++ b/projects/Win/vc14/cds.sln @@ -163,6 +163,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Header Files", "Header File ..\..\..\test\stress\map\map_type_cuckoo.h = ..\..\..\test\stress\map\map_type_cuckoo.h ..\..\..\test\stress\map\map_type_ellen_bintree.h = ..\..\..\test\stress\map\map_type_ellen_bintree.h ..\..\..\test\stress\map\map_type_feldman_hashmap.h = ..\..\..\test\stress\map\map_type_feldman_hashmap.h + ..\..\..\test\stress\map\map_type_iterable_list.h = ..\..\..\test\stress\map\map_type_iterable_list.h ..\..\..\test\stress\map\map_type_lazy_list.h = ..\..\..\test\stress\map\map_type_lazy_list.h ..\..\..\test\stress\map\map_type_michael.h = ..\..\..\test\stress\map\map_type_michael.h ..\..\..\test\stress\map\map_type_michael_list.h = ..\..\..\test\stress\map\map_type_michael_list.h diff --git a/test/stress/map/delodd/map_delodd_feldman_hashset.cpp b/test/stress/map/delodd/map_delodd_feldman_hashset.cpp index 7d692ac1..79d96003 100644 --- a/test/stress/map/delodd/map_delodd_feldman_hashset.cpp +++ b/test/stress/map/delodd/map_delodd_feldman_hashset.cpp @@ -25,7 +25,7 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "map_delodd.h" diff --git a/test/stress/map/delodd/map_delodd_michael.cpp b/test/stress/map/delodd/map_delodd_michael.cpp index 602cfde7..2ecf17b0 100644 --- a/test/stress/map/delodd/map_delodd_michael.cpp +++ b/test/stress/map/delodd/map_delodd_michael.cpp @@ -25,7 +25,7 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "map_delodd.h" diff --git a/test/stress/map/map_type_iterable_list.h b/test/stress/map/map_type_iterable_list.h new file mode 100644 index 00000000..a35e5e64 --- /dev/null +++ b/test/stress/map/map_type_iterable_list.h @@ -0,0 +1,172 @@ +/* + This file is a part of libcds - Concurrent Data Structures library + + (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 + + Source code repo: http://github.com/khizmax/libcds/ + Download: http://sourceforge.net/projects/libcds/files/ + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef CDSUNIT_MAP_TYPE_ITERABLE_LIST_H +#define CDSUNIT_MAP_TYPE_ITERABLE_LIST_H + +#include "map_type.h" + +#include +#include + +namespace map { + + template + struct iterable_list_type + { + typedef typename map_type_base::key_compare compare; + typedef typename map_type_base::key_less less; + + struct traits_IterableList_cmp_stdAlloc : + public cc::iterable_list::make_traits< + co::compare< compare > + >::type + {}; + typedef cc::IterableKVList< cds::gc::HP, Key, Value, traits_IterableList_cmp_stdAlloc > IterableList_HP_cmp_stdAlloc; + typedef cc::IterableKVList< cds::gc::DHP, Key, Value, traits_IterableList_cmp_stdAlloc > IterableList_DHP_cmp_stdAlloc; +// typedef cc::IterableKVList< rcu_gpi, Key, Value, traits_IterableList_cmp_stdAlloc > IterableList_RCU_GPI_cmp_stdAlloc; +// typedef cc::IterableKVList< rcu_gpb, Key, Value, traits_IterableList_cmp_stdAlloc > IterableList_RCU_GPB_cmp_stdAlloc; +// typedef cc::IterableKVList< rcu_gpt, Key, Value, traits_IterableList_cmp_stdAlloc > IterableList_RCU_GPT_cmp_stdAlloc; +//#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED +// typedef cc::IterableKVList< rcu_shb, Key, Value, traits_IterableList_cmp_stdAlloc > IterableList_RCU_SHB_cmp_stdAlloc; +// typedef cc::IterableKVList< rcu_sht, Key, Value, traits_IterableList_cmp_stdAlloc > IterableList_RCU_SHT_cmp_stdAlloc; +//#endif + + struct traits_IterableList_cmp_stdAlloc_stat: public traits_IterableList_cmp_stdAlloc + { + typedef cc::iterable_list::stat<> stat; + }; + typedef cc::IterableKVList< cds::gc::HP, Key, Value, traits_IterableList_cmp_stdAlloc_stat > IterableList_HP_cmp_stdAlloc_stat; + typedef cc::IterableKVList< cds::gc::DHP, Key, Value, traits_IterableList_cmp_stdAlloc_stat > IterableList_DHP_cmp_stdAlloc_stat; + // typedef cc::IterableKVList< rcu_gpi, Key, Value, traits_IterableList_cmp_stdAlloc_stat > IterableList_RCU_GPI_cmp_stdAlloc_stat; + // typedef cc::IterableKVList< rcu_gpb, Key, Value, traits_IterableList_cmp_stdAlloc_stat > IterableList_RCU_GPB_cmp_stdAlloc_stat; + // typedef cc::IterableKVList< rcu_gpt, Key, Value, traits_IterableList_cmp_stdAlloc_stat > IterableList_RCU_GPT_cmp_stdAlloc_stat; + //#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + // typedef cc::IterableKVList< rcu_shb, Key, Value, traits_IterableList_cmp_stdAlloc_stat > IterableList_RCU_SHB_cmp_stdAlloc_stat; + // typedef cc::IterableKVList< rcu_sht, Key, Value, traits_IterableList_cmp_stdAlloc_stat > IterableList_RCU_SHT_cmp_stdAlloc_stat; + //#endif + + struct traits_IterableList_cmp_stdAlloc_seqcst : + public cc::iterable_list::make_traits< + co::compare< compare > + ,co::memory_model< co::v::sequential_consistent > + >::type + {}; + typedef cc::IterableKVList< cds::gc::HP, Key, Value, traits_IterableList_cmp_stdAlloc_seqcst > IterableList_HP_cmp_stdAlloc_seqcst; + typedef cc::IterableKVList< cds::gc::DHP, Key, Value, traits_IterableList_cmp_stdAlloc_seqcst > IterableList_DHP_cmp_stdAlloc_seqcst; +// typedef cc::IterableKVList< rcu_gpi, Key, Value, traits_IterableList_cmp_stdAlloc_seqcst > IterableList_RCU_GPI_cmp_stdAlloc_seqcst; +// typedef cc::IterableKVList< rcu_gpb, Key, Value, traits_IterableList_cmp_stdAlloc_seqcst > IterableList_RCU_GPB_cmp_stdAlloc_seqcst; +// typedef cc::IterableKVList< rcu_gpt, Key, Value, traits_IterableList_cmp_stdAlloc_seqcst > IterableList_RCU_GPT_cmp_stdAlloc_seqcst; +//#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED +// typedef cc::IterableKVList< rcu_shb, Key, Value, traits_IterableList_cmp_stdAlloc_seqcst > IterableList_RCU_SHB_cmp_stdAlloc_seqcst; +// typedef cc::IterableKVList< rcu_sht, Key, Value, traits_IterableList_cmp_stdAlloc_seqcst > IterableList_RCU_SHT_cmp_stdAlloc_seqcst; +//#endif + + struct traits_IterableList_cmp_michaelAlloc : + public cc::iterable_list::make_traits< + co::compare< compare >, + co::allocator< memory::MichaelAllocator > + >::type + {}; + typedef cc::IterableKVList< cds::gc::HP, Key, Value, traits_IterableList_cmp_michaelAlloc > IterableList_HP_cmp_michaelAlloc; + typedef cc::IterableKVList< cds::gc::DHP, Key, Value, traits_IterableList_cmp_michaelAlloc > IterableList_DHP_cmp_michaelAlloc; +// typedef cc::IterableKVList< rcu_gpi, Key, Value, traits_IterableList_cmp_michaelAlloc > IterableList_RCU_GPI_cmp_michaelAlloc; +// typedef cc::IterableKVList< rcu_gpb, Key, Value, traits_IterableList_cmp_michaelAlloc > IterableList_RCU_GPB_cmp_michaelAlloc; +// typedef cc::IterableKVList< rcu_gpt, Key, Value, traits_IterableList_cmp_michaelAlloc > IterableList_RCU_GPT_cmp_michaelAlloc; +//#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED +// typedef cc::IterableKVList< rcu_shb, Key, Value, traits_IterableList_cmp_michaelAlloc > IterableList_RCU_SHB_cmp_michaelAlloc; +// typedef cc::IterableKVList< rcu_sht, Key, Value, traits_IterableList_cmp_michaelAlloc > IterableList_RCU_SHT_cmp_michaelAlloc; +//#endif + + struct traits_IterableList_less_stdAlloc : + public cc::iterable_list::make_traits< + co::less< less > + >::type + {}; + typedef cc::IterableKVList< cds::gc::HP, Key, Value, traits_IterableList_less_stdAlloc > IterableList_HP_less_stdAlloc; + typedef cc::IterableKVList< cds::gc::DHP, Key, Value, traits_IterableList_less_stdAlloc > IterableList_DHP_less_stdAlloc; +// typedef cc::IterableKVList< rcu_gpi, Key, Value, traits_IterableList_less_stdAlloc > IterableList_RCU_GPI_less_stdAlloc; +// typedef cc::IterableKVList< rcu_gpb, Key, Value, traits_IterableList_less_stdAlloc > IterableList_RCU_GPB_less_stdAlloc; +// typedef cc::IterableKVList< rcu_gpt, Key, Value, traits_IterableList_less_stdAlloc > IterableList_RCU_GPT_less_stdAlloc; +//#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED +// typedef cc::IterableKVList< rcu_shb, Key, Value, traits_IterableList_less_stdAlloc > IterableList_RCU_SHB_less_stdAlloc; +// typedef cc::IterableKVList< rcu_sht, Key, Value, traits_IterableList_less_stdAlloc > IterableList_RCU_SHT_less_stdAlloc; +//#endif + + struct traits_IterableList_less_stdAlloc_stat: public traits_IterableList_less_stdAlloc + { + typedef cc::iterable_list::stat<> stat; + }; + typedef cc::IterableKVList< cds::gc::HP, Key, Value, traits_IterableList_less_stdAlloc_stat > IterableList_HP_less_stdAlloc_stat; + typedef cc::IterableKVList< cds::gc::DHP, Key, Value, traits_IterableList_less_stdAlloc_stat > IterableList_DHP_less_stdAlloc_stat; +// typedef cc::IterableKVList< rcu_gpi, Key, Value, traits_IterableList_less_stdAlloc_stat > IterableList_RCU_GPI_less_stdAlloc_stat; +// typedef cc::IterableKVList< rcu_gpb, Key, Value, traits_IterableList_less_stdAlloc_stat > IterableList_RCU_GPB_less_stdAlloc_stat; +// typedef cc::IterableKVList< rcu_gpt, Key, Value, traits_IterableList_less_stdAlloc_stat > IterableList_RCU_GPT_less_stdAlloc_stat; +//#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED +// typedef cc::IterableKVList< rcu_shb, Key, Value, traits_IterableList_less_stdAlloc_stat > IterableList_RCU_SHB_less_stdAlloc_stat; +// typedef cc::IterableKVList< rcu_sht, Key, Value, traits_IterableList_less_stdAlloc_stat > IterableList_RCU_SHT_less_stdAlloc_stat; +//#endif + + struct traits_IterableList_less_stdAlloc_seqcst : + public cc::iterable_list::make_traits< + co::less< less > + ,co::memory_model< co::v::sequential_consistent > + >::type + {}; + typedef cc::IterableKVList< cds::gc::HP, Key, Value, traits_IterableList_less_stdAlloc_seqcst > IterableList_HP_less_stdAlloc_seqcst; + typedef cc::IterableKVList< cds::gc::DHP, Key, Value, traits_IterableList_less_stdAlloc_seqcst > IterableList_DHP_less_stdAlloc_seqcst; +// typedef cc::IterableKVList< rcu_gpi, Key, Value, traits_IterableList_less_stdAlloc_seqcst > IterableList_RCU_GPI_less_stdAlloc_seqcst; +// typedef cc::IterableKVList< rcu_gpb, Key, Value, traits_IterableList_less_stdAlloc_seqcst > IterableList_RCU_GPB_less_stdAlloc_seqcst; +// typedef cc::IterableKVList< rcu_gpt, Key, Value, traits_IterableList_less_stdAlloc_seqcst > IterableList_RCU_GPT_less_stdAlloc_seqcst; +//#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED +// typedef cc::IterableKVList< rcu_shb, Key, Value, traits_IterableList_less_stdAlloc_seqcst > IterableList_RCU_SHB_less_stdAlloc_seqcst; +// typedef cc::IterableKVList< rcu_sht, Key, Value, traits_IterableList_less_stdAlloc_seqcst > IterableList_RCU_SHT_less_stdAlloc_seqcst; +//#endif + + struct traits_IterableList_less_michaelAlloc : + public cc::iterable_list::make_traits< + co::less< less >, + co::allocator< memory::MichaelAllocator > + >::type + {}; + typedef cc::IterableKVList< cds::gc::HP, Key, Value, traits_IterableList_less_michaelAlloc > IterableList_HP_less_michaelAlloc; + typedef cc::IterableKVList< cds::gc::DHP, Key, Value, traits_IterableList_less_michaelAlloc > IterableList_DHP_less_michaelAlloc; +// typedef cc::IterableKVList< rcu_gpi, Key, Value, traits_IterableList_less_michaelAlloc > IterableList_RCU_GPI_less_michaelAlloc; +// typedef cc::IterableKVList< rcu_gpb, Key, Value, traits_IterableList_less_michaelAlloc > IterableList_RCU_GPB_less_michaelAlloc; +// typedef cc::IterableKVList< rcu_gpt, Key, Value, traits_IterableList_less_michaelAlloc > IterableList_RCU_GPT_less_michaelAlloc; +//#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED +// typedef cc::IterableKVList< rcu_shb, Key, Value, traits_IterableList_less_michaelAlloc > IterableList_RCU_SHB_less_michaelAlloc; +// typedef cc::IterableKVList< rcu_sht, Key, Value, traits_IterableList_less_michaelAlloc > IterableList_RCU_SHT_less_michaelAlloc; +//#endif + }; + +} // namespace map + +#endif // ifndef CDSUNIT_MAP_TYPE_ITERABLE_LIST_H diff --git a/test/stress/map/map_type_lazy_list.h b/test/stress/map/map_type_lazy_list.h index 14a70f42..d194ca66 100644 --- a/test/stress/map/map_type_lazy_list.h +++ b/test/stress/map/map_type_lazy_list.h @@ -25,7 +25,7 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef CDSUNIT_MAP_TYPE_LAZY_LIST_H @@ -63,6 +63,21 @@ namespace map { typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_RCU_SHT_cmp_stdAlloc; #endif + struct traits_LazyList_cmp_stdAlloc_stat: public traits_LazyList_cmp_stdAlloc + { + typedef cc::lazy_list::stat<> stat; + }; + typedef cc::LazyKVList< cds::gc::HP, Key, Value, traits_LazyList_cmp_stdAlloc_stat > LazyList_HP_cmp_stdAlloc_stat; + typedef cc::LazyKVList< cds::gc::DHP, Key, Value, traits_LazyList_cmp_stdAlloc_stat > LazyList_DHP_cmp_stdAlloc_stat; + typedef cc::LazyKVList< cds::gc::nogc, Key, Value, traits_LazyList_cmp_stdAlloc_stat > LazyList_NOGC_cmp_stdAlloc_stat; + typedef cc::LazyKVList< rcu_gpi, Key, Value, traits_LazyList_cmp_stdAlloc_stat > LazyList_RCU_GPI_cmp_stdAlloc_stat; + typedef cc::LazyKVList< rcu_gpb, Key, Value, traits_LazyList_cmp_stdAlloc_stat > LazyList_RCU_GPB_cmp_stdAlloc_stat; + typedef cc::LazyKVList< rcu_gpt, Key, Value, traits_LazyList_cmp_stdAlloc_stat > LazyList_RCU_GPT_cmp_stdAlloc_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::LazyKVList< rcu_shb, Key, Value, traits_LazyList_cmp_stdAlloc_stat > LazyList_RCU_SHB_cmp_stdAlloc_stat; + typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_cmp_stdAlloc_stat > LazyList_RCU_SHT_cmp_stdAlloc_stat; +#endif + struct traits_LazyList_unord_stdAlloc : public cc::lazy_list::make_traits< co::equal_to< equal_to > @@ -104,6 +119,7 @@ namespace map { typedef cc::LazyKVList< rcu_shb, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_SHB_cmp_michaelAlloc; typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_SHT_cmp_michaelAlloc; #endif + struct traits_LazyList_less_stdAlloc : public cc::lazy_list::make_traits< co::less< less > @@ -120,6 +136,21 @@ namespace map { typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_less_stdAlloc > LazyList_RCU_SHT_less_stdAlloc; #endif + struct traits_LazyList_less_stdAlloc_stat: public traits_LazyList_less_stdAlloc + { + typedef cc::lazy_list::stat<> stat; + }; + typedef cc::LazyKVList< cds::gc::HP, Key, Value, traits_LazyList_less_stdAlloc_stat > LazyList_HP_less_stdAlloc_stat; + typedef cc::LazyKVList< cds::gc::DHP, Key, Value, traits_LazyList_less_stdAlloc_stat > LazyList_DHP_less_stdAlloc_stat; + typedef cc::LazyKVList< cds::gc::nogc, Key, Value, traits_LazyList_less_stdAlloc_stat > LazyList_NOGC_less_stdAlloc_stat; + typedef cc::LazyKVList< rcu_gpi, Key, Value, traits_LazyList_less_stdAlloc_stat > LazyList_RCU_GPI_less_stdAlloc_stat; + typedef cc::LazyKVList< rcu_gpb, Key, Value, traits_LazyList_less_stdAlloc_stat > LazyList_RCU_GPB_less_stdAlloc_stat; + typedef cc::LazyKVList< rcu_gpt, Key, Value, traits_LazyList_less_stdAlloc_stat > LazyList_RCU_GPT_less_stdAlloc_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::LazyKVList< rcu_shb, Key, Value, traits_LazyList_less_stdAlloc_stat > LazyList_RCU_SHB_less_stdAlloc_stat; + typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_less_stdAlloc_stat > LazyList_RCU_SHT_less_stdAlloc_stat; +#endif + struct traits_LazyList_less_stdAlloc_seqcst : public cc::lazy_list::make_traits< co::less< less > diff --git a/test/stress/map/map_type_michael.h b/test/stress/map/map_type_michael.h index 6cfe99ae..234afdd4 100644 --- a/test/stress/map/map_type_michael.h +++ b/test/stress/map/map_type_michael.h @@ -25,7 +25,7 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef CDSUNIT_MAP_TYPE_MICHAEL_H @@ -33,6 +33,7 @@ #include "map_type_michael_list.h" #include "map_type_lazy_list.h" +#include "map_type_iterable_list.h" #include #include @@ -67,16 +68,16 @@ namespace map { typedef typename base_class::equal_to equal_to; typedef typename base_class::key_hash hash; - - // *************************************************************************** - // MichaelHashMap based on MichaelKVList - typedef michael_list_type< Key, Value > ml; - struct traits_MichaelMap_hash : public cc::michael_map::make_traits< co::hash< hash > >::type {}; + + // *************************************************************************** + // MichaelHashMap based on MichaelKVList + typedef michael_list_type< Key, Value > ml; + typedef MichaelHashMap< cds::gc::HP, typename ml::MichaelList_HP_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_HP_cmp_stdAlloc; typedef MichaelHashMap< cds::gc::DHP, typename ml::MichaelList_DHP_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_DHP_cmp_stdAlloc; typedef MichaelHashMap< cds::gc::nogc, typename ml::MichaelList_NOGC_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_NOGC_cmp_stdAlloc; @@ -88,6 +89,17 @@ namespace map { typedef MichaelHashMap< rcu_sht, typename ml::MichaelList_RCU_SHT_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_SHT_cmp_stdAlloc; #endif + typedef MichaelHashMap< cds::gc::HP, typename ml::MichaelList_HP_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_HP_cmp_stdAlloc_stat; + typedef MichaelHashMap< cds::gc::DHP, typename ml::MichaelList_DHP_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_DHP_cmp_stdAlloc_stat; + typedef MichaelHashMap< cds::gc::nogc, typename ml::MichaelList_NOGC_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_NOGC_cmp_stdAlloc_stat; + typedef MichaelHashMap< rcu_gpi, typename ml::MichaelList_RCU_GPI_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_RCU_GPI_cmp_stdAlloc_stat; + typedef MichaelHashMap< rcu_gpb, typename ml::MichaelList_RCU_GPB_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_RCU_GPB_cmp_stdAlloc_stat; + typedef MichaelHashMap< rcu_gpt, typename ml::MichaelList_RCU_GPT_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_RCU_GPT_cmp_stdAlloc_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef MichaelHashMap< rcu_shb, typename ml::MichaelList_RCU_SHB_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_RCU_SHB_cmp_stdAlloc_stat; + typedef MichaelHashMap< rcu_sht, typename ml::MichaelList_RCU_SHT_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_RCU_SHT_cmp_stdAlloc_stat; +#endif + typedef MichaelHashMap< cds::gc::HP, typename ml::MichaelList_HP_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_HP_less_stdAlloc; typedef MichaelHashMap< cds::gc::DHP, typename ml::MichaelList_DHP_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_DHP_less_stdAlloc; typedef MichaelHashMap< cds::gc::nogc, typename ml::MichaelList_NOGC_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_NOGC_less_stdAlloc; @@ -99,6 +111,17 @@ namespace map { typedef MichaelHashMap< rcu_sht, typename ml::MichaelList_RCU_SHT_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_SHT_less_stdAlloc; #endif + typedef MichaelHashMap< cds::gc::HP, typename ml::MichaelList_HP_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_HP_less_stdAlloc_stat; + typedef MichaelHashMap< cds::gc::DHP, typename ml::MichaelList_DHP_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_DHP_less_stdAlloc_stat; + typedef MichaelHashMap< cds::gc::nogc, typename ml::MichaelList_NOGC_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_NOGC_less_stdAlloc_stat; + typedef MichaelHashMap< rcu_gpi, typename ml::MichaelList_RCU_GPI_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_RCU_GPI_less_stdAlloc_stat; + typedef MichaelHashMap< rcu_gpb, typename ml::MichaelList_RCU_GPB_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_RCU_GPB_less_stdAlloc_stat; + typedef MichaelHashMap< rcu_gpt, typename ml::MichaelList_RCU_GPT_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_RCU_GPT_less_stdAlloc_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef MichaelHashMap< rcu_shb, typename ml::MichaelList_RCU_SHB_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_RCU_SHB_less_stdAlloc_stat; + typedef MichaelHashMap< rcu_sht, typename ml::MichaelList_RCU_SHT_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_RCU_SHT_less_stdAlloc_stat; +#endif + typedef MichaelHashMap< cds::gc::HP, typename ml::MichaelList_HP_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_HP_cmp_stdAlloc_seqcst; typedef MichaelHashMap< cds::gc::DHP, typename ml::MichaelList_DHP_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_DHP_cmp_stdAlloc_seqcst; typedef MichaelHashMap< cds::gc::nogc, typename ml::MichaelList_NOGC_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_NOGC_cmp_stdAlloc_seqcst; @@ -163,6 +186,17 @@ namespace map { typedef MichaelHashMap< rcu_sht, typename ll::LazyList_RCU_SHT_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHT_cmp_stdAlloc; #endif + typedef MichaelHashMap< cds::gc::HP, typename ll::LazyList_HP_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Lazy_HP_cmp_stdAlloc_stat; + typedef MichaelHashMap< cds::gc::DHP, typename ll::LazyList_DHP_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Lazy_DHP_cmp_stdAlloc_stat; + typedef MichaelHashMap< cds::gc::nogc, typename ll::LazyList_NOGC_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_cmp_stdAlloc_stat; + typedef MichaelHashMap< rcu_gpi, typename ll::LazyList_RCU_GPI_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPI_cmp_stdAlloc_stat; + typedef MichaelHashMap< rcu_gpb, typename ll::LazyList_RCU_GPB_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPB_cmp_stdAlloc_stat; + typedef MichaelHashMap< rcu_gpt, typename ll::LazyList_RCU_GPT_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPT_cmp_stdAlloc_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef MichaelHashMap< rcu_shb, typename ll::LazyList_RCU_SHB_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHB_cmp_stdAlloc_stat; + typedef MichaelHashMap< rcu_sht, typename ll::LazyList_RCU_SHT_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHT_cmp_stdAlloc_stat; +#endif + typedef MichaelHashMap< cds::gc::nogc, typename ll::LazyList_NOGC_unord_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_unord_stdAlloc; typedef MichaelHashMap< cds::gc::HP, typename ll::LazyList_HP_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_HP_less_stdAlloc; @@ -176,6 +210,17 @@ namespace map { typedef MichaelHashMap< rcu_sht, typename ll::LazyList_RCU_SHT_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHT_less_stdAlloc; #endif + typedef MichaelHashMap< cds::gc::HP, typename ll::LazyList_HP_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Lazy_HP_less_stdAlloc_stat; + typedef MichaelHashMap< cds::gc::DHP, typename ll::LazyList_DHP_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Lazy_DHP_less_stdAlloc_stat; + typedef MichaelHashMap< cds::gc::nogc, typename ll::LazyList_NOGC_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_less_stdAlloc_stat; + typedef MichaelHashMap< rcu_gpi, typename ll::LazyList_RCU_GPI_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPI_less_stdAlloc_stat; + typedef MichaelHashMap< rcu_gpb, typename ll::LazyList_RCU_GPB_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPB_less_stdAlloc_stat; + typedef MichaelHashMap< rcu_gpt, typename ll::LazyList_RCU_GPT_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPT_less_stdAlloc_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef MichaelHashMap< rcu_shb, typename ll::LazyList_RCU_SHB_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHB_less_stdAlloc_stat; + typedef MichaelHashMap< rcu_sht, typename ll::LazyList_RCU_SHT_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHT_less_stdAlloc_stat; +#endif + typedef MichaelHashMap< cds::gc::HP, typename ll::LazyList_HP_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_HP_cmp_stdAlloc_seqcst; typedef MichaelHashMap< cds::gc::DHP, typename ll::LazyList_DHP_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_DHP_cmp_stdAlloc_seqcst; typedef MichaelHashMap< cds::gc::nogc, typename ll::LazyList_NOGC_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_cmp_stdAlloc_seqcst; @@ -219,6 +264,60 @@ namespace map { typedef MichaelHashMap< rcu_sht, typename ll::LazyList_RCU_SHT_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_SHT_less_michaelAlloc; #endif + // *************************************************************************** + // MichaelHashMap based on IterableKVList + typedef iterable_list_type< Key, Value > il; + + typedef MichaelHashMap< cds::gc::HP, typename il::IterableList_HP_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Iterable_HP_cmp_stdAlloc; + typedef MichaelHashMap< cds::gc::DHP, typename il::IterableList_DHP_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Iterable_DHP_cmp_stdAlloc; +// typedef MichaelHashMap< rcu_gpi, typename il::IterableList_RCU_GPI_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_GPI_cmp_stdAlloc; +// typedef MichaelHashMap< rcu_gpb, typename il::IterableList_RCU_GPB_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_GPB_cmp_stdAlloc; +// typedef MichaelHashMap< rcu_gpt, typename il::IterableList_RCU_GPT_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_GPT_cmp_stdAlloc; +//#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED +// typedef MichaelHashMap< rcu_shb, typename il::IterableList_RCU_SHB_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_SHB_cmp_stdAlloc; +// typedef MichaelHashMap< rcu_sht, typename il::IterableList_RCU_SHT_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_SHT_cmp_stdAlloc; +//#endif + + typedef MichaelHashMap< cds::gc::HP, typename il::IterableList_HP_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Iterable_HP_cmp_stdAlloc_stat; + typedef MichaelHashMap< cds::gc::DHP, typename il::IterableList_DHP_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Iterable_DHP_cmp_stdAlloc_stat; +// typedef MichaelHashMap< rcu_gpi, typename il::IterableList_RCU_GPI_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_GPI_cmp_stdAlloc_stat; +// typedef MichaelHashMap< rcu_gpb, typename il::IterableList_RCU_GPB_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_GPB_cmp_stdAlloc_stat; +// typedef MichaelHashMap< rcu_gpt, typename il::IterableList_RCU_GPT_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_GPT_cmp_stdAlloc_stat; +//#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED +// typedef MichaelHashMap< rcu_shb, typename il::IterableList_RCU_SHB_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_SHB_cmp_stdAlloc_stat; +// typedef MichaelHashMap< rcu_sht, typename il::IterableList_RCU_SHT_cmp_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_SHT_cmp_stdAlloc_stat; +//#endif + + typedef MichaelHashMap< cds::gc::HP, typename il::IterableList_HP_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Iterable_HP_less_stdAlloc; + typedef MichaelHashMap< cds::gc::DHP, typename il::IterableList_DHP_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Iterable_DHP_less_stdAlloc; +// typedef MichaelHashMap< rcu_gpi, typename il::IterableList_RCU_GPI_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_GPI_less_stdAlloc; +// typedef MichaelHashMap< rcu_gpb, typename il::IterableList_RCU_GPB_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_GPB_less_stdAlloc; +// typedef MichaelHashMap< rcu_gpt, typename il::IterableList_RCU_GPT_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_GPT_less_stdAlloc; +//#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED +// typedef MichaelHashMap< rcu_shb, typename il::IterableList_RCU_SHB_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_SHB_less_stdAlloc; +// typedef MichaelHashMap< rcu_sht, typename il::IterableList_RCU_SHT_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_SHT_less_stdAlloc; +//#endif + + typedef MichaelHashMap< cds::gc::HP, typename il::IterableList_HP_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Iterable_HP_less_stdAlloc_stat; + typedef MichaelHashMap< cds::gc::DHP, typename il::IterableList_DHP_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Iterable_DHP_less_stdAlloc_stat; +// typedef MichaelHashMap< rcu_gpi, typename il::IterableList_RCU_GPI_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_GPI_less_stdAlloc_stat; +// typedef MichaelHashMap< rcu_gpb, typename il::IterableList_RCU_GPB_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_GPB_less_stdAlloc_stat; +// typedef MichaelHashMap< rcu_gpt, typename il::IterableList_RCU_GPT_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_GPT_less_stdAlloc_stat; +//#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED +// typedef MichaelHashMap< rcu_shb, typename il::IterableList_RCU_SHB_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_SHB_less_stdAlloc_stat; +// typedef MichaelHashMap< rcu_sht, typename il::IterableList_RCU_SHT_less_stdAlloc_stat, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_SHT_less_stdAlloc_stat; +//#endif + + typedef MichaelHashMap< cds::gc::HP, typename il::IterableList_HP_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Iterable_HP_cmp_stdAlloc_seqcst; + typedef MichaelHashMap< cds::gc::DHP, typename il::IterableList_DHP_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Iterable_DHP_cmp_stdAlloc_seqcst; +// typedef MichaelHashMap< rcu_gpi, typename il::IterableList_RCU_GPI_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_GPI_cmp_stdAlloc_seqcst; +// typedef MichaelHashMap< rcu_gpb, typename il::IterableList_RCU_GPB_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_GPB_cmp_stdAlloc_seqcst; +// typedef MichaelHashMap< rcu_gpt, typename il::IterableList_RCU_GPT_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_GPT_cmp_stdAlloc_seqcst; +//#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED +// typedef MichaelHashMap< rcu_shb, typename il::IterableList_RCU_SHB_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_SHB_cmp_stdAlloc_seqcst; +// typedef MichaelHashMap< rcu_sht, typename il::IterableList_RCU_SHT_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Iterable_RCU_SHT_cmp_stdAlloc_seqcst; +//#endif + }; } // namespace map @@ -263,11 +362,15 @@ namespace map { #define CDSSTRESS_MichaelMap( fixture, test_case, key_type, value_type ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_HP_cmp_stdAlloc, key_type, value_type, 0 ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_DHP_cmp_stdAlloc, key_type, value_type, 1 ) \ + CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_HP_cmp_stdAlloc_stat, key_type, value_type, 1 ) \ + CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_DHP_cmp_stdAlloc_stat, key_type, value_type, 0 ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_GPI_cmp_stdAlloc, key_type, value_type, 0 ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_GPB_cmp_stdAlloc, key_type, value_type, 1 ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_GPT_cmp_stdAlloc, key_type, value_type, 0 ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_HP_less_stdAlloc, key_type, value_type, 1 ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_DHP_less_stdAlloc, key_type, value_type, 0 ) \ + CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_HP_less_stdAlloc_stat, key_type, value_type, 0 ) \ + CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_DHP_less_stdAlloc_stat, key_type, value_type, 1 ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_GPI_less_stdAlloc, key_type, value_type, 1 ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_GPB_less_stdAlloc, key_type, value_type, 0 ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_GPT_less_stdAlloc, key_type, value_type, 1 ) \ @@ -291,13 +394,18 @@ namespace map { CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_GPI_less_michaelAlloc, key_type, value_type, 1 ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_GPB_less_michaelAlloc, key_type, value_type, 0 ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_RCU_GPT_less_michaelAlloc, key_type, value_type, 1 ) \ + \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_HP_cmp_stdAlloc, key_type, value_type, 0 ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_DHP_cmp_stdAlloc, key_type, value_type, 1 ) \ + CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_HP_cmp_stdAlloc_stat, key_type, value_type, 1 ) \ + CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_DHP_cmp_stdAlloc_stat, key_type, value_type, 0 ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_GPI_cmp_stdAlloc, key_type, value_type, 0 ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_GPB_cmp_stdAlloc, key_type, value_type, 1 ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_GPT_cmp_stdAlloc, key_type, value_type, 0 ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_HP_less_stdAlloc, key_type, value_type, 1 ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_DHP_less_stdAlloc, key_type, value_type, 0 ) \ + CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_HP_less_stdAlloc_stat, key_type, value_type, 0 ) \ + CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_DHP_less_stdAlloc_stat, key_type, value_type, 1 ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_GPI_less_stdAlloc, key_type, value_type, 1 ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_GPB_less_stdAlloc, key_type, value_type, 0 ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_GPT_less_stdAlloc, key_type, value_type, 1 ) \ @@ -321,6 +429,17 @@ namespace map { CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_GPI_less_michaelAlloc, key_type, value_type, 1 ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_GPB_less_michaelAlloc, key_type, value_type, 0 ) \ CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Lazy_RCU_GPT_less_michaelAlloc, key_type, value_type, 1 ) \ + \ + CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Iterable_HP_cmp_stdAlloc, key_type, value_type, 0 ) \ + CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Iterable_DHP_cmp_stdAlloc, key_type, value_type, 1 ) \ + CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Iterable_HP_cmp_stdAlloc_stat, key_type, value_type, 1 ) \ + CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Iterable_DHP_cmp_stdAlloc_stat, key_type, value_type, 0 ) \ + CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Iterable_HP_less_stdAlloc, key_type, value_type, 1 ) \ + CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Iterable_DHP_less_stdAlloc, key_type, value_type, 0 ) \ + CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Iterable_HP_less_stdAlloc_stat, key_type, value_type, 0 ) \ + CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Iterable_DHP_less_stdAlloc_stat, key_type, value_type, 1 ) \ + CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Iterable_HP_cmp_stdAlloc_seqcst, key_type, value_type, 2 ) \ + CDSSTRESS_MichaelMap_case( fixture, test_case, MichaelMap_Iterable_DHP_cmp_stdAlloc_seqcst, key_type, value_type, 2 ) \ CDSSTRESS_MichaelMap_SHRCU( fixture, test_case, key_type, value_type ) #define CDSSTRESS_MichaelMap_nogc( fixture, test_case, key_type, value_type ) \ diff --git a/test/stress/map/map_type_michael_list.h b/test/stress/map/map_type_michael_list.h index e223ce94..f06d6b48 100644 --- a/test/stress/map/map_type_michael_list.h +++ b/test/stress/map/map_type_michael_list.h @@ -25,7 +25,7 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef CDSUNIT_MAP_TYPE_MICHAEL_LIST_H @@ -62,6 +62,21 @@ namespace map { typedef cc::MichaelKVList< rcu_sht, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_SHT_cmp_stdAlloc; #endif + struct traits_MichaelList_cmp_stdAlloc_stat : public traits_MichaelList_cmp_stdAlloc + { + typedef cc::michael_list::stat<> stat; + }; + typedef cc::MichaelKVList< cds::gc::HP, Key, Value, traits_MichaelList_cmp_stdAlloc_stat > MichaelList_HP_cmp_stdAlloc_stat; + typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, traits_MichaelList_cmp_stdAlloc_stat > MichaelList_DHP_cmp_stdAlloc_stat; + typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, traits_MichaelList_cmp_stdAlloc_stat > MichaelList_NOGC_cmp_stdAlloc_stat; + typedef cc::MichaelKVList< rcu_gpi, Key, Value, traits_MichaelList_cmp_stdAlloc_stat > MichaelList_RCU_GPI_cmp_stdAlloc_stat; + typedef cc::MichaelKVList< rcu_gpb, Key, Value, traits_MichaelList_cmp_stdAlloc_stat > MichaelList_RCU_GPB_cmp_stdAlloc_stat; + typedef cc::MichaelKVList< rcu_gpt, Key, Value, traits_MichaelList_cmp_stdAlloc_stat > MichaelList_RCU_GPT_cmp_stdAlloc_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelKVList< rcu_shb, Key, Value, traits_MichaelList_cmp_stdAlloc_stat > MichaelList_RCU_SHB_cmp_stdAlloc_stat; + typedef cc::MichaelKVList< rcu_sht, Key, Value, traits_MichaelList_cmp_stdAlloc_stat > MichaelList_RCU_SHT_cmp_stdAlloc_stat; +#endif + struct traits_MichaelList_cmp_stdAlloc_seqcst : public cc::michael_list::make_traits< co::compare< compare > @@ -112,6 +127,21 @@ namespace map { typedef cc::MichaelKVList< rcu_sht, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_RCU_SHT_less_stdAlloc; #endif + struct traits_MichaelList_less_stdAlloc_stat: public traits_MichaelList_less_stdAlloc + { + typedef cc::michael_list::stat<> stat; + }; + typedef cc::MichaelKVList< cds::gc::HP, Key, Value, traits_MichaelList_less_stdAlloc_stat > MichaelList_HP_less_stdAlloc_stat; + typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, traits_MichaelList_less_stdAlloc_stat > MichaelList_DHP_less_stdAlloc_stat; + typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, traits_MichaelList_less_stdAlloc_stat > MichaelList_NOGC_less_stdAlloc_stat; + typedef cc::MichaelKVList< rcu_gpi, Key, Value, traits_MichaelList_less_stdAlloc_stat > MichaelList_RCU_GPI_less_stdAlloc_stat; + typedef cc::MichaelKVList< rcu_gpb, Key, Value, traits_MichaelList_less_stdAlloc_stat > MichaelList_RCU_GPB_less_stdAlloc_stat; + typedef cc::MichaelKVList< rcu_gpt, Key, Value, traits_MichaelList_less_stdAlloc_stat > MichaelList_RCU_GPT_less_stdAlloc_stat; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelKVList< rcu_shb, Key, Value, traits_MichaelList_less_stdAlloc_stat > MichaelList_RCU_SHB_less_stdAlloc_stat; + typedef cc::MichaelKVList< rcu_sht, Key, Value, traits_MichaelList_less_stdAlloc_stat > MichaelList_RCU_SHT_less_stdAlloc_stat; +#endif + struct traits_MichaelList_less_stdAlloc_seqcst : public cc::michael_list::make_traits< co::less< less > -- 2.34.1