Function gkfs::utils::arithmetic::block_underrun

Function Documentation

constexpr size_t gkfs::utils::arithmetic::block_underrun(const uint64_t offset, const size_t block_size)

Return the underrun bytes that separate @offset from the closest right side block boundary.

Note

This function assumes that block_size is a power of 2.

Parameters
  • offset[in] the offset for which the overrun distance should be computed.

  • block_size[in] the block size used to compute boundaries.

Returns

the distance in bytes between the right-side boundary of @offset