proxygen
folly::f14::detail::F14BasicSet< K, H, E, A > Class Template Reference

#include <F14Set.h>

Inheritance diagram for folly::f14::detail::F14BasicSet< K, H, E, A >:

Public Member Functions

 F14BasicSet ()=default
 
std::size_t getAllocatedMemorySize () const
 
template<typename V >
void visitAllocationClasses (V &&visitor) const
 
template<typename V >
void visitContiguousRanges (V &&visitor) const
 

Private Types

using Super = std::unordered_set< K, H, E, A >
 

Detailed Description

template<typename K, typename H, typename E, typename A>
class folly::f14::detail::F14BasicSet< K, H, E, A >

Definition at line 49 of file F14Set.h.

Member Typedef Documentation

template<typename K, typename H, typename E, typename A>
using folly::f14::detail::F14BasicSet< K, H, E, A >::Super = std::unordered_set<K, H, E, A>
private

Definition at line 50 of file F14Set.h.

Constructor & Destructor Documentation

template<typename K, typename H, typename E, typename A>
folly::f14::detail::F14BasicSet< K, H, E, A >::F14BasicSet ( )
default

Member Function Documentation

template<typename K, typename H, typename E, typename A>
std::size_t folly::f14::detail::F14BasicSet< K, H, E, A >::getAllocatedMemorySize ( ) const
inline

Definition at line 63 of file F14Set.h.

Referenced by folly::F14VectorSet< Key, Hasher, KeyEqual, Alloc >::operator=().

63  {
64  std::size_t rv = 0;
66  [&](std::size_t bytes, std::size_t n) { rv += bytes * n; });
67  return rv;
68  }
void visitAllocationClasses(V &&visitor) const
Definition: F14Set.h:72
template<typename K, typename H, typename E, typename A>
template<typename V >
void folly::f14::detail::F14BasicSet< K, H, E, A >::visitAllocationClasses ( V &&  visitor) const
inline

Definition at line 72 of file F14Set.h.

Referenced by folly::f14::detail::F14BasicSet< Key, Hasher, KeyEqual, Alloc >::getAllocatedMemorySize(), and folly::F14VectorSet< Key, Hasher, KeyEqual, Alloc >::operator=().

72  {
73  auto bc = this->bucket_count();
74  if (bc > 1) {
75  visitor(bc * sizeof(pointer), 1);
76  }
77  if (this->size() > 0) {
78  visitor(sizeof(StdNodeReplica<K, value_type, H>), this->size());
79  }
80  }
constexpr auto size(C const &c) -> decltype(c.size())
Definition: Access.h:45
template<typename K, typename H, typename E, typename A>
template<typename V >
void folly::f14::detail::F14BasicSet< K, H, E, A >::visitContiguousRanges ( V &&  visitor) const
inline

Definition at line 83 of file F14Set.h.

Referenced by folly::F14VectorSet< Key, Hasher, KeyEqual, Alloc >::operator=().

83  {
84  for (value_type const& entry : *this) {
85  value_type const* b = std::addressof(entry);
86  visitor(b, b + 1);
87  }
88  }
char b

The documentation for this class was generated from the following file: