Function gkfs::utils::arithmetic::align_right
Defined in File arithmetic.hpp
Function Documentation
-
constexpr uint64_t gkfs::utils::arithmetic::align_right(const uint64_t offset, const size_t block_size)
Given a file @offset and a @block_size, align the @offset to its closest right-side block boundary.
Note
This function assumes that block_size is a power of 2.
- Parameters
offset – [in] the offset to align.
block_size – [in] the block size used to compute boundaries.
- Returns
an offset aligned to the right-side block boundary.