Skip to content

Commit

Permalink
Ensure the alignment is not too big
Browse files Browse the repository at this point in the history
  • Loading branch information
tpadioleau committed Mar 7, 2025
1 parent 4b51190 commit 9c31653
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/ddc/kokkos_allocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ namespace ddc {
template <class T, class MemorySpace>
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;

Expand Down

0 comments on commit 9c31653

Please sign in to comment.