foyer_common

Module bits

source
Expand description

The bitwise utils.

Traits§

  • An unsigned trait that used by the utils.

Functions§

  • Align down the given value with the given align.
  • Align up the given value with the given align.
  • Assert that the given value is aligned with the given align.
  • Assert that the given value is a power of 2.
  • Debug assert that the given value is aligned with the given align.
  • Debug assert that the given value is a power of 2.
  • Check if the given value is aligned with the given align.
  • Check if the given value is a power of 2.