46#ifndef MUELU_LWGRAPH_KOKKOS_DEF_HPP
47#define MUELU_LWGRAPH_KOKKOS_DEF_HPP
49#include <Kokkos_Core.hpp>
51#include <Teuchos_ArrayView.hpp>
57 template<
class LocalOrdinal,
class GlobalOrdinal,
class DeviceType>
59 print(Teuchos::FancyOStream &out,
const VerbLevel verbLevel)
const {
61 if (verbLevel &
Debug) {
62 auto graph = lclLWGraph_.getGraph();
63 RCP<const Map> col_map = importMap_.is_null() ? domainMap_ : importMap_;
64 int mypid = col_map->getComm()->getRank();
67 std::ostringstream ss;
68 ss <<
"[pid " << mypid <<
"] num entries=" << graph.entries.size();
69 out << ss.str() << std::endl;
72 const size_t numRows = graph.numRows();
73 auto rowPtrs = graph.row_map;
74 auto columns = graph.entries;
75 for (
size_t i=0; i < numRows; ++i) {
76 std::ostringstream ss;
77 ss <<
"[pid " << mypid <<
"] row " << domainMap_->getGlobalElement(i) <<
":";
78 ss <<
" (numEntries=" << rowPtrs(i+1)-rowPtrs(i) <<
")";
80 auto rowView = graph.rowConst(i);
81 for (LO j = 0; j < rowView.length; j++) {
82 ss <<
" " << col_map->getGlobalElement(rowView.colidx(j));
84 out << ss.str() << std::endl;
Lightweight MueLu representation of a compressed row storage graph.
Namespace for MueLu classes and methods.
@ Debug
Print additional debugging information.