17#ifndef KOKKOS_IMPL_PUBLIC_INCLUDE
18#include <Kokkos_Macros.hpp>
20 "Including non-public Kokkos header files is not allowed.");
22#ifndef KOKKOS_MEMORYTRAITS_HPP
23#define KOKKOS_MEMORYTRAITS_HPP
25#include <impl/Kokkos_Traits.hpp>
39enum MemoryTraitsFlags {
50 using memory_traits = MemoryTraits<T>;
52 is_unmanaged = (unsigned(0) != (T & unsigned(Kokkos::Unmanaged)))
55 is_random_access = (unsigned(0) != (T & unsigned(Kokkos::RandomAccess)))
57 enum :
bool { is_atomic = (unsigned(0) != (T & unsigned(Kokkos::Atomic))) };
59 is_restrict = (unsigned(0) != (T & unsigned(Kokkos::Restrict)))
61 enum :
bool { is_aligned = (unsigned(0) != (T & unsigned(Kokkos::Aligned))) };
72using MemoryRandomAccess =
82static_assert((0 < int(KOKKOS_MEMORY_ALIGNMENT)) &&
83 (0 == (
int(KOKKOS_MEMORY_ALIGNMENT) &
84 (
int(KOKKOS_MEMORY_ALIGNMENT) - 1))),
85 "KOKKOS_MEMORY_ALIGNMENT must be a power of two");
94 MEMORY_ALIGNMENT = KOKKOS_MEMORY_ALIGNMENT,
95 MEMORY_ALIGNMENT_THRESHOLD = KOKKOS_MEMORY_ALIGNMENT_THRESHOLD
101template <
typename Tp>
102struct is_default_memory_trait : std::false_type {};
105struct is_default_memory_trait<Kokkos::MemoryTraits<0>> : std::true_type {};
A thread safe view to a bitset.