alignTo overloads
Synopses
Declared in <llvm/Support/Alignment.h>
Returns the next integer (mod 2**nbits) that is greater than or equal to Value and is a multiple of Align. Align must be non‐zero.
template<
auto Align,
typename V,
typename T = common_uint<decltype(Align), V>>
constexpr
T
alignTo(V Value);
Round Size up to a multiple of Align.
Returns a multiple of A needed to store Size bytes.
Fallback when arguments aren't integral.
constexpr
uint64_t
alignTo(
uint64_t Value,
uint64_t Align);
Returns the next integer (mod 2**nbits) that is greater than or equal to Value and is a multiple of Align. Align must be non‐zero.
template<
typename U,
typename V,
typename T = common_uint<U, V>>
constexpr
T
alignTo(
U Value,
V Align);
Returns the smallest value at least Size congruent to Skew modulo A.
Align Value up to Align with an optional Skew offset.
template<
typename U,
typename V,
typename W,
typename T = common_uint<common_uint<U, V>, W>>
constexpr
T
alignTo(
U Value,
V Align,
W Skew);
Return Value
-
Value rounded up to the next multiple of Align.
-
TypeSize with known‐min rounded up to a multiple of
Align. -
Sizerounded up to the next multiple ofA. -
The smallest value at least
Sizecongruent toSkewmoduloA. -
The smallest value at least Value equal to Align * N + Skew.
Parameters
Name |
Description |
Value |
Value to align upward. |
Size |
Quantity whose known‐min size is rounded up. |
Align |
Non‐zero alignment in the same units as |
A |
Alignment to round up to. |
Skew |
Desired residue modulo |
Created with MrDocs