44 #ifndef KOKKOS_MEMORYTRAITS_HPP
45 #define KOKKOS_MEMORYTRAITS_HPP
47 #include <impl/Kokkos_Traits.hpp>
48 #include <impl/Kokkos_Tags.hpp>
70 template <
unsigned T >
73 typedef MemoryTraits memory_traits ;
74 #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
75 enum :
bool { Unmanaged = (unsigned(0) != (T & unsigned(Kokkos::Unmanaged))) };
76 enum :
bool { RandomAccess = (unsigned(0) != (T & unsigned(Kokkos::RandomAccess))) };
77 enum :
bool { Atomic = (unsigned(0) != (T & unsigned(Kokkos::Atomic))) };
78 enum :
bool { Restrict = (unsigned(0) != (T & unsigned(Kokkos::Restrict))) };
79 enum :
bool { Aligned = (unsigned(0) != (T & unsigned(Kokkos::Aligned))) };
81 enum :
bool { is_unmanaged = (unsigned(0) != (T & unsigned(Kokkos::Unmanaged))) };
82 enum :
bool { is_random_access = (unsigned(0) != (T & unsigned(Kokkos::RandomAccess))) };
83 enum :
bool { is_atomic = (unsigned(0) != (T & unsigned(Kokkos::Atomic))) };
84 enum :
bool { is_restrict = (unsigned(0) != (T & unsigned(Kokkos::Restrict))) };
85 enum :
bool { is_aligned = (unsigned(0) != (T & unsigned(Kokkos::Aligned))) };
94 typedef Kokkos::MemoryTraits<0> MemoryManaged ;
95 typedef Kokkos::MemoryTraits< Kokkos::Unmanaged > MemoryUnmanaged ;
96 typedef Kokkos::MemoryTraits< Kokkos::Unmanaged | Kokkos::RandomAccess > MemoryRandomAccess ;
106 ( 0 <
int(KOKKOS_MEMORY_ALIGNMENT) ) &&
107 ( 0 == (
int(KOKKOS_MEMORY_ALIGNMENT) & (
int(KOKKOS_MEMORY_ALIGNMENT)-1))) ,
108 "KOKKOS_MEMORY_ALIGNMENT must be a power of two" );
117 { MEMORY_ALIGNMENT = KOKKOS_MEMORY_ALIGNMENT
118 , MEMORY_ALIGNMENT_THRESHOLD = KOKKOS_MEMORY_ALIGNMENT_THRESHOLD
MemoryTraitsFlags
Memory access traits for views, an extension point.