10 #ifndef MUELU_LWGRAPH_DEF_HPP
11 #define MUELU_LWGRAPH_DEF_HPP
13 #include "MueLu_LWGraph_kokkos.hpp"
18 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
22 auto graph = this->getGraph();
25 auto rows =
typename dev_crs_graph_type::local_graph_type::row_map_type::non_const_type(
"rows", graph.numRows() + 1);
26 auto entries =
typename dev_crs_graph_type::local_graph_type::entries_type::non_const_type(
"columns", graph.entries.extent(0));
27 Kokkos::deep_copy(
rows, graph.row_map);
28 Kokkos::deep_copy(entries, graph.entries);
31 auto graph_d = local_graph_type_device(entries,
rows);
37 auto bndry = this->GetBoundaryNodeMap();
38 auto bndry_d = bndry_nodes_type(
"boundary_nodes", bndry.extent(0));
39 Kokkos::deep_copy(bndry_d, bndry);
40 lw_d->SetBoundaryNodeMap(bndry_d);
47 #endif // MUELU_LWGRAPH_DEF_HPP
Lightweight MueLu representation of a compressed row storage graph.
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)
RCP< MueLu::LWGraph_kokkos< LocalOrdinal, GlobalOrdinal, Node > > copyToDevice()