NIM 跨平台 C++ SDK
载入中...
搜索中...
未找到
phmap::parallel_node_hash_map< Key, Value, Hash, Eq, Alloc, N, Mtx_ > 模板类 参考

#include <phmap.h>

类 phmap::parallel_node_hash_map< Key, Value, Hash, Eq, Alloc, N, Mtx_ > 继承关系图:
phmap::priv::parallel_hash_map< N, phmap::priv::raw_hash_set, Mtx_, phmap::priv::NodeHashMapPolicy< Key, Value >, Hash, Eq, Alloc > phmap::priv::parallel_hash_set< N, RefSet, Mtx_, Policy, Hash, Eq, Alloc >

Public 成员函数

 parallel_node_hash_map ()
 
Base::hasher hash_funct ()
 
void resize (typename Base::size_type hint)
 
- Public 成员函数 继承自 phmap::priv::parallel_hash_map< N, phmap::priv::raw_hash_set, Mtx_, phmap::priv::NodeHashMapPolicy< Key, Value >, Hash, Eq, Alloc >
 parallel_hash_map ()
 
std::pair< iterator, boolinsert_or_assign (key_arg< K > &&k, V &&v)
 
std::pair< iterator, boolinsert_or_assign (key_arg< K > &&k, const V &v)
 
std::pair< iterator, boolinsert_or_assign (const key_arg< K > &k, V &&v)
 
std::pair< iterator, boolinsert_or_assign (const key_arg< K > &k, const V &v)
 
iterator insert_or_assign (const_iterator, key_arg< K > &&k, V &&v)
 
iterator insert_or_assign (const_iterator, key_arg< K > &&k, const V &v)
 
iterator insert_or_assign (const_iterator, const key_arg< K > &k, V &&v)
 
iterator insert_or_assign (const_iterator, const key_arg< K > &k, const V &v)
 
std::pair< iterator, booltry_emplace (key_arg< K > &&k, Args &&... args)
 
std::pair< iterator, booltry_emplace (const key_arg< K > &k, Args &&... args)
 
iterator try_emplace (const_iterator, key_arg< K > &&k, Args &&... args)
 
iterator try_emplace (const_iterator, const key_arg< K > &k, Args &&... args)
 
MappedReference< P > at (const key_arg< K > &key)
 
MappedConstReference< P > at (const key_arg< K > &key) const
 
std::pair< iterator, booltry_emplace_with_hash (size_t hashval, key_arg< K > &&k, Args &&... args)
 
std::pair< iterator, booltry_emplace_with_hash (size_t hashval, const key_arg< K > &k, Args &&... args)
 
iterator try_emplace_with_hash (size_t hashval, const_iterator, key_arg< K > &&k, Args &&... args)
 
iterator try_emplace_with_hash (size_t hashval, const_iterator, const key_arg< K > &k, Args &&... args)
 
bool try_emplace_l (K &&k, F &&f, Args &&... args)
 
MappedReference< P > operator[] (key_arg< K > &&key)
 
MappedReference< P > operator[] (const key_arg< K > &key)
 
- Public 成员函数 继承自 phmap::priv::parallel_hash_set< N, RefSet, Mtx_, Policy, Hash, Eq, Alloc >
 parallel_hash_set () noexcept(std::is_nothrow_default_constructible< hasher >::value &&std::is_nothrow_default_constructible< key_equal >::value &&std::is_nothrow_default_constructible< allocator_type >::value)
 
 parallel_hash_set (size_t bucket_cnt, const hasher &hash_param=hasher(), const key_equal &eq=key_equal(), const allocator_type &alloc=allocator_type())
 
 parallel_hash_set (size_t bucket_cnt, const hasher &hash_param, const allocator_type &alloc)
 
 parallel_hash_set (size_t bucket_cnt, const allocator_type &alloc)
 
 parallel_hash_set (const allocator_type &alloc)
 
template<class InputIter >
 parallel_hash_set (InputIter first, InputIter last, size_t bucket_cnt=0, const hasher &hash_param=hasher(), const key_equal &eq=key_equal(), const allocator_type &alloc=allocator_type())
 
template<class InputIter >
 parallel_hash_set (InputIter first, InputIter last, size_t bucket_cnt, const hasher &hash_param, const allocator_type &alloc)
 
template<class InputIter >
 parallel_hash_set (InputIter first, InputIter last, size_t bucket_cnt, const allocator_type &alloc)
 
template<class InputIter >
 parallel_hash_set (InputIter first, InputIter last, const allocator_type &alloc)
 
