libmoost
|
#include <dense_hash_map.hpp>
Classes | |
class | const_iterator |
struct | HashingPolicy |
class | writer |
Public Types | |
typedef Key | key_type |
typedef T | mapped_type |
typedef pod_pair< Key, T > | value_type |
typedef size_t | size_type |
typedef const value_type & | const_reference |
typedef const value_type * | const_pointer |
typedef std::forward_iterator_tag | iterator_category |
Public Member Functions | |
mmd_dense_hash_map () | |
mmd_dense_hash_map (const memory_mapped_dataset &mmd, const std::string &name) | |
void | set (const memory_mapped_dataset &mmd, const std::string &name) |
void | warm_cache () const |
const_iterator | begin () const |
const_iterator | end () const |
size_type | size () const |
size_type | capacity () const |
bool | empty () const |
const key_type & | empty_key () const |
const_iterator | find (const key_type &key) const |
const mapped_type & | operator[] (const key_type &key) const |
Static Public Member Functions | |
static float | MAX_POPULATION_RATIO () |
Static Public Attributes | |
static const size_t | MMD_HASH_ALIGNMENT = 16 |
Private Member Functions | |
BOOST_STATIC_ASSERT_MSG (boost::is_pod< Key >::value,"mmd_dense_hash_map<> template can only handle POD key types") | |
BOOST_STATIC_ASSERT_MSG (boost::is_pod< T >::value,"mmd_dense_hash_map<> template can only handle POD value types") | |
size_type | find (const key_type &key, const value_type *begin, size_type size) const |
Private Attributes | |
size_type | m_size |
size_type | m_population |
const value_type * | m_begin |
key_type | m_empty_key |
Friends | |
class | const_iterator |
Memory-mapped dataset section representing a POD dense hash map
This section provides extremely fast lookups at the expense of consuming more memory. It is suitable for medium sized high-performance hash maps. Thanks to some simplifications that could be made due to the read-only character of the memory-mapped dense hash map, read access is about 30% faster than using google's dense hash map implementation.
This is not a multimap, so there can only be one value per key. Just sayin' in case that wasn't obvious. ;)
Definition at line 58 of file dense_hash_map.hpp.
typedef const value_type* moost::container::mmd_dense_hash_map< Key, T, HashFcn >::const_pointer |
Definition at line 81 of file dense_hash_map.hpp.
typedef const value_type& moost::container::mmd_dense_hash_map< Key, T, HashFcn >::const_reference |
Definition at line 80 of file dense_hash_map.hpp.
typedef std::forward_iterator_tag moost::container::mmd_dense_hash_map< Key, T, HashFcn >::iterator_category |
Definition at line 83 of file dense_hash_map.hpp.
typedef Key moost::container::mmd_dense_hash_map< Key, T, HashFcn >::key_type |
Definition at line 74 of file dense_hash_map.hpp.
typedef T moost::container::mmd_dense_hash_map< Key, T, HashFcn >::mapped_type |
Definition at line 75 of file dense_hash_map.hpp.
typedef size_t moost::container::mmd_dense_hash_map< Key, T, HashFcn >::size_type |
Definition at line 78 of file dense_hash_map.hpp.
typedef pod_pair<Key, T> moost::container::mmd_dense_hash_map< Key, T, HashFcn >::value_type |
Definition at line 76 of file dense_hash_map.hpp.
moost::container::mmd_dense_hash_map< Key, T, HashFcn >::mmd_dense_hash_map | ( | ) | [inline] |
Definition at line 338 of file dense_hash_map.hpp.
moost::container::mmd_dense_hash_map< Key, T, HashFcn >::mmd_dense_hash_map | ( | const memory_mapped_dataset & | mmd, |
const std::string & | name | ||
) | [inline] |
Definition at line 345 of file dense_hash_map.hpp.
const_iterator moost::container::mmd_dense_hash_map< Key, T, HashFcn >::begin | ( | ) | const [inline] |
Definition at line 381 of file dense_hash_map.hpp.
moost::container::mmd_dense_hash_map< Key, T, HashFcn >::BOOST_STATIC_ASSERT_MSG | ( | boost::is_pod< Key >::value | , |
"mmd_dense_hash_map<> template can only handle POD key types" | |||
) | [private] |
moost::container::mmd_dense_hash_map< Key, T, HashFcn >::BOOST_STATIC_ASSERT_MSG | ( | boost::is_pod< T >::value | , |
"mmd_dense_hash_map<> template can only handle POD value types" | |||
) | [private] |
size_type moost::container::mmd_dense_hash_map< Key, T, HashFcn >::capacity | ( | ) | const [inline] |
bool moost::container::mmd_dense_hash_map< Key, T, HashFcn >::empty | ( | ) | const [inline] |
Definition at line 401 of file dense_hash_map.hpp.
const key_type& moost::container::mmd_dense_hash_map< Key, T, HashFcn >::empty_key | ( | ) | const [inline] |
const_iterator moost::container::mmd_dense_hash_map< Key, T, HashFcn >::end | ( | ) | const [inline] |
Definition at line 386 of file dense_hash_map.hpp.
const_iterator moost::container::mmd_dense_hash_map< Key, T, HashFcn >::find | ( | const key_type & | key | ) | const [inline] |
size_type moost::container::mmd_dense_hash_map< Key, T, HashFcn >::find | ( | const key_type & | key, |
const value_type * | begin, | ||
size_type | size | ||
) | const [inline, private] |
static float moost::container::mmd_dense_hash_map< Key, T, HashFcn >::MAX_POPULATION_RATIO | ( | ) | [inline, static] |
Definition at line 68 of file dense_hash_map.hpp.
const mapped_type& moost::container::mmd_dense_hash_map< Key, T, HashFcn >::operator[] | ( | const key_type & | key | ) | const [inline] |
void moost::container::mmd_dense_hash_map< Key, T, HashFcn >::set | ( | const memory_mapped_dataset & | mmd, |
const std::string & | name | ||
) | [inline] |
Definition at line 350 of file dense_hash_map.hpp.
size_type moost::container::mmd_dense_hash_map< Key, T, HashFcn >::size | ( | ) | const [inline] |
void moost::container::mmd_dense_hash_map< Key, T, HashFcn >::warm_cache | ( | ) | const [inline] |
Definition at line 376 of file dense_hash_map.hpp.
friend class const_iterator [friend] |
Definition at line 63 of file dense_hash_map.hpp.
const value_type* moost::container::mmd_dense_hash_map< Key, T, HashFcn >::m_begin [private] |
Definition at line 455 of file dense_hash_map.hpp.
key_type moost::container::mmd_dense_hash_map< Key, T, HashFcn >::m_empty_key [private] |
Definition at line 456 of file dense_hash_map.hpp.
size_type moost::container::mmd_dense_hash_map< Key, T, HashFcn >::m_population [private] |
Definition at line 454 of file dense_hash_map.hpp.
size_type moost::container::mmd_dense_hash_map< Key, T, HashFcn >::m_size [private] |
Definition at line 453 of file dense_hash_map.hpp.
const size_t moost::container::mmd_dense_hash_map< Key, T, HashFcn >::MMD_HASH_ALIGNMENT = 16 [static] |
Definition at line 66 of file dense_hash_map.hpp.