[#BloombergLP-bdlb-BitUtil-roundUp-00] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/BitUtil.adoc[BitUtil]::roundUp :relfileprefix: ../../../ :mrdocs: Return the least multiple of `boundary` not less than `value`. == Synopsis Declared in `<bdlb_bitutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static unsigned int roundUp( unsigned int value, unsigned int boundary); ---- == Description 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`. == Return Value least multiple of `boundary` not less than `value`, or 0 == Parameters [cols="1,4"] |=== | Name| Description | *value* | value to round up | *boundary* | power‐of‐two alignment boundary |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#