}
};
- template <typename K, typename V, typename... Options>
- class CuckooStripedMap:
- public cc::CuckooMap< K, V,
- typename cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::striping<> >
- ,Options...
- >::type
- >
- {
- public:
- typedef typename cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::striping<> >
- ,Options...
- >::type cuckoo_traits;
-
- typedef cc::CuckooMap< K, V, cuckoo_traits > cuckoo_base_class;
-
- public:
- CuckooStripedMap( size_t nCapacity, size_t nLoadFactor )
- : cuckoo_base_class( nCapacity / (nLoadFactor * 16), (unsigned int) 4 )
- {}
-
- template <typename Q, typename Pred>
- bool erase_with( Q const& key, Pred pred )
- {
- return cuckoo_base_class::erase_with( key, typename std::conditional< cuckoo_base_class::c_isSorted, Pred, typename Pred::equal_to>::type() );
- }
- };
-
- template <typename K, typename V, typename... Options>
- class CuckooRefinableMap:
- public cc::CuckooMap< K, V,
- typename cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::refinable<> >
- ,Options...
- >::type
- >
+ template <typename K, typename V, typename Traits>
+ class CuckooMap :
+ public cc::CuckooMap< K, V, Traits >
{
public:
- typedef typename cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::refinable<> >
- ,Options...
- >::type cuckoo_traits;
-
- typedef cc::CuckooMap< K, V, cuckoo_traits > cuckoo_base_class;
+ typedef cc::CuckooMap< K, V, Traits > cuckoo_base_class;
public:
- CuckooRefinableMap( size_t nCapacity, size_t nLoadFactor )
+ CuckooMap( size_t nCapacity, size_t nLoadFactor )
: cuckoo_base_class( nCapacity / (nLoadFactor * 16), (unsigned int) 4 )
{}
// ***************************************************************************
// CuckooMap
- typedef CuckooStripedMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- > CuckooStripedMap_list_unord;
-
- typedef CuckooStripedMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- ,co::stat< cc::cuckoo::stat >
- > CuckooStripedMap_list_unord_stat;
-
- typedef CuckooStripedMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- ,cc::cuckoo::store_hash< true >
- > CuckooStripedMap_list_unord_storehash;
-
- typedef CuckooStripedMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- > CuckooStripedMap_list_ord;
-
- typedef CuckooStripedMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- ,co::stat< cc::cuckoo::stat >
- > CuckooStripedMap_list_ord_stat;
-
- typedef CuckooStripedMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- ,cc::cuckoo::store_hash< true >
- > CuckooStripedMap_list_ord_storehash;
-
- typedef CuckooStripedMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- > CuckooStripedMap_vector_unord;
-
- typedef CuckooStripedMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- ,co::stat< cc::cuckoo::stat >
- > CuckooStripedMap_vector_unord_stat;
-
- typedef CuckooStripedMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- ,cc::cuckoo::store_hash< true >
- > CuckooStripedMap_vector_unord_storehash;
-
- typedef CuckooStripedMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- > CuckooStripedMap_vector_ord;
-
- typedef CuckooStripedMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- ,co::stat< cc::cuckoo::stat >
- > CuckooStripedMap_vector_ord_stat;
-
- typedef CuckooStripedMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- ,cc::cuckoo::store_hash< true >
- > CuckooStripedMap_vector_ord_storehash;
-
- typedef CuckooRefinableMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- > CuckooRefinableMap_list_unord;
-
- typedef CuckooRefinableMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- ,co::stat< cc::cuckoo::stat >
- > CuckooRefinableMap_list_unord_stat;
-
- typedef CuckooRefinableMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- ,cc::cuckoo::store_hash< true >
- > CuckooRefinableMap_list_unord_storehash;
-
- typedef CuckooRefinableMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- > CuckooRefinableMap_list_ord;
-
- typedef CuckooRefinableMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- ,co::stat< cc::cuckoo::stat >
- > CuckooRefinableMap_list_ord_stat;
-
- typedef CuckooRefinableMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- ,cc::cuckoo::store_hash< true >
- > CuckooRefinableMap_list_ord_storehash;
-
- typedef CuckooRefinableMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- > CuckooRefinableMap_vector_unord;
-
- typedef CuckooRefinableMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- ,co::stat< cc::cuckoo::stat >
- > CuckooRefinableMap_vector_unord_stat;
-
- typedef CuckooRefinableMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- ,cc::cuckoo::store_hash< true >
- > CuckooRefinableMap_vector_unord_storehash;
-
- typedef CuckooRefinableMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- > CuckooRefinableMap_vector_ord;
-
- typedef CuckooRefinableMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- ,co::stat< cc::cuckoo::stat >
- > CuckooRefinableMap_vector_ord_stat;
-
- typedef CuckooRefinableMap< Key, Value,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- ,cc::cuckoo::store_hash< true >
- > CuckooRefinableMap_vector_ord_storehash;
+ template <typename Traits>
+ struct traits_CuckooStripedMap: public Traits
+ {
+ typedef cc::cuckoo::striping<> mutex_policy;
+ };
+ template <typename Traits>
+ struct traits_CuckooRefinableMap : public Traits
+ {
+ typedef cc::cuckoo::refinable<> mutex_policy;
+ };
+
+ struct traits_CuckooMap_list_unord :
+ public cc::cuckoo::make_traits <
+ cc::cuckoo::probeset_type< cc::cuckoo::list >
+ , co::equal_to< equal_to >
+ , co::hash< std::tuple< hash, hash2 > >
+ > ::type
+ {};
+ typedef CuckooMap< Key, Value, traits_CuckooStripedMap<traits_CuckooMap_list_unord>> CuckooStripedMap_list_unord;
+ typedef CuckooMap< Key, Value, traits_CuckooRefinableMap<traits_CuckooMap_list_unord>> CuckooRefinableMap_list_unord;
+
+ struct traits_CuckooMap_list_unord_stat : public traits_CuckooMap_list_unord
+ {
+ typedef cc::cuckoo::stat stat;
+ };
+ typedef CuckooMap< Key, Value, traits_CuckooStripedMap<traits_CuckooMap_list_unord_stat>> CuckooStripedMap_list_unord_stat;
+ typedef CuckooMap< Key, Value, traits_CuckooRefinableMap<traits_CuckooMap_list_unord_stat>> CuckooRefinableMap_list_unord_stat;
+
+ struct traits_CuckooMap_list_unord_storehash : public traits_CuckooMap_list_unord
+ {
+ static CDS_CONSTEXPR const bool store_hash = true;
+ };
+ typedef CuckooMap< Key, Value, traits_CuckooStripedMap<traits_CuckooMap_list_unord_storehash>> CuckooStripedMap_list_unord_storehash;
+ typedef CuckooMap< Key, Value, traits_CuckooRefinableMap<traits_CuckooMap_list_unord_storehash>> CuckooRefinableMap_list_unord_storehash;
+
+ struct traits_CuckooMap_list_ord :
+ public cc::cuckoo::make_traits <
+ cc::cuckoo::probeset_type< cc::cuckoo::list >
+ , co::compare< compare >
+ , co::hash< std::tuple< hash, hash2 > >
+ >::type
+ {};
+ typedef CuckooMap< Key, Value, traits_CuckooStripedMap<traits_CuckooMap_list_ord>> CuckooStripedMap_list_ord;
+ typedef CuckooMap< Key, Value, traits_CuckooRefinableMap<traits_CuckooMap_list_ord>> CuckooRefinableMap_list_ord;
+
+ struct traits_CuckooMap_list_ord_stat : public traits_CuckooMap_list_ord
+ {
+ typedef cc::cuckoo::stat stat;
+ };
+ typedef CuckooMap< Key, Value, traits_CuckooStripedMap<traits_CuckooMap_list_ord_stat>> CuckooStripedMap_list_ord_stat;
+ typedef CuckooMap< Key, Value, traits_CuckooRefinableMap<traits_CuckooMap_list_ord_stat>> CuckooRefinableMap_list_ord_stat;
+
+ struct traits_CuckooMap_list_ord_storehash : public traits_CuckooMap_list_ord
+ {
+ static CDS_CONSTEXPR const bool store_hash = true;
+ };
+ typedef CuckooMap< Key, Value, traits_CuckooStripedMap<traits_CuckooMap_list_ord_storehash>> CuckooStripedMap_list_ord_storehash;
+ typedef CuckooMap< Key, Value, traits_CuckooRefinableMap<traits_CuckooMap_list_ord_storehash>> CuckooRefinableMap_list_ord_storehash;
+
+ struct traits_CuckooMap_vector_unord :
+ public cc::cuckoo::make_traits <
+ cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
+ , co::equal_to< equal_to >
+ , co::hash< std::tuple< hash, hash2 > >
+ >::type
+ {};
+ typedef CuckooMap< Key, Value, traits_CuckooStripedMap<traits_CuckooMap_vector_unord>> CuckooStripedMap_vector_unord;
+ typedef CuckooMap< Key, Value, traits_CuckooRefinableMap<traits_CuckooMap_vector_unord>> CuckooRefinableMap_vector_unord;
+
+ struct traits_CuckooMap_vector_unord_stat : public traits_CuckooMap_vector_unord
+ {
+ typedef cc::cuckoo::stat stat;
+ };
+ typedef CuckooMap< Key, Value, traits_CuckooStripedMap<traits_CuckooMap_vector_unord_stat>> CuckooStripedMap_vector_unord_stat;
+ typedef CuckooMap< Key, Value, traits_CuckooRefinableMap<traits_CuckooMap_vector_unord_stat>> CuckooRefinableMap_vector_unord_stat;
+
+ struct traits_CuckooMap_vector_unord_storehash : public traits_CuckooMap_vector_unord
+ {
+ static CDS_CONSTEXPR const bool store_hash = true;
+ };
+ typedef CuckooMap< Key, Value, traits_CuckooStripedMap<traits_CuckooMap_vector_unord_storehash>> CuckooStripedMap_vector_unord_storehash;
+ typedef CuckooMap< Key, Value, traits_CuckooRefinableMap<traits_CuckooMap_vector_unord_storehash>> CuckooRefinableMap_vector_unord_storehash;
+
+ struct traits_CuckooMap_vector_ord :
+ public cc::cuckoo::make_traits <
+ cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
+ , co::compare< compare >
+ , co::hash< std::tuple< hash, hash2 > >
+ >::type
+ {};
+ typedef CuckooMap< Key, Value, traits_CuckooStripedMap<traits_CuckooMap_vector_ord>> CuckooStripedMap_vector_ord;
+ typedef CuckooMap< Key, Value, traits_CuckooRefinableMap<traits_CuckooMap_vector_ord>> CuckooRefinableMap_vector_ord;
+
+ struct traits_CuckooMap_vector_ord_stat : public traits_CuckooMap_vector_ord
+ {
+ typedef cc::cuckoo::stat stat;
+ };
+ typedef CuckooMap< Key, Value, traits_CuckooStripedMap<traits_CuckooMap_vector_ord_stat>> CuckooStripedMap_vector_ord_stat;
+ typedef CuckooMap< Key, Value, traits_CuckooRefinableMap<traits_CuckooMap_vector_ord_stat>> CuckooRefinableMap_vector_ord_stat;
+
+ struct traits_CuckooMap_vector_ord_storehash : public traits_CuckooMap_vector_ord
+ {
+ static CDS_CONSTEXPR const bool store_hash = true;
+ };
+ typedef CuckooMap< Key, Value, traits_CuckooStripedMap<traits_CuckooMap_vector_ord_storehash>> CuckooStripedMap_vector_ord_storehash;
+ typedef CuckooMap< Key, Value, traits_CuckooRefinableMap<traits_CuckooMap_vector_ord_storehash>> CuckooRefinableMap_vector_ord_storehash;
// ***************************************************************************
// SkipListMap
}
- template <typename K, typename V, typename... Options>
- static inline void print_stat( CuckooStripedMap< K, V, Options... > const& m )
+ template <typename K, typename V, typename Traits>
+ static inline void print_stat( CuckooMap< K, V, Traits > const& m )
{
- typedef CuckooStripedMap< K, V, Options... > map_type;
+ typedef CuckooMap< K, V, Traits > map_type;
print_stat( static_cast<typename map_type::cuckoo_base_class const&>(m) );
}
-
- template <typename K, typename V, typename... Options>
- static inline void print_stat( CuckooRefinableMap< K, V, Options... > const& m )
- {
- typedef CuckooRefinableMap< K, V, Options... > map_type;
- print_stat( static_cast<typename map_type::cuckoo_base_class const&>(m) );
- }
-
} // namespace map2
#endif // ifndef _CDSUNIT_MAP2_MAP_TYPES_H
typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_sht;
#endif
- template <typename V, typename... Options>
- class CuckooStripedSet:
- public cc::CuckooSet< V,
- typename cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::striping<> >
- ,Options...
- >::type
- >
+ template <typename V, typename Traits>
+ class CuckooSet : public cc::CuckooSet< V, Traits >
{
public:
- typedef typename cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::striping<> >
- ,Options...
- >::type cuckoo_traits;
-
- typedef cc::CuckooSet< V, cuckoo_traits > cuckoo_base_class;
+ typedef cc::CuckooSet< V, Traits > cuckoo_base_class;
public:
- CuckooStripedSet( size_t nCapacity, size_t nLoadFactor )
- : cuckoo_base_class( nCapacity / (nLoadFactor * 16), (unsigned int) 4 )
- {}
-
- template <typename Q, typename Pred>
- bool erase_with( Q const& key, Pred pred )
- {
- return cuckoo_base_class::erase_with( key, typename std::conditional< cuckoo_base_class::c_isSorted, Pred, typename Pred::equal_to>::type() );
- }
- };
-
- template <typename V, typename... Options>
- class CuckooRefinableSet:
- public cc::CuckooSet< V,
- typename cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::refinable<> >
- ,Options...
- >::type
- >
- {
- public:
- typedef typename cc::cuckoo::make_traits<
- co::mutex_policy< cc::cuckoo::refinable<> >
- ,Options...
- >::type cuckoo_traits;
-
- typedef cc::CuckooSet< V, cuckoo_traits > cuckoo_base_class;
-
- public:
- CuckooRefinableSet( size_t nCapacity, size_t nLoadFactor )
- : cuckoo_base_class( nCapacity / (nLoadFactor * 16), (unsigned int) 4 )
+ CuckooSet( size_t nCapacity, size_t nLoadFactor )
+ : cuckoo_base_class( nCapacity / (nLoadFactor * 16), (unsigned int)4 )
{}
template <typename Q, typename Pred>
// ***************************************************************************
// CuckooSet
- typedef CuckooStripedSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- > CuckooStripedSet_list_unord;
-
- typedef CuckooStripedSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- ,co::stat< cc::cuckoo::stat >
- > CuckooStripedSet_list_unord_stat;
-
- typedef CuckooStripedSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- ,cc::cuckoo::store_hash< true >
- > CuckooStripedSet_list_unord_storehash;
-
- typedef CuckooStripedSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- > CuckooStripedSet_list_ord;
-
- typedef CuckooStripedSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- ,co::stat< cc::cuckoo::stat >
- > CuckooStripedSet_list_ord_stat;
-
- typedef CuckooStripedSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- ,cc::cuckoo::store_hash< true >
- > CuckooStripedSet_list_ord_storehash;
-
- typedef CuckooStripedSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- > CuckooStripedSet_vector_unord;
-
- typedef CuckooStripedSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- ,co::stat< cc::cuckoo::stat >
- > CuckooStripedSet_vector_unord_stat;
-
- typedef CuckooStripedSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- ,cc::cuckoo::store_hash< true >
- > CuckooStripedSet_vector_unord_storehash;
-
- typedef CuckooStripedSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- > CuckooStripedSet_vector_ord;
-
- typedef CuckooStripedSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- ,co::stat< cc::cuckoo::stat >
- > CuckooStripedSet_vector_ord_stat;
-
- typedef CuckooStripedSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- ,cc::cuckoo::store_hash< true >
- > CuckooStripedSet_vector_ord_storehash;
-
- typedef CuckooRefinableSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- > CuckooRefinableSet_list_unord;
-
- typedef CuckooRefinableSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- ,co::stat< cc::cuckoo::stat >
- > CuckooRefinableSet_list_unord_stat;
-
- typedef CuckooRefinableSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- ,cc::cuckoo::store_hash< true >
- > CuckooRefinableSet_list_unord_storehash;
-
- typedef CuckooRefinableSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- > CuckooRefinableSet_list_ord;
-
- typedef CuckooRefinableSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- ,co::stat< cc::cuckoo::stat >
- > CuckooRefinableSet_list_ord_stat;
-
- typedef CuckooRefinableSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::list >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- ,cc::cuckoo::store_hash< true >
- > CuckooRefinableSet_list_ord_storehash;
-
- typedef CuckooRefinableSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- > CuckooRefinableSet_vector_unord;
-
- typedef CuckooRefinableSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- ,co::stat< cc::cuckoo::stat >
- > CuckooRefinableSet_vector_unord_stat;
-
- typedef CuckooRefinableSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::equal_to< equal_to >
- ,co::hash< std::tuple< hash, hash2 > >
- ,cc::cuckoo::store_hash< true >
- > CuckooRefinableSet_vector_unord_storehash;
-
- typedef CuckooRefinableSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- > CuckooRefinableSet_vector_ord;
-
- typedef CuckooRefinableSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- ,co::stat< cc::cuckoo::stat >
- > CuckooRefinableSet_vector_ord_stat;
-
- typedef CuckooRefinableSet< key_val,
- cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
- ,co::compare< compare >
- ,co::hash< std::tuple< hash, hash2 > >
- ,cc::cuckoo::store_hash< true >
- > CuckooRefinableSet_vector_ord_storehash;
+ template <typename Traits>
+ struct traits_CuckooStripedSet : public Traits
+ {
+ typedef cc::cuckoo::striping<> mutex_policy;
+ };
+ template <typename Traits>
+ struct traits_CuckooRefinableSet : public Traits
+ {
+ typedef cc::cuckoo::refinable<> mutex_policy;
+ };
+
+ struct traits_CuckooSet_list_unord :
+ public cc::cuckoo::make_traits <
+ cc::cuckoo::probeset_type< cc::cuckoo::list >
+ , co::equal_to< equal_to >
+ , co::hash< std::tuple< hash, hash2 > >
+ > ::type
+ {};
+ typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_list_unord>> CuckooStripedSet_list_unord;
+ typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_list_unord>> CuckooRefinableSet_list_unord;
+
+ struct traits_CuckooSet_list_unord_stat : public traits_CuckooSet_list_unord
+ {
+ typedef cc::cuckoo::stat stat;
+ };
+ typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_list_unord_stat>> CuckooStripedSet_list_unord_stat;
+ typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_list_unord_stat>> CuckooRefinableSet_list_unord_stat;
+
+ struct traits_CuckooSet_list_unord_storehash : public traits_CuckooSet_list_unord
+ {
+ static CDS_CONSTEXPR const bool store_hash = true;
+ };
+ typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_list_unord_storehash>> CuckooStripedSet_list_unord_storehash;
+ typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_list_unord_storehash>> CuckooRefinableSet_list_unord_storehash;
+
+ struct traits_CuckooSet_list_ord :
+ public cc::cuckoo::make_traits <
+ cc::cuckoo::probeset_type< cc::cuckoo::list >
+ , co::compare< compare >
+ , co::hash< std::tuple< hash, hash2 > >
+ > ::type
+ {};
+ typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_list_ord>> CuckooStripedSet_list_ord;
+ typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_list_ord>> CuckooRefinableSet_list_ord;
+
+ struct traits_CuckooSet_list_ord_stat : public traits_CuckooSet_list_ord
+ {
+ typedef cc::cuckoo::stat stat;
+ };
+ typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_list_ord_stat>> CuckooStripedSet_list_ord_stat;
+ typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_list_ord_stat>> CuckooRefinableSet_list_ord_stat;
+
+ struct traits_CuckooSet_list_ord_storehash : public traits_CuckooSet_list_ord
+ {
+ static CDS_CONSTEXPR const bool store_hash = true;
+ };
+ typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_list_ord_storehash>> CuckooStripedSet_list_ord_storehash;
+ typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_list_ord_storehash>> CuckooRefinableSet_list_ord_storehash;
+
+
+ struct traits_CuckooSet_vector_unord :
+ public cc::cuckoo::make_traits <
+ cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
+ , co::equal_to< equal_to >
+ , co::hash< std::tuple< hash, hash2 > >
+ > ::type
+ {};
+ typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_vector_unord>> CuckooStripedSet_vector_unord;
+ typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_vector_unord>> CuckooRefinableSet_vector_unord;
+
+ struct traits_CuckooSet_vector_unord_stat : public traits_CuckooSet_vector_unord
+ {
+ typedef cc::cuckoo::stat stat;
+ };
+ typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_vector_unord_stat>> CuckooStripedSet_vector_unord_stat;
+ typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_vector_unord_stat>> CuckooRefinableSet_vector_unord_stat;
+
+ struct traits_CuckooSet_vector_unord_storehash : public traits_CuckooSet_vector_unord
+ {
+ static CDS_CONSTEXPR const bool store_hash = true;
+ };
+ typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_vector_unord_storehash>> CuckooStripedSet_vector_unord_storehash;
+ typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_vector_unord_storehash>> CuckooRefinableSet_vector_unord_storehash;
+
+ struct traits_CuckooSet_vector_ord :
+ public cc::cuckoo::make_traits <
+ cc::cuckoo::probeset_type< cc::cuckoo::vector<4> >
+ , co::compare< compare >
+ , co::hash< std::tuple< hash, hash2 > >
+ > ::type
+ {};
+ typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_vector_ord>> CuckooStripedSet_vector_ord;
+ typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_vector_ord>> CuckooRefinableSet_vector_ord;
+
+ struct traits_CuckooSet_vector_ord_stat : public traits_CuckooSet_vector_ord
+ {
+ typedef cc::cuckoo::stat stat;
+ };
+ typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_vector_ord_stat>> CuckooStripedSet_vector_ord_stat;
+ typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_vector_ord_stat>> CuckooRefinableSet_vector_ord_stat;
+
+ struct traits_CuckooSet_vector_ord_storehash : public traits_CuckooSet_vector_ord
+ {
+ static CDS_CONSTEXPR const bool store_hash = true;
+ };
+ typedef CuckooSet< key_val, traits_CuckooStripedSet<traits_CuckooSet_vector_ord_storehash>> CuckooStripedSet_vector_ord_storehash;
+ typedef CuckooSet< key_val, traits_CuckooRefinableSet<traits_CuckooSet_vector_ord_storehash>> CuckooRefinableSet_vector_ord_storehash;
// ***************************************************************************
CPPUNIT_MSG( s.statistics() << s.mutex_policy_statistics() );
}
- template <typename V, typename... Options>
- static inline void print_stat( CuckooStripedSet< V, Options... > const& s )
+ template <typename V, typename Traits>
+ static inline void print_stat( CuckooSet< V, Traits > const& s )
{
- typedef CuckooStripedSet< V, Options... > set_type;
+ typedef CuckooSet< V, Traits > set_type;
print_stat( static_cast<typename set_type::cuckoo_base_class const&>(s) );
}
- template <typename V, typename... Options>
- static inline void print_stat( CuckooRefinableSet< V, Options... > const& s )
- {
- typedef CuckooRefinableSet< V, Options... > set_type;
- print_stat( static_cast<typename set_type::cuckoo_base_class const&>(s) );
- }
-
-
//*******************************************************
// additional_check