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

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

#include "TpetraCore_config.h"
#include "Tpetra_CombineMode.hpp"
#include "Kokkos_DualView.hpp"
#include "Tpetra_CrsMatrix_fwd.hpp"
#include "Tpetra_DistObject_decl.hpp"
#include "Tpetra_Details_DefaultTypes.hpp"

Go to the source code of this file.

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<typename ST , typename LO , typename GO , typename NT >
void Tpetra::Details::unpackCrsMatrixAndCombine (const CrsMatrix< ST, LO, GO, NT > &sourceMatrix, const Teuchos::ArrayView< const char > &imports, const Teuchos::ArrayView< const size_t > &numPacketsPerLID, const Teuchos::ArrayView< const LO > &importLIDs, size_t constantNumPackets, CombineMode combineMode)
 Unpack the imported column indices and values, and combine into matrix. More...
 
template<typename Scalar , typename LocalOrdinal , typename GlobalOrdinal , typename Node >
size_t Tpetra::Details::unpackAndCombineWithOwningPIDsCount (const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &sourceMatrix, const Teuchos::ArrayView< const LocalOrdinal > &importLIDs, const Teuchos::ArrayView< const char > &imports, const Teuchos::ArrayView< const size_t > &numPacketsPerLID, size_t constantNumPackets, CombineMode combineMode, size_t numSameIDs, const Teuchos::ArrayView< const LocalOrdinal > &permuteToLIDs, const Teuchos::ArrayView< const LocalOrdinal > &permuteFromLIDs)
 Special version of Tpetra::Details::unpackCrsMatrixAndCombine that also unpacks owning process ranks. More...
 
template<typename Scalar , typename LocalOrdinal , typename GlobalOrdinal , typename Node >
void Tpetra::Details::unpackAndCombineIntoCrsArrays (const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &sourceMatrix, const Kokkos::View< LocalOrdinal const *, Kokkos::Device< typename Node::device_type::execution_space, Tpetra::Details::DefaultTypes::comm_buffer_memory_space< typename Node::device_type >>, void, void >, const Kokkos::View< const char *, Kokkos::Device< typename Node::device_type::execution_space, Tpetra::Details::DefaultTypes::comm_buffer_memory_space< typename Node::device_type >>, void, void >, const Kokkos::View< const size_t *, Kokkos::Device< typename Node::device_type::execution_space, Tpetra::Details::DefaultTypes::comm_buffer_memory_space< typename Node::device_type >>, void, void >, const size_t numSameIDs, const Kokkos::View< LocalOrdinal const *, Kokkos::Device< typename Node::device_type::execution_space, Tpetra::Details::DefaultTypes::comm_buffer_memory_space< typename Node::device_type >>, void, void >, const Kokkos::View< LocalOrdinal const *, Kokkos::Device< typename Node::device_type::execution_space, Tpetra::Details::DefaultTypes::comm_buffer_memory_space< typename Node::device_type >>, void, void >, size_t TargetNumRows, const int MyTargetPID, Teuchos::ArrayRCP< size_t > &CRS_rowptr, Teuchos::ArrayRCP< GlobalOrdinal > &CRS_colind, Teuchos::ArrayRCP< Scalar > &CRS_vals, const Teuchos::ArrayView< const int > &SourcePids, Teuchos::Array< int > &TargetPids)
 unpackAndCombineIntoCrsArrays More...
 
template<typename Scalar , typename LocalOrdinal , typename GlobalOrdinal , typename Node >
void Tpetra::Details::unpackAndCombineIntoCrsArrays (const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &sourceMatrix, const Kokkos::View< LocalOrdinal const *, Kokkos::Device< typename Node::device_type::execution_space, Tpetra::Details::DefaultTypes::comm_buffer_memory_space< typename Node::device_type >>, void, void > import_lids_d, const Kokkos::View< const char *, Kokkos::Device< typename Node::device_type::execution_space, Tpetra::Details::DefaultTypes::comm_buffer_memory_space< typename Node::device_type >>, void, void > imports_d, const Kokkos::View< const size_t *, Kokkos::Device< typename Node::device_type::execution_space, Tpetra::Details::DefaultTypes::comm_buffer_memory_space< typename Node::device_type >>, void, void > num_packets_per_lid_d, const size_t numSameIDs, const Kokkos::View< LocalOrdinal const *, Kokkos::Device< typename Node::device_type::execution_space, Tpetra::Details::DefaultTypes::comm_buffer_memory_space< typename Node::device_type >>, void, void > permute_to_lids_d, const Kokkos::View< LocalOrdinal const *, Kokkos::Device< typename Node::device_type::execution_space, Tpetra::Details::DefaultTypes::comm_buffer_memory_space< typename Node::device_type >>, void, void > permute_from_lids_d, size_t TargetNumRows, const int MyTargetPID, Kokkos::View< size_t *, typename Node::device_type > &crs_rowptr_d, Kokkos::View< GlobalOrdinal *, typename Node::device_type > &crs_colind_d, Kokkos::View< typename CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::impl_scalar_type *, typename Node::device_type > &crs_vals_d, const Teuchos::ArrayView< const int > &SourcePids, Kokkos::View< int *, typename Node::device_type > &TargetPids)
 unpackAndCombineIntoCrsArrays More...
 

Detailed Description

Declaration of functions for unpacking the entries of a Tpetra::CrsMatrix for communication, in the case where it is valid to go to the KokkosSparse::CrsMatrix (local sparse matrix 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 matrix are "packed" (concatenated) in to a (view of) char* object in the following order:

  1. number of entries (LocalOrdinal)
  2. global column indices (GlobalOrdinal)
  3. proces IDs (optional, int)
  4. row values (Scalar)

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

Definition in file Tpetra_Details_unpackCrsMatrixAndCombine_decl.hpp.