42#ifndef TPETRA_DETAILS_GETENTRYONHOST_HPP
43#define TPETRA_DETAILS_GETENTRYONHOST_HPP
51#include "TpetraCore_config.h"
52#include "Kokkos_Core.hpp"
57template<
class ViewType,
59typename ViewType::non_const_value_type
60getEntryOnHost (
const ViewType& x,
63 static_assert (ViewType::Rank == 1,
"x must be a rank-1 Kokkos::View.");
65 typename ViewType::non_const_value_type val;
70template<
class ViewType,
72typename ViewType::HostMirror::const_type
73getEntriesOnHost (
const ViewType& x,
77 static_assert (ViewType::Rank == 1,
"x must be a rank-1 Kokkos::View.");
79 auto subview = Kokkos::subview(x, Kokkos::make_pair(ind, ind + count));
80 return Kokkos::create_mirror_view_and_copy(
typename ViewType::HostMirror::memory_space(), subview);
Implementation details of Tpetra.
Namespace Tpetra contains the class and methods constituting the Tpetra library.
void deep_copy(MultiVector< DS, DL, DG, DN > &dst, const MultiVector< SS, SL, SG, SN > &src)
Copy the contents of the MultiVector src into dst.