|
Tpetra Matrix/Vector Services
Version of the Day
|
Communication plan for data redistribution from a uniquely-owned to a (possibly) multiply-owned distribution. More...
#include <Tpetra_Import.hpp>
Inherits Describable.
Public Types | |
| typedef Map< LocalOrdinal, GlobalOrdinal, Node > | map_type |
| The specialization of Map used by this class. | |
Public Member Functions | |
Constructor/Destructor Methods | |
| Import (const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target) | |
| Construct an Import from the source and target Maps. | |
| Import (const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target, const Teuchos::RCP< Teuchos::ParameterList > &plist) | |
| Constructor (with list of parameters) | |
| Import (const Import< LocalOrdinal, GlobalOrdinal, Node > &import) | |
| Copy constructor. | |
| ~Import () | |
| Destructor. | |
Import Attribute Methods | |
| size_t | getNumSameIDs () const |
| Number of initial identical IDs. | |
| size_t | getNumPermuteIDs () const |
| Number of IDs to permute but not to communicate. | |
| ArrayView< const LocalOrdinal > | getPermuteFromLIDs () const |
| List of local IDs in the source Map that are permuted. | |
| ArrayView< const LocalOrdinal > | getPermuteToLIDs () const |
| List of local IDs in the target Map that are permuted. | |
| size_t | getNumRemoteIDs () const |
| Number of entries not on the calling process. | |
| ArrayView< const LocalOrdinal > | getRemoteLIDs () const |
| List of entries in the target Map to receive from other processes. | |
| size_t | getNumExportIDs () const |
| Number of entries that must be sent by the calling process to other processes. | |
| ArrayView< const LocalOrdinal > | getExportLIDs () const |
| List of entries in the source Map that will be sent to other processes. | |
| ArrayView< const int > | getExportImageIDs () const |
| List of processes to which entries will be sent. | |
| const RCP< const Map < LocalOrdinal, GlobalOrdinal, Node > > & | getSourceMap () const |
| The Source Map used to construct this Import object. | |
| const RCP< const Map < LocalOrdinal, GlobalOrdinal, Node > > & | getTargetMap () const |
| The Target Map used to construct this Import object. | |
| Distributor & | getDistributor () const |
The Distributor that this Import object uses to move data. | |
| 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. | |
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, both in terms of communication and computation. However, 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 90 of file Tpetra_Import.hpp.
| typedef Map<LocalOrdinal,GlobalOrdinal,Node> Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::map_type |
The specialization of Map used by this class.
Definition at line 94 of file Tpetra_Import.hpp.
| Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::Import | ( | const Teuchos::RCP< const map_type > & | source, |
| const Teuchos::RCP< const map_type > & | target | ||
| ) |
Construct an Import from the source and target Maps.
| source | [in] The source distribution. This must be a uniquely owned (nonoverlapping) distribution. |
| target | [in] The target distribution. This may be a multiply owned (overlapping) distribution. |
| Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::Import | ( | const Teuchos::RCP< const map_type > & | source, |
| const Teuchos::RCP< const map_type > & | target, | ||
| const Teuchos::RCP< Teuchos::ParameterList > & | plist | ||
| ) |
Constructor (with list of parameters)
| source | [in] The source distribution. This must be a uniquely owned (nonoverlapping) distribution. |
| target | [in] The target distribution. This may be a multiply owned (overlapping) distribution. |
| plist | [in/out] List of parameters. Currently passed directly to the Distributor that implements communication. |
| Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::Import | ( | const Import< LocalOrdinal, GlobalOrdinal, Node > & | import | ) |
Copy constructor.
Definition at line 306 of file Tpetra_Import.hpp.
| Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::~Import | ( | ) |
Destructor.
Definition at line 311 of file Tpetra_Import.hpp.
| size_t Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getNumSameIDs | ( | ) | const [inline] |
Number of initial identical IDs.
The number of IDs that are identical between the source and target Maps, up to the first different ID.
Definition at line 315 of file Tpetra_Import.hpp.
| size_t Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getNumPermuteIDs | ( | ) | const [inline] |
Number of IDs to permute but not to communicate.
The number of IDs that are local to the calling process, but not part of the first getNumSameIDs() entries. The Import will permute these entries locally (without distributed-memory communication).
Definition at line 320 of file Tpetra_Import.hpp.
| ArrayView< const LocalOrdinal > Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getPermuteFromLIDs | ( | ) | const [inline] |
List of local IDs in the source Map that are permuted.
Definition at line 326 of file Tpetra_Import.hpp.
| ArrayView< const LocalOrdinal > Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getPermuteToLIDs | ( | ) | const [inline] |
List of local IDs in the target Map that are permuted.
Definition at line 332 of file Tpetra_Import.hpp.
| size_t Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getNumRemoteIDs | ( | ) | const [inline] |
Number of entries not on the calling process.
Definition at line 337 of file Tpetra_Import.hpp.
| ArrayView< const LocalOrdinal > Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getRemoteLIDs | ( | ) | const [inline] |
List of entries in the target Map to receive from other processes.
Definition at line 343 of file Tpetra_Import.hpp.
| size_t Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getNumExportIDs | ( | ) | const [inline] |
Number of entries that must be sent by the calling process to other processes.
Definition at line 348 of file Tpetra_Import.hpp.
| ArrayView< const LocalOrdinal > Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getExportLIDs | ( | ) | const [inline] |
List of entries in the source Map that will be sent to other processes.
Definition at line 354 of file Tpetra_Import.hpp.
| ArrayView< const int > Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getExportImageIDs | ( | ) | const [inline] |
List of processes to which entries will be sent.
The entry with Local ID getExportLIDs()[i] will be sent to process getExportImageIDs()[i].
Definition at line 360 of file Tpetra_Import.hpp.
| const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getSourceMap | ( | ) | const [inline] |
The Source Map used to construct this Import object.
Definition at line 366 of file Tpetra_Import.hpp.
| const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getTargetMap | ( | ) | const [inline] |
The Target Map used to construct this Import object.
Definition at line 372 of file Tpetra_Import.hpp.
| Distributor & Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::getDistributor | ( | ) | const [inline] |
The Distributor that this Import object uses to move data.
Definition at line 378 of file Tpetra_Import.hpp.
| Import< LocalOrdinal, GlobalOrdinal, Node > & Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::operator= | ( | const Import< LocalOrdinal, GlobalOrdinal, Node > & | Source | ) |
Assignment operator.
Definition at line 384 of file Tpetra_Import.hpp.
| void Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >::print | ( | std::ostream & | os | ) | const [virtual] |
Print method.
Definition at line 390 of file Tpetra_Import.hpp.
| 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.
src != null tgt != null src == tgt, returns null. (Debug mode: throws std::runtime_error if one of src or tgt is null.) Definition at line 667 of file Tpetra_Import.hpp.
1.7.6.1