Function gkfs::utils::arithmetic::is_aligned

Function Documentation

constexpr bool gkfs::utils::arithmetic::is_aligned(const uint64_t n, const size_t block_size)

Check whether

is aligned to a block boundary, i.e. if it is divisible by @block_size.

Note

This function assumes that block_size is a power of 2.

Parameters
  • n[in] the number to check.

  • block_size[in]

Returns

true if

is divisible by @block_size; false otherwise.