10 #ifndef TPETRA_DETAILS_GETGRAPHOFFRANKOFFSETS_DECL_HPP
11 #define TPETRA_DETAILS_GETGRAPHOFFRANKOFFSETS_DECL_HPP
18 #include "TpetraCore_config.h"
19 #include "Kokkos_Core.hpp"
20 #include "Kokkos_StaticCrsGraph.hpp"
22 #include <type_traits>
44 class OffsetType =
size_t>
47 typedef typename DeviceType::device_type device_type;
48 typedef OffsetType offset_type;
49 typedef ::Kokkos::View<offset_type*,
51 ::Kokkos::MemoryUnmanaged> offsets_type;
52 typedef ::Kokkos::StaticCrsGraph<LO,
55 void,
size_t> local_graph_type;
56 typedef ::Tpetra::Details::LocalMap<LO, GO, device_type>
local_map_type;
57 typedef ::Kokkos::View<
const typename local_graph_type::size_type*,
60 ::Kokkos::MemoryUnmanaged> row_offsets_type;
63 typedef ::Kokkos::View<
const LO*,
66 ::Kokkos::MemoryUnmanaged> lcl_col_inds_type;
72 const row_offsets_type& ptr,
73 const lcl_col_inds_type& ind);
76 KOKKOS_FUNCTION
void operator() (
const LO& lclRowInd)
const;
79 offsets_type OffRankOffsets_;
82 row_offsets_type ptr_;
83 lcl_col_inds_type ind_;
89 template<
class OffsetsType,
93 getGraphOffRankOffsets (
const OffsetsType& OffRankOffsets,
94 const LclMapType& lclColMap,
95 const LclMapType& lclDomMap,
96 const LclGraphType& lclGraph)
98 typedef typename OffsetsType::non_const_value_type offset_type;
99 typedef typename LclMapType::local_ordinal_type LO;
100 typedef typename LclMapType::global_ordinal_type GO;
101 typedef typename LclMapType::device_type DT;
106 impl_type impl (OffRankOffsets, lclColMap, lclDomMap, lclGraph.row_map, lclGraph.entries);
112 #endif // TPETRA_DETAILS_GETGRAPHOFFRANKOFFSETS_DECL_HPP
Implementation detail of Tpetra::Details::getGraphOffRankOffsets, which in turn is an implementation ...
Declaration and definition of the Tpetra::Map class, an implementation detail of Tpetra::Map.
GetGraphOffRankOffsets(const offsets_type &OffRankOffsets, const local_map_type &lclColMap, const local_map_type &lclDomMap, const row_offsets_type &ptr, const lcl_col_inds_type &ind)
Constructor; also runs the functor.
KOKKOS_FUNCTION void operator()(const LO &lclRowInd) const
Kokkos::parallel_for loop body.