Tpetra parallel linear algebra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Functions
Tpetra_Details_unpackCrsGraphAndCombine_def.hpp File Reference

Definition of functions for unpacking the entries of a Tpetra::CrsGraph for communication, in the case where it is valid to go to the KokkosSparse::CrsGraph (local sparse graph data structure) directly. More...

#include "TpetraCore_config.h"
#include "Teuchos_Array.hpp"
#include "Teuchos_ArrayView.hpp"
#include "Tpetra_Details_castAwayConstDualView.hpp"
#include "Tpetra_Details_computeOffsets.hpp"
#include "Tpetra_Details_createMirrorView.hpp"
#include "Tpetra_Details_OrdinalTraits.hpp"
#include "Tpetra_Details_Behavior.hpp"
#include "Tpetra_CrsGraph_decl.hpp"
#include "Tpetra_Details_getEntryOnHost.hpp"
#include "Tpetra_Details_crsUtils.hpp"
#include "Kokkos_Core.hpp"
#include <memory>
#include <string>

Go to the source code of this file.

Classes

class  Tpetra::Details::UnpackAndCombineCrsGraphImpl::UnpackAndCombineFunctor< LocalOrdinal, Packet, RowView, IndicesView, BufferDevice >
 Unpacks and combines a single row of the CrsGraph. More...
 

Namespaces

 Tpetra
 Namespace Tpetra contains the class and methods constituting the Tpetra library.
 
 Tpetra::Details
 Nonmember function that computes a residual Computes R = B - A * X.
 

Functions

template<class Packet , class GO , class Device , class BufferDevice >
KOKKOS_FUNCTION int Tpetra::Details::UnpackAndCombineCrsGraphImpl::unpackRow (const Kokkos::View< GO *, Device, Kokkos::MemoryUnmanaged > &gids_out, const Kokkos::View< int *, Device, Kokkos::MemoryUnmanaged > &pids_out, const Kokkos::View< const Packet *, BufferDevice > &imports, const size_t offset, const size_t num_ent)
 Unpack a single row of a CrsGraph. More...
 
template<class LocalOrdinal , class GlobalOrdinal , class Node , class RowView , class IndicesView , class BufferDevice >
void Tpetra::Details::UnpackAndCombineCrsGraphImpl::unpackAndCombine (const RowView &row_ptrs_beg, const RowView &row_ptrs_end, IndicesView &indices, const Kokkos::View< const GlobalOrdinal *, BufferDevice, Kokkos::MemoryUnmanaged > &imports, const Kokkos::View< const size_t *, BufferDevice, Kokkos::MemoryUnmanaged > &num_packets_per_lid, const Kokkos::View< const LocalOrdinal *, BufferDevice, Kokkos::MemoryUnmanaged > &import_lids, const typename CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::padding_type &padding, const bool unpack_pids, const int myRank, const bool verbose)
 Perform the unpack operation for the graph. More...
 
template<class Packet , class LO , class Device , class BufferDevice >
void Tpetra::Details::UnpackAndCombineCrsGraphImpl::setupRowPointersForRemotes (const Kokkos::View< size_t *, Device > &tgt_rowptr, const Kokkos::View< const LO *, BufferDevice > &import_lids, const Kokkos::View< const Packet *, BufferDevice > &, const Kokkos::View< const size_t *, BufferDevice > &num_packets_per_lid)
 Setup row pointers for remotes. More...
 
template<class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::Details::unpackAndCombineWithOwningPIDsCount (const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > &sourceGraph, const Teuchos::ArrayView< const LocalOrdinal > &importLIDs, const Teuchos::ArrayView< const typename CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::packet_type > &imports, const Teuchos::ArrayView< const size_t > &numPacketsPerLID, size_t, CombineMode, size_t numSameIDs, const Teuchos::ArrayView< const LocalOrdinal > &permuteToLIDs, const Teuchos::ArrayView< const LocalOrdinal > &permuteFromLIDs)
 Special version of Tpetra::Details::unpackCrsGraphAndCombine that also unpacks owning process ranks. More...
 
template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Details::unpackAndCombineIntoCrsArrays (const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > &sourceGraph, const Teuchos::ArrayView< const LocalOrdinal > &importLIDs, const Teuchos::ArrayView< const typename CrsGraph< LocalOrdinal, GlobalOrdinal, Node >::packet_type > &imports, const Teuchos::ArrayView< const size_t > &numPacketsPerLID, const size_t, const CombineMode, const size_t numSameIDs, const Teuchos::ArrayView< const LocalOrdinal > &permuteToLIDs, const Teuchos::ArrayView< const LocalOrdinal > &permuteFromLIDs, size_t TargetNumRows, size_t TargetNumNonzeros, const int MyTargetPID, const Teuchos::ArrayView< size_t > &CRS_rowptr, const Teuchos::ArrayView< GlobalOrdinal > &CRS_colind, const Teuchos::ArrayView< const int > &SourcePids, Teuchos::Array< int > &TargetPids)
 unpackAndCombineIntoCrsArrays More...
 

Detailed Description

Definition of functions for unpacking the entries of a Tpetra::CrsGraph for communication, in the case where it is valid to go to the KokkosSparse::CrsGraph (local sparse graph data structure) directly.

Warning
This file, and its contents, are implementation details of Tpetra. The file itself or its contents may disappear or change at any time.

Data (bytes) describing the row of the CRS graph are "packed" (concatenated) in to a (view of) Packet* object in the following order:

  1. global column indices (GlobalOrdinal)
  2. proces IDs (optional, int)

The functions in this file are companions to Tpetra_Details_packCrsGraph.hpp, i.e., Tpetra_Details_packCrsGraph.hpp implements the packing order described above to ensure proper unpacking.

Definition in file Tpetra_Details_unpackCrsGraphAndCombine_def.hpp.