JayBeams  0.1
Another project to have fun coding.
Namespaces | Functions
p2ceil.hpp File Reference
#include <cstdint>
#include <type_traits>

Go to the source code of this file.

Namespaces

 jb
 The top-level namespace for the JayBeams library.
 

Functions

template<typename T >
constexpr T jb::p2ceil_kernel (int shift, T n)
 Implement the key operation in the p2ceil() function. More...
 
constexpr std::uint64_t jb::p2ceil (std::uint64_t n)
 Find the smallest power of 2 larger than n for a 64-bit integer. More...
 
constexpr std::uint32_t jb::p2ceil (std::uint32_t n)
 Find the smallest power of 2 larger than n for a 32-bit integer. More...
 
constexpr std::uint16_t jb::p2ceil (std::uint16_t n)
 Find the smallest power of 2 larger than n for a 16-bit integer. More...
 
constexpr std::uint8_t jb::p2ceil (std::uint8_t n)
 Find the smallest power of 2 larger than n for an 8-bit integer. More...