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 HashMapHdrTest::hash_int hash;
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 HashMapHdrTest::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 HashMapHdrTest::hash_int hash;
typedef cc::opt::v::sequential_consistent memory_model;
enum { dynamic_bucket_table = true };
- struct ordered_list_traits: public cc::michael_list::type_traits
+ struct ordered_list_traits: public cc::michael_list::traits
{
typedef HashMapHdrTest::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 HashMapHdrTest::hash_int hash;
typedef HashMapHdrTest::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 HashMapHdrTest::cmp compare;
typedef std::less<HashMapHdrTest::key_type> less;
};
};
+
+ struct RCU_cmpmix_stat_traits : public RCU_cmpmix_traits
+ {
+ typedef cc::split_list::stat<> stat;
+ };
}
void HashMapHdrTest::Split_RCU_GPT_cmp()
void HashMapHdrTest::Split_RCU_GPT_cmpmix()
{
// traits-based version
- typedef cc::SplitListMap< rcu_type, key_type, value_type, RCU_GPT_cmpmix_traits > map_type;
+ typedef cc::SplitListMap< rcu_type, key_type, value_type, RCU_cmpmix_traits > map_type;
test_rcu< map_type >();
// option-based version
test_rcu< opt_map >();
}
+ void HashMapHdrTest::Split_RCU_GPT_cmpmix_stat()
+ {
+ // traits-based version
+ typedef cc::SplitListMap< rcu_type, key_type, value_type, RCU_cmpmix_stat_traits > map_type;
+ test_rcu< map_type >();
+
+ // option-based version
+ typedef cc::SplitListMap< rcu_type,
+ key_type,
+ value_type,
+ 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 >
+ ,cds::opt::stat< cc::split_list::stat<>>
+ ,cc::split_list::ordered_list_traits<
+ cc::michael_list::make_traits<
+ cc::opt::less< std::less<key_type> >
+ ,cc::opt::compare< cmp >
+ >::type
+ >
+ >::type
+ > opt_map;
+ test_rcu< opt_map >();
+ }
} // namespace map