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 ;
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))) };
89 typedef Kokkos::MemoryTraits<0> MemoryManaged ;
90 typedef Kokkos::MemoryTraits< Kokkos::Unmanaged > MemoryUnmanaged ;
91 typedef Kokkos::MemoryTraits< Kokkos::Unmanaged | Kokkos::RandomAccess > MemoryRandomAccess ;
101 ( 0 <
int(KOKKOS_MEMORY_ALIGNMENT) ) &&
102 ( 0 == (
int(KOKKOS_MEMORY_ALIGNMENT) & (
int(KOKKOS_MEMORY_ALIGNMENT)-1))) ,
103 "KOKKOS_MEMORY_ALIGNMENT must be a power of two" );
112 { MEMORY_ALIGNMENT = KOKKOS_MEMORY_ALIGNMENT
113 , MEMORY_ALIGNMENT_THRESHOLD = KOKKOS_MEMORY_ALIGNMENT_THRESHOLD
MemoryTraitsFlags
Memory access traits for views, an extension point.