From 9c31653af53bbc2e7abcdfccdf9fab4f1d02d654 Mon Sep 17 00:00:00 2001 From: Thomas Padioleau Date: Fri, 7 Mar 2025 12:18:21 +0100 Subject: [PATCH] Ensure the alignment is not too big --- include/ddc/kokkos_allocator.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/ddc/kokkos_allocator.hpp b/include/ddc/kokkos_allocator.hpp index f58b334b4..2ee29258f 100644 --- a/include/ddc/kokkos_allocator.hpp +++ b/include/ddc/kokkos_allocator.hpp @@ -15,6 +15,9 @@ namespace ddc { template class KokkosAllocator { + // Kokkos natively support alignment for any scalar type that can be represented by the type `std::max_align_t` + static_assert(alignof(T) <= alignof(std::max_align_t), "Alignment not supported"); + public: using value_type = T;