3 #include "set/hdr_intrusive_striped_set.h"
4 #include <cds/intrusive/striped_set/boost_avl_set.h>
5 #include <cds/intrusive/striped_set.h>
8 namespace bi = boost::intrusive;
11 typedef IntrusiveStripedSetHdrTest::base_item< bi::avl_set_base_hook<> > base_item_type;
12 typedef IntrusiveStripedSetHdrTest::member_item< bi::avl_set_member_hook<> > member_item_type;
14 template <typename T, typename Node>
19 type const& operator()( Node const& v ) const
26 #if BOOST_VERSION >= 105900
27 # define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type ) ,bi::key_of_value< get_key< int, type>>
29 # define CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( type )
32 void IntrusiveStripedSetHdrTest::Refinable_avl_set_basehook()
34 typedef ci::StripedSet<
35 bi::avl_set<base_item_type
36 , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
37 CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
39 ,co::mutex_policy< ci::striped_set::refinable<> >
40 ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
41 ,co::back_off< cds::backoff::empty >
47 void IntrusiveStripedSetHdrTest::Refinable_avl_set_basehook_bucket_threshold()
49 typedef ci::StripedSet<
50 bi::avl_set<base_item_type
51 , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
52 CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
54 ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
55 ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<64> >
56 ,co::mutex_policy< ci::striped_set::refinable<> >
62 void IntrusiveStripedSetHdrTest::Refinable_avl_set_basehook_bucket_threshold_rt()
64 typedef ci::StripedSet<
65 bi::avl_set<base_item_type
66 , bi::compare<IntrusiveStripedSetHdrTest::less<base_item_type>>
67 CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( base_item_type )
69 ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
70 ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
71 ,co::mutex_policy< ci::striped_set::refinable<> >
74 set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );
78 void IntrusiveStripedSetHdrTest::Refinable_avl_set_memberhook()
80 typedef ci::StripedSet<
83 , bi::member_hook< member_item_type, bi::avl_set_member_hook<>, &member_item_type::hMember>
84 , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
85 CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
87 ,co::mutex_policy< ci::striped_set::refinable<> >
88 ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
94 void IntrusiveStripedSetHdrTest::Refinable_avl_set_memberhook_bucket_threshold()
96 typedef ci::StripedSet<
99 , bi::member_hook< member_item_type, bi::avl_set_member_hook<>, &member_item_type::hMember>
100 , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
101 CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
103 ,co::mutex_policy< ci::striped_set::refinable<> >
104 ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
105 ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<256> >
111 void IntrusiveStripedSetHdrTest::Refinable_avl_set_memberhook_bucket_threshold_rt()
113 typedef ci::StripedSet<
116 , bi::member_hook< member_item_type, bi::avl_set_member_hook<>, &member_item_type::hMember>
117 , bi::compare<IntrusiveStripedSetHdrTest::less<member_item_type> >
118 CDS_BOOST_INTRUSIVE_KEY_OF_VALUE_OPTION( member_item_type )
120 ,co::hash< IntrusiveStripedSetHdrTest::hash_int >
121 ,co::mutex_policy< ci::striped_set::refinable<> >
122 ,co::resizing_policy< ci::striped_set::single_bucket_size_threshold<0> >
125 set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>(256) );