From: khizmax Date: Tue, 28 Oct 2014 19:51:39 +0000 (+0300) Subject: intrusive::SplitListSet refactoring X-Git-Tag: v2.0.0~165 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=d583e3f268d869103f7c2bf3de36ed32a8d78ef4;p=libcds.git intrusive::SplitListSet refactoring --- diff --git a/cds/intrusive/lazy_list_rcu.h b/cds/intrusive/lazy_list_rcu.h index 2d947162..1790d2a7 100644 --- a/cds/intrusive/lazy_list_rcu.h +++ b/cds/intrusive/lazy_list_rcu.h @@ -128,7 +128,7 @@ namespace cds { namespace intrusive { //@cond // Rebind traits (split-list support) template - struct rebind_options { + struct rebind_traits { typedef LazyList< gc , value_type diff --git a/tests/test-hdr/set/hdr_intrusive_set.h b/tests/test-hdr/set/hdr_intrusive_set.h index 8e087d5d..a6345126 100644 --- a/tests/test-hdr/set/hdr_intrusive_set.h +++ b/tests/test-hdr/set/hdr_intrusive_set.h @@ -1202,15 +1202,19 @@ namespace set { void split_dyn_RCU_GPI_base_cmp(); void split_dyn_RCU_GPI_base_less(); void split_dyn_RCU_GPI_base_cmpmix(); + void split_dyn_RCU_GPI_base_cmpmix_stat(); void split_dyn_RCU_GPI_member_cmp(); void split_dyn_RCU_GPI_member_less(); void split_dyn_RCU_GPI_member_cmpmix(); + void split_dyn_RCU_GPI_member_cmpmix_stat(); void split_st_RCU_GPI_base_cmp(); void split_st_RCU_GPI_base_less(); void split_st_RCU_GPI_base_cmpmix(); + void split_st_RCU_GPI_base_cmpmix_stat(); void split_st_RCU_GPI_member_cmp(); void split_st_RCU_GPI_member_less(); void split_st_RCU_GPI_member_cmpmix(); + void split_st_RCU_GPI_member_cmpmix_stat(); void split_dyn_RCU_GPB_base_cmp(); void split_dyn_RCU_GPB_base_less(); @@ -1232,41 +1236,53 @@ namespace set { void split_dyn_RCU_GPT_base_cmp(); void split_dyn_RCU_GPT_base_less(); void split_dyn_RCU_GPT_base_cmpmix(); + void split_dyn_RCU_GPT_base_cmpmix_stat(); void split_dyn_RCU_GPT_member_cmp(); void split_dyn_RCU_GPT_member_less(); void split_dyn_RCU_GPT_member_cmpmix(); + void split_dyn_RCU_GPT_member_cmpmix_stat(); void split_st_RCU_GPT_base_cmp(); void split_st_RCU_GPT_base_less(); void split_st_RCU_GPT_base_cmpmix(); + void split_st_RCU_GPT_base_cmpmix_stat(); void split_st_RCU_GPT_member_cmp(); void split_st_RCU_GPT_member_less(); void split_st_RCU_GPT_member_cmpmix(); + void split_st_RCU_GPT_member_cmpmix_stat(); void split_dyn_RCU_SHB_base_cmp(); void split_dyn_RCU_SHB_base_less(); void split_dyn_RCU_SHB_base_cmpmix(); + void split_dyn_RCU_SHB_base_cmpmix_stat(); void split_dyn_RCU_SHB_member_cmp(); void split_dyn_RCU_SHB_member_less(); void split_dyn_RCU_SHB_member_cmpmix(); + void split_dyn_RCU_SHB_member_cmpmix_stat(); void split_st_RCU_SHB_base_cmp(); void split_st_RCU_SHB_base_less(); void split_st_RCU_SHB_base_cmpmix(); + void split_st_RCU_SHB_base_cmpmix_stat(); void split_st_RCU_SHB_member_cmp(); void split_st_RCU_SHB_member_less(); void split_st_RCU_SHB_member_cmpmix(); + void split_st_RCU_SHB_member_cmpmix_stat(); void split_dyn_RCU_SHT_base_cmp(); void split_dyn_RCU_SHT_base_less(); void split_dyn_RCU_SHT_base_cmpmix(); + void split_dyn_RCU_SHT_base_cmpmix_stat(); void split_dyn_RCU_SHT_member_cmp(); void split_dyn_RCU_SHT_member_less(); void split_dyn_RCU_SHT_member_cmpmix(); + void split_dyn_RCU_SHT_member_cmpmix_stat(); void split_st_RCU_SHT_base_cmp(); void split_st_RCU_SHT_base_less(); void split_st_RCU_SHT_base_cmpmix(); + void split_st_RCU_SHT_base_cmpmix_stat(); void split_st_RCU_SHT_member_cmp(); void split_st_RCU_SHT_member_less(); void split_st_RCU_SHT_member_cmpmix(); + void split_st_RCU_SHT_member_cmpmix_stat(); void split_dyn_nogc_base_cmp(); void split_dyn_nogc_base_less(); @@ -1324,15 +1340,19 @@ namespace set { void split_dyn_RCU_GPI_base_cmp_lazy(); void split_dyn_RCU_GPI_base_less_lazy(); void split_dyn_RCU_GPI_base_cmpmix_lazy(); + void split_dyn_RCU_GPI_base_cmpmix_stat_lazy(); void split_dyn_RCU_GPI_member_cmp_lazy(); void split_dyn_RCU_GPI_member_less_lazy(); void split_dyn_RCU_GPI_member_cmpmix_lazy(); + void split_dyn_RCU_GPI_member_cmpmix_stat_lazy(); void split_st_RCU_GPI_base_cmp_lazy(); void split_st_RCU_GPI_base_less_lazy(); void split_st_RCU_GPI_base_cmpmix_lazy(); + void split_st_RCU_GPI_base_cmpmix_stat_lazy(); void split_st_RCU_GPI_member_cmp_lazy(); void split_st_RCU_GPI_member_less_lazy(); void split_st_RCU_GPI_member_cmpmix_lazy(); + void split_st_RCU_GPI_member_cmpmix_stat_lazy(); void split_dyn_RCU_GPB_base_cmp_lazy(); void split_dyn_RCU_GPB_base_less_lazy(); @@ -1354,41 +1374,53 @@ namespace set { void split_dyn_RCU_GPT_base_cmp_lazy(); void split_dyn_RCU_GPT_base_less_lazy(); void split_dyn_RCU_GPT_base_cmpmix_lazy(); + void split_dyn_RCU_GPT_base_cmpmix_stat_lazy(); void split_dyn_RCU_GPT_member_cmp_lazy(); void split_dyn_RCU_GPT_member_less_lazy(); void split_dyn_RCU_GPT_member_cmpmix_lazy(); + void split_dyn_RCU_GPT_member_cmpmix_stat_lazy(); void split_st_RCU_GPT_base_cmp_lazy(); void split_st_RCU_GPT_base_less_lazy(); void split_st_RCU_GPT_base_cmpmix_lazy(); + void split_st_RCU_GPT_base_cmpmix_stat_lazy(); void split_st_RCU_GPT_member_cmp_lazy(); void split_st_RCU_GPT_member_less_lazy(); void split_st_RCU_GPT_member_cmpmix_lazy(); + void split_st_RCU_GPT_member_cmpmix_stat_lazy(); void split_dyn_RCU_SHB_base_cmp_lazy(); void split_dyn_RCU_SHB_base_less_lazy(); void split_dyn_RCU_SHB_base_cmpmix_lazy(); + void split_dyn_RCU_SHB_base_cmpmix_stat_lazy(); void split_dyn_RCU_SHB_member_cmp_lazy(); void split_dyn_RCU_SHB_member_less_lazy(); void split_dyn_RCU_SHB_member_cmpmix_lazy(); + void split_dyn_RCU_SHB_member_cmpmix_stat_lazy(); void split_st_RCU_SHB_base_cmp_lazy(); void split_st_RCU_SHB_base_less_lazy(); void split_st_RCU_SHB_base_cmpmix_lazy(); + void split_st_RCU_SHB_base_cmpmix_stat_lazy(); void split_st_RCU_SHB_member_cmp_lazy(); void split_st_RCU_SHB_member_less_lazy(); void split_st_RCU_SHB_member_cmpmix_lazy(); + void split_st_RCU_SHB_member_cmpmix_stat_lazy(); void split_dyn_RCU_SHT_base_cmp_lazy(); void split_dyn_RCU_SHT_base_less_lazy(); void split_dyn_RCU_SHT_base_cmpmix_lazy(); + void split_dyn_RCU_SHT_base_cmpmix_stat_lazy(); void split_dyn_RCU_SHT_member_cmp_lazy(); void split_dyn_RCU_SHT_member_less_lazy(); void split_dyn_RCU_SHT_member_cmpmix_lazy(); + void split_dyn_RCU_SHT_member_cmpmix_stat_lazy(); void split_st_RCU_SHT_base_cmp_lazy(); void split_st_RCU_SHT_base_less_lazy(); void split_st_RCU_SHT_base_cmpmix_lazy(); + void split_st_RCU_SHT_base_cmpmix_stat_lazy(); void split_st_RCU_SHT_member_cmp_lazy(); void split_st_RCU_SHT_member_less_lazy(); void split_st_RCU_SHT_member_cmpmix_lazy(); + void split_st_RCU_SHT_member_cmpmix_stat_lazy(); void split_dyn_nogc_base_cmp_lazy(); void split_dyn_nogc_base_less_lazy(); @@ -1557,15 +1589,19 @@ namespace set { CPPUNIT_TEST(split_dyn_RCU_GPI_base_cmp) CPPUNIT_TEST(split_dyn_RCU_GPI_base_less) CPPUNIT_TEST(split_dyn_RCU_GPI_base_cmpmix) - CPPUNIT_TEST(split_dyn_RCU_GPI_member_cmp) + CPPUNIT_TEST( split_dyn_RCU_GPI_base_cmpmix_stat ) + CPPUNIT_TEST( split_dyn_RCU_GPI_member_cmp ) CPPUNIT_TEST(split_dyn_RCU_GPI_member_less) CPPUNIT_TEST(split_dyn_RCU_GPI_member_cmpmix) - CPPUNIT_TEST(split_st_RCU_GPI_base_cmp) + CPPUNIT_TEST( split_dyn_RCU_GPI_member_cmpmix_stat ) + CPPUNIT_TEST( split_st_RCU_GPI_base_cmp ) CPPUNIT_TEST(split_st_RCU_GPI_base_less) CPPUNIT_TEST(split_st_RCU_GPI_base_cmpmix) - CPPUNIT_TEST(split_st_RCU_GPI_member_cmp) + CPPUNIT_TEST( split_st_RCU_GPI_base_cmpmix_stat ) + CPPUNIT_TEST( split_st_RCU_GPI_member_cmp ) CPPUNIT_TEST(split_st_RCU_GPI_member_less) CPPUNIT_TEST(split_st_RCU_GPI_member_cmpmix) + CPPUNIT_TEST( split_st_RCU_GPI_member_cmpmix_stat ) CPPUNIT_TEST(split_dyn_RCU_GPB_base_cmp) CPPUNIT_TEST(split_dyn_RCU_GPB_base_less) @@ -1587,41 +1623,53 @@ namespace set { CPPUNIT_TEST(split_dyn_RCU_GPT_base_cmp) CPPUNIT_TEST(split_dyn_RCU_GPT_base_less) CPPUNIT_TEST(split_dyn_RCU_GPT_base_cmpmix) - CPPUNIT_TEST(split_dyn_RCU_GPT_member_cmp) + CPPUNIT_TEST( split_dyn_RCU_GPT_base_cmpmix_stat ) + CPPUNIT_TEST( split_dyn_RCU_GPT_member_cmp ) CPPUNIT_TEST(split_dyn_RCU_GPT_member_less) CPPUNIT_TEST(split_dyn_RCU_GPT_member_cmpmix) - CPPUNIT_TEST(split_st_RCU_GPT_base_cmp) + CPPUNIT_TEST( split_dyn_RCU_GPT_member_cmpmix_stat ) + CPPUNIT_TEST( split_st_RCU_GPT_base_cmp ) CPPUNIT_TEST(split_st_RCU_GPT_base_less) CPPUNIT_TEST(split_st_RCU_GPT_base_cmpmix) - CPPUNIT_TEST(split_st_RCU_GPT_member_cmp) + CPPUNIT_TEST( split_st_RCU_GPT_base_cmpmix_stat ) + CPPUNIT_TEST( split_st_RCU_GPT_member_cmp ) CPPUNIT_TEST(split_st_RCU_GPT_member_less) CPPUNIT_TEST(split_st_RCU_GPT_member_cmpmix) + CPPUNIT_TEST( split_st_RCU_GPT_member_cmpmix_stat ) CPPUNIT_TEST(split_dyn_RCU_SHB_base_cmp) CPPUNIT_TEST(split_dyn_RCU_SHB_base_less) CPPUNIT_TEST(split_dyn_RCU_SHB_base_cmpmix) - CPPUNIT_TEST(split_dyn_RCU_SHB_member_cmp) + CPPUNIT_TEST( split_dyn_RCU_SHB_base_cmpmix_stat ) + CPPUNIT_TEST( split_dyn_RCU_SHB_member_cmp ) CPPUNIT_TEST(split_dyn_RCU_SHB_member_less) CPPUNIT_TEST(split_dyn_RCU_SHB_member_cmpmix) - CPPUNIT_TEST(split_st_RCU_SHB_base_cmp) + CPPUNIT_TEST( split_dyn_RCU_SHB_member_cmpmix_stat ) + CPPUNIT_TEST( split_st_RCU_SHB_base_cmp ) CPPUNIT_TEST(split_st_RCU_SHB_base_less) CPPUNIT_TEST(split_st_RCU_SHB_base_cmpmix) - CPPUNIT_TEST(split_st_RCU_SHB_member_cmp) + CPPUNIT_TEST( split_st_RCU_SHB_base_cmpmix_stat ) + CPPUNIT_TEST( split_st_RCU_SHB_member_cmp ) CPPUNIT_TEST(split_st_RCU_SHB_member_less) CPPUNIT_TEST(split_st_RCU_SHB_member_cmpmix) + CPPUNIT_TEST( split_st_RCU_SHB_member_cmpmix_stat ) CPPUNIT_TEST(split_dyn_RCU_SHT_base_cmp) CPPUNIT_TEST(split_dyn_RCU_SHT_base_less) CPPUNIT_TEST(split_dyn_RCU_SHT_base_cmpmix) - CPPUNIT_TEST(split_dyn_RCU_SHT_member_cmp) + CPPUNIT_TEST( split_dyn_RCU_SHT_base_cmpmix_stat ) + CPPUNIT_TEST( split_dyn_RCU_SHT_member_cmp ) CPPUNIT_TEST(split_dyn_RCU_SHT_member_less) CPPUNIT_TEST(split_dyn_RCU_SHT_member_cmpmix) - CPPUNIT_TEST(split_st_RCU_SHT_base_cmp) + CPPUNIT_TEST( split_dyn_RCU_SHT_member_cmpmix_stat ) + CPPUNIT_TEST( split_st_RCU_SHT_base_cmp ) CPPUNIT_TEST(split_st_RCU_SHT_base_less) CPPUNIT_TEST(split_st_RCU_SHT_base_cmpmix) - CPPUNIT_TEST(split_st_RCU_SHT_member_cmp) + CPPUNIT_TEST( split_st_RCU_SHT_base_cmpmix_stat ) + CPPUNIT_TEST( split_st_RCU_SHT_member_cmp ) CPPUNIT_TEST(split_st_RCU_SHT_member_less) CPPUNIT_TEST(split_st_RCU_SHT_member_cmpmix) + CPPUNIT_TEST( split_st_RCU_SHT_member_cmpmix_stat ) CPPUNIT_TEST(split_dyn_nogc_base_cmp) CPPUNIT_TEST(split_dyn_nogc_base_less) @@ -1677,15 +1725,19 @@ namespace set { CPPUNIT_TEST(split_dyn_RCU_GPI_base_cmp_lazy) CPPUNIT_TEST(split_dyn_RCU_GPI_base_less_lazy) CPPUNIT_TEST(split_dyn_RCU_GPI_base_cmpmix_lazy) - CPPUNIT_TEST(split_dyn_RCU_GPI_member_cmp_lazy) + CPPUNIT_TEST( split_dyn_RCU_GPI_base_cmpmix_stat_lazy ) + CPPUNIT_TEST( split_dyn_RCU_GPI_member_cmp_lazy ) CPPUNIT_TEST(split_dyn_RCU_GPI_member_less_lazy) CPPUNIT_TEST(split_dyn_RCU_GPI_member_cmpmix_lazy) - CPPUNIT_TEST(split_st_RCU_GPI_base_cmp_lazy) + CPPUNIT_TEST( split_dyn_RCU_GPI_member_cmpmix_stat_lazy ) + CPPUNIT_TEST( split_st_RCU_GPI_base_cmp_lazy ) CPPUNIT_TEST(split_st_RCU_GPI_base_less_lazy) CPPUNIT_TEST(split_st_RCU_GPI_base_cmpmix_lazy) - CPPUNIT_TEST(split_st_RCU_GPI_member_cmp_lazy) + CPPUNIT_TEST( split_st_RCU_GPI_base_cmpmix_stat_lazy ) + CPPUNIT_TEST( split_st_RCU_GPI_member_cmp_lazy ) CPPUNIT_TEST(split_st_RCU_GPI_member_less_lazy) CPPUNIT_TEST(split_st_RCU_GPI_member_cmpmix_lazy) + CPPUNIT_TEST( split_st_RCU_GPI_member_cmpmix_stat_lazy ) CPPUNIT_TEST(split_dyn_RCU_GPB_base_cmp_lazy) CPPUNIT_TEST(split_dyn_RCU_GPB_base_less_lazy) @@ -1707,41 +1759,53 @@ namespace set { CPPUNIT_TEST(split_dyn_RCU_GPT_base_cmp_lazy) CPPUNIT_TEST(split_dyn_RCU_GPT_base_less_lazy) CPPUNIT_TEST(split_dyn_RCU_GPT_base_cmpmix_lazy) - CPPUNIT_TEST(split_dyn_RCU_GPT_member_cmp_lazy) + CPPUNIT_TEST( split_dyn_RCU_GPT_base_cmpmix_stat_lazy ) + CPPUNIT_TEST( split_dyn_RCU_GPT_member_cmp_lazy ) CPPUNIT_TEST(split_dyn_RCU_GPT_member_less_lazy) CPPUNIT_TEST(split_dyn_RCU_GPT_member_cmpmix_lazy) - CPPUNIT_TEST(split_st_RCU_GPT_base_cmp_lazy) + CPPUNIT_TEST( split_dyn_RCU_GPT_member_cmpmix_stat_lazy ) + CPPUNIT_TEST( split_st_RCU_GPT_base_cmp_lazy ) CPPUNIT_TEST(split_st_RCU_GPT_base_less_lazy) CPPUNIT_TEST(split_st_RCU_GPT_base_cmpmix_lazy) - CPPUNIT_TEST(split_st_RCU_GPT_member_cmp_lazy) + CPPUNIT_TEST( split_st_RCU_GPT_base_cmpmix_stat_lazy ) + CPPUNIT_TEST( split_st_RCU_GPT_member_cmp_lazy ) CPPUNIT_TEST(split_st_RCU_GPT_member_less_lazy) CPPUNIT_TEST(split_st_RCU_GPT_member_cmpmix_lazy) + CPPUNIT_TEST( split_st_RCU_GPT_member_cmpmix_stat_lazy ) CPPUNIT_TEST(split_dyn_RCU_SHB_base_cmp_lazy) CPPUNIT_TEST(split_dyn_RCU_SHB_base_less_lazy) CPPUNIT_TEST(split_dyn_RCU_SHB_base_cmpmix_lazy) - CPPUNIT_TEST(split_dyn_RCU_SHB_member_cmp_lazy) + CPPUNIT_TEST( split_dyn_RCU_SHB_base_cmpmix_stat_lazy ) + CPPUNIT_TEST( split_dyn_RCU_SHB_member_cmp_lazy ) CPPUNIT_TEST(split_dyn_RCU_SHB_member_less_lazy) CPPUNIT_TEST(split_dyn_RCU_SHB_member_cmpmix_lazy) - CPPUNIT_TEST(split_st_RCU_SHB_base_cmp_lazy) + CPPUNIT_TEST( split_dyn_RCU_SHB_member_cmpmix_stat_lazy ) + CPPUNIT_TEST( split_st_RCU_SHB_base_cmp_lazy ) CPPUNIT_TEST(split_st_RCU_SHB_base_less_lazy) CPPUNIT_TEST(split_st_RCU_SHB_base_cmpmix_lazy) - CPPUNIT_TEST(split_st_RCU_SHB_member_cmp_lazy) + CPPUNIT_TEST( split_st_RCU_SHB_base_cmpmix_stat_lazy ) + CPPUNIT_TEST( split_st_RCU_SHB_member_cmp_lazy ) CPPUNIT_TEST(split_st_RCU_SHB_member_less_lazy) CPPUNIT_TEST(split_st_RCU_SHB_member_cmpmix_lazy) + CPPUNIT_TEST( split_st_RCU_SHB_member_cmpmix_stat_lazy ) CPPUNIT_TEST(split_dyn_RCU_SHT_base_cmp_lazy) CPPUNIT_TEST(split_dyn_RCU_SHT_base_less_lazy) CPPUNIT_TEST(split_dyn_RCU_SHT_base_cmpmix_lazy) - CPPUNIT_TEST(split_dyn_RCU_SHT_member_cmp_lazy) + CPPUNIT_TEST( split_dyn_RCU_SHT_base_cmpmix_stat_lazy ) + CPPUNIT_TEST( split_dyn_RCU_SHT_member_cmp_lazy ) CPPUNIT_TEST(split_dyn_RCU_SHT_member_less_lazy) CPPUNIT_TEST(split_dyn_RCU_SHT_member_cmpmix_lazy) - CPPUNIT_TEST(split_st_RCU_SHT_base_cmp_lazy) + CPPUNIT_TEST( split_dyn_RCU_SHT_member_cmpmix_stat_lazy ) + CPPUNIT_TEST( split_st_RCU_SHT_base_cmp_lazy ) CPPUNIT_TEST(split_st_RCU_SHT_base_less_lazy) CPPUNIT_TEST(split_st_RCU_SHT_base_cmpmix_lazy) - CPPUNIT_TEST(split_st_RCU_SHT_member_cmp_lazy) + CPPUNIT_TEST( split_st_RCU_SHT_base_cmpmix_stat_lazy ) + CPPUNIT_TEST( split_st_RCU_SHT_member_cmp_lazy ) CPPUNIT_TEST(split_st_RCU_SHT_member_less_lazy) CPPUNIT_TEST(split_st_RCU_SHT_member_cmpmix_lazy) + CPPUNIT_TEST( split_st_RCU_SHT_member_cmpmix_stat_lazy ) CPPUNIT_TEST(split_dyn_nogc_base_cmp_lazy) CPPUNIT_TEST(split_dyn_nogc_base_less_lazy) @@ -1759,7 +1823,6 @@ namespace set { CPPUNIT_TEST(split_st_nogc_member_less_lazy) CPPUNIT_TEST(split_st_nogc_member_cmpmix_lazy) CPPUNIT_TEST( split_st_nogc_member_cmpmix_stat_lazy ) - CPPUNIT_TEST_SUITE_END() }; diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpb.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpb.cpp index 25a46ea5..5dcb67c4 100644 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpb.cpp +++ b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpb.cpp @@ -13,23 +13,23 @@ namespace set { void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_base_cmp() { typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type + typedef ci::MichaelList < rcu_type + , item + , ci::michael_list::make_traits < + ci::opt::hook< ci::michael_list::base_hook< co::gc > > + , co::compare< cmp > + , ci::opt::disposer < faked_disposer > + > ::type + > ord_list; + + typedef ci::SplitListSet < rcu_type, ord_list, + ci::split_list::make_traits < + co::hash< hash_int > + , ci::split_list::dynamic_bucket_table + , co::memory_model < co::v::relaxed_ordering > + > ::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table"); test_rcu_int(); } @@ -37,22 +37,22 @@ namespace set { void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_base_less() { typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type + typedef ci::MichaelList < rcu_type + , item + , ci::michael_list::make_traits < + ci::opt::hook< ci::michael_list::base_hook< co::gc > > + , co::less< less > + , ci::opt::disposer < faked_disposer > + > ::type + > ord_list; + + typedef ci::SplitListSet < rcu_type, ord_list, + ci::split_list::make_traits < + co::hash< hash_int > + , co::memory_model < co::v::sequential_consistent > + > ::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table"); test_rcu_int(); } @@ -60,24 +60,49 @@ namespace set { void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_base_cmpmix() { typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type + typedef ci::MichaelList < rcu_type + , item + , ci::michael_list::make_traits < + ci::opt::hook< ci::michael_list::base_hook< co::gc > > + , co::less< less > + , co::compare< cmp > + , ci::opt::disposer < faked_disposer > + > ::type + > ord_list; + + typedef ci::SplitListSet < rcu_type, ord_list, + ci::split_list::make_traits < + co::hash< hash_int > + , co::item_counter< simple_item_counter > + , ci::split_list::dynamic_bucket_table < true > + > ::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table"); + + test_rcu_int(); + } + + void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_base_cmpmix_stat() + { + typedef base_int_item< ci::split_list::node > > item; + struct list_traits : public ci::michael_list::traits + { + typedef ci::michael_list::base_hook< co::gc > hook; + typedef IntrusiveHashSetHdrTest::less less; + typedef cmp compare; + typedef faked_disposer disposer; + }; + typedef ci::MichaelList< rcu_type, item, list_traits > ord_list; + + struct set_traits : public ci::split_list::make_traits >::type + { + typedef hash_int hash; + typedef simple_item_counter item_counter; + typedef ci::split_list::stat<> stat; + }; + typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; + + static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table"); test_rcu_int(); } @@ -85,24 +110,24 @@ namespace set { void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_member_cmp() { typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - >::type + typedef ci::MichaelList < rcu_type + , item + , ci::michael_list::make_traits < + ci::opt::hook< ci::michael_list::member_hook < + offsetof( item, hMember ), + co::gc + > > + , co::compare< cmp > + , ci::opt::disposer < faked_disposer > + > ::type + > ord_list; + + typedef ci::SplitListSet < rcu_type, ord_list, + ci::split_list::make_traits < + co::hash < hash_int > + > ::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table"); test_rcu_int(); } @@ -110,25 +135,25 @@ namespace set { void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_member_less() { typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::memory_model - >::type + typedef ci::MichaelList < rcu_type + , item + , ci::michael_list::make_traits < + ci::opt::hook< ci::michael_list::member_hook < + offsetof( item, hMember ), + co::gc + > > + , co::less< less > + , ci::opt::disposer < faked_disposer > + > ::type + > ord_list; + + typedef ci::SplitListSet < rcu_type, ord_list, + ci::split_list::make_traits < + co::hash< hash_int > + , co::memory_model < co::v::relaxed_ordering > + > ::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table"); test_rcu_int(); } @@ -136,53 +161,82 @@ namespace set { void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_member_cmpmix() { typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,co::memory_model - >::type + typedef ci::MichaelList < rcu_type + , item + , ci::michael_list::make_traits < + ci::opt::hook< ci::michael_list::member_hook < + offsetof( item, hMember ), + co::gc + > > + , co::compare< cmp > + , co::less< less > + , ci::opt::disposer < faked_disposer > + > ::type + > ord_list; + + typedef ci::SplitListSet < rcu_type, ord_list, + ci::split_list::make_traits < + co::hash< hash_int > + , co::item_counter< simple_item_counter > + , co::memory_model < co::v::sequential_consistent > + > ::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table"); test_rcu_int(); } + void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_member_cmpmix_stat() + { + typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; + struct list_traits : + public ci::michael_list::make_traits < + ci::opt::hook< ci::michael_list::member_hook < + offsetof( item, hMember ), + co::gc + > > + , co::compare< cmp > + , co::less< less > + , ci::opt::disposer < faked_disposer > + > ::type + {}; + typedef ci::MichaelList< rcu_type, item, list_traits > ord_list; + + struct set_traits : + public ci::split_list::make_traits < + co::hash< hash_int > + , co::item_counter< simple_item_counter > + , co::memory_model + , co::stat < ci::split_list::stat<> > + > ::type + {}; + typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; + static_assert(set::traits::dynamic_bucket_table, "Set has static bucket table"); + + test_rcu_int(); + } // Static bucket table void IntrusiveHashSetHdrTest::split_st_RCU_GPB_base_cmp() { typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type + typedef ci::MichaelList < rcu_type + , item + , ci::michael_list::make_traits < + ci::opt::hook< ci::michael_list::base_hook< co::gc > > + , co::compare< cmp > + , ci::opt::disposer < faked_disposer > + > ::type + > ord_list; + + typedef ci::SplitListSet < rcu_type, ord_list, + ci::split_list::make_traits < + co::hash< hash_int > + , ci::split_list::dynamic_bucket_table + , co::memory_model < co::v::relaxed_ordering > + > ::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table"); test_rcu_int(); } @@ -190,23 +244,23 @@ namespace set { void IntrusiveHashSetHdrTest::split_st_RCU_GPB_base_less() { typedef base_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type + typedef ci::MichaelList < rcu_type + , item + , ci::michael_list::make_traits < + ci::opt::hook< ci::michael_list::base_hook< co::gc > > + , co::less< less > + , ci::opt::disposer < faked_disposer > + > ::type + > ord_list; + + typedef ci::SplitListSet < rcu_type, ord_list, + ci::split_list::make_traits < + co::hash< hash_int > + , ci::split_list::dynamic_bucket_table + , co::memory_model < co::v::sequential_consistent > + > ::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table"); test_rcu_int(); } @@ -214,24 +268,50 @@ namespace set { void IntrusiveHashSetHdrTest::split_st_RCU_GPB_base_cmpmix() { typedef base_int_item< ci::split_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::base_hook< co::gc > > - ,co::less< less > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type + typedef ci::MichaelList < rcu_type + , item + , ci::michael_list::make_traits < + ci::opt::hook< ci::michael_list::base_hook< co::gc > > + , co::less< less > + , co::compare< cmp > + , ci::opt::disposer < faked_disposer > + > ::type + > ord_list; + + typedef ci::SplitListSet < rcu_type, ord_list, + ci::split_list::make_traits < + co::hash< hash_int > + , co::item_counter< simple_item_counter > + , ci::split_list::dynamic_bucket_table < false > + > ::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table"); + + test_rcu_int(); + } + + void IntrusiveHashSetHdrTest::split_st_RCU_GPB_base_cmpmix_stat() + { + typedef base_int_item< ci::split_list::node > > item; + typedef ci::MichaelList < rcu_type + , item + , ci::michael_list::make_traits < + ci::opt::hook< ci::michael_list::base_hook< co::gc > > + , co::less< less > + , co::compare< cmp > + , ci::opt::disposer < faked_disposer > + > ::type + > ord_list; + + typedef ci::SplitListSet < rcu_type, ord_list, + ci::split_list::make_traits < + co::hash< hash_int > + , co::item_counter< simple_item_counter > + , ci::split_list::dynamic_bucket_table + , co::stat < ci::split_list::stat<> > + > ::type + > set; + static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table"); test_rcu_int(); } @@ -239,26 +319,26 @@ namespace set { void IntrusiveHashSetHdrTest::split_st_RCU_GPB_member_cmp() { typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,ci::split_list::dynamic_bucket_table - ,co::memory_model - >::type + typedef ci::MichaelList < rcu_type + , item + , ci::michael_list::make_traits < + ci::opt::hook< ci::michael_list::member_hook < + offsetof( item, hMember ), + co::gc + > > + , co::compare< cmp > + , ci::opt::disposer < faked_disposer > + > ::type + > ord_list; + + typedef ci::SplitListSet < rcu_type, ord_list, + ci::split_list::make_traits < + co::hash< hash_int > + , ci::split_list::dynamic_bucket_table + , co::memory_model < co::v::relaxed_ordering > + > ::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table"); test_rcu_int(); } @@ -266,26 +346,26 @@ namespace set { void IntrusiveHashSetHdrTest::split_st_RCU_GPB_member_less() { typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - ci::split_list::dynamic_bucket_table - ,co::hash< hash_int > - ,co::memory_model - >::type + typedef ci::MichaelList < rcu_type + , item + , ci::michael_list::make_traits < + ci::opt::hook< ci::michael_list::member_hook < + offsetof( item, hMember ), + co::gc + > > + , co::less< less > + , ci::opt::disposer < faked_disposer > + > ::type + > ord_list; + + typedef ci::SplitListSet < rcu_type, ord_list, + ci::split_list::make_traits < + ci::split_list::dynamic_bucket_table + , co::hash< hash_int > + , co::memory_model < co::v::sequential_consistent > + > ::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table"); test_rcu_int(); } @@ -293,30 +373,57 @@ namespace set { void IntrusiveHashSetHdrTest::split_st_RCU_GPB_member_cmpmix() { typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; - typedef ci::MichaelList< rcu_type - ,item - ,ci::michael_list::make_traits< - ci::opt::hook< ci::michael_list::member_hook< - offsetof( item, hMember ), - co::gc - > > - ,co::compare< cmp > - ,co::less< less > - ,ci::opt::disposer< faked_disposer > - >::type - > ord_list; - - typedef ci::SplitListSet< rcu_type, ord_list, - ci::split_list::make_traits< - co::hash< hash_int > - ,co::item_counter< simple_item_counter > - ,ci::split_list::dynamic_bucket_table - >::type + typedef ci::MichaelList < rcu_type + , item + , ci::michael_list::make_traits < + ci::opt::hook< ci::michael_list::member_hook < + offsetof( item, hMember ), + co::gc + > > + , co::compare< cmp > + , co::less< less > + , ci::opt::disposer < faked_disposer > + > ::type + > ord_list; + + typedef ci::SplitListSet < rcu_type, ord_list, + ci::split_list::make_traits < + co::hash< hash_int > + , co::item_counter< simple_item_counter > + , ci::split_list::dynamic_bucket_table < false > + > ::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table"); test_rcu_int(); } + void IntrusiveHashSetHdrTest::split_st_RCU_GPB_member_cmpmix_stat() + { + typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; + typedef ci::MichaelList < rcu_type + , item + , ci::michael_list::make_traits < + ci::opt::hook< ci::michael_list::member_hook < + offsetof( item, hMember ), + co::gc + > > + , co::compare< cmp > + , co::less< less > + , ci::opt::disposer < faked_disposer > + > ::type + > ord_list; + + typedef ci::SplitListSet < rcu_type, ord_list, + ci::split_list::make_traits < + co::hash< hash_int > + , co::item_counter< simple_item_counter > + , ci::split_list::dynamic_bucket_table + , co::stat < ci::split_list::stat<> > + > ::type + > set; + static_assert(!set::traits::dynamic_bucket_table, "Set has dynamic bucket table"); + test_rcu_int(); + } } // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpb_lazy.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpb_lazy.cpp index 76de301f..a3cafcfb 100644 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpb_lazy.cpp +++ b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpb_lazy.cpp @@ -29,7 +29,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -52,7 +52,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -77,7 +77,31 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); + + test_rcu_int(); + } + + void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_base_cmpmix_stat_lazy() + { + typedef base_int_item< ci::split_list::node > > item; + struct list_traits : public ci::lazy_list::traits + { + typedef ci::lazy_list::base_hook< co::gc > hook; + typedef IntrusiveHashSetHdrTest::less< item > less; + typedef cmp compare; + typedef faked_disposer disposer; + }; + typedef ci::LazyList< rcu_type, item, list_traits > ord_list; + + struct set_traits : public ci::split_list::make_traits>::type + { + typedef hash_int hash; + typedef simple_item_counter item_counter; + typedef ci::split_list::stat<> stat; + }; + typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -103,7 +127,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -129,7 +153,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -156,11 +180,39 @@ namespace set { ,co::item_counter< simple_item_counter > >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } + void IntrusiveHashSetHdrTest::split_dyn_RCU_GPB_member_cmpmix_stat_lazy() + { + typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; + struct list_traits : + public ci::lazy_list::make_traits< + ci::opt::hook< ci::lazy_list::member_hook< + offsetof( item, hMember ), + co::gc + > > + ,co::compare< cmp > + ,co::less< less > + ,ci::opt::disposer< faked_disposer > + >::type + {}; + typedef ci::LazyList< rcu_type, item, list_traits > ord_list; + + struct set_traits : + public ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,co::stat< ci::split_list::stat<> > + >::type + {}; + typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); + + test_rcu_int(); + } // Static bucket table void IntrusiveHashSetHdrTest::split_st_RCU_GPB_base_cmp_lazy() @@ -182,7 +234,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -206,7 +258,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -231,7 +283,33 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); + + test_rcu_int(); + } + + void IntrusiveHashSetHdrTest::split_st_RCU_GPB_base_cmpmix_stat_lazy() + { + typedef base_int_item< ci::split_list::node > > item; + typedef ci::LazyList< rcu_type + ,item + ,ci::lazy_list::make_traits< + ci::opt::hook< ci::lazy_list::base_hook< co::gc > > + ,co::less< less > + ,co::compare< cmp > + ,ci::opt::disposer< faked_disposer > + >::type + > ord_list; + + typedef ci::SplitListSet< rcu_type, ord_list, + ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,ci::split_list::dynamic_bucket_table + ,co::stat< ci::split_list::stat<>> + >::type + > set; + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -258,7 +336,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -285,7 +363,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -313,10 +391,38 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } + void IntrusiveHashSetHdrTest::split_st_RCU_GPB_member_cmpmix_stat_lazy() + { + typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; + typedef ci::LazyList< rcu_type + ,item + ,ci::lazy_list::make_traits< + ci::opt::hook< ci::lazy_list::member_hook< + offsetof( item, hMember ), + co::gc + > > + ,co::compare< cmp > + ,co::less< less > + ,ci::opt::disposer< faked_disposer > + >::type + > ord_list; + + typedef ci::SplitListSet< rcu_type, ord_list, + ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,ci::split_list::dynamic_bucket_table + ,co::stat< ci::split_list::stat<>> + >::type + > set; + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); + + test_rcu_int(); + } } // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpi.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpi.cpp index 5de7a4d9..36d7415b 100644 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpi.cpp +++ b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpi.cpp @@ -29,7 +29,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -52,7 +52,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -77,7 +77,7 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -102,7 +102,7 @@ namespace set { co::hash< hash_int > >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -128,7 +128,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -156,7 +156,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -182,7 +182,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -206,7 +206,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -231,7 +231,7 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -258,7 +258,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -285,7 +285,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -313,7 +313,117 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); + + test_rcu_int(); + } + + void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_base_cmpmix_stat() + { + typedef base_int_item< ci::split_list::node > > item; + struct list_traits : public ci::michael_list::traits + { + typedef ci::michael_list::base_hook< co::gc > hook; + typedef IntrusiveHashSetHdrTest::less less; + typedef cmp compare; + typedef faked_disposer disposer; + }; + typedef ci::MichaelList< rcu_type, item, list_traits > ord_list; + + struct set_traits : public ci::split_list::make_traits >::type + { + typedef hash_int hash; + typedef simple_item_counter item_counter; + typedef ci::split_list::stat<> stat; + }; + typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; + + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); + + test_rcu_int(); + } + + void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_member_cmpmix_stat() + { + typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; + struct list_traits : + public ci::michael_list::make_traits< + ci::opt::hook< ci::michael_list::member_hook< + offsetof( item, hMember ), + co::gc + > > + ,co::compare< cmp > + ,co::less< less > + ,ci::opt::disposer< faked_disposer > + >::type + {}; + typedef ci::MichaelList< rcu_type, item, list_traits > ord_list; + + struct set_traits : + public ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,co::memory_model + ,co::stat< ci::split_list::stat<>> + >::type + {}; + typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); + + test_rcu_int(); + } + + void IntrusiveHashSetHdrTest::split_st_RCU_GPI_base_cmpmix_stat() + { + typedef base_int_item< ci::split_list::node > > item; + typedef ci::MichaelList< rcu_type + ,item + ,ci::michael_list::make_traits< + ci::opt::hook< ci::michael_list::base_hook< co::gc > > + ,co::less< less > + ,co::compare< cmp > + ,ci::opt::disposer< faked_disposer > + >::type + > ord_list; + + typedef ci::SplitListSet< rcu_type, ord_list, + ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,ci::split_list::dynamic_bucket_table + ,co::stat< ci::split_list::stat<>> + >::type + > set; + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); + + test_rcu_int(); + } + + void IntrusiveHashSetHdrTest::split_st_RCU_GPI_member_cmpmix_stat() + { + typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; + typedef ci::MichaelList< rcu_type + ,item + ,ci::michael_list::make_traits< + ci::opt::hook< ci::michael_list::member_hook< + offsetof( item, hMember ), + co::gc + > > + ,co::compare< cmp > + ,co::less< less > + ,ci::opt::disposer< faked_disposer > + >::type + > ord_list; + + typedef ci::SplitListSet< rcu_type, ord_list, + ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,ci::split_list::dynamic_bucket_table + ,co::stat< ci::split_list::stat<> > + >::type + > set; + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpi_lazy.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpi_lazy.cpp index d3641a24..186f4290 100644 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpi_lazy.cpp +++ b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpi_lazy.cpp @@ -29,7 +29,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -52,7 +52,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -77,7 +77,7 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -103,7 +103,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -129,7 +129,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -156,7 +156,7 @@ namespace set { ,co::item_counter< simple_item_counter > >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -182,7 +182,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -206,7 +206,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -231,7 +231,7 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -258,7 +258,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -285,7 +285,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -313,10 +313,119 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } + void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_base_cmpmix_stat_lazy() + { + typedef base_int_item< ci::split_list::node > > item; + struct list_traits : public ci::lazy_list::traits + { + typedef ci::lazy_list::base_hook< co::gc > hook; + typedef IntrusiveHashSetHdrTest::less< item > less; + typedef cmp compare; + typedef faked_disposer disposer; + }; + typedef ci::LazyList< rcu_type, item, list_traits > ord_list; + + struct set_traits : public ci::split_list::make_traits>::type + { + typedef hash_int hash; + typedef simple_item_counter item_counter; + typedef ci::split_list::stat<> stat; + }; + typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); + + test_rcu_int(); + } + + void IntrusiveHashSetHdrTest::split_dyn_RCU_GPI_member_cmpmix_stat_lazy() + { + typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; + struct list_traits : + public ci::lazy_list::make_traits< + ci::opt::hook< ci::lazy_list::member_hook< + offsetof( item, hMember ), + co::gc + > > + ,co::compare< cmp > + ,co::less< less > + ,ci::opt::disposer< faked_disposer > + >::type + {}; + typedef ci::LazyList< rcu_type, item, list_traits > ord_list; + + struct set_traits : + public ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,co::stat< ci::split_list::stat<> > + >::type + {}; + typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); + + test_rcu_int(); + } + + void IntrusiveHashSetHdrTest::split_st_RCU_GPI_base_cmpmix_stat_lazy() + { + typedef base_int_item< ci::split_list::node > > item; + typedef ci::LazyList< rcu_type + ,item + ,ci::lazy_list::make_traits< + ci::opt::hook< ci::lazy_list::base_hook< co::gc > > + ,co::less< less > + ,co::compare< cmp > + ,ci::opt::disposer< faked_disposer > + >::type + > ord_list; + + typedef ci::SplitListSet< rcu_type, ord_list, + ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,ci::split_list::dynamic_bucket_table + ,co::stat< ci::split_list::stat<>> + >::type + > set; + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); + + test_rcu_int(); + } + + void IntrusiveHashSetHdrTest::split_st_RCU_GPI_member_cmpmix_stat_lazy() + { + typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; + typedef ci::LazyList< rcu_type + ,item + ,ci::lazy_list::make_traits< + ci::opt::hook< ci::lazy_list::member_hook< + offsetof( item, hMember ), + co::gc + > > + ,co::compare< cmp > + ,co::less< less > + ,ci::opt::disposer< faked_disposer > + >::type + > ord_list; + + typedef ci::SplitListSet< rcu_type, ord_list, + ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,ci::split_list::dynamic_bucket_table + ,co::stat< ci::split_list::stat<>> + >::type + > set; + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); + + test_rcu_int(); + } + + } // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpt.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpt.cpp index 28b58030..75e9dac4 100644 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpt.cpp +++ b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpt.cpp @@ -29,7 +29,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -52,7 +52,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -77,7 +77,7 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -102,7 +102,7 @@ namespace set { co::hash< hash_int > >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -128,7 +128,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -156,7 +156,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -182,7 +182,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -206,7 +206,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -231,7 +231,7 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -258,7 +258,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -285,7 +285,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -313,7 +313,117 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); + + test_rcu_int(); + } + + void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_base_cmpmix_stat() + { + typedef base_int_item< ci::split_list::node > > item; + struct list_traits : public ci::michael_list::traits + { + typedef ci::michael_list::base_hook< co::gc > hook; + typedef IntrusiveHashSetHdrTest::less less; + typedef cmp compare; + typedef faked_disposer disposer; + }; + typedef ci::MichaelList< rcu_type, item, list_traits > ord_list; + + struct set_traits : public ci::split_list::make_traits >::type + { + typedef hash_int hash; + typedef simple_item_counter item_counter; + typedef ci::split_list::stat<> stat; + }; + typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; + + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); + + test_rcu_int(); + } + + void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_member_cmpmix_stat() + { + typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; + struct list_traits : + public ci::michael_list::make_traits< + ci::opt::hook< ci::michael_list::member_hook< + offsetof( item, hMember ), + co::gc + > > + ,co::compare< cmp > + ,co::less< less > + ,ci::opt::disposer< faked_disposer > + >::type + {}; + typedef ci::MichaelList< rcu_type, item, list_traits > ord_list; + + struct set_traits : + public ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,co::memory_model + ,co::stat< ci::split_list::stat<>> + >::type + {}; + typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); + + test_rcu_int(); + } + + void IntrusiveHashSetHdrTest::split_st_RCU_GPT_base_cmpmix_stat() + { + typedef base_int_item< ci::split_list::node > > item; + typedef ci::MichaelList< rcu_type + ,item + ,ci::michael_list::make_traits< + ci::opt::hook< ci::michael_list::base_hook< co::gc > > + ,co::less< less > + ,co::compare< cmp > + ,ci::opt::disposer< faked_disposer > + >::type + > ord_list; + + typedef ci::SplitListSet< rcu_type, ord_list, + ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,ci::split_list::dynamic_bucket_table + ,co::stat< ci::split_list::stat<>> + >::type + > set; + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); + + test_rcu_int(); + } + + void IntrusiveHashSetHdrTest::split_st_RCU_GPT_member_cmpmix_stat() + { + typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; + typedef ci::MichaelList< rcu_type + ,item + ,ci::michael_list::make_traits< + ci::opt::hook< ci::michael_list::member_hook< + offsetof( item, hMember ), + co::gc + > > + ,co::compare< cmp > + ,co::less< less > + ,ci::opt::disposer< faked_disposer > + >::type + > ord_list; + + typedef ci::SplitListSet< rcu_type, ord_list, + ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,ci::split_list::dynamic_bucket_table + ,co::stat< ci::split_list::stat<> > + >::type + > set; + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpt_lazy.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpt_lazy.cpp index c26f7a57..4d081c6e 100644 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpt_lazy.cpp +++ b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_gpt_lazy.cpp @@ -29,7 +29,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -52,7 +52,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -77,7 +77,7 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -103,7 +103,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -129,7 +129,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -156,7 +156,7 @@ namespace set { ,co::item_counter< simple_item_counter > >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); } @@ -182,7 +182,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -206,7 +206,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -231,7 +231,7 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -258,7 +258,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -285,7 +285,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } @@ -313,7 +313,115 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); + + test_rcu_int(); + } + + void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_base_cmpmix_stat_lazy() + { + typedef base_int_item< ci::split_list::node > > item; + struct list_traits : public ci::lazy_list::traits + { + typedef ci::lazy_list::base_hook< co::gc > hook; + typedef IntrusiveHashSetHdrTest::less< item > less; + typedef cmp compare; + typedef faked_disposer disposer; + }; + typedef ci::LazyList< rcu_type, item, list_traits > ord_list; + + struct set_traits : public ci::split_list::make_traits>::type + { + typedef hash_int hash; + typedef simple_item_counter item_counter; + typedef ci::split_list::stat<> stat; + }; + typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); + + test_rcu_int(); + } + + void IntrusiveHashSetHdrTest::split_dyn_RCU_GPT_member_cmpmix_stat_lazy() + { + typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; + struct list_traits : + public ci::lazy_list::make_traits< + ci::opt::hook< ci::lazy_list::member_hook< + offsetof( item, hMember ), + co::gc + > > + ,co::compare< cmp > + ,co::less< less > + ,ci::opt::disposer< faked_disposer > + >::type + {}; + typedef ci::LazyList< rcu_type, item, list_traits > ord_list; + + struct set_traits : + public ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,co::stat< ci::split_list::stat<> > + >::type + {}; + typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); + + test_rcu_int(); + } + + void IntrusiveHashSetHdrTest::split_st_RCU_GPT_base_cmpmix_stat_lazy() + { + typedef base_int_item< ci::split_list::node > > item; + typedef ci::LazyList< rcu_type + ,item + ,ci::lazy_list::make_traits< + ci::opt::hook< ci::lazy_list::base_hook< co::gc > > + ,co::less< less > + ,co::compare< cmp > + ,ci::opt::disposer< faked_disposer > + >::type + > ord_list; + + typedef ci::SplitListSet< rcu_type, ord_list, + ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,ci::split_list::dynamic_bucket_table + ,co::stat< ci::split_list::stat<>> + >::type + > set; + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); + + test_rcu_int(); + } + + void IntrusiveHashSetHdrTest::split_st_RCU_GPT_member_cmpmix_stat_lazy() + { + typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; + typedef ci::LazyList< rcu_type + ,item + ,ci::lazy_list::make_traits< + ci::opt::hook< ci::lazy_list::member_hook< + offsetof( item, hMember ), + co::gc + > > + ,co::compare< cmp > + ,co::less< less > + ,ci::opt::disposer< faked_disposer > + >::type + > ord_list; + + typedef ci::SplitListSet< rcu_type, ord_list, + ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,ci::split_list::dynamic_bucket_table + ,co::stat< ci::split_list::stat<>> + >::type + > set; + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); } diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_shb.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_shb.cpp index 1731368e..8701d273 100644 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_shb.cpp +++ b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_shb.cpp @@ -32,7 +32,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -57,7 +57,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -84,7 +84,7 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -111,7 +111,7 @@ namespace set { co::hash< hash_int > >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -139,7 +139,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -169,7 +169,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -197,7 +197,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif @@ -223,7 +223,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif @@ -250,7 +250,7 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif @@ -279,7 +279,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif @@ -308,7 +308,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif @@ -338,11 +338,128 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif } + void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_base_cmpmix_stat() + { +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef base_int_item< ci::split_list::node > > item; + struct list_traits : public ci::michael_list::traits + { + typedef ci::michael_list::base_hook< co::gc > hook; + typedef IntrusiveHashSetHdrTest::less less; + typedef cmp compare; + typedef faked_disposer disposer; + }; + typedef ci::MichaelList< rcu_type, item, list_traits > ord_list; + + struct set_traits : public ci::split_list::make_traits >::type + { + typedef hash_int hash; + typedef simple_item_counter item_counter; + typedef ci::split_list::stat<> stat; + }; + typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; + + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); + + test_rcu_int(); +#endif + } + + void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_member_cmpmix_stat() + { +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; + struct list_traits : + public ci::michael_list::make_traits< + ci::opt::hook< ci::michael_list::member_hook< + offsetof( item, hMember ), + co::gc + > > + ,co::compare< cmp > + ,co::less< less > + ,ci::opt::disposer< faked_disposer > + >::type + {}; + typedef ci::MichaelList< rcu_type, item, list_traits > ord_list; + + struct set_traits : + public ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,co::memory_model + ,co::stat< ci::split_list::stat<>> + >::type + {}; + typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); + + test_rcu_int(); +#endif + } + + void IntrusiveHashSetHdrTest::split_st_RCU_SHB_base_cmpmix_stat() + { +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef base_int_item< ci::split_list::node > > item; + typedef ci::MichaelList< rcu_type + ,item + ,ci::michael_list::make_traits< + ci::opt::hook< ci::michael_list::base_hook< co::gc > > + ,co::less< less > + ,co::compare< cmp > + ,ci::opt::disposer< faked_disposer > + >::type + > ord_list; + + typedef ci::SplitListSet< rcu_type, ord_list, + ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,ci::split_list::dynamic_bucket_table + ,co::stat< ci::split_list::stat<>> + >::type + > set; + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); + + test_rcu_int(); +#endif + } + + void IntrusiveHashSetHdrTest::split_st_RCU_SHB_member_cmpmix_stat() + { +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; + typedef ci::MichaelList< rcu_type + ,item + ,ci::michael_list::make_traits< + ci::opt::hook< ci::michael_list::member_hook< + offsetof( item, hMember ), + co::gc + > > + ,co::compare< cmp > + ,co::less< less > + ,ci::opt::disposer< faked_disposer > + >::type + > ord_list; + + typedef ci::SplitListSet< rcu_type, ord_list, + ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,ci::split_list::dynamic_bucket_table + ,co::stat< ci::split_list::stat<> > + >::type + > set; + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); + + test_rcu_int(); +#endif + } } // namespace set diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_shb_lazy.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_shb_lazy.cpp index cc1f22a7..3c809e30 100644 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_shb_lazy.cpp +++ b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_shb_lazy.cpp @@ -32,7 +32,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -57,7 +57,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -84,7 +84,7 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -112,7 +112,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -140,7 +140,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -169,7 +169,7 @@ namespace set { ,co::item_counter< simple_item_counter > >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -197,7 +197,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif @@ -223,7 +223,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif @@ -250,7 +250,7 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif @@ -279,7 +279,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif @@ -308,7 +308,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif @@ -338,7 +338,123 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); + + test_rcu_int(); +#endif + } + + void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_base_cmpmix_stat_lazy() + { +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef base_int_item< ci::split_list::node > > item; + struct list_traits : public ci::lazy_list::traits + { + typedef ci::lazy_list::base_hook< co::gc > hook; + typedef IntrusiveHashSetHdrTest::less< item > less; + typedef cmp compare; + typedef faked_disposer disposer; + }; + typedef ci::LazyList< rcu_type, item, list_traits > ord_list; + + struct set_traits : public ci::split_list::make_traits>::type + { + typedef hash_int hash; + typedef simple_item_counter item_counter; + typedef ci::split_list::stat<> stat; + }; + typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); + + test_rcu_int(); +#endif + } + + void IntrusiveHashSetHdrTest::split_dyn_RCU_SHB_member_cmpmix_stat_lazy() + { +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; + struct list_traits : + public ci::lazy_list::make_traits< + ci::opt::hook< ci::lazy_list::member_hook< + offsetof( item, hMember ), + co::gc + > > + ,co::compare< cmp > + ,co::less< less > + ,ci::opt::disposer< faked_disposer > + >::type + {}; + typedef ci::LazyList< rcu_type, item, list_traits > ord_list; + + struct set_traits : + public ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,co::stat< ci::split_list::stat<> > + >::type + {}; + typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); + + test_rcu_int(); +#endif + } + + void IntrusiveHashSetHdrTest::split_st_RCU_SHB_base_cmpmix_stat_lazy() + { +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef base_int_item< ci::split_list::node > > item; + typedef ci::LazyList< rcu_type + ,item + ,ci::lazy_list::make_traits< + ci::opt::hook< ci::lazy_list::base_hook< co::gc > > + ,co::less< less > + ,co::compare< cmp > + ,ci::opt::disposer< faked_disposer > + >::type + > ord_list; + + typedef ci::SplitListSet< rcu_type, ord_list, + ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,ci::split_list::dynamic_bucket_table + ,co::stat< ci::split_list::stat<>> + >::type + > set; + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); + + test_rcu_int(); +#endif + } + + void IntrusiveHashSetHdrTest::split_st_RCU_SHB_member_cmpmix_stat_lazy() + { +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; + typedef ci::LazyList< rcu_type + ,item + ,ci::lazy_list::make_traits< + ci::opt::hook< ci::lazy_list::member_hook< + offsetof( item, hMember ), + co::gc + > > + ,co::compare< cmp > + ,co::less< less > + ,ci::opt::disposer< faked_disposer > + >::type + > ord_list; + + typedef ci::SplitListSet< rcu_type, ord_list, + ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,ci::split_list::dynamic_bucket_table + ,co::stat< ci::split_list::stat<>> + >::type + > set; + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_sht.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_sht.cpp index a82dc518..8bf2323d 100644 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_sht.cpp +++ b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_sht.cpp @@ -32,7 +32,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -57,7 +57,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -84,7 +84,7 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -111,7 +111,7 @@ namespace set { co::hash< hash_int > >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -139,7 +139,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -169,7 +169,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -197,7 +197,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif @@ -223,7 +223,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif @@ -250,7 +250,7 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif @@ -279,7 +279,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif @@ -308,7 +308,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif @@ -338,7 +338,125 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); + + test_rcu_int(); +#endif + } + + void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_base_cmpmix_stat() + { +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef base_int_item< ci::split_list::node > > item; + struct list_traits : public ci::michael_list::traits + { + typedef ci::michael_list::base_hook< co::gc > hook; + typedef IntrusiveHashSetHdrTest::less less; + typedef cmp compare; + typedef faked_disposer disposer; + }; + typedef ci::MichaelList< rcu_type, item, list_traits > ord_list; + + struct set_traits : public ci::split_list::make_traits >::type + { + typedef hash_int hash; + typedef simple_item_counter item_counter; + typedef ci::split_list::stat<> stat; + }; + typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; + + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); + + test_rcu_int(); +#endif + } + + void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_member_cmpmix_stat() + { +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; + struct list_traits : + public ci::michael_list::make_traits< + ci::opt::hook< ci::michael_list::member_hook< + offsetof( item, hMember ), + co::gc + > > + ,co::compare< cmp > + ,co::less< less > + ,ci::opt::disposer< faked_disposer > + >::type + {}; + typedef ci::MichaelList< rcu_type, item, list_traits > ord_list; + + struct set_traits : + public ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,co::memory_model + ,co::stat< ci::split_list::stat<>> + >::type + {}; + typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); + + test_rcu_int(); +#endif + } + + void IntrusiveHashSetHdrTest::split_st_RCU_SHT_base_cmpmix_stat() + { +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef base_int_item< ci::split_list::node > > item; + typedef ci::MichaelList< rcu_type + ,item + ,ci::michael_list::make_traits< + ci::opt::hook< ci::michael_list::base_hook< co::gc > > + ,co::less< less > + ,co::compare< cmp > + ,ci::opt::disposer< faked_disposer > + >::type + > ord_list; + + typedef ci::SplitListSet< rcu_type, ord_list, + ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,ci::split_list::dynamic_bucket_table + ,co::stat< ci::split_list::stat<>> + >::type + > set; + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); + + test_rcu_int(); +#endif + } + + void IntrusiveHashSetHdrTest::split_st_RCU_SHT_member_cmpmix_stat() + { +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef member_int_item< ci::split_list::node< ci::michael_list::node > > item; + typedef ci::MichaelList< rcu_type + ,item + ,ci::michael_list::make_traits< + ci::opt::hook< ci::michael_list::member_hook< + offsetof( item, hMember ), + co::gc + > > + ,co::compare< cmp > + ,co::less< less > + ,ci::opt::disposer< faked_disposer > + >::type + > ord_list; + + typedef ci::SplitListSet< rcu_type, ord_list, + ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,ci::split_list::dynamic_bucket_table + ,co::stat< ci::split_list::stat<> > + >::type + > set; + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif diff --git a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_sht_lazy.cpp b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_sht_lazy.cpp index 088607fd..6bd9c7ae 100644 --- a/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_sht_lazy.cpp +++ b/tests/test-hdr/set/hdr_intrusive_splitlist_set_rcu_sht_lazy.cpp @@ -32,7 +32,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -57,7 +57,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -84,7 +84,7 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -112,7 +112,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -140,7 +140,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -169,7 +169,7 @@ namespace set { ,co::item_counter< simple_item_counter > >::type > set; - static_assert( set::options::dynamic_bucket_table, "Set has static bucket table" ); + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); test_rcu_int(); #endif @@ -197,7 +197,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif @@ -223,7 +223,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif @@ -250,7 +250,7 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif @@ -279,7 +279,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif @@ -308,7 +308,7 @@ namespace set { ,co::memory_model >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif @@ -338,7 +338,123 @@ namespace set { ,ci::split_list::dynamic_bucket_table >::type > set; - static_assert( !set::options::dynamic_bucket_table, "Set has dynamic bucket table" ); + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); + + test_rcu_int(); +#endif + } + + void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_base_cmpmix_stat_lazy() + { +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef base_int_item< ci::split_list::node > > item; + struct list_traits : public ci::lazy_list::traits + { + typedef ci::lazy_list::base_hook< co::gc > hook; + typedef IntrusiveHashSetHdrTest::less< item > less; + typedef cmp compare; + typedef faked_disposer disposer; + }; + typedef ci::LazyList< rcu_type, item, list_traits > ord_list; + + struct set_traits : public ci::split_list::make_traits>::type + { + typedef hash_int hash; + typedef simple_item_counter item_counter; + typedef ci::split_list::stat<> stat; + }; + typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); + + test_rcu_int(); +#endif + } + + void IntrusiveHashSetHdrTest::split_dyn_RCU_SHT_member_cmpmix_stat_lazy() + { +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; + struct list_traits : + public ci::lazy_list::make_traits< + ci::opt::hook< ci::lazy_list::member_hook< + offsetof( item, hMember ), + co::gc + > > + ,co::compare< cmp > + ,co::less< less > + ,ci::opt::disposer< faked_disposer > + >::type + {}; + typedef ci::LazyList< rcu_type, item, list_traits > ord_list; + + struct set_traits : + public ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,co::stat< ci::split_list::stat<> > + >::type + {}; + typedef ci::SplitListSet< rcu_type, ord_list, set_traits > set; + static_assert( set::traits::dynamic_bucket_table, "Set has static bucket table" ); + + test_rcu_int(); +#endif + } + + void IntrusiveHashSetHdrTest::split_st_RCU_SHT_base_cmpmix_stat_lazy() + { +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef base_int_item< ci::split_list::node > > item; + typedef ci::LazyList< rcu_type + ,item + ,ci::lazy_list::make_traits< + ci::opt::hook< ci::lazy_list::base_hook< co::gc > > + ,co::less< less > + ,co::compare< cmp > + ,ci::opt::disposer< faked_disposer > + >::type + > ord_list; + + typedef ci::SplitListSet< rcu_type, ord_list, + ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,ci::split_list::dynamic_bucket_table + ,co::stat< ci::split_list::stat<>> + >::type + > set; + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); + + test_rcu_int(); +#endif + } + + void IntrusiveHashSetHdrTest::split_st_RCU_SHT_member_cmpmix_stat_lazy() + { +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef member_int_item< ci::split_list::node< ci::lazy_list::node > > item; + typedef ci::LazyList< rcu_type + ,item + ,ci::lazy_list::make_traits< + ci::opt::hook< ci::lazy_list::member_hook< + offsetof( item, hMember ), + co::gc + > > + ,co::compare< cmp > + ,co::less< less > + ,ci::opt::disposer< faked_disposer > + >::type + > ord_list; + + typedef ci::SplitListSet< rcu_type, ord_list, + ci::split_list::make_traits< + co::hash< hash_int > + ,co::item_counter< simple_item_counter > + ,ci::split_list::dynamic_bucket_table + ,co::stat< ci::split_list::stat<>> + >::type + > set; + static_assert( !set::traits::dynamic_bucket_table, "Set has dynamic bucket table" ); test_rcu_int(); #endif