diff --git a/include/ddc/kokkos_allocator.hpp b/include/ddc/kokkos_allocator.hpp index f58b334b4..cd6701c9a 100644 --- a/include/ddc/kokkos_allocator.hpp +++ b/include/ddc/kokkos_allocator.hpp @@ -15,6 +15,12 @@ namespace ddc { template class KokkosAllocator { + // Kokkos natively supports alignment for any scalar type that can be represented by the type `std::max_align_t` + static_assert( + alignof(T) + <= std::max(alignof(std::max_align_t), alignof(Kokkos::complex)), + "Alignment not supported"); + public: using value_type = T;