Tpetra Matrix/Vector Services Version of the Day
Related Functions
Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > Class Template Reference

Communication plan for data redistribution from a uniquely-owned to a (possibly) multiply-owned distribution. More...

#include <Tpetra_Import.hpp>

Inheritance diagram for Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

Constructor/Destructor Methods
 Import (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &source, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &target)
 Constructs a Import object from the source and target Maps.
 Import (const Import< LocalOrdinal, GlobalOrdinal, Node > &import)
 copy constructor.
 ~Import ()
 destructor.
Export Attribute Methods
size_t getNumSameIDs () const
 Returns the number of entries that are identical between the source and target maps, up to the first different ID.
size_t getNumPermuteIDs () const
 Returns the number of entries that are local to the calling image, but not part of the first getNumSameIDs() entries.
ArrayView< const LocalOrdinal > getPermuteFromLIDs () const
 List of entries in the source Map that are permuted. (non-persisting view)
ArrayView< const LocalOrdinal > getPermuteToLIDs () const
 List of entries in the target Map that are permuted. (non-persisting view)
size_t getNumRemoteIDs () const
 Returns the number of entries that are not on the calling image.
ArrayView< const LocalOrdinal > getRemoteLIDs () const
 List of entries in the target Map that are coming from other images. (non-persisting view)
size_t getNumExportIDs () const
 Returns the number of entries that must be sent by the calling image to other images.
ArrayView< const LocalOrdinal > getExportLIDs () const
 List of entries in the source Map that will be sent to other images. (non-persisting view)
ArrayView< const int > getExportImageIDs () const
 List of images to which entries will be sent, getExportLIDs() [i] will be sent to image getExportImageIDs() [i]. (non-persisting view)
const RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > & 
getSourceMap () const
 Returns the Source Map used to construct this importer.
const RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > & 
getTargetMap () const
 Returns the Target Map used to construct this importer.
DistributorgetDistributor () const
Import< LocalOrdinal,
GlobalOrdinal, Node > & 
operator= (const Import< LocalOrdinal, GlobalOrdinal, Node > &Source)
 Assignment operator.
I/O Methods
virtual void print (std::ostream &os) const
 Print method.

Related Functions

(Note that these are not member functions.)

template<class LO , class GO , class Node >
RCP< const Import< LO, GO, Node > > createImport (const RCP< const Map< LO, GO, Node > > &src, const RCP< const Map< LO, GO, Node > > &tgt)
 Non-member constructor for Import objects.

Detailed Description

template<class LocalOrdinal, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
class Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >

Communication plan for data redistribution from a uniquely-owned to a (possibly) multiply-owned distribution.

Tpetra users should use this class to construct a communication plan between two data distributions (i.e., two Map objects). The plan can be called repeatedly by computational classes to perform communication according to the same pattern. Constructing the plan may be expensive, but it can be reused inexpensively.

Tpetra has two classes for data redistribution: Import and Export. Import is for redistributing data from a uniquely-owned distribution to a possibly multiply-owned distribution. Export is for redistributing data from a possibly multiply-owned distribution to a uniquely-owned distribution.

One use case of Import is bringing in remote source vector data for a distributed sparse matrix-vector multiply. The source vector itself is uniquely owned, but must be brought in into an overlapping distribution so that each process can compute its part of the target vector without further communication.

Epetra separated Import and Export for performance reasons. The implementation is different, depending on which direction is the uniquely-owned Map. Tpetra retains this convention.

This class is templated on the same template arguments as Map: the local ordinal type (LocalOrdinal), the global ordinal type (GlobalOrdinal), and the Kokkos Node type (Node).

Definition at line 88 of file Tpetra_Import.hpp.


Constructor & Destructor Documentation

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::Import ( const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  source,
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  target 
)

Constructs a Import object from the source and target Maps.

Definition at line 234 of file Tpetra_Import.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::Import ( const Import< LocalOrdinal, GlobalOrdinal, Node > &  import)

copy constructor.

Definition at line 247 of file Tpetra_Import.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::~Import ( )

destructor.

Definition at line 252 of file Tpetra_Import.hpp.


Member Function Documentation

template<class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getNumSameIDs ( ) const [inline]

Returns the number of entries that are identical between the source and target maps, up to the first different ID.

Definition at line 256 of file Tpetra_Import.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getNumPermuteIDs ( ) const [inline]

Returns the number of entries that are local to the calling image, but not part of the first getNumSameIDs() entries.

Definition at line 261 of file Tpetra_Import.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
ArrayView< const LocalOrdinal > Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getPermuteFromLIDs ( ) const [inline]

List of entries in the source Map that are permuted. (non-persisting view)

Definition at line 267 of file Tpetra_Import.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
ArrayView< const LocalOrdinal > Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getPermuteToLIDs ( ) const [inline]

List of entries in the target Map that are permuted. (non-persisting view)

Definition at line 273 of file Tpetra_Import.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getNumRemoteIDs ( ) const [inline]

Returns the number of entries that are not on the calling image.

Definition at line 278 of file Tpetra_Import.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
ArrayView< const LocalOrdinal > Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getRemoteLIDs ( ) const [inline]

List of entries in the target Map that are coming from other images. (non-persisting view)

Definition at line 284 of file Tpetra_Import.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getNumExportIDs ( ) const [inline]

Returns the number of entries that must be sent by the calling image to other images.

Definition at line 289 of file Tpetra_Import.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
ArrayView< const LocalOrdinal > Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getExportLIDs ( ) const [inline]

List of entries in the source Map that will be sent to other images. (non-persisting view)

Definition at line 295 of file Tpetra_Import.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
ArrayView< const int > Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getExportImageIDs ( ) const [inline]

List of images to which entries will be sent, getExportLIDs() [i] will be sent to image getExportImageIDs() [i]. (non-persisting view)

Definition at line 301 of file Tpetra_Import.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getSourceMap ( ) const [inline]

Returns the Source Map used to construct this importer.

Definition at line 307 of file Tpetra_Import.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getTargetMap ( ) const [inline]

Returns the Target Map used to construct this importer.

Definition at line 313 of file Tpetra_Import.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Import< LocalOrdinal, GlobalOrdinal, Node > & Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::operator= ( const Import< LocalOrdinal, GlobalOrdinal, Node > &  Source)

Assignment operator.

Definition at line 325 of file Tpetra_Import.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::print ( std::ostream &  os) const [virtual]

Print method.

Definition at line 331 of file Tpetra_Import.hpp.


Friends And Related Function Documentation

template<class LO , class GO , class Node >
RCP< const Import< LO, GO, Node > > createImport ( const RCP< const Map< LO, GO, Node > > &  src,
const RCP< const Map< LO, GO, Node > > &  tgt 
) [related]

Non-member constructor for Import objects.

Creates a Import object from the given source and target maps.

Precondition:
src != null
tgt != null
Returns:
Returns the Import object. If src == tgt, returns null. (Debug mode: throws std::runtime_error if one of src or tgt is null.)
Examples:
RTIOperatorExample.cpp.

Definition at line 548 of file Tpetra_Import.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines