46#ifndef MUELU_LWGRAPH_KOKKOS_DECL_HPP
47#define MUELU_LWGRAPH_KOKKOS_DECL_HPP
51#include <Kokkos_StaticCrsGraph.hpp>
52#include <KokkosCompat_ClassicNodeAPI_Wrapper.hpp>
54#include <Xpetra_ConfigDefs.hpp>
55#include <Xpetra_Map.hpp>
72 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
76 template<
class LocalOrdinal,
class GlobalOrdinal,
class DeviceType>
83 using device_type = Kokkos::Device<execution_space, memory_space>;
84 using node_type = Kokkos::Compat::KokkosDeviceWrapperNode<DeviceType>;
88 using map_type = Xpetra::Map<LocalOrdinal, GlobalOrdinal, node_type>;
95#undef MUELU_LWGRAPH_KOKKOS_SHORT
110 const RCP<const map_type>& domainMap,
111 const RCP<const map_type>& importMap,
112 const std::string& objectLabel =
"")
113 : lclLWGraph_(graph, domainMap), domainMap_(domainMap), importMap_(importMap), objectLabel_(objectLabel) { }
118 const RCP<const Teuchos::Comm<int> >
GetComm()
const {
119 return domainMap_->getComm();
131 return lclLWGraph_.GetNodeNumVertices();
135 return lclLWGraph_.GetNodeNumEdges();
140 return lclLWGraph_.getLocalMaxNumRowEntries();
145 return "LWGraph (" + objectLabel_ +
")";
149 void print(Teuchos::FancyOStream &out,
const VerbLevel verbLevel =
Default)
const;
170#define MUELU_LWGRAPH_KOKKOS_SHORT
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultGlobalOrdinal GlobalOrdinal
LocalOrdinal local_ordinal_type
typename local_lw_graph_type::boundary_nodes_type boundary_nodes_type
local_lw_graph_type & getLocalLWGraph() const
LWGraph_kokkos(const local_graph_type &graph, const RCP< const map_type > &domainMap, const RCP< const map_type > &importMap, const std::string &objectLabel="")
LWGraph constructor.
const RCP< const map_type > domainMap_
Graph maps.
KOKKOS_INLINE_FUNCTION size_type GetNodeNumEdges() const
Return number of graph edges.
const RCP< const Teuchos::Comm< int > > GetComm() const
const RCP< const Map > GetDomainMap() const
typename local_lw_graph_type::local_graph_type local_graph_type
const RCP< const Map > GetImportMap() const
Return overlapping import map (nodes).
~LWGraph_kokkos()=default
std::string description() const
Return a simple one-line description of the Graph.
KOKKOS_INLINE_FUNCTION size_type getLocalMaxNumRowEntries() const
Returns the maximum number of entries across all rows/columns on this node.
Kokkos::Compat::KokkosDeviceWrapperNode< DeviceType > node_type
Kokkos::Device< execution_space, memory_space > device_type
GlobalOrdinal global_ordinal_type
KOKKOS_INLINE_FUNCTION size_type GetNodeNumVertices() const
Return number of graph vertices.
typename DeviceType::execution_space execution_space
local_lw_graph_type lclLWGraph_
Underlying graph (with label)
const RCP< const map_type > importMap_
const std::string objectLabel_
Name of this graph.
typename DeviceType::memory_space memory_space
Xpetra::Map< LocalOrdinal, GlobalOrdinal, node_type > map_type
Lightweight MueLu representation of a compressed row storage graph.
Namespace for MueLu classes and methods.