proxygen
|
#include <CachelinePadded.h>
Public Member Functions | |
template<typename... Args> | |
CachelinePadded (Args &&...args) | |
T * | get () |
const T * | get () const |
T * | operator-> () |
const T * | operator-> () const |
T & | operator* () |
const T & | operator* () const |
Static Private Member Functions | |
static constexpr size_t | paddingSize () noexcept |
Private Attributes | |
char | paddingPre_ [paddingSize()] |
T | inner_ |
char | paddingPost_ [paddingSize()] |
Holds a type T, in addition to enough padding to ensure that it isn't subject to false sharing within the range used by folly.
If sizeof(T) <= alignof(T)
then the inner T
will be entirely within one false sharing range (AKA cache line).
CachelinePadded may add padding both before and after the value. Consider whether alignas(folly::hardware_destructive_interference_size) suffices.
Definition at line 37 of file CachelinePadded.h.
|
inlineexplicit |
Definition at line 44 of file CachelinePadded.h.
|
inline |
Definition at line 47 of file CachelinePadded.h.
Referenced by TEST(), and TYPED_TEST().
|
inline |
Definition at line 51 of file CachelinePadded.h.
|
inline |
Definition at line 63 of file CachelinePadded.h.
|
inline |
Definition at line 67 of file CachelinePadded.h.
|
inline |
Definition at line 55 of file CachelinePadded.h.
|
inline |
Definition at line 59 of file CachelinePadded.h.
|
inlinestaticprivatenoexcept |
Definition at line 72 of file CachelinePadded.h.
|
private |
Definition at line 77 of file CachelinePadded.h.
Referenced by folly::CachelinePadded< std::atomic< Version > >::get().
|
private |
Definition at line 78 of file CachelinePadded.h.
|
private |
Definition at line 76 of file CachelinePadded.h.