proxygen
|
#include <ConcurrentSkipList-inl.h>
Classes | |
struct | DestroyIsNoOp |
Public Types | |
typedef T | value_type |
Public Member Functions | |
SkipListNode * | copyHead (SkipListNode *node) |
SkipListNode * | skip (int layer) const |
SkipListNode * | next () |
void | setSkip (uint8_t h, SkipListNode *next) |
value_type & | data () |
const value_type & | data () const |
int | maxLayer () const |
int | height () const |
std::unique_lock< MicroSpinLock > | acquireGuard () |
bool | fullyLinked () const |
bool | markedForRemoval () const |
bool | isHeadNode () const |
void | setIsHeadNode () |
void | setFullyLinked () |
void | setMarkedForRemoval () |
Static Public Member Functions | |
template<typename NodeAlloc , typename U , typename = typename std::enable_if<std::is_convertible<U, T>::value>::type> | |
static SkipListNode * | create (NodeAlloc &alloc, int height, U &&data, bool isHead=false) |
template<typename NodeAlloc > | |
static void | destroy (NodeAlloc &alloc, SkipListNode *node) |
Private Types | |
enum | : uint16_t { IS_HEAD_NODE = 1, MARKED_FOR_REMOVAL = (1 << 1), FULLY_LINKED = (1 << 2) } |
Private Member Functions | |
template<typename U > | |
SkipListNode (uint8_t height, U &&data, bool isHead) | |
~SkipListNode () | |
uint16_t | getFlags () const |
void | setFlags (uint16_t flags) |
Private Attributes | |
std::atomic< uint16_t > | flags_ |
const uint8_t | height_ |
MicroSpinLock | spinLock_ |
value_type | data_ |
std::atomic< SkipListNode * > | skip_ [0] |
Definition at line 46 of file ConcurrentSkipList-inl.h.
typedef T folly::detail::SkipListNode< T >::value_type |
Definition at line 54 of file ConcurrentSkipList-inl.h.
|
private |
Enumerator | |
---|---|
IS_HEAD_NODE | |
MARKED_FOR_REMOVAL | |
FULLY_LINKED |
Definition at line 47 of file ConcurrentSkipList-inl.h.
|
inlineprivate |
Definition at line 155 of file ConcurrentSkipList-inl.h.
References folly::detail::SkipListNode< T >::height_, i, folly::MicroSpinLock::init(), folly::detail::SkipListNode< T >::setFlags(), folly::detail::SkipListNode< T >::setIsHeadNode(), folly::detail::SkipListNode< T >::skip_, folly::detail::SkipListNode< T >::spinLock_, and uint8_t.
Referenced by folly::detail::SkipListNode< T >::create(), and folly::detail::SkipListNode< T >::destroy().
|
inlineprivate |
Definition at line 168 of file ConcurrentSkipList-inl.h.
References folly::detail::SkipListNode< T >::height_, i, folly::detail::SkipListNode< T >::skip_, and uint8_t.
Referenced by folly::detail::SkipListNode< T >::destroy().
|
inline |
Definition at line 128 of file ConcurrentSkipList-inl.h.
References folly::detail::SkipListNode< T >::spinLock_.
Referenced by folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::growHeight(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::lockNodesForChange(), and folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::remove().
|
inline |
Definition at line 87 of file ConcurrentSkipList-inl.h.
References folly::detail::SkipListNode< T >::getFlags(), folly::detail::SkipListNode< T >::height_, i, folly::detail::SkipListNode< T >::setFlags(), folly::detail::SkipListNode< T >::setSkip(), folly::detail::SkipListNode< T >::skip(), and uint8_t.
Referenced by folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::growHeight().
|
inlinestatic |
Definition at line 62 of file ConcurrentSkipList-inl.h.
References folly::detail::SkipListNode< T >::data(), folly::detail::SkipListNode< T >::height(), folly::size(), folly::detail::SkipListNode< T >::SkipListNode(), and uint8_t.
Referenced by folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::addOrGetData(), and folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::growHeight().
|
inline |
Definition at line 115 of file ConcurrentSkipList-inl.h.
References folly::detail::SkipListNode< T >::data_.
Referenced by folly::detail::SkipListNode< T >::create(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::greater(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::last(), and folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::less().
|
inline |
Definition at line 118 of file ConcurrentSkipList-inl.h.
References folly::detail::SkipListNode< T >::data_.
|
inlinestatic |
Definition at line 74 of file ConcurrentSkipList-inl.h.
References folly::detail::SkipListNode< T >::height_, folly::size(), folly::detail::SkipListNode< T >::SkipListNode(), and folly::detail::SkipListNode< T >::~SkipListNode().
Referenced by folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::growHeight(), and folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::~ConcurrentSkipList().
|
inline |
Definition at line 132 of file ConcurrentSkipList-inl.h.
References folly::detail::SkipListNode< T >::FULLY_LINKED, and folly::detail::SkipListNode< T >::getFlags().
Referenced by folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::addOrGetData(), and folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::okToDelete().
|
inlineprivate |
Definition at line 174 of file ConcurrentSkipList-inl.h.
References folly::detail::SkipListNode< T >::flags_.
Referenced by folly::detail::SkipListNode< T >::copyHead(), folly::detail::SkipListNode< T >::fullyLinked(), folly::detail::SkipListNode< T >::isHeadNode(), folly::detail::SkipListNode< T >::markedForRemoval(), folly::detail::SkipListNode< T >::setFullyLinked(), folly::detail::SkipListNode< T >::setIsHeadNode(), and folly::detail::SkipListNode< T >::setMarkedForRemoval().
|
inline |
Definition at line 124 of file ConcurrentSkipList-inl.h.
References folly::detail::SkipListNode< T >::height_.
Referenced by folly::detail::SkipListNode< T >::create(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::findNodeDownRight(), folly::detail::SkipListRandomHeight::getSizeLimit(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::growHeight(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::Skipper::init(), and folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::remove().
|
inline |
Definition at line 138 of file ConcurrentSkipList-inl.h.
References folly::detail::SkipListNode< T >::getFlags(), and folly::detail::SkipListNode< T >::IS_HEAD_NODE.
|
inline |
Definition at line 135 of file ConcurrentSkipList-inl.h.
References folly::detail::SkipListNode< T >::getFlags(), and folly::detail::SkipListNode< T >::MARKED_FOR_REMOVAL.
Referenced by folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::addOrGetData(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::lockNodesForChange(), folly::detail::SkipListNode< T >::next(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::okToDelete(), and folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::remove().
|
inline |
Definition at line 121 of file ConcurrentSkipList-inl.h.
References folly::detail::SkipListNode< T >::height_.
Referenced by folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::okToDelete().
|
inline |
Definition at line 102 of file ConcurrentSkipList-inl.h.
References folly::detail::SkipListNode< T >::markedForRemoval(), and folly::detail::SkipListNode< T >::skip().
Referenced by folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::Accessor::begin().
|
inlineprivate |
Definition at line 177 of file ConcurrentSkipList-inl.h.
References folly::detail::SkipListNode< T >::flags_.
Referenced by folly::detail::SkipListNode< T >::copyHead(), folly::detail::SkipListNode< T >::setFullyLinked(), folly::detail::SkipListNode< T >::setIsHeadNode(), folly::detail::SkipListNode< T >::setMarkedForRemoval(), and folly::detail::SkipListNode< T >::SkipListNode().
|
inline |
Definition at line 145 of file ConcurrentSkipList-inl.h.
References folly::detail::SkipListNode< T >::FULLY_LINKED, folly::detail::SkipListNode< T >::getFlags(), folly::detail::SkipListNode< T >::setFlags(), and uint16_t.
Referenced by folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::addOrGetData().
|
inline |
Definition at line 142 of file ConcurrentSkipList-inl.h.
References folly::detail::SkipListNode< T >::getFlags(), folly::detail::SkipListNode< T >::IS_HEAD_NODE, folly::detail::SkipListNode< T >::setFlags(), and uint16_t.
Referenced by folly::detail::SkipListNode< T >::SkipListNode().
|
inline |
Definition at line 148 of file ConcurrentSkipList-inl.h.
References folly::detail::SkipListNode< T >::getFlags(), folly::detail::SkipListNode< T >::MARKED_FOR_REMOVAL, folly::detail::SkipListNode< T >::setFlags(), and uint16_t.
Referenced by folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::growHeight(), and folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::remove().
|
inline |
Definition at line 110 of file ConcurrentSkipList-inl.h.
References h, folly::detail::SkipListNode< T >::height_, and folly::detail::SkipListNode< T >::skip_.
Referenced by folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::addOrGetData(), folly::detail::SkipListNode< T >::copyHead(), and folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::remove().
|
inline |
Definition at line 96 of file ConcurrentSkipList-inl.h.
References folly::detail::SkipListNode< T >::height_, and folly::detail::SkipListNode< T >::skip_.
Referenced by folly::detail::SkipListNode< T >::copyHead(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::findInsertionPoint(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::findNodeDownRight(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::findNodeRightDown(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::Skipper::init(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::last(), folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::lockNodesForChange(), folly::detail::SkipListNode< T >::next(), and folly::ConcurrentSkipList< T, Comp, NodeAlloc, MAX_HEIGHT >::remove().
|
private |
Definition at line 189 of file ConcurrentSkipList-inl.h.
Referenced by folly::detail::SkipListNode< T >::data().
|
private |
Definition at line 185 of file ConcurrentSkipList-inl.h.
Referenced by folly::detail::SkipListNode< T >::getFlags(), and folly::detail::SkipListNode< T >::setFlags().
|
private |
Definition at line 186 of file ConcurrentSkipList-inl.h.
Referenced by folly::detail::SkipListNode< T >::copyHead(), folly::detail::SkipListNode< T >::destroy(), folly::detail::SkipListNode< T >::height(), folly::detail::SkipListNode< T >::maxLayer(), folly::detail::SkipListNode< T >::setSkip(), folly::detail::SkipListNode< T >::skip(), folly::detail::SkipListNode< T >::SkipListNode(), and folly::detail::SkipListNode< T >::~SkipListNode().
|
private |
Definition at line 191 of file ConcurrentSkipList-inl.h.
Referenced by folly::detail::SkipListNode< T >::setSkip(), folly::detail::SkipListNode< T >::skip(), folly::detail::SkipListNode< T >::SkipListNode(), and folly::detail::SkipListNode< T >::~SkipListNode().
|
private |
Definition at line 187 of file ConcurrentSkipList-inl.h.
Referenced by folly::detail::SkipListNode< T >::acquireGuard(), and folly::detail::SkipListNode< T >::SkipListNode().