std::ceil2() & std::floor2() produce conceptual confusion
std::ceil() is a linear operation, but std::ceil2() is an exponential operation. The '2' suffix does not provide any hint as to its fundamental difference from the std::ceil() function.
std::floor2() suffers from the same defect.
Spell out what the operations are exactly by renaming to ceil_power_of_two() and floor_power_of_two().
Proposed change:
Rename std::ceil2() to std::ceil_power_of_two().
Rename std::floor2() to std::floor_power_of_two().
std::ceil2() & std::floor2() produce conceptual confusion std::ceil() is a linear operation, but std::ceil2() is an exponential operation. The '2' suffix does not provide any hint as to its fundamental difference from the std::ceil() function. std::floor2() suffers from the same defect. Spell out what the operations are exactly by renaming to ceil_power_of_two() and floor_power_of_two().
Proposed change: Rename std::ceil2() to std::ceil_power_of_two(). Rename std::floor2() to std::floor_power_of_two().