46#ifndef MUELU_LOCALLWGRAPH_KOKKOS_DEF_HPP
47#define MUELU_LOCALLWGRAPH_KOKKOS_DEF_HPP
49#include <Kokkos_Core.hpp>
51#include <Teuchos_ArrayView.hpp>
59 template<
class LocalOrdinal,
class RowType>
60 class MaxNumRowEntriesFunctor {
62 MaxNumRowEntriesFunctor(RowType rowPointers) : rowPointers_(rowPointers) { }
64 KOKKOS_INLINE_FUNCTION
65 void operator()(
const LocalOrdinal i,
size_t& maxLength)
const {
66 size_t d = rowPointers_(i+1) - rowPointers_(i);
68 maxLength = (d > maxLength ? d : maxLength);
71 KOKKOS_INLINE_FUNCTION
72 void join(
volatile size_t& dest,
const volatile size_t& src) {
73 dest = (dest > src ? dest : src);
76 KOKKOS_INLINE_FUNCTION
77 void init(
size_t& initValue) {
87 template<
class LocalOrdinal,
class GlobalOrdinal,
class DeviceType>
90 const RCP<const map_type>& domainMap)
96 MaxNumRowEntriesFunctor<LO,typename local_graph_type::row_map_type> maxNumRowEntriesFunctor(
graph_.row_map);
MueLu::DefaultLocalOrdinal LocalOrdinal
LO minLocalIndex_
Local index boundaries (cached from domain map)
size_type maxNumRowEntries_
Kokkos::RangePolicy< local_ordinal_type, execution_space > range_type
const local_graph_type graph_
Underlying graph (with label)
Kokkos::StaticCrsGraph< LocalOrdinal, Kokkos::LayoutLeft, device_type, void, size_t > local_graph_type
LocalLWGraph_kokkos(const local_graph_type &graph, const RCP< const map_type > &domainMap)
LocalLWGraph constructor.
Namespace for MueLu classes and methods.