template<class T , RequiresNotInit< T > = 0, RequiresInsertable< T > = 0>
 parallel_hash_set (std::initializer_list< T > init, size_t bucket_cnt=0, const hasher &hash_param=hasher(), const key_equal &eq=key_equal(), const allocator_type &alloc=allocator_type())
 
 parallel_hash_set (std::initializer_list< init_type > init, size_t bucket_cnt=0, const hasher &hash_param=hasher(), const key_equal &eq=key_equal(), const allocator_type &alloc=allocator_type())
 
template<class T , RequiresNotInit< T > = 0, RequiresInsertable< T > = 0>
 parallel_hash_set (std::initializer_list< T > init, size_t bucket_cnt, const hasher &hash_param, const allocator_type &alloc)
 
 parallel_hash_set (std::initializer_list< init_type > init, size_t bucket_cnt, const hasher &hash_param, const allocator_type &alloc)
 
template<class T , RequiresNotInit< T > = 0, RequiresInsertable< T > = 0>
 parallel_hash_set (std::initializer_list< T > init, size_t bucket_cnt, const allocator_type &alloc)
 
 parallel_hash_set (std::initializer_list< init_type > init, size_t bucket_cnt, const allocator_type &alloc)
 
template<class T , RequiresNotInit< T > = 0, RequiresInsertable< T > = 0>
 parallel_hash_set (std::initializer_list< T > init, const allocator_type &alloc)
 
 parallel_hash_set (std::initializer_list< init_type > init, const allocator_type &alloc)
 
 parallel_hash_set (const parallel_hash_set &that)
 
 parallel_hash_set (const parallel_hash_set &that, const allocator_type &a)
 
 parallel_hash_set (parallel_hash_set &&that) noexcept(std::is_nothrow_copy_constructible< hasher >::value &&std::is_nothrow_copy_constructible< key_equal >::value &&std::is_nothrow_copy_constructible< allocator_type >::value)
 
 parallel_hash_set (parallel_hash_set &&that, const allocator_type &a)
 
parallel_hash_setoperator= (const parallel_hash_set &that)
 
parallel_hash_setoperator= (parallel_hash_set &&that) noexcept(phmap::allocator_traits< allocator_type >::is_always_equal::value &&std::is_nothrow_move_assignable< hasher >::value &&std::is_nothrow_move_assignable< key_equal >::value)
 
 ~parallel_hash_set ()
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
bool empty () const
 
size_t size () const
 
size_t capacity () const
 
size_t max_size () const
 
PHMAP_ATTRIBUTE_REINITIALIZES void clear ()
 
void clear (std::size_t submap_index)
 
template<class T , RequiresInsertable< T > = 0, typename std::enable_if< IsDecomposable< T >::value, int >::type = 0, T * = nullptr>
std::pair< iterator, boolinsert (T &&value)
 
template<class T , RequiresInsertable< T > = 0, typename std::enable_if< IsDecomposable< const T & >::value, int >::type = 0>
std::pair< iterator, boolinsert (const T &value)
 
std::pair< iterator, boolinsert (init_type &&value)
 
template<class T , RequiresInsertable< T > = 0, typename std::enable_if< IsDecomposable< T >::value, int >::type = 0, T * = nullptr>
iterator insert (const_iterator, T &&value)
 
template<class T , RequiresInsertable< T > = 0, typename std::enable_if< IsDecomposable< const T & >::value, int >::type = 0>
iterator insert (const_iterator, const T &value)
 
iterator insert (const_iterator, init_type &&value)
 
template<class InputIt >
void insert (InputIt first, InputIt last)
 
template<class T , RequiresNotInit< T > = 0, RequiresInsertable< const T & > = 0>
void insert (std::initializer_list< T > ilist)
 
void insert (std::initializer_list< init_type > ilist)
 
insert_return_type insert (node_type &&node)
 
iterator insert (const_iterator, node_type &&node)
 
template<class K , class... Args>
std::pair< iterator, boolemplace_decomposable_with_hash (const K &key, size_t hashval, Args &&... args)
 
template<class... Args, typename std::enable_if< IsDecomposable< Args... >::value, int >::type = 0>
std::pair< iterator, boolemplace_with_hash (size_t hashval, Args &&... args)
 
template<class... Args, typename std::enable_if< !IsDecomposable< Args... >::value, int >::type = 0>
std::pair< iterator, boolemplace_with_hash (size_t hashval, Args &&... args)
 
template<class... Args>
iterator emplace_hint_with_hash (size_t hashval, const_iterator, Args &&... args)
 
template<class K = key_type, class F >
iterator lazy_emplace_with_hash (const key_arg< K > &key, size_t hashval, F &&f)
 
