47 #ifndef MUELU_AGGREGATES_KOKKOS_DECL_HPP 48 #define MUELU_AGGREGATES_KOKKOS_DECL_HPP 51 #ifdef HAVE_MUELU_KOKKOS_REFACTOR 53 #include <Kokkos_StaticCrsGraph.hpp> 54 #include <KokkosCompat_ClassicNodeAPI_Wrapper.hpp> 66 #define MUELU_UNAGGREGATED -1 69 #define MUELU_UNASSIGNED -1 102 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
103 class Aggregates_kokkos;
105 template <
class LocalOrdinal,
class GlobalOrdinal,
class DeviceType>
106 class Aggregates_kokkos<LocalOrdinal, GlobalOrdinal,
Kokkos::Compat::KokkosDeviceWrapperNode<DeviceType> > :
public BaseClass {
108 typedef LocalOrdinal local_ordinal_type;
109 typedef GlobalOrdinal global_ordinal_type;
110 typedef typename DeviceType::execution_space execution_space;
112 typedef Kokkos::Compat::KokkosDeviceWrapperNode<DeviceType> node_type;
113 typedef DeviceType device_type;
120 typedef node_type Node;
121 #undef MUELU_AGGREGATES_KOKKOS_SHORT 135 Aggregates_kokkos(LWGraph_kokkos graph);
142 Aggregates_kokkos(
const RCP<const Map>& map);
147 virtual ~Aggregates_kokkos() { }
150 KOKKOS_INLINE_FUNCTION
LO GetNumAggregates()
const {
151 return numAggregates_;
158 void SetNumAggregates(
LO nAggregates) { numAggregates_ = nAggregates; }
161 KOKKOS_INLINE_FUNCTION
void AggregatesCrossProcessors(
const bool& flag) {
162 aggregatesIncludeGhosts_ = flag;
169 KOKKOS_INLINE_FUNCTION
bool AggregatesCrossProcessors()
const {
170 return aggregatesIncludeGhosts_;
177 RCP<LOVector>& GetVertex2AggIdNonConst() {
return vertex2AggId_; }
183 RCP<LOVector>& GetProcWinnerNonConst() {
return procWinner_; }
188 const RCP<LOVector>& GetVertex2AggId()
const {
return vertex2AggId_; }
194 const RCP<LOVector>& GetProcWinner()
const {
return procWinner_; }
197 KOKKOS_INLINE_FUNCTION
198 bool IsRoot(
LO i)
const {
return isRoot_(i); }
204 KOKKOS_INLINE_FUNCTION
205 void SetIsRoot(
LO i,
bool value =
true) { isRoot_(i) = value; }
207 const RCP<const Map> GetMap()
const;
218 typename aggregates_sizes_type::const_type ComputeAggregateSizes(
bool forceRecompute =
false)
const;
220 local_graph_type GetGraph()
const;
226 std::string description()
const;
239 RCP<LOVector> vertex2AggId_;
245 RCP<LOVector> procWinner_;
250 bool aggregatesIncludeGhosts_;
254 aggregates_sizes_type aggregateSizes_;
258 local_graph_type graph_;
262 GO GetNumGlobalAggregates()
const;
267 #endif // HAVE_MUELU_KOKKOS_REFACTOR 269 #define MUELU_AGGREGATES_KOKKOS_SHORT 270 #endif // MUELU_AGGREGATES_KOKKOS_DECL_HPP
Namespace for MueLu classes and methods.