NIM 跨平台 C++ SDK
|
#include <phmap.h>
类 | |
class | const_iterator |
class | constructor |
struct | EmplaceDecomposable |
struct | EmplaceDecomposableHashval |
struct | EqualElement |
struct | FindElement |
struct | FindInfo |
struct | has_difference_operator |
struct | HashElement |
struct | InsertSlot |
struct | InsertSlotWithHash |
class | iterator |
struct | SameAsElementReference |
Public 类型 | |
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> |
template<typename It > | |
using | IsRandomAccess |
Public 成员函数 | |
raw_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) | |
raw_hash_set (size_t bucket_cnt, const hasher &hashfn=hasher(), const key_equal &eq=key_equal(), const allocator_type &alloc=allocator_type()) | |
raw_hash_set (size_t bucket_cnt, const hasher &hashfn, const allocator_type &alloc) | |
raw_hash_set (size_t bucket_cnt, const allocator_type &alloc) | |
raw_hash_set (const allocator_type &alloc) | |
template<class InputIter > | |
raw_hash_set (InputIter first, InputIter last, size_t bucket_cnt=0, const hasher &hashfn=hasher(), const key_equal &eq=key_equal(), const allocator_type &alloc=allocator_type()) | |
template<class InputIter > | |
raw_hash_set (InputIter first, InputIter last, size_t bucket_cnt, const hasher &hashfn, const allocator_type &alloc) | |
template<class InputIter > | |
raw_hash_set (InputIter first, InputIter last, size_t bucket_cnt, const allocator_type &alloc) | |
template<class InputIter > | |
raw_hash_set (InputIter first, InputIter last, const allocator_type &alloc) | |
template<class T , RequiresNotInit< T > = 0, RequiresInsertable< T > = 0> | |
raw_hash_set (std::initializer_list< T > init, size_t bucket_cnt=0, const hasher &hashfn=hasher(), const key_equal &eq=key_equal(), const allocator_type &alloc=allocator_type()) | |
raw_hash_set (std::initializer_list< init_type > init, size_t bucket_cnt=0, const hasher &hashfn=hasher(), const key_equal &eq=key_equal(), const allocator_type &alloc=allocator_type()) | |
template<class T , RequiresNotInit< T > = 0, RequiresInsertable< T > = 0> | |
raw_hash_set (std::initializer_list< T > init, size_t bucket_cnt, const hasher &hashfn, const allocator_type &alloc) | |
raw_hash_set (std::initializer_list< init_type > init, size_t bucket_cnt, const hasher &hashfn, const allocator_type &alloc) | |
template<class T , RequiresNotInit< T > = 0, RequiresInsertable< T > = 0> | |
raw_hash_set (std::initializer_list< T > init, size_t bucket_cnt, const allocator_type &alloc) | |
raw_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> | |
raw_hash_set (std::initializer_list< T > init, const allocator_type &alloc) | |
raw_hash_set (std::initializer_list< init_type > init, const allocator_type &alloc) | |
raw_hash_set (const raw_hash_set &that) | |
raw_hash_set (const raw_hash_set &that, const allocator_type &a) | |
raw_hash_set (raw_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) | |
raw_hash_set (raw_hash_set &&that, const allocator_type &a) | |
raw_hash_set & | operator= (const raw_hash_set &that) |
raw_hash_set & | operator= (raw_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) |
~raw_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 () |
template<class T , RequiresInsertable< T > = 0, typename std::enable_if< IsDecomposable< T >::value, int >::type = 0, T * = nullptr> | |
std::pair< iterator, bool > | insert (T &&value) |
template<class T , RequiresInsertable< T > = 0, typename std::enable_if< IsDecomposable< const T & >::value, int >::type = 0> | |
std::pair< iterator, bool > | insert (const T &value) |
std::pair< iterator, bool > | insert (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 , typename phmap::enable_if_t< has_difference_operator< InputIt >::value, int > = 0> | |
void | insert (InputIt first, InputIt last) |
template<class InputIt , typename phmap::enable_if_t<!has_difference_operator< InputIt >::value, int > = 0> | |
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) |
insert_return_type | insert (node_type &&node, size_t hashval) |
iterator | insert (const_iterator, node_type &&node) |
template<class... Args, typename std::enable_if< IsDecomposable< Args... >::value, int >::type = 0> | |
std::pair< iterator, bool > | emplace (Args &&... args) |
template<class... Args, typename std::enable_if< IsDecomposable< Args... >::value, int >::type = 0> | |
std::pair< iterator, bool > | emplace_with_hash (size_t hashval, Args &&... args) |
template<class... Args, typename std::enable_if< !IsDecomposable< Args... >::value, int >::type = 0> | |
std::pair< iterator, bool > | emplace (Args &&... args) |
template<class... Args, typename std::enable_if<!IsDecomposable< Args... >::value, int >::type = 0> | |
std::pair< iterator, bool > | emplace_with_hash (size_t hashval, Args &&... args) |
template<class... Args> | |
iterator | emplace_hint (const_iterator, 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 (const key_arg< K > &key, F &&f) |
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 = key_type, class F > | |
void | lazy_emplace_at (size_t &idx, 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> | |
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 H , typename E > | |
void | merge (raw_hash_set< Policy, H, E, Alloc > &src) |
template<typename H , typename E > | |
void | merge (raw_hash_set< Policy, H, 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) |
void | swap (raw_hash_set &that) noexcept(IsNoThrowSwappable< hasher >() &&IsNoThrowSwappable< key_equal >() &&(!AllocTraits::propagate_on_container_swap::value||IsNoThrowSwappable< allocator_type >())) |
template<typename OutputArchive > | |
bool | phmap_dump (OutputArchive &) const |
template<typename InputArchive > | |
bool | phmap_load (InputArchive &) |
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> | |
pointer | find_ptr (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, iterator > | equal_range (const key_arg< K > &key) |
template<class K = key_type> | |
std::pair< const_iterator, const_iterator > | equal_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 |
Protected 成员函数 | |
template<class K > | |
std::pair< size_t, bool > | find_or_prepare_insert (const K &key, size_t hashval) |
template<class K > | |
std::pair< size_t, bool > | find_or_prepare_insert (const K &key) |
size_t | prepare_insert (size_t hashval) PHMAP_ATTRIBUTE_NOINLINE |
template<class... Args> | |
void | emplace_at (size_t i, Args &&... args) |
iterator | iterator_at (size_t i) |
const_iterator | iterator_at (size_t i) const |
Private 类型 | |
using | PolicyTraits = hash_policy_traits<Policy> |
using | KeyArgImpl |
using | Layout = phmap::priv::Layout<ctrl_t, slot_type> |
using | AllocTraits = phmap::allocator_traits<allocator_type> |
using | SlotAlloc |
using | SlotAllocTraits |
template<class T > | |
using | RequiresInsertable |
template<class T > | |
using | RequiresNotInit |
template<class... Ts> | |
using | IsDecomposable = IsDecomposable<void, PolicyTraits, Hash, Eq, Ts...> |
Private 成员函数 | |
auto | KeyTypeCanBeHashed (const Hash &h, const key_type &k) -> decltype(h(k)) |
auto | KeyTypeCanBeEq (const Eq &eq, const key_type &k) -> decltype(eq(k, k)) |
template<class K = key_type> | |
bool | find_impl (const key_arg< K > &key, size_t hashval, size_t &offset) |
template<class K , class... Args> | |
std::pair< iterator, bool > | emplace_decomposable (const K &key, size_t hashval, Args &&... args) |
void | erase_meta_only (const_iterator it) |
void | initialize_slots (size_t new_capacity) |
void | destroy_slots () |
void | resize (size_t new_capacity) |
void | drop_deletes_without_resize () PHMAP_ATTRIBUTE_NOINLINE |
void | rehash_and_grow_if_necessary () |
bool | has_element (const value_type &elem, size_t hashval) const |
bool | has_element (const value_type &elem) const |
FindInfo | find_first_non_full (size_t hashval) |
raw_hash_set & | move_assign (raw_hash_set &&that, std::true_type) |
raw_hash_set & | move_assign (raw_hash_set &&that, std::false_type) |
probe_seq< Group::kWidth > | probe (size_t hashval) const |
void | reset_ctrl (size_t capacity) |
void | reset_growth_left (size_t capacity) |
void | set_ctrl (size_t i, ctrl_t h) |
size_t & | growth_left () |
bool | is_small () const |
hasher & | hash_ref () |
const hasher & | hash_ref () const |
key_equal & | eq_ref () |
const key_equal & | eq_ref () const |
allocator_type & | alloc_ref () |
const allocator_type & | alloc_ref () const |
静态 Private 成员函数 | |
static Layout | MakeLayout (size_t capacity) |
Private 属性 | |
ctrl_t * | ctrl_ = EmptyGroup() |
slot_type * | slots_ = nullptr |
size_t | size_ = 0 |
size_t | capacity_ = 0 |
HashtablezInfoHandle | infoz_ |
phmap::priv::CompressedTuple< size_t, hasher, key_equal, allocator_type > | settings_ {0, hasher{}, key_equal{}, allocator_type{}} |
友元 | |
template<class Container , typename Enabler > | |
struct | phmap::priv::hashtable_debug_internal::HashtableDebugAccess |
struct | RawHashSetTestOnlyAccess |
template<size_t N, template< class, class, class, class > class RefSet, class M , class P , class H , class E , class A > | |
class | parallel_hash_set |
template<size_t N, template< class, class, class, class > class RefSet, class M , class P , class H , class E , class A > | |
class | parallel_hash_map |
bool | operator== (const raw_hash_set &a, const raw_hash_set &b) |
bool | operator!= (const raw_hash_set &a, const raw_hash_set &b) |
void | swap (raw_hash_set &a, raw_hash_set &b) noexcept(noexcept(a.swap(b))) |
using phmap::priv::raw_hash_set< Policy, Hash, Eq, Alloc >::allocator_type = Alloc |
|
private |
using phmap::priv::raw_hash_set< Policy, Hash, Eq, Alloc >::const_pointer |
using phmap::priv::raw_hash_set< Policy, Hash, Eq, Alloc >::const_reference = const value_type& |
using phmap::priv::raw_hash_set< Policy, Hash, Eq, Alloc >::difference_type = ptrdiff_t |
using phmap::priv::raw_hash_set< Policy, Hash, Eq, Alloc >::hasher = Hash |
using phmap::priv::raw_hash_set< Policy, Hash, Eq, Alloc >::init_type = typename PolicyTraits::init_type |
using phmap::priv::raw_hash_set< Policy, Hash, Eq, Alloc >::insert_return_type = InsertReturnType<iterator, node_type> |
|
private |
using phmap::priv::raw_hash_set< Policy, Hash, Eq, Alloc >::IsRandomAccess |
using phmap::priv::raw_hash_set< Policy, Hash, Eq, Alloc >::key_arg = typename KeyArgImpl::template type<K, key_type> |
using phmap::priv::raw_hash_set< Policy, Hash, Eq, Alloc >::key_equal = Eq |
using phmap::priv::raw_hash_set< Policy, Hash, Eq, Alloc >::key_type = typename PolicyTraits::key_type |
|
private |
|
private |
using phmap::priv::raw_hash_set< Policy, Hash, Eq, Alloc >::node_type = node_handle<Policy, hash_policy_traits<Policy>, Alloc> |
using phmap::priv::raw_hash_set< Policy, Hash, Eq, Alloc >::pointer |
using phmap::priv::raw_hash_set< Policy, Hash, Eq, Alloc >::policy_type = Policy |
|
private |
using phmap::priv::raw_hash_set< Policy, Hash, Eq, Alloc >::reference = value_type& |
|
private |
|
private |
using phmap::priv::raw_hash_set< Policy, Hash, Eq, Alloc >::size_type = size_t |
using phmap::priv::raw_hash_set< Policy, Hash, Eq, Alloc >::slot_type = typename PolicyTraits::slot_type |
|
private |
|
private |
using phmap::priv::raw_hash_set< Policy, Hash, Eq, Alloc >::value_type = typename PolicyTraits::value_type |
|
inlinenoexcept |
|
inlineexplicit |
|
inline |
|
inline |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
private |
|
private |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestaticprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inlinenoexcept |
bool phmap::priv::raw_hash_set< Policy, Hash, Eq, Alloc >::phmap_dump | ( | OutputArchive & | ar | ) | const |
bool phmap::priv::raw_hash_set< Policy, Hash, Eq, Alloc >::phmap_load | ( | InputArchive & | ar | ) |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprivate |
|
inline |
|
inlineprivate |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inlinenoexcept |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |