{
return CityHash32( reinterpret_cast<char const *>( &s ), sizeof(s));
}
+
+ struct less
+ {
+ bool operator()( hash_type lhs, hash_type rhs ) const
+ {
+ return lhs < rhs;
+ }
+ };
};
class city64 {
{
return CityHash64( reinterpret_cast<char const *>( &s ), sizeof(s));
}
+
+ struct less
+ {
+ bool operator()( hash_type lhs, hash_type rhs ) const
+ {
+ return lhs < rhs;
+ }
+ };
};
class city128 {
{
return CityHash128( reinterpret_cast<char const *>( &s ), sizeof(s));
}
+
+ struct less
+ {
+ bool operator()( hash_type const& lhs, hash_type const& rhs ) const
+ {
+ if ( lhs.first != rhs.first )
+ return lhs.second < rhs.second;
+ return lhs.first < rhs.second;
+ }
+ };
};
} // namespace hashing
struct traits_MultiLevelHashMap_city64 : public cc::multilevel_hashmap::traits
{
typedef ::hashing::city64 hash;
+ typedef ::hashing::city64::less less;
};
typedef MultiLevelHashMap< cds::gc::HP, Key, Value, traits_MultiLevelHashMap_city64 > MultiLevelHashMap_hp_city64;
typedef MultiLevelHashMap< cds::gc::DHP, Key, Value, traits_MultiLevelHashMap_city64 > MultiLevelHashMap_dhp_city64;
struct traits_MultiLevelHashMap_city128 : public cc::multilevel_hashmap::traits
{
typedef ::hashing::city128 hash;
+ typedef ::hashing::city128::less less;
};
typedef MultiLevelHashMap< cds::gc::HP, Key, Value, traits_MultiLevelHashMap_city128 > MultiLevelHashMap_hp_city128;
typedef MultiLevelHashMap< cds::gc::DHP, Key, Value, traits_MultiLevelHashMap_city128 > MultiLevelHashMap_dhp_city128;