7#define IS_INTEGRAL_GUARD typename std::enable_if<std::is_integral<T>::value, bool>::type = true
14template<
typename T, IS_INTEGRAL_GUARD>
15T is_power_of_two(T x) {
16 return x > 0 && (x & (x - 1)) == 0;
20template<
typename T, IS_INTEGRAL_GUARD>
21T next_power_of_two(T x) {
29template<
typename T, IS_INTEGRAL_GUARD>
30T next_multiple_k_greater_than_n(T k, T n) {
31 T remainder = k - (n % k);
38template<
typename T, IS_INTEGRAL_GUARD>
39T div_round_up(T a, T b) {
40 return (a + b - T(1)) / b;
43template<
typename T, cgv::type::u
int32_type N, IS_INTEGRAL_GUARD>
44fvec<T, N> div_round_up(fvec<T, N> a, fvec<T, N> b) {
45 return (a + b - T(1)) / b;
51#undef IS_INTEGRAL_GUARD
this header is dependency free