45 #ifndef KOKKOS_MEMORYTRAITS_HPP
46 #define KOKKOS_MEMORYTRAITS_HPP
48 #include <impl/Kokkos_Traits.hpp>
49 #include <impl/Kokkos_Tags.hpp>
74 typedef MemoryTraits memory_traits;
75 #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
77 Unmanaged = (unsigned(0) != (T & unsigned(Kokkos::Unmanaged)))
80 RandomAccess = (unsigned(0) != (T & unsigned(Kokkos::RandomAccess)))
82 enum :
bool { Atomic = (unsigned(0) != (T & unsigned(Kokkos::Atomic))) };
83 enum :
bool { Restrict = (unsigned(0) != (T & unsigned(Kokkos::Restrict))) };
84 enum :
bool { Aligned = (unsigned(0) != (T & unsigned(Kokkos::Aligned))) };
87 is_unmanaged = (unsigned(0) != (T & unsigned(Kokkos::Unmanaged)))
90 is_random_access = (unsigned(0) != (T & unsigned(Kokkos::RandomAccess)))
92 enum :
bool { is_atomic = (unsigned(0) != (T & unsigned(Kokkos::Atomic))) };
94 is_restrict = (unsigned(0) != (T & unsigned(Kokkos::Restrict)))
96 enum :
bool { is_aligned = (unsigned(0) != (T & unsigned(Kokkos::Aligned))) };
105 typedef Kokkos::MemoryTraits<0> MemoryManaged;
106 typedef Kokkos::MemoryTraits<Kokkos::Unmanaged> MemoryUnmanaged;
107 typedef Kokkos::MemoryTraits<Kokkos::Unmanaged | Kokkos::RandomAccess>
117 static_assert((0 <
int(KOKKOS_MEMORY_ALIGNMENT)) &&
118 (0 == (
int(KOKKOS_MEMORY_ALIGNMENT) &
119 (
int(KOKKOS_MEMORY_ALIGNMENT) - 1))),
120 "KOKKOS_MEMORY_ALIGNMENT must be a power of two");
129 MEMORY_ALIGNMENT = KOKKOS_MEMORY_ALIGNMENT,
130 MEMORY_ALIGNMENT_THRESHOLD = KOKKOS_MEMORY_ALIGNMENT_THRESHOLD
MemoryTraitsFlags
Memory access traits for views, an extension point.