template<class K , class... Args>
std::pair< iterator, boolemplace_decomposable (const K &key, Args &&... args)
 
template<class... Args, typename std::enable_if< IsDecomposable< Args... >::value, int >::type = 0>
std::pair< iterator, boolemplace (Args &&... args)
 
template<class... Args, typename std::enable_if< !IsDecomposable< Args... >::value, int >::type = 0>
std::pair< iterator, boolemplace (Args &&... args)
 
template<class... Args>
iterator emplace_hint (const_iterator, Args &&... args)
 
iterator make_iterator (Inner *inner, const EmbeddedIterator it)
 
std::pair< iterator, boolmake_rv (Inner *inner, const std::pair< EmbeddedIterator, bool > &res)
 
template<class K = key_type, class F >
iterator lazy_emplace (const key_arg< K > &key, F &&f)
 
template<class K = key_type, class F >
void emplace_single_with_hash (const key_arg< K > &key, size_t hashval, F &&f)
 
template<class K = key_type, class F >
void emplace_single (const key_arg< K > &key, F &&f)
 
template<class K = key_type, class F >
bool if_contains (const key_arg< K > &key, F &&f) const
 
template<class K = key_type, class F >
bool if_contains_unsafe (const key_arg< K > &key, F &&f) const
 
template<class K = key_type, class F >
bool modify_if (const key_arg< K > &key, F &&f)
 
template<class K = key_type, class F , class L >
bool modify_if_impl (const key_arg< K > &key, F &&f)
 
template<class K = key_type, class F >
bool erase_if (const key_arg< K > &key, F &&f)
 
template<class K = key_type, class F , class L >
bool erase_if_impl (const key_arg< K > &key, F &&f)
 
template<class K = key_type, class FExists , class FEmplace >
bool lazy_emplace_l (const key_arg< K > &key, FExists &&fExists, FEmplace &&fEmplace)
 
template<class F >
void for_each (F &&fCallback) const
 
template<class F >
void for_each_m (F &&fCallback)
 
template<class F >
void with_submap (size_t idx, F &&fCallback) const
 
template<class F >
void with_submap_m (size_t idx, F &&fCallback)
 
Innerget_inner (size_t idx)
 
template<class K = key_type>
size_type erase (const key_arg< K > &key)
 
iterator erase (const_iterator cit)
 
void _erase (iterator it)
 
void _erase (const_iterator cit)
 
iterator erase (iterator it)
 
iterator erase (const_iterator first, const_iterator last)
 
template<typename E = Eq>
void merge (parallel_hash_set< N, RefSet, Mtx_, Policy, Hash, E, Alloc > &src)
 
template<typename E = Eq>
void merge (parallel_hash_set< N, RefSet, Mtx_, Policy, Hash, E, Alloc > &&src)
 
node_type extract (const_iterator position)
 
template<class K = key_type, typename std::enable_if<!std::is_same< K, iterator >::value, int >::type = 0>
node_type extract (const key_arg< K > &key)
 
template<class Mtx2_ >
void swap (parallel_hash_set< N, RefSet, Mtx2_, Policy, Hash, Eq, Alloc > &that) noexcept(IsNoThrowSwappable< EmbeddedSet >() &&(!AllocTraits::propagate_on_container_swap::value||IsNoThrowSwappable< allocator_type >()))
 
void rehash (size_t n)
 
void reserve (size_t n)
 
template<class K = key_type>
size_t count (const key_arg< K > &key) const
 
void prefetch_hash (size_t hashval) const
 
template<class K = key_type>
void prefetch (const key_arg< K > &key) const
 
template<class K = key_type>
iterator find (const key_arg< K > &key, size_t hashval)
 
template<class K = key_type>
iterator find (const key_arg< K > &key)
 
template<class K = key_type>
const_iterator find (const key_arg< K > &key, size_t hashval) const
 
template<class K = key_type>
const_iterator find (const key_arg< K > &key) const
 
template<class K = key_type>
bool contains (const key_arg< K > &key) const
 
template<class K = key_type>
bool contains (const key_arg< K > &key, size_t hashval) const
 
template<class K = key_type>
std::pair< iterator, iteratorequal_range (const key_arg< K > &key)
 
template<class K = key_type>
std::pair< const_iterator, const_iteratorequal_range (const key_arg< K > &key) const
 
size_t bucket_count () const
 
float load_factor () const
 
float max_load_factor () const
 
void max_load_factor (float)
 
hasher hash_function () const
 
key_equal key_eq () const
 
allocator_type get_allocator () const
 
template<class K >
size_t hash (const K &key) const
 
template<typename OutputArchive >
bool phmap_dump (OutputArchive &ar) const
 
