7#define IS_INTEGRAL_GUARD typename std::enable_if<std::is_integral<T>::value, bool>::type = true
14template<
typename T, IS_INTEGRAL_GUARD>
15T next_power_of_two(T x) {
23template<
typename T, IS_INTEGRAL_GUARD>
24T next_multiple_k_greater_than_n(T k, T n) {
25 T remainder = k - (n % k);
32template<
typename T, IS_INTEGRAL_GUARD>
33T div_round_up(T a, T b) {
34 return (a + b - T(1)) / b;
37template<
typename T, cgv::type::u
int32_type N, IS_INTEGRAL_GUARD>
38fvec<T, N> div_round_up(fvec<T, N> a, fvec<T, N> b) {
39 return (a + b - T(1)) / b;
45#undef IS_INTEGRAL_GUARD