10 #include <type_traits>
16 template<std::
size_t N>
23 template<std::
size_t N,
bool TisPowerTwo>
31 template<std::
size_t N>
33 : std::integral_constant<std::size_t, RoundUpToPowerOfTwo<(N | (N - 1)) + 1>::value>
38 template<std::
size_t N>
40 : std::integral_constant<std::size_t, detail::RoundUpToPowerOfTwoHelper<N, (N & (N - 1)) == 0>::value>
48 template<std::
size_t TsizeBytes>
50 : std::integral_constant<
55 (TsizeBytes > 64) ? 128 :
57 (RoundUpToPowerOfTwo<TsizeBytes>::value)>
64 #define ALPAKA_OPTIMAL_ALIGNMENT(...) \
65 ::alpaka::core::align::OptimalAlignment<sizeof(std::remove_cv_t<__VA_ARGS__>)>::value
Rounds to the next higher power of two (if not already power of two).
Calculates the optimal alignment for data of the given size.
Base case for N being a power of two.