10 #ifndef KOKKOS_VIEW_MP_VECTOR_FWD_HPP
11 #define KOKKOS_VIEW_MP_VECTOR_FWD_HPP
15 #ifndef KOKKOS_IMPL_PUBLIC_INCLUDE
16 #define KOKKOS_IMPL_PUBLIC_INCLUDE
17 #define KOKKOS_IMPL_PUBLIC_INCLUDE_NOTDEFINED_CORE
21 #include "Kokkos_Core_fwd.hpp"
22 #include "Kokkos_View.hpp"
23 #ifdef KOKKOS_IMPL_PUBLIC_INCLUDE_NOTDEFINED_CORE
24 #undef KOKKOS_IMPL_PUBLIC_INCLUDE
25 #undef KOKKOS_IMPL_PUBLIC_INCLUDE_NOTDEFINED_CORE
32 template <
typename Storage >
40 template<
class Space,
class T,
class ... P>
41 struct MirrorViewType;
47 namespace Experimental {
50 struct ViewMPVectorContiguous;
61 template <
class T,
class... P,
class... ViewCtorArgs>
63 const Impl::ViewCtorProp<ViewCtorArgs...>& arg_prop,
64 const View<T, P...>& src,
65 typename std::enable_if_t<
66 std::is_same_v<
typename ViewTraits<T, P...>::specialize,
67 Experimental::Impl::ViewMPVectorContiguous>>* =
nullptr
70 template <
class T,
class... P>
72 const View<T, P...>& src,
73 typename std::enable_if_t<
74 std::is_same_v<
typename ViewTraits<T, P...>::specialize,
75 Experimental::Impl::ViewMPVectorContiguous>>* =
nullptr
78 template <
class Space,
class T,
class... P,
typename Enable = std::enable_if_t<Kokkos::is_space<Space>::value>>
81 const View<T, P...>& src,
82 typename std::enable_if_t<
83 std::is_same_v<
typename ViewTraits<T, P...>::specialize,
84 Experimental::Impl::ViewMPVectorContiguous>>* =
nullptr
87 template <
class T,
class... P>
89 Impl::WithoutInitializing_t wi,
90 const View<T, P...>& src,
91 typename std::enable_if_t<
92 std::is_same_v<
typename ViewTraits<T, P...>::specialize,
93 Experimental::Impl::ViewMPVectorContiguous>>* =
nullptr
96 template <
class Space,
class T,
class... P,
typename Enable = std::enable_if_t<is_space<Space>::value>>
98 Impl::WithoutInitializing_t wi,
100 const View<T, P...>& src,
101 typename std::enable_if_t<
102 std::is_same_v<
typename ViewTraits<T, P...>::specialize,
103 Experimental::Impl::ViewMPVectorContiguous>>* =
nullptr
106 template <
class T,
class... P,
class... ViewCtorArgs>
108 const Impl::ViewCtorProp<ViewCtorArgs...>& arg_prop,
109 const Kokkos::View<T, P...>& src,
110 typename std::enable_if_t<
111 std::is_same_v<
typename ViewTraits<T, P...>::specialize,
112 Experimental::Impl::ViewMPVectorContiguous>>* =
nullptr
115 template <
class Space,
class T,
class... P>
116 typename Impl::MirrorViewType<Space, T, P...>::view_type
118 const Space&,
const Kokkos::View<T, P...>& src,
119 std::string
const& name =
"",
120 typename std::enable_if<
121 std::is_same<
typename ViewTraits<T, P...>::specialize,
123 Impl::MirrorViewType<Space, T, P...>::is_same_memspace>::type* =
126 template <
class Space,
class T,
class... P>
127 typename Impl::MirrorViewType<Space, T, P...>::view_type
129 const Space&,
const Kokkos::View<T, P...>& src,
130 std::string
const& name =
"",
131 typename std::enable_if<
132 std::is_same<
typename ViewTraits<T, P...>::specialize,
134 !Impl::MirrorViewType<Space, T, P...>::is_same_memspace>::type* =
138 template<
class DT,
class ... DP >
140 const View<DT,DP...> & view ,
142 ,
typename std::enable_if<(
143 std::is_same<
typename ViewTraits<DT,DP...>::specialize
148 template<
class DT,
class ... DP >
150 const View<DT,DP...> & view ,
152 ,
typename std::enable_if<(
153 std::is_same<
typename ViewTraits<DT,DP...>::specialize
158 template<
class ExecSpace ,
class DT,
class ... DP >
161 const View<DT,DP...> & view ,
163 ,
typename std::enable_if<(
164 Kokkos::is_execution_space< ExecSpace >::value &&
165 std::is_same<
typename ViewTraits<DT,DP...>::specialize
170 template<
class ExecSpace ,
class DT,
class ... DP >
173 const View<DT,DP...> & view ,
175 ,
typename std::enable_if<(
176 Kokkos::is_execution_space< ExecSpace >::value &&
177 std::is_same<
typename ViewTraits<DT,DP...>::specialize
182 template<
class DT ,
class ... DP ,
class ST ,
class ... SP >
184 void deep_copy(
const View<DT,DP...> & dst ,
185 const View<ST,SP...> & src
186 ,
typename std::enable_if<(
187 std::is_same<
typename ViewTraits<DT,DP...>::specialize
190 std::is_same<
typename ViewTraits<ST,SP...>::specialize
195 template<
class ExecSpace,
class DT ,
class ... DP ,
class ST ,
class ... SP >
198 const View<DT,DP...> & dst ,
199 const View<ST,SP...> & src
200 ,
typename std::enable_if<(
201 std::is_same<
typename ViewTraits<DT,DP...>::specialize
204 std::is_same<
typename ViewTraits<ST,SP...>::specialize
210 template <
unsigned N,
typename... Args>
211 KOKKOS_FUNCTION std::enable_if_t<
212 N ==
View<Args...>::rank &&
213 std::is_same<
typename ViewTraits<Args...>::specialize,
220 template <
unsigned N,
typename T,
typename... Args>
222 N !=
View<T, Args...>::rank &&
223 std::is_same<
typename ViewTraits<T, Args...>::specialize,
KOKKOS_FUNCTION std::enable_if_t< N==View< Args...>::rank &&std::is_same< typename ViewTraits< Args...>::specialize, Kokkos::Experimental::Impl::ViewPCEContiguous >::value, View< Args...> > as_view_of_rank_n(View< Args...> v)
Impl::MirrorViewType< Space, T, P...>::view_type create_mirror_view_and_copy(const Space &, const Kokkos::View< T, P...> &src, std::string const &name="", typename std::enable_if< std::is_same< typename ViewTraits< T, P...>::specialize, Kokkos::Experimental::Impl::ViewPCEContiguous >::value &&Impl::MirrorViewType< Space, T, P...>::is_same_memspace >::type *=nullptr)
void deep_copy(const Stokhos::CrsMatrix< ValueType, DstDevice, Layout > &dst, const Stokhos::CrsMatrix< ValueType, SrcDevice, Layout > &src)
Stokhos::CrsMatrix< ValueType, Device, Layout >::HostMirror create_mirror(const Stokhos::CrsMatrix< ValueType, Device, Layout > &A)
Stokhos::CrsMatrix< ValueType, Device, Layout >::HostMirror create_mirror_view(const Stokhos::CrsMatrix< ValueType, Device, Layout > &A)