10 #ifndef KOKKOS_VIEW_UQ_PCE_FWD_HPP
11 #define KOKKOS_VIEW_UQ_PCE_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>
47 namespace Experimental {
61 template<
class T ,
class ... P >
63 typename std::enable_if<
64 std::is_same<
typename ViewTraits<T,P...>::specialize ,
66 !std::is_same<
typename Kokkos::ViewTraits<T,P...>::array_layout,
67 Kokkos::LayoutStride >::value,
68 typename Kokkos::View<T,P...>::HostMirror>::type
71 template<
class T ,
class ... P >
73 typename std::enable_if<
74 std::is_same<
typename ViewTraits<T,P...>::specialize ,
76 std::is_same<
typename Kokkos::ViewTraits<T,P...>::array_layout,
77 Kokkos::LayoutStride >::value,
78 typename Kokkos::View<T,P...>::HostMirror>::type
81 template<
class Space,
class T,
class ... P,
82 typename Enable = std::enable_if_t<Kokkos::is_space<Space>::value>>
83 typename std::enable_if<
84 std::is_same<
typename ViewTraits<T,P...>::specialize ,
86 typename Impl::MirrorViewType<Space,T,P ...>::dest_view_type>::type
88 const Kokkos::View<T,P...> & src);
90 template<
class T ,
class ... P >
92 typename std::enable_if<
93 std::is_same<
typename ViewTraits<T,P...>::specialize ,
95 !std::is_same<
typename Kokkos::ViewTraits<T,P...>::array_layout,
96 Kokkos::LayoutStride >::value,
97 typename Kokkos::View<T,P...>::HostMirror>::type
99 const Kokkos::View<T,P...> & src);
101 template<
class T ,
class ... P >
103 typename std::enable_if<
104 std::is_same<
typename ViewTraits<T,P...>::specialize ,
106 std::is_same<
typename Kokkos::ViewTraits<T,P...>::array_layout,
107 Kokkos::LayoutStride >::value,
108 typename Kokkos::View<T,P...>::HostMirror>::type
110 const Kokkos::View<T,P...> & src);
112 template<
class Space,
class T,
class ... P,
113 typename Enable = std::enable_if_t<Kokkos::is_space<Space>::value>>
114 typename std::enable_if<
115 std::is_same<
typename ViewTraits<T,P...>::specialize ,
117 typename Impl::MirrorViewType<Space,T,P ...>::dest_view_type>::type
119 const Space&,
const Kokkos::View<T,P...> & src);
121 template <
class Space,
class T,
class... P>
122 typename Impl::MirrorViewType<Space, T, P...>::view_type
124 const Space&,
const Kokkos::View<T, P...>& src,
125 std::string
const& name =
"",
126 typename std::enable_if<
127 std::is_same<
typename ViewTraits<T, P...>::specialize,
129 Impl::MirrorViewType<Space, T, P...>::is_same_memspace>::type* =
132 template <
class Space,
class T,
class... P>
133 typename Impl::MirrorViewType<Space, T, P...>::view_type
135 const Space&,
const Kokkos::View<T, P...>& src,
136 std::string
const& name =
"",
137 typename std::enable_if<
138 std::is_same<
typename ViewTraits<T, P...>::specialize,
140 !Impl::MirrorViewType<Space, T, P...>::is_same_memspace>::type* =
144 template<
class DT,
class ... DP >
146 const View<DT,DP...> & view ,
148 ,
typename std::enable_if<(
149 std::is_same<
typename ViewTraits<DT,DP...>::specialize
154 template<
class DT,
class ... DP >
156 const View<DT,DP...> & view ,
158 ,
typename std::enable_if<(
159 std::is_same<
typename ViewTraits<DT,DP...>::specialize
164 template<
class ExecSpace ,
class DT,
class ... DP >
167 const View<DT,DP...> & view ,
169 ,
typename std::enable_if<(
170 Kokkos::is_execution_space< ExecSpace >::value &&
171 std::is_same<
typename ViewTraits<DT,DP...>::specialize
176 template<
class ExecSpace ,
class DT,
class ... DP >
179 const View<DT,DP...> & view ,
181 ,
typename std::enable_if<(
182 Kokkos::is_execution_space< ExecSpace >::value &&
183 std::is_same<
typename ViewTraits<DT,DP...>::specialize
188 template<
class DT ,
class ... DP ,
class ST ,
class ... SP >
190 void deep_copy(
const View<DT,DP...> & dst ,
191 const View<ST,SP...> & src
192 ,
typename std::enable_if<(
193 std::is_same<
typename ViewTraits<DT,DP...>::specialize
196 std::is_same<
typename ViewTraits<ST,SP...>::specialize
201 template<
class ExecSpace,
class DT ,
class ... DP ,
class ST ,
class ... SP >
204 const View<DT,DP...> & dst ,
205 const View<ST,SP...> & src
206 ,
typename std::enable_if<(
207 std::is_same<
typename ViewTraits<DT,DP...>::specialize
210 std::is_same<
typename ViewTraits<ST,SP...>::specialize
216 template <
unsigned N,
typename... Args>
217 KOKKOS_FUNCTION std::enable_if_t<
218 N ==
View<Args...>::rank &&
219 std::is_same<
typename ViewTraits<Args...>::specialize,
226 template <
unsigned N,
typename T,
typename... Args>
228 N !=
View<T, Args...>::rank &&
229 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)