proxygen
|
#include <Padded.h>
Classes | |
union | Storage |
Public Types | |
typedef T | value_type |
Public Member Functions | |
T * | data () |
const T * | data () const |
bool | operator== (const Node &other) const |
bool | operator!= (const Node &other) const |
Static Public Member Functions | |
static constexpr size_t | nodeCount (size_t n) |
static constexpr size_t | paddedByteSize (size_t n) |
static constexpr size_t | paddingBytes (size_t n) |
static constexpr size_t | unpaddedByteSize (size_t n) |
Static Public Attributes | |
static constexpr size_t | kNodeSize = NS |
static constexpr size_t | kElementCount = NS / sizeof(T) |
static constexpr size_t | kPaddingBytes = NS % sizeof(T) |
Private Attributes | |
union folly::padded::Node< T, NS, typename detail::NodeValid< T, NS >::type >::Storage | storage_ |
typedef T folly::padded::Node< T, NS, typename detail::NodeValid< T, NS >::type >::value_type |
|
inline |
Definition at line 82 of file Padded.h.
|
inline |
Definition at line 85 of file Padded.h.
|
inlinestatic |
Return the number of nodes needed to represent n values. Rounds up.
Definition at line 99 of file Padded.h.
|
inline |
|
inline |
Definition at line 89 of file Padded.h.
References folly::data(), and folly::T.
|
inlinestatic |
Return the total byte size needed to represent n values, rounded up to the nearest full node.
Definition at line 107 of file Padded.h.
|
inlinestatic |
Return the number of bytes used for padding n values. Note that, even if n is a multiple of kElementCount, this may return non-zero if kPaddingBytes != 0, as the padding at the end of the last node is not included in the result.
Definition at line 117 of file Padded.h.
References folly::T.
|
inlinestatic |
Return the minimum byte size needed to represent n values. Does not round up. Even if n is a multiple of kElementCount, this may be different from paddedByteSize() if kPaddingBytes != 0, as the padding at the end of the last node is not included in the result. Note that the calculation below works for n=0 correctly (returns 0).
Definition at line 131 of file Padded.h.
|
static |
|
static |
|
static |
|
private |