From: khizmax Date: Wed, 29 Oct 2014 15:41:49 +0000 (+0300) Subject: container::SplitListSet hdr test X-Git-Tag: v2.0.0~163 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fedb85ae85f6cbb8e79f4f67f7aa4e1c92d75ca6;p=libcds.git container::SplitListSet hdr test --- diff --git a/tests/test-hdr/set/hdr_set.h b/tests/test-hdr/set/hdr_set.h index 72c7a0e5..81fcaa27 100644 --- a/tests/test-hdr/set/hdr_set.h +++ b/tests/test-hdr/set/hdr_set.h @@ -898,22 +898,27 @@ namespace set { void Split_RCU_GPI_cmp(); void Split_RCU_GPI_less(); void Split_RCU_GPI_cmpmix(); + void Split_RCU_GPI_cmpmix_stat(); void Split_RCU_GPB_cmp(); void Split_RCU_GPB_less(); void Split_RCU_GPB_cmpmix(); + void Split_RCU_GPB_cmpmix_stat(); void Split_RCU_GPT_cmp(); void Split_RCU_GPT_less(); void Split_RCU_GPT_cmpmix(); + void Split_RCU_GPT_cmpmix_stat(); void Split_RCU_SHB_cmp(); void Split_RCU_SHB_less(); void Split_RCU_SHB_cmpmix(); + void Split_RCU_SHB_cmpmix_stat(); void Split_RCU_SHT_cmp(); void Split_RCU_SHT_less(); void Split_RCU_SHT_cmpmix(); + void Split_RCU_SHT_cmpmix_stat(); void Split_nogc_cmp(); void Split_nogc_less(); @@ -934,22 +939,27 @@ namespace set { void Split_Lazy_RCU_GPI_cmp(); void Split_Lazy_RCU_GPI_less(); void Split_Lazy_RCU_GPI_cmpmix(); + void Split_Lazy_RCU_GPI_cmpmix_stat(); void Split_Lazy_RCU_GPB_cmp(); void Split_Lazy_RCU_GPB_less(); void Split_Lazy_RCU_GPB_cmpmix(); + void Split_Lazy_RCU_GPB_cmpmix_stat(); void Split_Lazy_RCU_GPT_cmp(); void Split_Lazy_RCU_GPT_less(); void Split_Lazy_RCU_GPT_cmpmix(); + void Split_Lazy_RCU_GPT_cmpmix_stat(); void Split_Lazy_RCU_SHB_cmp(); void Split_Lazy_RCU_SHB_less(); void Split_Lazy_RCU_SHB_cmpmix(); + void Split_Lazy_RCU_SHB_cmpmix_stat(); void Split_Lazy_RCU_SHT_cmp(); void Split_Lazy_RCU_SHT_less(); void Split_Lazy_RCU_SHT_cmpmix(); + void Split_Lazy_RCU_SHT_cmpmix_stat(); void Split_Lazy_nogc_cmp(); void Split_Lazy_nogc_less(); @@ -1034,22 +1044,27 @@ namespace set { CPPUNIT_TEST(Split_RCU_GPI_cmp) CPPUNIT_TEST(Split_RCU_GPI_less) CPPUNIT_TEST(Split_RCU_GPI_cmpmix) + CPPUNIT_TEST( Split_RCU_GPI_cmpmix_stat ) CPPUNIT_TEST(Split_RCU_GPB_cmp) CPPUNIT_TEST(Split_RCU_GPB_less) CPPUNIT_TEST(Split_RCU_GPB_cmpmix) + CPPUNIT_TEST( Split_RCU_GPB_cmpmix_stat ) CPPUNIT_TEST(Split_RCU_GPT_cmp) CPPUNIT_TEST(Split_RCU_GPT_less) CPPUNIT_TEST(Split_RCU_GPT_cmpmix) + CPPUNIT_TEST( Split_RCU_GPT_cmpmix_stat ) CPPUNIT_TEST(Split_RCU_SHB_cmp) CPPUNIT_TEST(Split_RCU_SHB_less) CPPUNIT_TEST(Split_RCU_SHB_cmpmix) + CPPUNIT_TEST( Split_RCU_SHB_cmpmix_stat ) CPPUNIT_TEST(Split_RCU_SHT_cmp) CPPUNIT_TEST(Split_RCU_SHT_less) CPPUNIT_TEST(Split_RCU_SHT_cmpmix) + CPPUNIT_TEST( Split_RCU_SHT_cmpmix_stat ) CPPUNIT_TEST(Split_nogc_cmp) CPPUNIT_TEST(Split_nogc_less) @@ -1069,22 +1084,27 @@ namespace set { CPPUNIT_TEST(Split_Lazy_RCU_GPI_cmp) CPPUNIT_TEST(Split_Lazy_RCU_GPI_less) CPPUNIT_TEST(Split_Lazy_RCU_GPI_cmpmix) + CPPUNIT_TEST( Split_Lazy_RCU_GPI_cmpmix_stat ) CPPUNIT_TEST(Split_Lazy_RCU_GPB_cmp) CPPUNIT_TEST(Split_Lazy_RCU_GPB_less) CPPUNIT_TEST(Split_Lazy_RCU_GPB_cmpmix) + CPPUNIT_TEST( Split_Lazy_RCU_GPB_cmpmix_stat ) CPPUNIT_TEST(Split_Lazy_RCU_GPT_cmp) CPPUNIT_TEST(Split_Lazy_RCU_GPT_less) CPPUNIT_TEST(Split_Lazy_RCU_GPT_cmpmix) + CPPUNIT_TEST( Split_Lazy_RCU_GPT_cmpmix_stat ) CPPUNIT_TEST(Split_Lazy_RCU_SHB_cmp) CPPUNIT_TEST(Split_Lazy_RCU_SHB_less) CPPUNIT_TEST(Split_Lazy_RCU_SHB_cmpmix) + CPPUNIT_TEST( Split_Lazy_RCU_SHB_cmpmix_stat ) CPPUNIT_TEST(Split_Lazy_RCU_SHT_cmp) CPPUNIT_TEST(Split_Lazy_RCU_SHT_less) CPPUNIT_TEST(Split_Lazy_RCU_SHT_cmpmix) + CPPUNIT_TEST( Split_Lazy_RCU_SHT_cmpmix_stat ) CPPUNIT_TEST(Split_Lazy_nogc_cmp) CPPUNIT_TEST(Split_Lazy_nogc_less) diff --git a/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpb.cpp b/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpb.cpp index ed2c9f15..e41ab714 100644 --- a/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpb.cpp +++ b/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpb.cpp @@ -10,7 +10,7 @@ namespace set { namespace { typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type; - struct RCU_GPB_cmp_traits: public cc::split_list::type_traits + struct RCU_GPB_cmp_traits: public cc::split_list::traits { typedef cc::lazy_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; @@ -18,13 +18,13 @@ namespace set { typedef cc::opt::v::relaxed_ordering memory_model; enum { dynamic_bucket_table = false }; - struct ordered_list_traits: public cc::lazy_list::type_traits + struct ordered_list_traits: public cc::lazy_list::traits { typedef HashSetHdrTest::cmp compare; }; }; - struct RCU_GPB_less_traits: public cc::split_list::type_traits + struct RCU_GPB_less_traits: public cc::split_list::traits { typedef cc::lazy_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; @@ -32,24 +32,29 @@ namespace set { typedef cc::opt::v::sequential_consistent memory_model; enum { dynamic_bucket_table = false }; - struct ordered_list_traits: public cc::lazy_list::type_traits + struct ordered_list_traits: public cc::lazy_list::traits { typedef HashSetHdrTest::less less; }; }; - struct RCU_GPB_cmpmix_traits: public cc::split_list::type_traits + struct RCU_cmpmix_traits: public cc::split_list::traits { typedef cc::lazy_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; typedef HashSetHdrTest::simple_item_counter item_counter; - struct ordered_list_traits: public cc::lazy_list::type_traits + struct ordered_list_traits: public cc::lazy_list::traits { typedef HashSetHdrTest::cmp compare; typedef HashSetHdrTest::less less; }; }; + + struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits + { + typedef cc::split_list::stat<> stat; + }; } void HashSetHdrTest::Split_Lazy_RCU_GPB_cmp() @@ -105,7 +110,7 @@ namespace set { void HashSetHdrTest::Split_Lazy_RCU_GPB_cmpmix() { // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_GPB_cmpmix_traits > set; + typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set; test_int_rcu< set >(); // option-based version @@ -125,6 +130,29 @@ namespace set { test_int_rcu< opt_set >(); } + void HashSetHdrTest::Split_Lazy_RCU_GPB_cmpmix_stat() + { + // traits-based version + typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set; + test_int_rcu< set >(); + + // option-based version + typedef cc::SplitListSet< rcu_type, item, + cc::split_list::make_traits< + cc::split_list::ordered_list + ,cc::opt::hash< hash_int > + ,cc::opt::item_counter< simple_item_counter > + ,cc::opt::stat< cc::split_list::stat<>> + ,cc::split_list::ordered_list_traits< + cc::lazy_list::make_traits< + cc::opt::less< less > + ,cc::opt::compare< cmp > + >::type + > + >::type + > opt_set; + test_int_rcu< opt_set >(); + } } // namespace set diff --git a/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpi.cpp b/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpi.cpp index e365ae75..b9de5042 100644 --- a/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpi.cpp +++ b/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpi.cpp @@ -10,7 +10,7 @@ namespace set { namespace { typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type; - struct RCU_GPI_cmp_traits: public cc::split_list::type_traits + struct RCU_GPI_cmp_traits: public cc::split_list::traits { typedef cc::lazy_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; @@ -18,13 +18,13 @@ namespace set { typedef cc::opt::v::relaxed_ordering memory_model; enum { dynamic_bucket_table = false }; - struct ordered_list_traits: public cc::lazy_list::type_traits + struct ordered_list_traits: public cc::lazy_list::traits { typedef HashSetHdrTest::cmp compare; }; }; - struct RCU_GPI_less_traits: public cc::split_list::type_traits + struct RCU_GPI_less_traits: public cc::split_list::traits { typedef cc::lazy_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; @@ -32,24 +32,30 @@ namespace set { typedef cc::opt::v::sequential_consistent memory_model; enum { dynamic_bucket_table = false }; - struct ordered_list_traits: public cc::lazy_list::type_traits + struct ordered_list_traits: public cc::lazy_list::traits { typedef HashSetHdrTest::less less; }; }; - struct RCU_GPI_cmpmix_traits: public cc::split_list::type_traits + struct RCU_cmpmix_traits: public cc::split_list::traits { typedef cc::lazy_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; typedef HashSetHdrTest::simple_item_counter item_counter; - struct ordered_list_traits: public cc::lazy_list::type_traits + struct ordered_list_traits: public cc::lazy_list::traits { typedef HashSetHdrTest::cmp compare; typedef HashSetHdrTest::less less; }; }; + + struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits + { + typedef cc::split_list::stat<> stat; + }; + } void HashSetHdrTest::Split_Lazy_RCU_GPI_cmp() @@ -105,7 +111,7 @@ namespace set { void HashSetHdrTest::Split_Lazy_RCU_GPI_cmpmix() { // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_GPI_cmpmix_traits > set; + typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set; test_int_rcu< set >(); // option-based version @@ -125,6 +131,29 @@ namespace set { test_int_rcu< opt_set >(); } + void HashSetHdrTest::Split_Lazy_RCU_GPI_cmpmix_stat() + { + // traits-based version + typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set; + test_int_rcu< set >(); + + // option-based version + typedef cc::SplitListSet< rcu_type, item, + cc::split_list::make_traits< + cc::split_list::ordered_list + ,cc::opt::hash< hash_int > + ,cc::opt::item_counter< simple_item_counter > + , cc::opt::stat< cc::split_list::stat<>> + ,cc::split_list::ordered_list_traits< + cc::lazy_list::make_traits< + cc::opt::less< less > + ,cc::opt::compare< cmp > + >::type + > + >::type + > opt_set; + test_int_rcu< opt_set >(); + } } // namespace set diff --git a/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpt.cpp b/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpt.cpp index fd5a475a..d9f50ed5 100644 --- a/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpt.cpp +++ b/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpt.cpp @@ -10,7 +10,7 @@ namespace set { namespace { typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type; - struct RCU_GPT_cmp_traits: public cc::split_list::type_traits + struct RCU_GPT_cmp_traits: public cc::split_list::traits { typedef cc::lazy_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; @@ -18,13 +18,13 @@ namespace set { typedef cc::opt::v::relaxed_ordering memory_model; enum { dynamic_bucket_table = false }; - struct ordered_list_traits: public cc::lazy_list::type_traits + struct ordered_list_traits: public cc::lazy_list::traits { typedef HashSetHdrTest::cmp compare; }; }; - struct RCU_GPT_less_traits: public cc::split_list::type_traits + struct RCU_GPT_less_traits: public cc::split_list::traits { typedef cc::lazy_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; @@ -32,24 +32,29 @@ namespace set { typedef cc::opt::v::sequential_consistent memory_model; enum { dynamic_bucket_table = false }; - struct ordered_list_traits: public cc::lazy_list::type_traits + struct ordered_list_traits: public cc::lazy_list::traits { typedef HashSetHdrTest::less less; }; }; - struct RCU_GPT_cmpmix_traits: public cc::split_list::type_traits + struct RCU_cmpmix_traits: public cc::split_list::traits { typedef cc::lazy_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; typedef HashSetHdrTest::simple_item_counter item_counter; - struct ordered_list_traits: public cc::lazy_list::type_traits + struct ordered_list_traits: public cc::lazy_list::traits { typedef HashSetHdrTest::cmp compare; typedef HashSetHdrTest::less less; }; }; + + struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits + { + typedef cc::split_list::stat<> stat; + }; } void HashSetHdrTest::Split_Lazy_RCU_GPT_cmp() @@ -105,7 +110,7 @@ namespace set { void HashSetHdrTest::Split_Lazy_RCU_GPT_cmpmix() { // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_GPT_cmpmix_traits > set; + typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set; test_int_rcu< set >(); // option-based version @@ -125,6 +130,29 @@ namespace set { test_int_rcu< opt_set >(); } + void HashSetHdrTest::Split_Lazy_RCU_GPT_cmpmix_stat() + { + // traits-based version + typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set; + test_int_rcu< set >(); + + // option-based version + typedef cc::SplitListSet< rcu_type, item, + cc::split_list::make_traits< + cc::split_list::ordered_list + ,cc::opt::hash< hash_int > + ,cc::opt::item_counter< simple_item_counter > + ,cc::split_list::ordered_list_traits< + cc::lazy_list::make_traits< + cc::opt::less< less > + ,cc::opt::compare< cmp > + >::type + > + , cc::opt::stat< cc::split_list::stat<>> + >::type + > opt_set; + test_int_rcu< opt_set >(); + } } // namespace set diff --git a/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_shb.cpp b/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_shb.cpp index 8b09aaab..5a1035ca 100644 --- a/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_shb.cpp +++ b/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_shb.cpp @@ -11,7 +11,7 @@ namespace set { namespace { typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type; - struct RCU_SHB_cmp_traits: public cc::split_list::type_traits + struct RCU_SHB_cmp_traits: public cc::split_list::traits { typedef cc::lazy_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; @@ -19,13 +19,13 @@ namespace set { typedef cc::opt::v::relaxed_ordering memory_model; enum { dynamic_bucket_table = false }; - struct ordered_list_traits: public cc::lazy_list::type_traits + struct ordered_list_traits: public cc::lazy_list::traits { typedef HashSetHdrTest::cmp compare; }; }; - struct RCU_SHB_less_traits: public cc::split_list::type_traits + struct RCU_SHB_less_traits: public cc::split_list::traits { typedef cc::lazy_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; @@ -33,24 +33,30 @@ namespace set { typedef cc::opt::v::sequential_consistent memory_model; enum { dynamic_bucket_table = false }; - struct ordered_list_traits: public cc::lazy_list::type_traits + struct ordered_list_traits: public cc::lazy_list::traits { typedef HashSetHdrTest::less less; }; }; - struct RCU_SHB_cmpmix_traits: public cc::split_list::type_traits + struct RCU_cmpmix_traits: public cc::split_list::traits { typedef cc::lazy_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; typedef HashSetHdrTest::simple_item_counter item_counter; - struct ordered_list_traits: public cc::lazy_list::type_traits + struct ordered_list_traits: public cc::lazy_list::traits { typedef HashSetHdrTest::cmp compare; typedef HashSetHdrTest::less less; }; }; + + struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits + { + typedef cc::split_list::stat<> stat; + }; + } #endif @@ -112,7 +118,32 @@ namespace set { { #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_SHB_cmpmix_traits > set; + typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set; + test_int_rcu< set >(); + + // option-based version + typedef cc::SplitListSet< rcu_type, item, + cc::split_list::make_traits< + cc::split_list::ordered_list + ,cc::opt::hash< hash_int > + ,cc::opt::item_counter< simple_item_counter > + ,cc::split_list::ordered_list_traits< + cc::lazy_list::make_traits< + cc::opt::less< less > + ,cc::opt::compare< cmp > + >::type + > + >::type + > opt_set; + test_int_rcu< opt_set >(); +#endif + } + + void HashSetHdrTest::Split_Lazy_RCU_SHB_cmpmix_stat() + { +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + // traits-based version + typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set; test_int_rcu< set >(); // option-based version @@ -127,6 +158,7 @@ namespace set { ,cc::opt::compare< cmp > >::type > + ,cc::opt::stat< cc::split_list::stat<>> >::type > opt_set; test_int_rcu< opt_set >(); diff --git a/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_sht.cpp b/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_sht.cpp index f460a95b..0771b403 100644 --- a/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_sht.cpp +++ b/tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_sht.cpp @@ -11,7 +11,7 @@ namespace set { namespace { typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type; - struct RCU_SHT_cmp_traits: public cc::split_list::type_traits + struct RCU_SHT_cmp_traits: public cc::split_list::traits { typedef cc::lazy_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; @@ -19,13 +19,13 @@ namespace set { typedef cc::opt::v::relaxed_ordering memory_model; enum { dynamic_bucket_table = false }; - struct ordered_list_traits: public cc::lazy_list::type_traits + struct ordered_list_traits: public cc::lazy_list::traits { typedef HashSetHdrTest::cmp compare; }; }; - struct RCU_SHT_less_traits: public cc::split_list::type_traits + struct RCU_SHT_less_traits: public cc::split_list::traits { typedef cc::lazy_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; @@ -33,24 +33,30 @@ namespace set { typedef cc::opt::v::sequential_consistent memory_model; enum { dynamic_bucket_table = false }; - struct ordered_list_traits: public cc::lazy_list::type_traits + struct ordered_list_traits: public cc::lazy_list::traits { typedef HashSetHdrTest::less less; }; }; - struct RCU_SHT_cmpmix_traits: public cc::split_list::type_traits + struct RCU_cmpmix_traits: public cc::split_list::traits { typedef cc::lazy_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; typedef HashSetHdrTest::simple_item_counter item_counter; - struct ordered_list_traits: public cc::lazy_list::type_traits + struct ordered_list_traits: public cc::lazy_list::traits { typedef HashSetHdrTest::cmp compare; typedef HashSetHdrTest::less less; }; }; + + struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits + { + typedef cc::split_list::stat<> stat; + }; + } #endif @@ -112,7 +118,32 @@ namespace set { { #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_SHT_cmpmix_traits > set; + typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set; + test_int_rcu< set >(); + + // option-based version + typedef cc::SplitListSet< rcu_type, item, + cc::split_list::make_traits< + cc::split_list::ordered_list + ,cc::opt::hash< hash_int > + ,cc::opt::item_counter< simple_item_counter > + ,cc::split_list::ordered_list_traits< + cc::lazy_list::make_traits< + cc::opt::less< less > + ,cc::opt::compare< cmp > + >::type + > + >::type + > opt_set; + test_int_rcu< opt_set >(); +#endif + } + + void HashSetHdrTest::Split_Lazy_RCU_SHT_cmpmix_stat() + { +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + // traits-based version + typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set; test_int_rcu< set >(); // option-based version @@ -127,6 +158,7 @@ namespace set { ,cc::opt::compare< cmp > >::type > + ,cc::opt::stat< cc::split_list::stat<>> >::type > opt_set; test_int_rcu< opt_set >(); diff --git a/tests/test-hdr/set/hdr_splitlist_set_rcu_gpb.cpp b/tests/test-hdr/set/hdr_splitlist_set_rcu_gpb.cpp index b3c646e1..ff2b132d 100644 --- a/tests/test-hdr/set/hdr_splitlist_set_rcu_gpb.cpp +++ b/tests/test-hdr/set/hdr_splitlist_set_rcu_gpb.cpp @@ -10,7 +10,7 @@ namespace set { namespace { typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type; - struct RCU_GPB_cmp_traits: public cc::split_list::type_traits + struct RCU_GPB_cmp_traits: public cc::split_list::traits { typedef cc::michael_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; @@ -18,13 +18,13 @@ namespace set { typedef cc::opt::v::relaxed_ordering memory_model; enum { dynamic_bucket_table = false }; - struct ordered_list_traits: public cc::michael_list::type_traits + struct ordered_list_traits: public cc::michael_list::traits { typedef HashSetHdrTest::cmp compare; }; }; - struct RCU_GPB_less_traits: public cc::split_list::type_traits + struct RCU_GPB_less_traits: public cc::split_list::traits { typedef cc::michael_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; @@ -32,24 +32,30 @@ namespace set { typedef cc::opt::v::sequential_consistent memory_model; enum { dynamic_bucket_table = false }; - struct ordered_list_traits: public cc::michael_list::type_traits + struct ordered_list_traits: public cc::michael_list::traits { typedef HashSetHdrTest::less less; }; }; - struct RCU_GPB_cmpmix_traits: public cc::split_list::type_traits + struct RCU_cmpmix_traits: public cc::split_list::traits { typedef cc::michael_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; typedef HashSetHdrTest::simple_item_counter item_counter; - struct ordered_list_traits: public cc::michael_list::type_traits + struct ordered_list_traits: public cc::michael_list::traits { typedef HashSetHdrTest::cmp compare; typedef HashSetHdrTest::less less; }; }; + + struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits + { + typedef cc::split_list::stat<> stat; + }; + } void HashSetHdrTest::Split_RCU_GPB_cmp() @@ -105,7 +111,7 @@ namespace set { void HashSetHdrTest::Split_RCU_GPB_cmpmix() { // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_GPB_cmpmix_traits > set; + typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set; test_int_rcu< set >(); // option-based version @@ -125,6 +131,29 @@ namespace set { test_int_rcu< opt_set >(); } + void HashSetHdrTest::Split_RCU_GPB_cmpmix_stat() + { + // traits-based version + typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set; + test_int_rcu< set >(); + + // option-based version + typedef cc::SplitListSet< rcu_type, item, + cc::split_list::make_traits< + cc::split_list::ordered_list + ,cc::opt::hash< hash_int > + ,cc::opt::item_counter< simple_item_counter > + ,cc::split_list::ordered_list_traits< + cc::michael_list::make_traits< + cc::opt::less< less > + ,cc::opt::compare< cmp > + >::type + > + , cc::opt::stat< cc::split_list::stat<>> + >::type + > opt_set; + test_int_rcu< opt_set >(); + } } // namespace set diff --git a/tests/test-hdr/set/hdr_splitlist_set_rcu_gpi.cpp b/tests/test-hdr/set/hdr_splitlist_set_rcu_gpi.cpp index daa4e383..5f260c2b 100644 --- a/tests/test-hdr/set/hdr_splitlist_set_rcu_gpi.cpp +++ b/tests/test-hdr/set/hdr_splitlist_set_rcu_gpi.cpp @@ -10,7 +10,7 @@ namespace set { namespace { typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type; - struct RCU_GPI_cmp_traits: public cc::split_list::type_traits + struct RCU_GPI_cmp_traits: public cc::split_list::traits { typedef cc::michael_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; @@ -18,13 +18,13 @@ namespace set { typedef cc::opt::v::relaxed_ordering memory_model; enum { dynamic_bucket_table = false }; - struct ordered_list_traits: public cc::michael_list::type_traits + struct ordered_list_traits: public cc::michael_list::traits { typedef HashSetHdrTest::cmp compare; }; }; - struct RCU_GPI_less_traits: public cc::split_list::type_traits + struct RCU_GPI_less_traits: public cc::split_list::traits { typedef cc::michael_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; @@ -32,24 +32,29 @@ namespace set { typedef cc::opt::v::sequential_consistent memory_model; enum { dynamic_bucket_table = false }; - struct ordered_list_traits: public cc::michael_list::type_traits + struct ordered_list_traits: public cc::michael_list::traits { typedef HashSetHdrTest::less less; }; }; - struct RCU_GPI_cmpmix_traits: public cc::split_list::type_traits + struct RCU_cmpmix_traits: public cc::split_list::traits { typedef cc::michael_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; typedef HashSetHdrTest::simple_item_counter item_counter; - struct ordered_list_traits: public cc::michael_list::type_traits + struct ordered_list_traits: public cc::michael_list::traits { typedef HashSetHdrTest::cmp compare; typedef HashSetHdrTest::less less; }; }; + + struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits + { + typedef cc::split_list::stat<> stat; + }; } void HashSetHdrTest::Split_RCU_GPI_cmp() @@ -105,7 +110,7 @@ namespace set { void HashSetHdrTest::Split_RCU_GPI_cmpmix() { // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_GPI_cmpmix_traits > set; + typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set; test_int_rcu< set >(); // option-based version @@ -125,6 +130,29 @@ namespace set { test_int_rcu< opt_set >(); } + void HashSetHdrTest::Split_RCU_GPI_cmpmix_stat() + { + // traits-based version + typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set; + test_int_rcu< set >(); + + // option-based version + typedef cc::SplitListSet< rcu_type, item, + cc::split_list::make_traits< + cc::split_list::ordered_list + ,cc::opt::hash< hash_int > + , cc::opt::stat< cc::split_list::stat<>> + ,cc::opt::item_counter< simple_item_counter > + ,cc::split_list::ordered_list_traits< + cc::michael_list::make_traits< + cc::opt::less< less > + ,cc::opt::compare< cmp > + >::type + > + >::type + > opt_set; + test_int_rcu< opt_set >(); + } } // namespace set diff --git a/tests/test-hdr/set/hdr_splitlist_set_rcu_gpt.cpp b/tests/test-hdr/set/hdr_splitlist_set_rcu_gpt.cpp index 4bb1c9f3..dba22368 100644 --- a/tests/test-hdr/set/hdr_splitlist_set_rcu_gpt.cpp +++ b/tests/test-hdr/set/hdr_splitlist_set_rcu_gpt.cpp @@ -10,7 +10,7 @@ namespace set { namespace { typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type; - struct RCU_GPT_cmp_traits: public cc::split_list::type_traits + struct RCU_GPT_cmp_traits: public cc::split_list::traits { typedef cc::michael_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; @@ -18,13 +18,13 @@ namespace set { typedef cc::opt::v::relaxed_ordering memory_model; enum { dynamic_bucket_table = false }; - struct ordered_list_traits: public cc::michael_list::type_traits + struct ordered_list_traits: public cc::michael_list::traits { typedef HashSetHdrTest::cmp compare; }; }; - struct RCU_GPT_less_traits: public cc::split_list::type_traits + struct RCU_GPT_less_traits: public cc::split_list::traits { typedef cc::michael_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; @@ -32,24 +32,30 @@ namespace set { typedef cc::opt::v::sequential_consistent memory_model; enum { dynamic_bucket_table = false }; - struct ordered_list_traits: public cc::michael_list::type_traits + struct ordered_list_traits: public cc::michael_list::traits { typedef HashSetHdrTest::less less; }; }; - struct RCU_GPT_cmpmix_traits: public cc::split_list::type_traits + struct RCU_cmpmix_traits: public cc::split_list::traits { typedef cc::michael_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; typedef HashSetHdrTest::simple_item_counter item_counter; - struct ordered_list_traits: public cc::michael_list::type_traits + struct ordered_list_traits: public cc::michael_list::traits { typedef HashSetHdrTest::cmp compare; typedef HashSetHdrTest::less less; }; }; + + struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits + { + typedef cc::split_list::stat<> stat; + }; + } void HashSetHdrTest::Split_RCU_GPT_cmp() @@ -105,7 +111,7 @@ namespace set { void HashSetHdrTest::Split_RCU_GPT_cmpmix() { // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_GPT_cmpmix_traits > set; + typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set; test_int_rcu< set >(); // option-based version @@ -125,6 +131,29 @@ namespace set { test_int_rcu< opt_set >(); } + void HashSetHdrTest::Split_RCU_GPT_cmpmix_stat() + { + // traits-based version + typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set; + test_int_rcu< set >(); + + // option-based version + typedef cc::SplitListSet< rcu_type, item, + cc::split_list::make_traits< + cc::split_list::ordered_list + ,cc::opt::hash< hash_int > + ,cc::opt::item_counter< simple_item_counter > + , cc::opt::stat< cc::split_list::stat<>> + ,cc::split_list::ordered_list_traits< + cc::michael_list::make_traits< + cc::opt::less< less > + ,cc::opt::compare< cmp > + >::type + > + >::type + > opt_set; + test_int_rcu< opt_set >(); + } } // namespace set diff --git a/tests/test-hdr/set/hdr_splitlist_set_rcu_shb.cpp b/tests/test-hdr/set/hdr_splitlist_set_rcu_shb.cpp index 13fa6ac5..2d0cf6c3 100644 --- a/tests/test-hdr/set/hdr_splitlist_set_rcu_shb.cpp +++ b/tests/test-hdr/set/hdr_splitlist_set_rcu_shb.cpp @@ -11,7 +11,7 @@ namespace set { namespace { typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type; - struct RCU_SHB_cmp_traits: public cc::split_list::type_traits + struct RCU_SHB_cmp_traits: public cc::split_list::traits { typedef cc::michael_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; @@ -19,13 +19,13 @@ namespace set { typedef cc::opt::v::relaxed_ordering memory_model; enum { dynamic_bucket_table = false }; - struct ordered_list_traits: public cc::michael_list::type_traits + struct ordered_list_traits: public cc::michael_list::traits { typedef HashSetHdrTest::cmp compare; }; }; - struct RCU_SHB_less_traits: public cc::split_list::type_traits + struct RCU_SHB_less_traits: public cc::split_list::traits { typedef cc::michael_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; @@ -33,24 +33,30 @@ namespace set { typedef cc::opt::v::sequential_consistent memory_model; enum { dynamic_bucket_table = false }; - struct ordered_list_traits: public cc::michael_list::type_traits + struct ordered_list_traits: public cc::michael_list::traits { typedef HashSetHdrTest::less less; }; }; - struct RCU_SHB_cmpmix_traits: public cc::split_list::type_traits + struct RCU_cmpmix_traits: public cc::split_list::traits { typedef cc::michael_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; typedef HashSetHdrTest::simple_item_counter item_counter; - struct ordered_list_traits: public cc::michael_list::type_traits + struct ordered_list_traits: public cc::michael_list::traits { typedef HashSetHdrTest::cmp compare; typedef HashSetHdrTest::less less; }; }; + + struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits + { + typedef cc::split_list::stat<> stat; + }; + } #endif @@ -112,7 +118,32 @@ namespace set { { #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_SHB_cmpmix_traits > set; + typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set; + test_int_rcu< set >(); + + // option-based version + typedef cc::SplitListSet< rcu_type, item, + cc::split_list::make_traits< + cc::split_list::ordered_list + ,cc::opt::hash< hash_int > + ,cc::opt::item_counter< simple_item_counter > + ,cc::split_list::ordered_list_traits< + cc::michael_list::make_traits< + cc::opt::less< less > + ,cc::opt::compare< cmp > + >::type + > + >::type + > opt_set; + test_int_rcu< opt_set >(); +#endif + } + + void HashSetHdrTest::Split_RCU_SHB_cmpmix_stat() + { +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + // traits-based version + typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set; test_int_rcu< set >(); // option-based version @@ -127,6 +158,7 @@ namespace set { ,cc::opt::compare< cmp > >::type > + ,cc::opt::stat< cc::split_list::stat<>> >::type > opt_set; test_int_rcu< opt_set >(); diff --git a/tests/test-hdr/set/hdr_splitlist_set_rcu_sht.cpp b/tests/test-hdr/set/hdr_splitlist_set_rcu_sht.cpp index a8a43bc2..62330bf6 100644 --- a/tests/test-hdr/set/hdr_splitlist_set_rcu_sht.cpp +++ b/tests/test-hdr/set/hdr_splitlist_set_rcu_sht.cpp @@ -11,7 +11,7 @@ namespace set { namespace { typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type; - struct RCU_SHT_cmp_traits: public cc::split_list::type_traits + struct RCU_SHT_cmp_traits: public cc::split_list::traits { typedef cc::michael_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; @@ -19,13 +19,13 @@ namespace set { typedef cc::opt::v::relaxed_ordering memory_model; enum { dynamic_bucket_table = false }; - struct ordered_list_traits: public cc::michael_list::type_traits + struct ordered_list_traits: public cc::michael_list::traits { typedef HashSetHdrTest::cmp compare; }; }; - struct RCU_SHT_less_traits: public cc::split_list::type_traits + struct RCU_SHT_less_traits: public cc::split_list::traits { typedef cc::michael_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; @@ -33,24 +33,30 @@ namespace set { typedef cc::opt::v::sequential_consistent memory_model; enum { dynamic_bucket_table = false }; - struct ordered_list_traits: public cc::michael_list::type_traits + struct ordered_list_traits: public cc::michael_list::traits { typedef HashSetHdrTest::less less; }; }; - struct RCU_SHT_cmpmix_traits: public cc::split_list::type_traits + struct RCU_cmpmix_traits: public cc::split_list::traits { typedef cc::michael_list_tag ordered_list; typedef HashSetHdrTest::hash_int hash; typedef HashSetHdrTest::simple_item_counter item_counter; - struct ordered_list_traits: public cc::michael_list::type_traits + struct ordered_list_traits: public cc::michael_list::traits { typedef HashSetHdrTest::cmp compare; typedef HashSetHdrTest::less less; }; }; + + struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits + { + typedef cc::split_list::stat<> stat; + }; + } #endif @@ -112,7 +118,32 @@ namespace set { { #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED // traits-based version - typedef cc::SplitListSet< rcu_type, item, RCU_SHT_cmpmix_traits > set; + typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_traits > set; + test_int_rcu< set >(); + + // option-based version + typedef cc::SplitListSet< rcu_type, item, + cc::split_list::make_traits< + cc::split_list::ordered_list + ,cc::opt::hash< hash_int > + ,cc::opt::item_counter< simple_item_counter > + ,cc::split_list::ordered_list_traits< + cc::michael_list::make_traits< + cc::opt::less< less > + ,cc::opt::compare< cmp > + >::type + > + >::type + > opt_set; + test_int_rcu< opt_set >(); +#endif + } + + void HashSetHdrTest::Split_RCU_SHT_cmpmix_stat() + { +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + // traits-based version + typedef cc::SplitListSet< rcu_type, item, RCU_cmpmix_stat_traits > set; test_int_rcu< set >(); // option-based version @@ -121,6 +152,7 @@ namespace set { cc::split_list::ordered_list ,cc::opt::hash< hash_int > ,cc::opt::item_counter< simple_item_counter > + ,cc::opt::stat< cc::split_list::stat<>> ,cc::split_list::ordered_list_traits< cc::michael_list::make_traits< cc::opt::less< less >