proxygen
|
#include <ThreadCachedInt.h>
Classes | |
struct | IntCache |
Public Member Functions | |
ThreadCachedInt (IntT initialVal=0, uint32_t cacheSize=1000) | |
void | increment (IntT inc) |
IntT | readFast () const |
IntT | readFull () const |
IntT | readFastAndReset () |
IntT | readFullAndReset () |
void | setCacheSize (uint32_t newSize) |
uint32_t | getCacheSize () const |
ThreadCachedInt & | operator+= (IntT inc) |
ThreadCachedInt & | operator-= (IntT inc) |
ThreadCachedInt & | operator++ () |
ThreadCachedInt & | operator-- () |
void | set (IntT newVal) |
Private Attributes | |
std::atomic< IntT > | target_ |
std::atomic< uint32_t > | cacheSize_ |
ThreadLocalPtr< IntCache, Tag, AccessModeStrict > | cache_ |
Definition at line 39 of file ThreadCachedInt.h.
|
inlineexplicit |
Definition at line 43 of file ThreadCachedInt.h.
|
inline |
Definition at line 103 of file ThreadCachedInt.h.
|
inline |
Definition at line 46 of file ThreadCachedInt.h.
Referenced by folly::ThreadCachedInt< uint64_t >::operator++(), folly::ThreadCachedInt< uint64_t >::operator+=(), folly::ThreadCachedInt< uint64_t >::operator--(), and folly::ThreadCachedInt< uint64_t >::operator-=().
|
inline |
Definition at line 116 of file ThreadCachedInt.h.
|
inline |
Definition at line 107 of file ThreadCachedInt.h.
|
inline |
Definition at line 120 of file ThreadCachedInt.h.
|
inline |
Definition at line 111 of file ThreadCachedInt.h.
|
inline |
Definition at line 57 of file ThreadCachedInt.h.
Referenced by BENCHMARK(), folly::AtomicHashArray< KeyT, ValueT, HashFcn, EqualFcn, Allocator, ProbeFcn, KeyConvertFcn >::insertInternal(), folly::ThreadCachedInt< uint64_t >::readFull(), and TEST().
|
inline |
Definition at line 77 of file ThreadCachedInt.h.
Referenced by folly::ThreadCachedInt< uint64_t >::readFullAndReset().
|
inline |
Definition at line 63 of file ThreadCachedInt.h.
Referenced by BENCHMARK(), folly::AtomicHashArray< KeyT, ValueT, HashFcn, EqualFcn, Allocator, ProbeFcn, KeyConvertFcn >::insertInternal(), folly::AtomicHashMap< KeyT, ValueT, HashFcn, EqualFcn, Allocator, ProbeFcn, KeyConvertFcn >::spaceRemaining(), and TEST().
|
inline |
Definition at line 85 of file ThreadCachedInt.h.
|
inline |
Definition at line 128 of file ThreadCachedInt.h.
Referenced by folly::AtomicHashArray< KeyT, ValueT, HashFcn, EqualFcn, Allocator, ProbeFcn, KeyConvertFcn >::clear(), and TEST().
|
inline |
Definition at line 99 of file ThreadCachedInt.h.
|
private |
Definition at line 139 of file ThreadCachedInt.h.
Referenced by folly::ThreadCachedInt< uint64_t >::increment(), folly::ThreadCachedInt< uint64_t >::readFull(), folly::ThreadCachedInt< uint64_t >::readFullAndReset(), and folly::ThreadCachedInt< uint64_t >::set().
|
private |
Definition at line 137 of file ThreadCachedInt.h.
Referenced by folly::ThreadCachedInt< uint64_t >::getCacheSize(), folly::ThreadCachedInt< IntT, Tag >::IntCache::increment(), and folly::ThreadCachedInt< uint64_t >::setCacheSize().
|
private |
Definition at line 136 of file ThreadCachedInt.h.
Referenced by folly::ThreadCachedInt< IntT, Tag >::IntCache::flush(), folly::ThreadCachedInt< uint64_t >::readFast(), folly::ThreadCachedInt< uint64_t >::readFastAndReset(), and folly::ThreadCachedInt< uint64_t >::set().