container::SplitListSet hdr test
authorkhizmax <khizmax@gmail.com>
Wed, 29 Oct 2014 15:41:49 +0000 (18:41 +0300)
committerkhizmax <khizmax@gmail.com>
Wed, 29 Oct 2014 15:41:49 +0000 (18:41 +0300)
tests/test-hdr/set/hdr_set.h
tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpb.cpp
tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpi.cpp
tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_gpt.cpp
tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_shb.cpp
tests/test-hdr/set/hdr_splitlist_set_lazy_rcu_sht.cpp
tests/test-hdr/set/hdr_splitlist_set_rcu_gpb.cpp
tests/test-hdr/set/hdr_splitlist_set_rcu_gpi.cpp
tests/test-hdr/set/hdr_splitlist_set_rcu_gpt.cpp
tests/test-hdr/set/hdr_splitlist_set_rcu_shb.cpp
tests/test-hdr/set/hdr_splitlist_set_rcu_sht.cpp

index 72c7a0e54cd31eaa36d57b891487fcb1c289c8a0..81fcaa278e0b01c2ba13d15c80ed63e298c03be2 100644 (file)
@@ -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)
index ed2c9f156faba75651ceeaeb28ec630ca212db48..e41ab714aed5f92ce0856769b6015e5269da07c1 100644 (file)
@@ -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<HashSetHdrTest::item>   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<HashSetHdrTest::item>   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<HashSetHdrTest::item>   compare;
                 typedef HashSetHdrTest::less<HashSetHdrTest::item>   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::lazy_list_tag>
+                ,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<item> >
+                        ,cc::opt::compare< cmp<item> >
+                    >::type
+                >
+            >::type
+        > opt_set;
+        test_int_rcu< opt_set >();
+    }
 
 } // namespace set
 
index e365ae757e7171c60e7f7125570ad9a544d79b38..b9de5042dd7d78922cc359420f074c3d4af5e0ed 100644 (file)
@@ -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<HashSetHdrTest::item>   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<HashSetHdrTest::item>   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<HashSetHdrTest::item>   compare;
                 typedef HashSetHdrTest::less<HashSetHdrTest::item>   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::lazy_list_tag>
+                ,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<item> >
+                        ,cc::opt::compare< cmp<item> >
+                    >::type
+                >
+            >::type
+        > opt_set;
+        test_int_rcu< opt_set >();
+    }
 
 } // namespace set
 
index fd5a475a1610c38b933305ab6466f3390f40c144..d9f50ed532297af9469c9787a01c9d4e5d590b7f 100644 (file)
@@ -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<HashSetHdrTest::item>   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<HashSetHdrTest::item>   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<HashSetHdrTest::item>   compare;
                 typedef HashSetHdrTest::less<HashSetHdrTest::item>   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::lazy_list_tag>
+                ,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<item> >
+                        ,cc::opt::compare< cmp<item> >
+                    >::type
+                >
+                , cc::opt::stat< cc::split_list::stat<>>
+            >::type
+        > opt_set;
+        test_int_rcu< opt_set >();
+    }
 
 } // namespace set
 
index 8b09aaabc718871e0601715e55655b13cb1fb65a..5a1035ca1ef2b8cb4b5c624b8131ecf6a8d40a69 100644 (file)
@@ -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<HashSetHdrTest::item>   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<HashSetHdrTest::item>   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<HashSetHdrTest::item>   compare;
                 typedef HashSetHdrTest::less<HashSetHdrTest::item>   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::lazy_list_tag>
+                ,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<item> >
+                        ,cc::opt::compare< cmp<item> >
+                    >::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<item> >
                     >::type
                 >
+                ,cc::opt::stat< cc::split_list::stat<>>
             >::type
         > opt_set;
         test_int_rcu< opt_set >();
index f460a95b790d7e45c55147740d63d1941193234d..0771b403050e90eea55795aec30e42286f3c8a72 100644 (file)
@@ -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<HashSetHdrTest::item>   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<HashSetHdrTest::item>   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<HashSetHdrTest::item>   compare;
                 typedef HashSetHdrTest::less<HashSetHdrTest::item>   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::lazy_list_tag>
+                ,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<item> >
+                        ,cc::opt::compare< cmp<item> >
+                    >::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<item> >
                     >::type
                 >
+                ,cc::opt::stat< cc::split_list::stat<>>
             >::type
         > opt_set;
         test_int_rcu< opt_set >();
index b3c646e10b7d2d55e69597ed53122ac4fe3bc242..ff2b132d0eac279a758ba5bfb184fa069fae6625 100644 (file)
@@ -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<HashSetHdrTest::item>   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<HashSetHdrTest::item>   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<HashSetHdrTest::item>   compare;
                 typedef HashSetHdrTest::less<HashSetHdrTest::item>   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::michael_list_tag>
+                ,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<item> >
+                        ,cc::opt::compare< cmp<item> >
+                    >::type
+                >
+                , cc::opt::stat< cc::split_list::stat<>>
+            >::type
+        > opt_set;
+        test_int_rcu< opt_set >();
+    }
 
 } // namespace set
 
index daa4e383ea756524604de3be67e1f98296465236..5f260c2b76ea519fa5f44ad06ba519926f261c70 100644 (file)
@@ -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<HashSetHdrTest::item>   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<HashSetHdrTest::item>   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<HashSetHdrTest::item>   compare;
                 typedef HashSetHdrTest::less<HashSetHdrTest::item>   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::michael_list_tag>
+                ,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<item> >
+                        ,cc::opt::compare< cmp<item> >
+                    >::type
+                >
+            >::type
+        > opt_set;
+        test_int_rcu< opt_set >();
+    }
 
 } // namespace set
 
index 4bb1c9f3b9111df0420b00b257957194d8ad5dfc..dba223687a5a9b96a5c2a95e28ab79dbfc964663 100644 (file)
@@ -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<HashSetHdrTest::item>   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<HashSetHdrTest::item>   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<HashSetHdrTest::item>   compare;
                 typedef HashSetHdrTest::less<HashSetHdrTest::item>   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::michael_list_tag>
+                ,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<item> >
+                        ,cc::opt::compare< cmp<item> >
+                    >::type
+                >
+            >::type
+        > opt_set;
+        test_int_rcu< opt_set >();
+    }
 
 } // namespace set
 
index 13fa6ac5f5db521f93ea2bf804cef743114647d5..2d0cf6c3727dc815a1e80c076dd7e2c79235ba2d 100644 (file)
@@ -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<HashSetHdrTest::item>   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<HashSetHdrTest::item>   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<HashSetHdrTest::item>   compare;
                 typedef HashSetHdrTest::less<HashSetHdrTest::item>   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::michael_list_tag>
+                ,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<item> >
+                        ,cc::opt::compare< cmp<item> >
+                    >::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<item> >
                     >::type
                 >
+                ,cc::opt::stat< cc::split_list::stat<>>
             >::type
         > opt_set;
         test_int_rcu< opt_set >();
index a8a43bc2427728462b2b67bc27309dabeadb32e2..62330bf694c6990f5e176da6bbc3d860ff91742c 100644 (file)
@@ -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<HashSetHdrTest::item>   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<HashSetHdrTest::item>   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<HashSetHdrTest::item>   compare;
                 typedef HashSetHdrTest::less<HashSetHdrTest::item>   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::michael_list_tag>
+                ,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<item> >
+                        ,cc::opt::compare< cmp<item> >
+                    >::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::michael_list_tag>
                 ,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<item> >