53 #ifndef AMESOS2_KOKKOS_MULTIVEC_ADAPTER_DEF_HPP
54 #define AMESOS2_KOKKOS_MULTIVEC_ADAPTER_DEF_HPP
56 #include <type_traits>
63 template <
typename Scalar,
typename ExecutionSpace >
65 Kokkos::View<Scalar**, Kokkos::LayoutLeft, ExecutionSpace> >
::MultiVecAdapter(
const Teuchos::RCP<multivec_t>& m )
69 template <
typename Scalar,
typename ExecutionSpace >
72 Kokkos::View<Scalar**, Kokkos::LayoutLeft, ExecutionSpace> >::getMVPointer_impl()
const
74 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::runtime_error,
"getMVPointer_impl not implemented.");
77 template <
typename Scalar,
typename ExecutionSpace >
80 Kokkos::View<Scalar**, Kokkos::LayoutLeft, ExecutionSpace> >::get1dCopy(
const Teuchos::ArrayView<scalar_t>& av,
83 const Tpetra::Map<local_ordinal_t, global_ordinal_t,
84 MultiVecAdapter<Kokkos::View<Scalar**, Kokkos::LayoutLeft, ExecutionSpace>>::node_t>> distribution_map,
87 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::logic_error,
"get1dCopy for kokkos not implemented.");
90 template <
typename Scalar,
typename ExecutionSpace >
91 Teuchos::ArrayRCP<Scalar>
93 Kokkos::View<Scalar**, Kokkos::LayoutLeft, ExecutionSpace> >::get1dViewNonConst (
bool local)
95 TEUCHOS_TEST_FOR_EXCEPTION(
96 true, std::logic_error,
"Amesos2::MultiVecAdapter::get1dViewNonConst: "
100 template <
typename Scalar,
typename ExecutionSpace>
103 Kokkos::View<Scalar**, Kokkos::LayoutLeft, ExecutionSpace> >::put1dData(
104 const Teuchos::ArrayView<const scalar_t>& new_data,
107 const Tpetra::Map<local_ordinal_t, global_ordinal_t,
108 MultiVecAdapter<Kokkos::View<Scalar**, Kokkos::LayoutLeft, ExecutionSpace>>::node_t> > source_map,
111 TEUCHOS_TEST_FOR_EXCEPTION(
112 true, std::logic_error,
"Amesos2::MultiVecAdapter::put1dData: "
116 template <
typename Scalar,
typename ExecutionSpace >
119 Kokkos::View<Scalar**, Kokkos::LayoutLeft, ExecutionSpace> >::description()
const
121 std::ostringstream oss;
122 oss <<
"Amesos2 adapter wrapping: ";
123 oss << mv_->description();
128 template <
typename Scalar,
typename ExecutionSpace >
131 Kokkos::View<Scalar**, Kokkos::LayoutLeft, ExecutionSpace> >::describe (Teuchos::FancyOStream& os,
132 const Teuchos::EVerbosityLevel verbLevel)
const
134 mv_->describe (os, verbLevel);
139 #endif // AMESOS2_KOKKOS_MULTIVEC_ADAPTER_DEF_HPP
Amesos2::MultiVecAdapter specialization for the Kokkos::View class.
Copy or assign views based on memory spaces.
EDistribution
Definition: Amesos2_TypeDecl.hpp:123
A templated MultiVector class adapter for Amesos2.
Definition: Amesos2_MultiVecAdapter_decl.hpp:176