12 #ifndef ROC_CORE_ALIGN_OPS_H_
13 #define ROC_CORE_ALIGN_OPS_H_
37 static size_t align_as(
size_t size,
size_t alignment);
43 static size_t pad_as(
size_t size,
size_t alignment);
static size_t pad_max(size_t size)
Return padding needed for maximum alignment.
static size_t align_as(size_t size, size_t alignment)
Return size aligned to given alignment.
static size_t pad_as(size_t size, size_t alignment)
Return padding needed for given alignment.
static size_t align_max(size_t size)
Return size aligned to maximum alignment.
static size_t max_alignment()
Get maximum alignment for current platform.
Commonly used types and functions.
Maximum aligned data unit.
void(* p)()
4-, 8- or 16-byte function pointer.
double d
8-byte floating point.
uint64_t u
8-byte integer.