46 #ifndef MUELU_ISOLATEDNODEAGGREGATIONALGORITHM_KOKKOS_DEF_HPP
47 #define MUELU_ISOLATEDNODEAGGREGATIONALGORITHM_KOKKOS_DEF_HPP
49 #ifdef HAVE_MUELU_KOKKOS_REFACTOR
51 #include <Teuchos_Comm.hpp>
52 #include <Teuchos_CommHelpers.hpp>
54 #include <Xpetra_Vector.hpp>
56 #include "MueLu_IsolatedNodeAggregationAlgorithm_kokkos.hpp"
58 #include "MueLu_LWGraph_kokkos.hpp"
59 #include "MueLu_Aggregates_kokkos.hpp"
65 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
66 void IsolatedNodeAggregationAlgorithm_kokkos<LocalOrdinal, GlobalOrdinal, Node>::
67 BuildAggregates(
const ParameterList& ,
68 const LWGraph_kokkos& graph,
71 LO& numNonAggregatedNodes)
const {
72 Monitor m(*
this,
"BuildAggregates");
75 = Kokkos::create_mirror(aggstat);
77 std::vector<unsigned> aggStat;
78 aggStat.resize(aggstatHost.
extent(0));
79 for(
size_t idx = 0; idx < aggstatHost.
extent(0); ++idx) {
80 aggStat[idx] = aggstatHost(idx);
83 const LO numRows = graph.GetNodeNumVertices();
86 for (LO i = 0; i < numRows; i++)
87 if (aggStat[i] !=
AGGREGATED && aggStat[i] !=
IGNORED && graph.getNeighborVertices(i).length == 1) {
89 numNonAggregatedNodes--;
92 for(
size_t idx = 0; idx < aggstatHost.
extent(0); ++idx) {
93 aggstatHost(idx) = aggStat[idx];
100 #endif // HAVE_MUELU_KOKKOS_REFACTOR
101 #endif // MUELU_ISOLATEDNODEAGGREGATIONALGORITHM_KOKKOS_DEF_HPP
void deep_copy(const View< DT, DP...> &dst, typename ViewTraits< DT, DP...>::const_value_type &value, typename std::enable_if< std::is_same< typename ViewTraits< DT, DP...>::specialize, void >::value >::type *=nullptr)
KOKKOS_INLINE_FUNCTION constexpr std::enable_if< std::is_integral< iType >::value, size_t >::type extent(const iType &r) const noexcept