10 #ifndef MUELU_LWGRAPH_KOKKOS_DEF_HPP
11 #define MUELU_LWGRAPH_KOKKOS_DEF_HPP
13 #include "MueLu_LWGraph.hpp"
18 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
20 auto graph = this->getGraph();
22 auto row_map_h = Kokkos::create_mirror_view(graph.row_map);
23 auto entries_h = Kokkos::create_mirror_view(graph.entries);
24 Kokkos::deep_copy(row_map_h, graph.row_map);
25 Kokkos::deep_copy(entries_h, graph.entries);
28 auto graph_h = local_graph_type_host(entries_h, row_map_h);
34 auto bndry = this->GetBoundaryNodeMap();
35 auto bndry_h = bndry_nodes_type(
"boundary_nodes", bndry.extent(0));
36 Kokkos::deep_copy(bndry_h, bndry);
37 lw_h->SetBoundaryNodeMap(bndry_h);
44 #endif // MUELU_LWGRAPH_KOKKOS_DEF_HPP
RCP< MueLu::LWGraph< LocalOrdinal, GlobalOrdinal, Node > > copyToHost()
typename std::conditional< OnHost, typename local_graph_device_type::HostMirror, local_graph_device_type >::type local_graph_type
Kokkos::View< bool *, memory_space > boundary_nodes_type
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Lightweight MueLu representation of a compressed row storage graph.