BloombergLP::bdlb::BitUtil::roundUp

roundUp overloads

Synopses

Declared in <bdlb_bitutil.h>

Return the least multiple of the specified boundary that is greater than or equal to the specified value, and 0 if 0 == value or the conversion was not successful. The behavior is undefined unless 1 == numBitsSet(boundary). Note that the conversion will succeed if and only if 0 == value % boundary or (1 << sizeInBits(value)) > (value / boundary + 1) * boundary.

static
unsigned int
roundUp(
    unsigned int value,
    unsigned int boundary);
» more...

Same as the unsigned int overload.

static
unsigned long
roundUp(
    unsigned long value,
    unsigned long boundary);
» more...

Same as the unsigned int overload.

static
unsigned long long
roundUp(
    unsigned long long value,
    unsigned long long boundary);
» more...