40#ifndef TPETRA_CRSGRAPH_DECL_HPP
41#define TPETRA_CRSGRAPH_DECL_HPP
49#include "Tpetra_DistObject.hpp"
50#include "Tpetra_Exceptions.hpp"
51#include "Tpetra_RowGraph.hpp"
53#include "Tpetra_Details_WrappedDualView.hpp"
55#include "KokkosSparse_findRelOffset.hpp"
56#include "Kokkos_DualView.hpp"
57#include "Kokkos_StaticCrsGraph.hpp"
59#include "Teuchos_CommHelpers.hpp"
60#include "Teuchos_Describable.hpp"
61#include "Teuchos_OrdinalTraits.hpp"
62#include "Teuchos_ParameterListAcceptorDefaultBase.hpp"
71 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
class crsGraph_Swap_Tester;
73#ifndef DOXYGEN_SHOULD_SKIP_THIS
75 template<
class LocalOrdinal,
82 template<
class ViewType>
83 struct UnmanagedView {
84 static_assert (Kokkos::is_view<ViewType>::value,
85 "ViewType must be a Kokkos::View specialization.");
89 typedef Kokkos::View<
typename ViewType::data_type,
90 typename ViewType::array_layout,
91 typename ViewType::device_type,
92 Kokkos::MemoryUnmanaged> type;
215 template <
class LocalOrdinal,
219 public RowGraph<LocalOrdinal, GlobalOrdinal, Node>,
224 public Teuchos::ParameterListAcceptorDefaultBase
226 template <
class S,
class LO,
class GO,
class N>
228 template <
class LO2,
class GO2,
class N2>
230 template <
class LO,
class GO,
class N>
256#ifdef TPETRA_ENABLE_DEPRECATED_CODE
272 using local_inds_dualv_type =
273 Kokkos::DualView<local_ordinal_type*, device_type>;
274 using local_inds_wdv_type =
275 Details::WrappedDualView<local_inds_dualv_type>;
278 using global_inds_dualv_type =
279 Kokkos::DualView<global_ordinal_type*, device_type>;
280 using global_inds_wdv_type =
281 Details::WrappedDualView<global_inds_dualv_type>;
285 using row_ptrs_device_view_type =
286 typename row_graph_type::row_ptrs_device_view_type;
287 using row_ptrs_host_view_type =
288 typename row_graph_type::row_ptrs_host_view_type;
292 typename row_graph_type::local_inds_device_view_type;
293 using local_inds_host_view_type =
294 typename row_graph_type::local_inds_host_view_type;
295 using nonconst_local_inds_host_view_type =
296 typename row_graph_type::nonconst_local_inds_host_view_type;
300 typename row_graph_type::global_inds_device_view_type;
301 using global_inds_host_view_type =
302 typename row_graph_type::global_inds_host_view_type;
303 using nonconst_global_inds_host_view_type =
304 typename row_graph_type::nonconst_global_inds_host_view_type;
306 using offset_device_view_type =
307 typename row_ptrs_device_view_type::non_const_type;
341 CrsGraph (
const Teuchos::RCP<const map_type>& rowMap,
342 const size_t maxNumEntriesPerRow,
343 const ProfileType pftype = TPETRA_DEFAULT_PROFILE_TYPE,
344 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);
360 CrsGraph (
const Teuchos::RCP<const map_type>& rowMap,
361 const Kokkos::DualView<const size_t*, device_type>& numEntPerRow,
362 const ProfileType pftype = TPETRA_DEFAULT_PROFILE_TYPE,
363 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);
380 CrsGraph (
const Teuchos::RCP<const map_type>& rowMap,
381 const Teuchos::ArrayView<const size_t>& numEntPerRow,
382 const ProfileType pftype = TPETRA_DEFAULT_PROFILE_TYPE,
383 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);
404 CrsGraph (
const Teuchos::RCP<const map_type>& rowMap,
405 const Teuchos::RCP<const map_type>& colMap,
406 const size_t maxNumEntriesPerRow,
407 const ProfileType pftype = TPETRA_DEFAULT_PROFILE_TYPE,
408 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);
426 CrsGraph (
const Teuchos::RCP<const map_type>& rowMap,
427 const Teuchos::RCP<const map_type>& colMap,
428 const Kokkos::DualView<const size_t*, device_type>& numEntPerRow,
429 const ProfileType pftype = TPETRA_DEFAULT_PROFILE_TYPE,
430 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);
449 CrsGraph (
const Teuchos::RCP<const map_type>& rowMap,
450 const Teuchos::RCP<const map_type>& colMap,
451 const Teuchos::ArrayView<const size_t>& numEntPerRow,
452 const ProfileType pftype = TPETRA_DEFAULT_PROFILE_TYPE,
453 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);
468 const Teuchos::RCP<const map_type>& rowMap,
469 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);
493 CrsGraph (
const Teuchos::RCP<const map_type>& rowMap,
494 const Teuchos::RCP<const map_type>& colMap,
495 const typename local_graph_device_type::row_map_type& rowPointers,
496 const typename local_graph_device_type::entries_type::non_const_type& columnIndices,
497 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);
521 CrsGraph (
const Teuchos::RCP<const map_type>& rowMap,
522 const Teuchos::RCP<const map_type>& colMap,
523 const Teuchos::ArrayRCP<size_t>& rowPointers,
524 const Teuchos::ArrayRCP<local_ordinal_type>& columnIndices,
525 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);
548 CrsGraph (
const Teuchos::RCP<const map_type>& rowMap,
549 const Teuchos::RCP<const map_type>& colMap,
551 const Teuchos::RCP<Teuchos::ParameterList>& params);
580 const Teuchos::RCP<const map_type>& rowMap,
581 const Teuchos::RCP<const map_type>& colMap,
582 const Teuchos::RCP<const map_type>& domainMap = Teuchos::null,
583 const Teuchos::RCP<const map_type>& rangeMap = Teuchos::null,
584 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);
591 const Teuchos::RCP<const map_type>& rowMap,
592 const Teuchos::RCP<const map_type>& colMap,
593 const Teuchos::RCP<const map_type>& domainMap,
594 const Teuchos::RCP<const map_type>& rangeMap,
595 const Teuchos::RCP<const import_type>& importer,
596 const Teuchos::RCP<const export_type>& exporter,
597 const Teuchos::RCP<Teuchos::ParameterList>& params =
675 setParameterList (
const Teuchos::RCP<Teuchos::ParameterList>& params)
override;
678 Teuchos::RCP<const Teuchos::ParameterList>
708 const Teuchos::ArrayView<const global_ordinal_type>& indices);
738 const Teuchos::ArrayView<const local_ordinal_type>& indices);
795 resumeFill (
const Teuchos::RCP<Teuchos::ParameterList>& params =
836 fillComplete (
const Teuchos::RCP<const map_type>& domainMap,
837 const Teuchos::RCP<const map_type>& rangeMap,
838 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);
868 fillComplete (
const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null);
900 const Teuchos::RCP<const map_type>& rangeMap,
901 const Teuchos::RCP<const import_type>& importer =
903 const Teuchos::RCP<const export_type>& exporter =
905 const Teuchos::RCP<Teuchos::ParameterList>& params =
912 Teuchos::RCP<const Teuchos::Comm<int> >
getComm()
const override;
916 Teuchos::RCP<const map_type>
getRowMap ()
const override;
919 Teuchos::RCP<const map_type>
getColMap ()
const override;
922 Teuchos::RCP<const map_type>
getDomainMap ()
const override;
925 Teuchos::RCP<const map_type>
getRangeMap ()
const override;
928 Teuchos::RCP<const import_type>
getImporter ()
const override;
931 Teuchos::RCP<const export_type>
getExporter ()
const override;
1115 nonconst_global_inds_host_view_type &gblColInds,
1116 size_t& numColInds)
const override;
1117#ifdef TPETRA_ENABLE_DEPRECATED_CODE
1120 const Teuchos::ArrayView<global_ordinal_type>& gblColInds,
1121 size_t& numColInds)
const override;
1132 nonconst_local_inds_host_view_type &gblColInds,
1133 size_t& numColInds)
const override;
1134#ifdef TPETRA_ENABLE_DEPRECATED_CODE
1137 const Teuchos::ArrayView<local_ordinal_type>& lclColInds,
1138 size_t& numColInds)
const override;
1141#ifdef TPETRA_ENABLE_DEPRECATED_CODE
1154 Teuchos::ArrayView<const global_ordinal_type>& gblColInds)
const override;
1170 global_inds_host_view_type &gblColInds)
const override;
1177#ifdef TPETRA_ENABLE_DEPRECATED_CODE
1190 Teuchos::ArrayView<const local_ordinal_type>& lclColInds)
const override;
1205 const LocalOrdinal lclRow,
1206 local_inds_host_view_type &lclColInds)
const override;
1219 describe (Teuchos::FancyOStream& out,
1220 const Teuchos::EVerbosityLevel verbLevel =
1221 Teuchos::Describable::verbLevel_default)
const override;
1241 const size_t numSameIDs,
1253 const bool verbose);
1255 std::unique_ptr<padding_type>
1259 const size_t numSameIDs,
1264 const bool verbose)
const;
1267 std::unique_ptr<padding_type>
1268 computeCrsPaddingForImports(
1271 Kokkos::DualView<packet_type*, buffer_device_type> imports,
1272 Kokkos::DualView<size_t*, buffer_device_type> numPacketsPerLID,
1273 const bool verbose)
const;
1275 std::unique_ptr<padding_type>
1276 computePaddingForCrsMatrixUnpack(
1279 Kokkos::DualView<char*, buffer_device_type> imports,
1280 Kokkos::DualView<size_t*, buffer_device_type> numPacketsPerLID,
1281 const bool verbose)
const;
1284 computeCrsPaddingForSameIDs(
1291 computeCrsPaddingForPermutedIDs(
1303 const Kokkos::DualView<const local_ordinal_type*, buffer_device_type>& exportLIDs,
1304 Kokkos::DualView<packet_type*, buffer_device_type>& exports,
1305 Kokkos::DualView<size_t*, buffer_device_type> numPacketsPerLID,
1306 size_t& constantNumPackets)
override;
1309 pack (
const Teuchos::ArrayView<const local_ordinal_type>& exportLIDs,
1310 Teuchos::Array<global_ordinal_type>& exports,
1311 const Teuchos::ArrayView<size_t>& numPacketsPerLID,
1312 size_t& constantNumPackets)
const override;
1315 packFillActive (
const Teuchos::ArrayView<const local_ordinal_type>& exportLIDs,
1316 Teuchos::Array<global_ordinal_type>& exports,
1317 const Teuchos::ArrayView<size_t>& numPacketsPerLID,
1318 size_t& constantNumPackets)
const;
1325 Kokkos::DualView<
size_t*,
1327 size_t& constantNumPackets)
const;
1335 Kokkos::DualView<
size_t*,
1337 const size_t constantNumPackets,
1387 getLocalDiagOffsets (
const Kokkos::View<size_t*, device_type, Kokkos::MemoryUnmanaged>& offsets)
const;
1430 size_t& boundForAllLocalRows,
1431 bool& boundSameForAllLocalRows)
const;
1443 setAllIndices (
const typename local_graph_device_type::row_map_type& rowPointers,
1444 const typename local_graph_device_type::entries_type::non_const_type& columnIndices);
1456 setAllIndices (
const Teuchos::ArrayRCP<size_t> & rowPointers,
1457 const Teuchos::ArrayRCP<local_ordinal_type> & columnIndices);
1491 void replaceColMap (
const Teuchos::RCP<const map_type>& newColMap);
1514 const Teuchos::RCP<const import_type>& newImport = Teuchos::null,
1515 const bool sortIndicesInEachRow =
true);
1541 const Teuchos::RCP<const import_type>& newImporter);
1567 const Teuchos::RCP<const export_type>& newExporter);
1601 template<
class DestViewType,
class SrcViewType,
1602 class DestOffsetViewType,
class SrcOffsetViewType >
1603 struct pack_functor {
1607 SrcOffsetViewType src_offset;
1608 DestOffsetViewType dest_offset;
1609 typedef typename DestOffsetViewType::non_const_value_type ScalarIndx;
1611 pack_functor(DestViewType dest_,
1612 const SrcViewType src_,
1613 DestOffsetViewType dest_offset_,
1614 const SrcOffsetViewType src_offset_):
1615 src(src_),dest(dest_),
1616 src_offset(src_offset_),dest_offset(dest_offset_) {};
1618 KOKKOS_INLINE_FUNCTION
1619 void operator() (
size_t row)
const {
1620 ScalarIndx i = src_offset(row);
1621 ScalarIndx j = dest_offset(row);
1622 const ScalarIndx k = dest_offset(row+1);
1631 template<
class CrsGraphType>
1632 friend Teuchos::RCP<CrsGraphType>
1633 importAndFillCompleteCrsGraph (
const Teuchos::RCP<const CrsGraphType>& sourceGraph,
1634 const Import<
typename CrsGraphType::local_ordinal_type,
1635 typename CrsGraphType::global_ordinal_type,
1636 typename CrsGraphType::node_type>& importer,
1637 const Teuchos::RCP<
const Map<
typename CrsGraphType::local_ordinal_type,
1638 typename CrsGraphType::global_ordinal_type,
1639 typename CrsGraphType::node_type> >& domainMap,
1640 const Teuchos::RCP<
const Map<
typename CrsGraphType::local_ordinal_type,
1641 typename CrsGraphType::global_ordinal_type,
1642 typename CrsGraphType::node_type> >& rangeMap,
1643 const Teuchos::RCP<Teuchos::ParameterList>& params);
1646 template<
class CrsGraphType>
1647 friend Teuchos::RCP<CrsGraphType>
1648 importAndFillCompleteCrsGraph (
const Teuchos::RCP<const CrsGraphType>& sourceGraph,
1649 const Import<
typename CrsGraphType::local_ordinal_type,
1650 typename CrsGraphType::global_ordinal_type,
1651 typename CrsGraphType::node_type>& rowImporter,
1652 const Import<
typename CrsGraphType::local_ordinal_type,
1653 typename CrsGraphType::global_ordinal_type,
1654 typename CrsGraphType::node_type>& domainImporter,
1655 const Teuchos::RCP<
const Map<
typename CrsGraphType::local_ordinal_type,
1656 typename CrsGraphType::global_ordinal_type,
1657 typename CrsGraphType::node_type> >& domainMap,
1658 const Teuchos::RCP<
const Map<
typename CrsGraphType::local_ordinal_type,
1659 typename CrsGraphType::global_ordinal_type,
1660 typename CrsGraphType::node_type> >& rangeMap,
1661 const Teuchos::RCP<Teuchos::ParameterList>& params);
1665 template<
class CrsGraphType>
1666 friend Teuchos::RCP<CrsGraphType>
1667 exportAndFillCompleteCrsGraph (
const Teuchos::RCP<const CrsGraphType>& sourceGraph,
1668 const Export<
typename CrsGraphType::local_ordinal_type,
1669 typename CrsGraphType::global_ordinal_type,
1670 typename CrsGraphType::node_type>& exporter,
1671 const Teuchos::RCP<
const Map<
typename CrsGraphType::local_ordinal_type,
1672 typename CrsGraphType::global_ordinal_type,
1673 typename CrsGraphType::node_type> >& domainMap,
1674 const Teuchos::RCP<
const Map<
typename CrsGraphType::local_ordinal_type,
1675 typename CrsGraphType::global_ordinal_type,
1676 typename CrsGraphType::node_type> >& rangeMap,
1677 const Teuchos::RCP<Teuchos::ParameterList>& params);
1680 template<
class CrsGraphType>
1681 friend Teuchos::RCP<CrsGraphType>
1682 exportAndFillCompleteCrsGraph (
const Teuchos::RCP<const CrsGraphType>& sourceGraph,
1683 const Export<
typename CrsGraphType::local_ordinal_type,
1684 typename CrsGraphType::global_ordinal_type,
1685 typename CrsGraphType::node_type>& rowExporter,
1686 const Export<
typename CrsGraphType::local_ordinal_type,
1687 typename CrsGraphType::global_ordinal_type,
1688 typename CrsGraphType::node_type>& domainExporter,
1689 const Teuchos::RCP<
const Map<
typename CrsGraphType::local_ordinal_type,
1690 typename CrsGraphType::global_ordinal_type,
1691 typename CrsGraphType::node_type> >& domainMap,
1692 const Teuchos::RCP<
const Map<
typename CrsGraphType::local_ordinal_type,
1693 typename CrsGraphType::global_ordinal_type,
1694 typename CrsGraphType::node_type> >& rangeMap,
1695 const Teuchos::RCP<Teuchos::ParameterList>& params);
1714 importAndFillComplete (Teuchos::RCP<CrsGraph<local_ordinal_type, global_ordinal_type, Node> >& destGraph,
1716 const Teuchos::RCP<const map_type>& domainMap,
1717 const Teuchos::RCP<const map_type>& rangeMap,
1718 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null)
const;
1736 importAndFillComplete (Teuchos::RCP<CrsGraph<local_ordinal_type, global_ordinal_type, Node> >& destGraph,
1739 const Teuchos::RCP<const map_type>& domainMap,
1740 const Teuchos::RCP<const map_type>& rangeMap,
1741 const Teuchos::RCP<Teuchos::ParameterList>& params)
const;
1760 exportAndFillComplete (Teuchos::RCP<CrsGraph<local_ordinal_type, global_ordinal_type, Node> >& destGraph,
1762 const Teuchos::RCP<const map_type>& domainMap = Teuchos::null,
1763 const Teuchos::RCP<const map_type>& rangeMap = Teuchos::null,
1764 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null)
const;
1782 exportAndFillComplete (Teuchos::RCP<CrsGraph<local_ordinal_type, global_ordinal_type, Node> >& destGraph,
1785 const Teuchos::RCP<const map_type>& domainMap,
1786 const Teuchos::RCP<const map_type>& rangeMap,
1787 const Teuchos::RCP<Teuchos::ParameterList>& params)
const;
1812 transferAndFillComplete (Teuchos::RCP<CrsGraph<local_ordinal_type, global_ordinal_type, Node> >& destGraph,
1813 const ::Tpetra::Details::Transfer<local_ordinal_type, global_ordinal_type, Node>& rowTransfer,
1814 const Teuchos::RCP<const ::Tpetra::Details::Transfer<local_ordinal_type, global_ordinal_type, Node> > & domainTransfer,
1815 const Teuchos::RCP<const map_type>& domainMap = Teuchos::null,
1816 const Teuchos::RCP<const map_type>& rangeMap = Teuchos::null,
1817 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null)
const;
1822 struct SLocalGlobalViews {
1823 Teuchos::ArrayView<const global_ordinal_type> ginds;
1824 Teuchos::ArrayView<const local_ordinal_type> linds;
1826 struct SLocalGlobalNCViews {
1827 Teuchos::ArrayView<global_ordinal_type> ginds;
1828 Teuchos::ArrayView<local_ordinal_type> linds;
1831 bool indicesAreAllocated ()
const;
1834 allocateIndices(
const ELocalGlobal lg,
const bool verbose=
false);
1848 void makeColMap (Teuchos::Array<int>& remotePIDs);
1870 std::pair<size_t, std::string>
1883 const bool useRemotePIDs);
1925 const SLocalGlobalViews& newInds,
1926 const ELocalGlobal lg,
1927 const ELocalGlobal I);
1941 const size_t numInputInds);
1955 const size_t numInputInds,
1956 std::function<
void(
const size_t,
const size_t,
const size_t)> fun =
1957 std::function<
void(
const size_t,
const size_t,
const size_t)>());
1961 const Teuchos::ArrayView<const local_ordinal_type>& gblColInds,
1962 std::function<
void(
const size_t,
const size_t,
const size_t)> fun =
1963 std::function<
void(
const size_t,
const size_t,
const size_t)>());
1982 const Teuchos::ArrayView<const global_ordinal_type>& indices,
1983 std::function<
void(
const size_t,
const size_t,
const size_t)> fun)
const;
2022#ifdef KOKKOS_ENABLE_SERIAL
2023 ! std::is_same<execution_space, Kokkos::Serial>::value;
2048 sortAndMergeAllIndices (
const bool sorted,
const bool merged);
2077 const Teuchos::RCP<const map_type>& rangeMap);
2079 void staticAssertions()
const;
2080 void clearGlobalConstants();
2105 bool haveLocalOffRankOffsets()
const {
return haveLocalOffRankOffsets_;}
2147#ifdef TPETRA_ENABLE_DEPRECATED_CODE
2152 Teuchos::ArrayView<const local_ordinal_type>
2153 getLocalView (
const RowInfo& rowinfo)
const;
2158#ifdef TPETRA_ENABLE_DEPRECATED_CODE
2163 Teuchos::ArrayView<const global_ordinal_type>
2164 getGlobalView (
const RowInfo& rowinfo)
const;
2176#ifdef TPETRA_ENABLE_DEPRECATED_CODE
2185 void fillLocalGraph (
const Teuchos::RCP<Teuchos::ParameterList>& params);
2193 void swap(CrsGraph<local_ordinal_type, global_ordinal_type, Node> & graph);
2228 Teuchos::OrdinalTraits<size_t>::invalid();
2234 Teuchos::OrdinalTraits<global_size_t>::invalid();
2241 Teuchos::OrdinalTraits<global_size_t>::invalid();
2259 row_ptrs_device_view_type rowPtrsUnpacked_dev_;
2260 row_ptrs_host_view_type rowPtrsUnpacked_host_;
2262 void setRowPtrsUnpacked(
const row_ptrs_device_view_type &dview) {
2263 rowPtrsUnpacked_dev_ = dview;
2264 rowPtrsUnpacked_host_ =
2265 Kokkos::create_mirror_view_and_copy(
2266 typename row_ptrs_device_view_type::host_mirror_space(),
2273 row_ptrs_device_view_type rowPtrsPacked_dev_;
2274 row_ptrs_host_view_type rowPtrsPacked_host_;
2276 void setRowPtrsPacked(
const row_ptrs_device_view_type &dview) {
2277 rowPtrsPacked_dev_ = dview;
2278 rowPtrsPacked_host_ =
2279 Kokkos::create_mirror_view_and_copy(
2280 typename row_ptrs_device_view_type::host_mirror_space(),
2328 typename local_inds_dualv_type::t_host::const_type
2334 typename local_inds_dualv_type::t_dev::const_type
2340 typename global_inds_dualv_type::t_host::const_type
2346 typename global_inds_dualv_type::t_dev::const_type
2352 typename local_inds_dualv_type::t_host
2384 typename Kokkos::View<const size_t*, device_type>::HostMirror
2472 Details::STORAGE_1D_UNPACKED;
2474 bool indicesAreAllocated_ =
false;
2475 bool indicesAreLocal_ =
false;
2476 bool indicesAreGlobal_ =
false;
2477 bool fillComplete_ =
false;
2489 mutable bool haveLocalOffRankOffsets_ =
false;
2491 typedef typename std::map<global_ordinal_type, std::vector<global_ordinal_type> > nonlocals_type;
2514 static bool getDebug();
2518 bool debug_ = getDebug();
2521 static bool getVerbose();
2526 bool verbose_ = getVerbose();
2530 mutable bool need_sync_host_uvm_access =
false;
2533 void set_need_sync_host_uvm_access() {
2534 need_sync_host_uvm_access =
true;
2538 void execute_sync_host_uvm_access()
const {
2539 if(need_sync_host_uvm_access) {
2541 need_sync_host_uvm_access =
false;
2553 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
2554 Teuchos::RCP<CrsGraph<LocalOrdinal, GlobalOrdinal, Node> >
2558 size_t maxNumEntriesPerRow = 0,
2559 const Teuchos::RCP<Teuchos::ParameterList>& params =
2564 const ProfileType pftype = TPETRA_DEFAULT_PROFILE_TYPE;
2565 return rcp(
new graph_type(map, maxNumEntriesPerRow,
2618 template<
class CrsGraphType>
2619 Teuchos::RCP<CrsGraphType>
2621 const Import<
typename CrsGraphType::local_ordinal_type,
2622 typename CrsGraphType::global_ordinal_type,
2623 typename CrsGraphType::node_type>& importer,
2624 const Teuchos::RCP<
const Map<
typename CrsGraphType::local_ordinal_type,
2625 typename CrsGraphType::global_ordinal_type,
2626 typename CrsGraphType::node_type> >& domainMap = Teuchos::null,
2627 const Teuchos::RCP<
const Map<
typename CrsGraphType::local_ordinal_type,
2628 typename CrsGraphType::global_ordinal_type,
2629 typename CrsGraphType::node_type> >& rangeMap = Teuchos::null,
2630 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null)
2632 Teuchos::RCP<CrsGraphType> destGraph;
2633 sourceGraph->importAndFillComplete (destGraph,importer,domainMap, rangeMap, params);
2687 template<
class CrsGraphType>
2688 Teuchos::RCP<CrsGraphType>
2690 const Import<
typename CrsGraphType::local_ordinal_type,
2691 typename CrsGraphType::global_ordinal_type,
2692 typename CrsGraphType::node_type>& rowImporter,
2693 const Import<
typename CrsGraphType::local_ordinal_type,
2694 typename CrsGraphType::global_ordinal_type,
2695 typename CrsGraphType::node_type>& domainImporter,
2696 const Teuchos::RCP<
const Map<
typename CrsGraphType::local_ordinal_type,
2697 typename CrsGraphType::global_ordinal_type,
2698 typename CrsGraphType::node_type> >& domainMap,
2699 const Teuchos::RCP<
const Map<
typename CrsGraphType::local_ordinal_type,
2700 typename CrsGraphType::global_ordinal_type,
2701 typename CrsGraphType::node_type> >& rangeMap,
2702 const Teuchos::RCP<Teuchos::ParameterList>& params)
2704 Teuchos::RCP<CrsGraphType> destGraph;
2705 sourceGraph->importAndFillComplete (destGraph,rowImporter,domainImporter, domainMap, rangeMap, params);
2742 template<
class CrsGraphType>
2743 Teuchos::RCP<CrsGraphType>
2745 const Export<
typename CrsGraphType::local_ordinal_type,
2746 typename CrsGraphType::global_ordinal_type,
2747 typename CrsGraphType::node_type>& exporter,
2748 const Teuchos::RCP<
const Map<
typename CrsGraphType::local_ordinal_type,
2749 typename CrsGraphType::global_ordinal_type,
2750 typename CrsGraphType::node_type> >& domainMap = Teuchos::null,
2751 const Teuchos::RCP<
const Map<
typename CrsGraphType::local_ordinal_type,
2752 typename CrsGraphType::global_ordinal_type,
2753 typename CrsGraphType::node_type> >& rangeMap = Teuchos::null,
2754 const Teuchos::RCP<Teuchos::ParameterList>& params = Teuchos::null)
2756 Teuchos::RCP<CrsGraphType> destGraph;
2757 sourceGraph->exportAndFillComplete (destGraph,exporter,domainMap, rangeMap, params);
2794 template<
class CrsGraphType>
2795 Teuchos::RCP<CrsGraphType>
2797 const Export<
typename CrsGraphType::local_ordinal_type,
2798 typename CrsGraphType::global_ordinal_type,
2799 typename CrsGraphType::node_type>& rowExporter,
2800 const Export<
typename CrsGraphType::local_ordinal_type,
2801 typename CrsGraphType::global_ordinal_type,
2802 typename CrsGraphType::node_type>& domainExporter,
2803 const Teuchos::RCP<
const Map<
typename CrsGraphType::local_ordinal_type,
2804 typename CrsGraphType::global_ordinal_type,
2805 typename CrsGraphType::node_type> >& domainMap,
2806 const Teuchos::RCP<
const Map<
typename CrsGraphType::local_ordinal_type,
2807 typename CrsGraphType::global_ordinal_type,
2808 typename CrsGraphType::node_type> >& rangeMap,
2809 const Teuchos::RCP<Teuchos::ParameterList>& params)
2811 Teuchos::RCP<CrsGraphType> destGraph;
2812 sourceGraph->exportAndFillComplete (destGraph,rowExporter,domainExporter,domainMap, rangeMap, params);
Forward declaration of Tpetra::BlockCrsMatrix.
Forward declaration of Tpetra::CrsGraph.
Forward declaration of Tpetra::CrsMatrix.
Stand-alone utility functions and macros.
A distributed graph accessed by rows (adjacency lists) and stored sparsely.
bool isMerged() const
Whether duplicate column indices in each row have been merged.
local_inds_dualv_type::t_dev::const_type getLocalIndsViewDevice(const RowInfo &rowinfo) const
Get a const, locally indexed view of the locally owned row myRow, such that rowinfo = getRowInfo(myRo...
global_size_t globalMaxNumRowEntries_
Global maximum of the number of entries in each row.
void reindexColumns(const Teuchos::RCP< const map_type > &newColMap, const Teuchos::RCP< const import_type > &newImport=Teuchos::null, const bool sortIndicesInEachRow=true)
Reindex the column indices in place, and replace the column Map. Optionally, replace the Import objec...
global_inds_dualv_type::t_host::const_type getGlobalIndsViewHost(const RowInfo &rowinfo) const
Get a const, globally indexed view of the locally owned row myRow, such that rowinfo = getRowInfo(myR...
size_t getNumEntriesInLocalRow(local_ordinal_type localRow) const override
Get the number of entries in the given row (local index).
Teuchos::RCP< CrsGraphType > importAndFillCompleteCrsGraph(const Teuchos::RCP< const CrsGraphType > &sourceGraph, const Import< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > &rowImporter, const Import< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > &domainImporter, const Teuchos::RCP< const Map< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > > &domainMap, const Teuchos::RCP< const Map< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > > &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
Nonmember CrsGraph constructor that fuses Import and fillComplete().
Teuchos::RCP< const map_type > getColMap() const override
Returns the Map that describes the column distribution in this graph.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const override
Default parameter list suitable for validation.
Details::EStorageStatus storageStatus_
Status of the graph's storage, when not in a fill-complete state.
::Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > import_type
The Import specialization used by this class.
global_ordinal_type packet_type
Type of each entry of the DistObject communication buffer.
GlobalOrdinal global_ordinal_type
The type of the graph's global indices.
void insertGlobalIndicesIntoNonownedRows(const global_ordinal_type gblRow, const global_ordinal_type gblColInds[], const local_ordinal_type numGblColInds)
Implementation of insertGlobalIndices for nonowned rows.
Teuchos::RCP< const map_type > rangeMap_
The Map describing the range of the (matrix corresponding to the) graph.
std::pair< size_t, std::string > makeIndicesLocal(const bool verbose=false)
Convert column indices from global to local.
global_size_t getGlobalNumEntries() const override
Returns the global number of entries in the graph.
bool isIdenticalTo(const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > &graph) const
Create a cloned CrsGraph for a different Node type.
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const override
Returns the communicator.
local_inds_wdv_type lclIndsUnpacked_wdv
Local ordinals of colum indices for all rows KDDKDD UVM Removal: Device view takes place of k_lclInds...
bool haveGlobalConstants() const
Returns true if globalConstants have been computed; false otherwise.
void globalAssemble()
Communicate nonlocal contributions to other processes.
RowInfo getRowInfoFromGlobalRowIndex(const global_ordinal_type gblRow) const
Get information about the locally owned row with global index gblRow.
void getLocalDiagOffsets(const Kokkos::View< size_t *, device_type, Kokkos::MemoryUnmanaged > &offsets) const
Get offsets of the diagonal entries in the graph.
size_t findGlobalIndices(const RowInfo &rowInfo, const Teuchos::ArrayView< const global_ordinal_type > &indices, std::function< void(const size_t, const size_t, const size_t)> fun) const
Finds indices in the given row.
CrsGraph(const CrsGraph< local_ordinal_type, global_ordinal_type, node_type > &)=default
Copy constructor (default).
void fillComplete(const Teuchos::RCP< const map_type > &domainMap, const Teuchos::RCP< const map_type > &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Tell the graph that you are done changing its structure.
global_inds_wdv_type gblInds_wdv
Global ordinals of column indices for all rows KDDKDD UVM Removal: Device view takes place of k_gblIn...
size_t nodeMaxNumRowEntries_
Local maximum of the number of entries in each row.
size_t sortAndMergeRowIndices(const RowInfo &rowInfo, const bool sorted, const bool merged)
Sort and merge duplicate column indices in the given row.
Teuchos::RCP< const import_type > importer_
The Import from the domain Map to the column Map.
Teuchos::RCP< CrsGraphType > exportAndFillCompleteCrsGraph(const Teuchos::RCP< const CrsGraphType > &sourceGraph, const Export< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > &exporter, const Teuchos::RCP< const Map< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > > &domainMap=Teuchos::null, const Teuchos::RCP< const Map< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > > &rangeMap=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Nonmember CrsGraph constructor that fuses Export and fillComplete().
num_row_entries_type k_numRowEntries_
The number of local entries in each locally owned row.
CrsGraph(CrsGraph< local_ordinal_type, global_ordinal_type, node_type > &&)=default
Move constructor (default).
size_t numAllocForAllRows_
The maximum number of entries to allow in each locally owned row.
bool hasColMap() const override
Whether the graph has a column Map.
LocalOrdinal local_ordinal_type
The type of the graph's local indices.
std::string description() const override
Return a one-line human-readable description of this object.
bool isStorageOptimized() const
Returns true if storage has been optimized.
void getGlobalRowCopy(global_ordinal_type gblRow, nonconst_global_inds_host_view_type &gblColInds, size_t &numColInds) const override
Get a copy of the given row, using global indices.
void removeLocalIndices(local_ordinal_type localRow)
Remove all graph indices from the specified local row.
void importAndFillComplete(Teuchos::RCP< CrsGraph< local_ordinal_type, global_ordinal_type, Node > > &destGraph, const import_type &importer, const Teuchos::RCP< const map_type > &domainMap, const Teuchos::RCP< const map_type > &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null) const
Import from this to the given destination graph, and make the result fill complete.
global_size_t getGlobalNumRows() const override
Returns the number of global rows in the graph.
Teuchos::RCP< const map_type > getDomainMap() const override
Returns the Map associated with the domain of this graph.
void replaceRangeMapAndExporter(const Teuchos::RCP< const map_type > &newRangeMap, const Teuchos::RCP< const export_type > &newExporter)
Replace the current Range Map and Export with the given parameters.
Teuchos::ArrayRCP< const local_ordinal_type > getNodePackedIndices() const
Get an Teuchos::ArrayRCP of the packed column-indices.
void computeLocalConstants()
Compute local constants, if they have not yet been computed.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const override
Print this object to the given output stream with the given verbosity level.
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > ¶ms) override
Set the given list of parameters (must be nonnull).
static const bool useAtomicUpdatesByDefault
Whether transformLocalValues should use atomic updates by default.
void resumeFill(const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Resume fill operations.
size_t insertIndices(RowInfo &rowInfo, const SLocalGlobalViews &newInds, const ELocalGlobal lg, const ELocalGlobal I)
Insert indices into the given row.
typename Node::device_type device_type
This class' Kokkos device type.
Teuchos::RCP< CrsGraphType > importAndFillCompleteCrsGraph(const Teuchos::RCP< const CrsGraphType > &sourceGraph, const Import< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > &importer, const Teuchos::RCP< const Map< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > > &domainMap=Teuchos::null, const Teuchos::RCP< const Map< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > > &rangeMap=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Nonmember CrsGraph constructor that fuses Import and fillComplete().
void insertGlobalIndicesFiltered(const local_ordinal_type lclRow, const global_ordinal_type gblColInds[], const local_ordinal_type numGblColInds)
Like insertGlobalIndices(), but with column Map filtering.
Kokkos::View< global_ordinal_type *, device_type > t_GlobalOrdinal_1D
Type of the k_gblInds1D_ array of global column indices.
RowInfo getRowInfo(const local_ordinal_type myRow) const
Get information about the locally owned row with local index myRow.
global_inds_dualv_type::t_dev::const_type getGlobalIndsViewDevice(const RowInfo &rowinfo) const
Get a const, globally indexed view of the locally owned row myRow, such that rowinfo = getRowInfo(myR...
typename local_graph_device_type::HostMirror local_graph_host_type
The type of the part of the sparse graph on each MPI process.
Teuchos::RCP< const map_type > colMap_
The Map describing the distribution of columns of the graph.
bool noRedundancies_
Whether the graph's indices are non-redundant (merged) in each row, on this process.
bool isSorted() const
Whether graph indices in all rows are known to be sorted.
Teuchos::RCP< CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > createCrsGraph(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, size_t maxNumEntriesPerRow=0, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Nonmember function to create an empty CrsGraph given a row Map and the max number of entries allowed ...
void setAllIndices(const typename local_graph_device_type::row_map_type &rowPointers, const typename local_graph_device_type::entries_type::non_const_type &columnIndices)
Set the graph's data directly, using 1-D storage.
void insertLocalIndices(const local_ordinal_type localRow, const Teuchos::ArrayView< const local_ordinal_type > &indices)
Insert local indices into the graph.
bool supportsRowViews() const override
Whether this class implements getLocalRowView() and getGlobalRowView() (it does).
size_t getNumEntriesInGlobalRow(global_ordinal_type globalRow) const override
Returns the current number of entries on this node in the specified global row.
Kokkos::View< size_t *, Kokkos::LayoutLeft, device_type >::HostMirror num_row_entries_type
Row offsets for "1-D" storage.
bool isFillComplete() const override
Whether fillComplete() has been called and the graph is in compute mode.
void setDomainRangeMaps(const Teuchos::RCP< const map_type > &domainMap, const Teuchos::RCP< const map_type > &rangeMap)
void swap(CrsGraph< local_ordinal_type, global_ordinal_type, Node > &graph)
Swaps the data from *this with the data and maps from graph.
CrsGraph & operator=(const CrsGraph< local_ordinal_type, global_ordinal_type, node_type > &)=default
Assignment operator (default).
void getGlobalRowView(const global_ordinal_type gblRow, global_inds_host_view_type &gblColInds) const override
Get a const view of the given global row's global column indices.
void exportAndFillComplete(Teuchos::RCP< CrsGraph< local_ordinal_type, global_ordinal_type, Node > > &destGraph, const export_type &exporter, const Teuchos::RCP< const map_type > &domainMap=Teuchos::null, const Teuchos::RCP< const map_type > &rangeMap=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null) const
Export from this to the given destination graph, and make the result fill complete.
void makeColMap(Teuchos::Array< int > &remotePIDs)
Make and set the graph's column Map.
bool haveGlobalConstants_
Whether all processes have computed global constants.
size_t getGlobalMaxNumRowEntries() const override
Maximum number of entries in any row of the graph, over all processes in the graph's communicator.
void getNumEntriesPerLocalRowUpperBound(Teuchos::ArrayRCP< const size_t > &boundPerLocalRow, size_t &boundForAllLocalRows, bool &boundSameForAllLocalRows) const
Get an upper bound on the number of entries that can be stored in each row.
void checkInternalState() const
Throw an exception if the internal state is not consistent.
typename dist_object_type::buffer_device_type buffer_device_type
Kokkos::Device specialization for communication buffers.
Teuchos::RCP< const map_type > getRangeMap() const override
Returns the Map associated with the domain of this graph.
typename row_graph_type::global_inds_device_view_type global_inds_device_view_type
The Kokkos::View type for views of global ordinals on device and host.
void expertStaticFillComplete(const Teuchos::RCP< const map_type > &domainMap, const Teuchos::RCP< const map_type > &rangeMap, const Teuchos::RCP< const import_type > &importer=Teuchos::null, const Teuchos::RCP< const export_type > &exporter=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
Perform a fillComplete on a graph that already has data, via setAllIndices().
bool sortGhostsAssociatedWithEachProcessor_
Whether to require makeColMap() (and therefore fillComplete()) to order column Map GIDs associated wi...
size_t getNumAllocatedEntriesInGlobalRow(global_ordinal_type globalRow) const
Current number of allocated entries in the given row on the calling (MPI) process,...
Teuchos::RCP< const export_type > getExporter() const override
Returns the exporter associated with this graph.
typename device_type::execution_space execution_space
This class' Kokkos execution space.
void makeImportExport(Teuchos::Array< int > &remotePIDs, const bool useRemotePIDs)
Make the Import and Export objects, if needed.
global_ordinal_type getIndexBase() const override
Returns the index base for global indices for this graph.
void getLocalRowCopy(local_ordinal_type gblRow, nonconst_local_inds_host_view_type &gblColInds, size_t &numColInds) const override
Get a copy of the given row, using local indices.
local_inds_dualv_type::t_host::const_type getLocalIndsViewHost(const RowInfo &rowinfo) const
Get a const, locally indexed view of the locally owned row myRow, such that rowinfo = getRowInfo(myRo...
bool isFillActive() const
Whether resumeFill() has been called and the graph is in edit mode.
Teuchos::RCP< const map_type > getRowMap() const override
Returns the Map that describes the row distribution in this graph.
global_size_t globalNumEntries_
Global number of entries in the graph.
size_t getNodeAllocationSize() const
The local number of indices allocated for the graph, over all rows on the calling (MPI) process.
size_t insertGlobalIndicesImpl(const local_ordinal_type lclRow, const global_ordinal_type inputGblColInds[], const size_t numInputInds)
Insert global indices, using an input local row index.
::Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node > export_type
The Export specialization used by this class.
Teuchos::RCP< const import_type > getImporter() const override
Returns the importer associated with this graph.
local_inds_wdv_type lclIndsPacked_wdv
Local ordinals of colum indices for all rows KDDKDD UVM Removal: Device view takes place of lclGraph_...
Kokkos::StaticCrsGraph< local_ordinal_type, Kokkos::LayoutLeft, device_type, void, size_t > local_graph_device_type
The type of the part of the sparse graph on each MPI process.
Teuchos::RCP< const map_type > domainMap_
The Map describing the domain of the (matrix corresponding to the) graph.
nonlocals_type nonlocals_
Nonlocal data given to insertGlobalIndices.
virtual void pack(const Teuchos::ArrayView< const local_ordinal_type > &exportLIDs, Teuchos::Array< global_ordinal_type > &exports, const Teuchos::ArrayView< size_t > &numPacketsPerLID, size_t &constantNumPackets) const override
Pack this object's data for Import or Export.
Teuchos::ArrayRCP< const size_t > getNodeRowPtrs() const
Get a host view of the row offsets.
size_t getNodeMaxNumRowEntries() const override
Maximum number of entries in any row of the graph, on this process.
void getLocalOffRankOffsets(offset_device_view_type &offsets) const
Get offsets of the off-rank entries in the graph.
global_size_t getGlobalNumCols() const override
Returns the number of global columns in the graph.
typename row_graph_type::local_inds_device_view_type local_inds_device_view_type
The Kokkos::View type for views of local ordinals on device and host.
bool indicesAreSorted_
Whether the graph's indices are sorted in each row, on this process.
Node node_type
This class' Kokkos Node type.
Teuchos::RCP< const export_type > exporter_
The Export from the row Map to the range Map.
size_t getNodeNumRows() const override
Returns the number of graph rows owned on the calling node.
void insertGlobalIndices(const global_ordinal_type globalRow, const Teuchos::ArrayView< const global_ordinal_type > &indices)
Insert global indices into the graph.
local_inds_dualv_type::t_host getLocalIndsViewHostNonConst(const RowInfo &rowinfo)
Get a ReadWrite locally indexed view of the locally owned row myRow, such that rowinfo = getRowInfo(m...
void replaceDomainMap(const Teuchos::RCP< const map_type > &newDomainMap)
Replace the current domain Map with the given objects.
size_t getNodeNumEntries() const override
The local number of entries in the graph.
Kokkos::View< constsize_t *, device_type >::HostMirror k_numAllocPerRow_
The maximum number of entries to allow in each locally owned row, per row.
void computeGlobalConstants()
Compute global constants, if they have not yet been computed.
size_t getNumAllocatedEntriesInLocalRow(local_ordinal_type localRow) const
Current number of allocated entries in the given row on the calling (MPI) process,...
virtual ~CrsGraph()=default
Destructor (virtual for memory safety of derived classes).
ProfileType getProfileType() const
Returns true if the graph was allocated with static data structures.
offset_device_view_type k_offRankOffsets_
The offsets for off-rank entries.
void replaceDomainMapAndImporter(const Teuchos::RCP< const map_type > &newDomainMap, const Teuchos::RCP< const import_type > &newImporter)
Replace the current domain Map and Import with the given parameters.
void setLocallyModified()
Report that we made a local modification to its structure.
void replaceRangeMap(const Teuchos::RCP< const map_type > &newRangeMap)
Replace the current Range Map with the given objects.
size_t getNodeNumCols() const override
Returns the number of columns connected to the locally owned rows of this graph.
Teuchos::RCP< const map_type > rowMap_
The Map describing the distribution of rows of the graph.
Teuchos::RCP< CrsGraphType > exportAndFillCompleteCrsGraph(const Teuchos::RCP< const CrsGraphType > &sourceGraph, const Export< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > &rowExporter, const Export< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > &domainExporter, const Teuchos::RCP< const Map< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > > &domainMap, const Teuchos::RCP< const Map< typename CrsGraphType::local_ordinal_type, typename CrsGraphType::global_ordinal_type, typename CrsGraphType::node_type > > &rangeMap, const Teuchos::RCP< Teuchos::ParameterList > ¶ms)
Nonmember CrsGraph constructor that fuses Export and fillComplete().
virtual void removeEmptyProcessesInPlace(const Teuchos::RCP< const map_type > &newMap) override
Remove processes owning zero rows from the Maps and their communicator.
void getLocalRowView(const LocalOrdinal lclRow, local_inds_host_view_type &lclColInds) const override
Get a const view of the given local row's local column indices.
bool isGloballyIndexed() const override
Whether the graph's column indices are stored as global indices.
bool isLocallyIndexed() const override
Whether the graph's column indices are stored as local indices.
virtual bool checkSizes(const SrcDistObject &source) override
Compare the source and target (this) objects for compatibility.
local_graph_device_type getLocalGraphDevice() const
Get the local graph.
void replaceColMap(const Teuchos::RCP< const map_type > &newColMap)
Replace the graph's current column Map with the given Map.
bool haveLocalConstants_
Whether this process has computed local constants.
Sparse matrix that presents a row-oriented interface that lets users read or modify entries.
Keep track of how much more space a CrsGraph or CrsMatrix needs, when the graph or matrix is the targ...
Base class for distributed Tpetra objects that support data redistribution.
Kokkos::Device< typename device_type::execution_space, buffer_memory_space > buffer_device_type
Kokkos::Device specialization for communication buffers.
Communication plan for data redistribution from a (possibly) multiply-owned to a uniquely-owned distr...
A distributed graph accessed by rows (adjacency lists) and stored sparsely.
Communication plan for data redistribution from a uniquely-owned to a (possibly) multiply-owned distr...
A parallel distribution of indices over processes.
An abstract interface for graphs accessed by rows.
Abstract base class for objects that can be the source of an Import or Export operation.
Implementation details of Tpetra.
EStorageStatus
Status of the graph's or matrix's storage, when not in a fill-complete state.
Namespace Tpetra contains the class and methods constituting the Tpetra library.
size_t global_size_t
Global size_t object.
CombineMode
Rule for combining data in an Import or Export.
Allocation information for a locally owned row in a CrsGraph or CrsMatrix.