Skip to content

Resolve "Make chunk computations constexpr"

Alberto Miranda requested to merge 135-make-chunk-computations-constexpr into master

This MR implements the following changes:

  • All arithmetic operations based on block sizes are now constexpr.
  • Add several new functions, also constexpr: is_aligned(), is_power_of_2().
  • Reimplement log2() to make it faster based on compiler builtins.
  • Rename functions to avoid depending on the concept of chunk (in preparation for more chunk-agnostic code).
  • Add exhaustive tests for all these functions and enable them in the CI.
  • Rename the gkfs::util namespace to gkfs::utils.
  • Create the gkfs::utils::arithmetic namespace for all these functions, as well as a convenience library/target in CMake for easier testing.

Fixes #137 (closed) Closes #135 (closed)

Edited by Alberto Miranda

Merge request reports