template<typename InputArchive >
bool phmap_load (InputArchive &ar)
 

Private 类型

using Base = typename parallel_node_hash_map::parallel_hash_map
 

额外继承的成员函数

- Public 类型 继承自 phmap::priv::parallel_hash_map< N, phmap::priv::raw_hash_set, Mtx_, phmap::priv::NodeHashMapPolicy< Key, Value >, Hash, Eq, Alloc >
using key_type
 
using mapped_type
 
using value_type
 
using key_arg
 
using iterator
 
using const_iterator
 
- Public 类型 继承自 phmap::priv::parallel_hash_set< N, RefSet, Mtx_, Policy, Hash, Eq, Alloc >
using EmbeddedSet = RefSet<Policy, Hash, Eq, Alloc>
 
using EmbeddedIterator = typename EmbeddedSet::iterator
 
using EmbeddedConstIterator = typename EmbeddedSet::const_iterator
 
using constructor = typename EmbeddedSet::constructor
 
using init_type = typename PolicyTraits::init_type
 
using key_type = typename PolicyTraits::key_type
 
using slot_type = typename PolicyTraits::slot_type
 
using allocator_type = Alloc
 
using size_type = size_t
 
using difference_type = ptrdiff_t
 
using hasher = Hash
 
using key_equal = Eq
 
using policy_type = Policy
 
using value_type = typename PolicyTraits::value_type
 
using reference = value_type&
 
using const_reference = const value_type&
 
using pointer
 
using const_pointer
 
template<class K >
using key_arg = typename KeyArgImpl::template type<K, key_type>
 
using node_type = node_handle<Policy, hash_policy_traits<Policy>, Alloc>
 
using insert_return_type = InsertReturnType<iterator, node_type>
 
- Protected 类型 继承自 phmap::priv::parallel_hash_set< N, RefSet, Mtx_, Policy, Hash, Eq, Alloc >
using Lockable = phmap::LockableImpl<Mtx_>
 
- Protected 成员函数 继承自 phmap::priv::parallel_hash_set< N, RefSet, Mtx_, Policy, Hash, Eq, Alloc >
template<class K = key_type, class L = typename Lockable::SharedLock>
pointer find_ptr (const key_arg< K > &key, size_t hashval, L &mutexlock)
 
template<class K = key_type, class L = typename Lockable::SharedLock>
iterator find (const key_arg< K > &key, size_t hashval, L &mutexlock)
 
template<class K >
std::tuple< Inner *, size_t, boolfind_or_prepare_insert_with_hash (size_t hashval, const K &key, typename Lockable::UniqueLock &mutexlock)
 
template<class K >
std::tuple< Inner *, size_t, boolfind_or_prepare_insert (const K &key, typename Lockable::UniqueLock &mutexlock)
 
iterator iterator_at (Inner *inner, const EmbeddedIterator &it)
 
const_iterator iterator_at (Inner *inner, const EmbeddedIterator &it) const
 
- 静态 Protected 成员函数 继承自 phmap::priv::parallel_hash_set< N, RefSet, Mtx_, Policy, Hash, Eq, Alloc >
static size_t subidx (size_t hashval)
 
static size_t subcnt ()
 
- Protected 属性 继承自 phmap::priv::parallel_hash_set< N, RefSet, Mtx_, Policy, Hash, Eq, Alloc >
std::array< Inner, num_tablessets_
 

成员类型定义说明

◆ Base

template<class Key , class Value , class Hash , class Eq , class Alloc , size_t N, class Mtx_ >
using phmap::parallel_node_hash_map< Key, Value, Hash, Eq, Alloc, N, Mtx_ >::Base = typename parallel_node_hash_map::parallel_hash_map
private

构造及析构函数说明

◆ parallel_node_hash_map()

template<class Key , class Value , class Hash , class Eq , class Alloc , size_t N, class Mtx_ >
phmap::parallel_node_hash_map< Key, Value, Hash, Eq, Alloc, N, Mtx_ >::parallel_node_hash_map ( )
inline

成员函数说明

◆ hash_funct()

template<class Key , class Value , class Hash , class Eq , class Alloc , size_t N, class Mtx_ >
Base::hasher phmap::parallel_node_hash_map< Key, Value, Hash, Eq, Alloc, N, Mtx_ >::hash_funct ( )
inline

◆ resize()

template<class Key , class Value , class Hash , class Eq , class Alloc , size_t N, class Mtx_ >
void phmap::parallel_node_hash_map< Key, Value, Hash, Eq, Alloc, N, Mtx_ >::resize ( typename Base::size_type hint)
inline

该类的文档由以下文件生成: