68 Kokkos::View<unsigned*, typename LWGraph_kokkos::device_type>& aggstat,
69 LO& numNonAggregatedNodes)
const {
70 Monitor m(*
this,
"BuildAggregates");
72 typename Kokkos::View<unsigned*, device_type>::HostMirror aggstatHost
73 = Kokkos::create_mirror(aggstat);
74 Kokkos::deep_copy(aggstatHost, aggstat);
75 std::vector<unsigned> aggStat;
76 aggStat.resize(aggstatHost.extent(0));
77 for(
size_t idx = 0; idx < aggstatHost.extent(0); ++idx) {
78 aggStat[idx] = aggstatHost(idx);
81 auto lclLWGraph = graph.getLocalLWGraph();
83 const LO numRows = graph.GetNodeNumVertices();
86 for (LO i = 0; i < numRows; i++)
87 if (aggStat[i] !=
AGGREGATED && aggStat[i] !=
IGNORED && lclLWGraph.getNeighborVertices(i).length == 1) {
89 numNonAggregatedNodes--;
92 for(
size_t idx = 0; idx < aggstatHost.extent(0); ++idx) {
93 aggstatHost(idx) = aggStat[idx];
95 Kokkos::deep_copy(aggstat, aggstatHost);