24#ifndef MORPHEUS_CONTAINERTRAITS_IMPL_HPP
25#define MORPHEUS_CONTAINERTRAITS_IMPL_HPP
27#include <Morpheus_TypeTraits.hpp>
28#include <Morpheus_SpaceTraits.hpp>
29#include <Morpheus_GenericBackend.hpp>
31#include <Kokkos_Core.hpp>
37template <
typename ValueType,
class... Properties>
42 using index_type = void;
43 using array_layout = void;
45 using execution_space = void;
46 using memory_space = void;
47 using memory_traits = void;
50template <
class... Prop>
55 using array_layout =
typename ContainerTraits<void, Prop...>::array_layout;
57 using execution_space =
59 using memory_space =
typename ContainerTraits<void, Prop...>::memory_space;
60 using memory_traits =
typename ContainerTraits<void, Prop...>::memory_traits;
63template <
typename IndexType,
class... Prop>
65 typename std::enable_if_t<std::is_integral<IndexType>::value>,
IndexType,
71 using array_layout =
typename ContainerTraits<void, Prop...>::array_layout;
73 using execution_space =
75 using memory_space =
typename ContainerTraits<void, Prop...>::memory_space;
76 using memory_traits =
typename ContainerTraits<void, Prop...>::memory_traits;
79template <
typename ArrayLayout,
class... Prop>
81 typename std::enable_if_t<Morpheus::is_layout<ArrayLayout>::value>,
82 ArrayLayout, Prop...> {
86 using index_type = void;
87 using array_layout = ArrayLayout;
89 using execution_space =
91 using memory_space =
typename ContainerTraits<void, Prop...>::memory_space;
92 using memory_traits =
typename ContainerTraits<void, Prop...>::memory_traits;
95template <
class Space,
class... Prop>
97 typename std::enable_if<Morpheus::is_space<Space>::value>::type, Space,
108 "Only one Container Execution or Memory Space template argument");
110 using index_type = void;
111 using array_layout = void;
112 using backend =
typename std::conditional<
116 using execution_space =
typename backend::execution_space;
117 using memory_space =
typename backend::memory_space;
118 using memory_traits =
typename ContainerTraits<void, Prop...>::memory_traits;
121template <
class MemoryTraits,
class... Prop>
123 Kokkos::is_memory_traits<MemoryTraits>::value>::type,
124 MemoryTraits, Prop...> {
136 "MemoryTrait is the final optional template argument for a Container");
138 using index_type = void;
139 using backend = void;
140 using execution_space = void;
141 using memory_space = void;
142 using array_layout = void;
143 using memory_traits = MemoryTraits;
Checks if the given type T has a valid supported backend.
Definition: Morpheus_Spaces.hpp:62
Generic Morpheus interfaces.
Definition: dummy.cpp:24
A wrapper that converts a valid space into a generic backend.
Definition: Morpheus_GenericBackend.hpp:68
Definition: Morpheus_ContainerTraits_Impl.hpp:38
A wrapper that checks if the provided type is an integral type.
Definition: Morpheus_TypeTraits.hpp:73