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> 
   64 #include "MueLu_LWGraph_kokkos.hpp" 
   65 #include "MueLu_IndexManager_kokkos.hpp" 
   67 #define MUELU_UNAGGREGATED  -1    
   70 #define MUELU_UNASSIGNED    -1    
  103   template <
class LocalOrdinal, 
class GlobalOrdinal, 
class Node>
 
  104   class Aggregates_kokkos;
 
  106   template <
class LocalOrdinal, 
class GlobalOrdinal, 
class DeviceType>
 
  107   class Aggregates_kokkos<
LocalOrdinal, 
GlobalOrdinal, Kokkos::Compat::KokkosDeviceWrapperNode<DeviceType> > : 
public BaseClass {
 
  115     using execution_space     = 
typename DeviceType::execution_space;
 
  116     using node_type           = Kokkos::Compat::KokkosDeviceWrapperNode<DeviceType>;
 
  117     using device_type         = DeviceType;
 
  124     typedef node_type                                           
Node;
 
  125 #undef MUELU_AGGREGATES_KOKKOS_SHORT 
  131     using local_graph_type = 
typename LWGraph_kokkos::local_graph_type;
 
  132     using colors_view_type = 
Kokkos::View<
typename local_graph_type::entries_type::data_type,
 
  133                                           typename local_graph_type::device_type::memory_space>;
 
  142     Aggregates_kokkos(LWGraph_kokkos graph);
 
  149     Aggregates_kokkos(
const RCP<const Map>& map);
 
  154     virtual ~Aggregates_kokkos() { }
 
  162     RCP<IndexManager_kokkos>& GetIndexManager() { 
return geoData_; }
 
  167     void SetIndexManager(RCP<IndexManager_kokkos> & geoData) { geoData_ = geoData; }
 
  172     colors_view_type& GetGraphColors() { 
return graphColors_; }
 
  177     void SetGraphColors(colors_view_type graphColors) { graphColors_ = graphColors; }
 
  181     LO GetGraphNumColors() { 
return graphNumColors_; }
 
  185     void SetGraphNumColors(
const LO graphNumColors) { graphNumColors_ = graphNumColors; }
 
  193     void SetNumAggregates(
LO nAggregates) { numAggregates_ = nAggregates; }
 
  196     KOKKOS_INLINE_FUNCTION 
LO GetNumAggregates()
 const {
 
  197       return numAggregates_;
 
  201     KOKKOS_INLINE_FUNCTION 
void AggregatesCrossProcessors(
const bool& flag) {
 
  202       aggregatesIncludeGhosts_ = flag;
 
  209     KOKKOS_INLINE_FUNCTION 
bool AggregatesCrossProcessors()
 const {
 
  210       return aggregatesIncludeGhosts_;
 
  217     RCP<LOVector>& GetVertex2AggIdNonConst()     { 
return vertex2AggId_;       }
 
  223     RCP<LOVector>& GetProcWinnerNonConst()       { 
return procWinner_;         }
 
  228     const RCP<LOVector>& GetVertex2AggId()
 const { 
return vertex2AggId_;       }
 
  234     const RCP<LOVector>& GetProcWinner()
 const   { 
return procWinner_;         }
 
  237     KOKKOS_INLINE_FUNCTION
 
  238     bool IsRoot(
LO i)
 const                      { 
return isRoot_(i);          }
 
  244     KOKKOS_INLINE_FUNCTION
 
  245     void SetIsRoot(
LO i, 
bool value = 
true)      { isRoot_(i) = value;         }
 
  247     const RCP<const Map> GetMap() 
const; 
 
  258     typename aggregates_sizes_type::const_type ComputeAggregateSizes(
bool forceRecompute = 
false) 
const;
 
  260     local_graph_type GetGraph() 
const;
 
  266     std::string description() 
const;
 
  279     RCP<LOVector> vertex2AggId_;
 
  285     RCP<LOVector> procWinner_;
 
  290     RCP<IndexManager_kokkos> geoData_;
 
  295     colors_view_type graphColors_;
 
  305     bool aggregatesIncludeGhosts_;
 
  309     aggregates_sizes_type aggregateSizes_;
 
  313     local_graph_type graph_;
 
  317     GO GetNumGlobalAggregates() 
const;
 
  322 #endif // HAVE_MUELU_KOKKOS_REFACTOR 
  324 #define MUELU_AGGREGATES_KOKKOS_SHORT 
  325 #endif // MUELU_AGGREGATES_KOKKOS_DECL_HPP 
MueLu::DefaultLocalOrdinal LocalOrdinal
 
MueLu::DefaultGlobalOrdinal GlobalOrdinal