Tpetra parallel linear algebra
Version of the Day
|
Common base class of Import and Export. More...
#include <Tpetra_Details_Transfer_decl.hpp>
Public Types | |
using | map_type = ::Tpetra::Map< LO, GO, NT > |
Map specialization used by this class and subclasses. More... | |
Public Member Functions | |
Transfer (const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target, const Teuchos::RCP< Teuchos::FancyOStream > &out, const Teuchos::RCP< Teuchos::ParameterList > &plist, const std::string &className) | |
Four-argument constructor (most often used). More... | |
Transfer (const Transfer< LO, GO, NT > &rhs, reverse_tag tag) | |
Reverse-mode "copy" constructor. More... | |
virtual | ~Transfer ()=default |
Destructor (declared virtual for memory safety of derived classes). More... | |
size_t | getNumSameIDs () const |
Number of initial identical IDs. More... | |
size_t | getNumPermuteIDs () const |
Number of IDs to permute but not to communicate. More... | |
Kokkos::DualView< const LO *, device_type > | getPermuteFromLIDs_dv () const |
List of local IDs in the source Map that are permuted, as a const DualView (that is sync'd to both host and device). More... | |
Teuchos::ArrayView< const LO > | getPermuteFromLIDs () const |
List of local IDs in the source Map that are permuted. More... | |
Kokkos::DualView< const LO *, device_type > | getPermuteToLIDs_dv () const |
List of local IDs in the target Map that are permuted, as a const DualView (that is sync'd to both host and device). More... | |
Teuchos::ArrayView< const LO > | getPermuteToLIDs () const |
List of local IDs in the target Map that are permuted. More... | |
size_t | getNumRemoteIDs () const |
Number of entries not on the calling process. More... | |
Kokkos::DualView< const LO *, device_type > | getRemoteLIDs_dv () const |
List of entries in the target Map to receive from other processes, as a const DualView (that is sync'd to both host and device). More... | |
Teuchos::ArrayView< const LO > | getRemoteLIDs () const |
List of entries in the target Map to receive from other processes. More... | |
size_t | getNumExportIDs () const |
Number of entries that must be sent by the calling process to other processes. More... | |
Kokkos::DualView< const LO *, device_type > | getExportLIDs_dv () const |
List of entries in the source Map that will be sent to other processes, as a const DualView (that is sync'd to both host and device). More... | |
Teuchos::ArrayView< const LO > | getExportLIDs () const |
List of entries in the source Map that will be sent to other processes. More... | |
Teuchos::ArrayView< const int > | getExportPIDs () const |
List of processes to which entries will be sent. More... | |
Teuchos::RCP< const map_type > | getSourceMap () const |
The source Map used to construct this Export or Import. More... | |
Teuchos::RCP< const map_type > | getTargetMap () const |
The target Map used to construct this Export or Import. More... | |
::Tpetra::Distributor & | getDistributor () const |
The Distributor that this Export or Import object uses to move data. More... | |
bool | isLocallyComplete () const |
Is this Export or Import locally complete? More... | |
virtual void | describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const |
Describe this object in a human-readable way to the given output stream. More... | |
Protected Member Functions | |
Teuchos::FancyOStream & | verboseOutputStream () const |
Valid (nonnull) output stream for verbose output. More... | |
bool | verbose () const |
Whether to print verbose debugging output. More... | |
void | describeImpl (Teuchos::FancyOStream &out, const std::string &className, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const |
Implementation of describe() for subclasses (Tpetra::Import and Tpetra::Export). More... | |
Protected Attributes | |
Teuchos::RCP< ImportExportData < LO, GO, NT > > | TransferData_ |
All the data needed for executing the Export communication plan. More... | |
Common base class of Import and Export.
Definition at line 67 of file Tpetra_Details_Transfer_decl.hpp.
using Tpetra::Details::Transfer< LO, GO, NT >::map_type = ::Tpetra::Map<LO, GO, NT> |
Map specialization used by this class and subclasses.
The initial two colons avoid confusion between Tpetra::Map and Tpetra::Details::Map.
Definition at line 73 of file Tpetra_Details_Transfer_decl.hpp.
Tpetra::Details::Transfer< LO, GO, NT >::Transfer | ( | const Teuchos::RCP< const map_type > & | source, |
const Teuchos::RCP< const map_type > & | target, | ||
const Teuchos::RCP< Teuchos::FancyOStream > & | out, | ||
const Teuchos::RCP< Teuchos::ParameterList > & | plist, | ||
const std::string & | className | ||
) |
Four-argument constructor (most often used).
source | [in] Source Map of the Export or Import. |
target | [in] Target Map of the Export or Import. May be null only if Export or Import is using one of the special source-Map-only constructors. |
out | [in/out] Stream for verbose debugging output. If null, Transfer will wrap and use std::cerr. |
plist | [in/out] Parameters; may be null. |
className | [in] Either "Export" or "Import". Used to control verbose debugging output (sometimes you might want it only for one or the other class). |
Definition at line 73 of file Tpetra_Details_Transfer_def.hpp.
Tpetra::Details::Transfer< LO, GO, NT >::Transfer | ( | const Transfer< LO, GO, NT > & | rhs, |
reverse_tag | tag | ||
) |
|
virtualdefault |
Destructor (declared virtual for memory safety of derived classes).
size_t Tpetra::Details::Transfer< LO, GO, NT >::getNumSameIDs | ( | ) | const |
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 121 of file Tpetra_Details_Transfer_def.hpp.
size_t Tpetra::Details::Transfer< LO, GO, NT >::getNumPermuteIDs | ( | ) | const |
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 or Export will permute these entries locally (without distributed-memory communication).
Definition at line 128 of file Tpetra_Details_Transfer_def.hpp.
Kokkos::DualView< const LO *, typename Transfer< LO, GO, NT >::device_type > Tpetra::Details::Transfer< LO, GO, NT >::getPermuteFromLIDs_dv | ( | ) | const |
List of local IDs in the source Map that are permuted, as a const DualView (that is sync'd to both host and device).
Definition at line 135 of file Tpetra_Details_Transfer_def.hpp.
Teuchos::ArrayView< const LO > Tpetra::Details::Transfer< LO, GO, NT >::getPermuteFromLIDs | ( | ) | const |
List of local IDs in the source Map that are permuted.
Definition at line 151 of file Tpetra_Details_Transfer_def.hpp.
Kokkos::DualView< const LO *, typename Transfer< LO, GO, NT >::device_type > Tpetra::Details::Transfer< LO, GO, NT >::getPermuteToLIDs_dv | ( | ) | const |
List of local IDs in the target Map that are permuted, as a const DualView (that is sync'd to both host and device).
Definition at line 158 of file Tpetra_Details_Transfer_def.hpp.
Teuchos::ArrayView< const LO > Tpetra::Details::Transfer< LO, GO, NT >::getPermuteToLIDs | ( | ) | const |
List of local IDs in the target Map that are permuted.
Definition at line 174 of file Tpetra_Details_Transfer_def.hpp.
size_t Tpetra::Details::Transfer< LO, GO, NT >::getNumRemoteIDs | ( | ) | const |
Number of entries not on the calling process.
Definition at line 181 of file Tpetra_Details_Transfer_def.hpp.
Kokkos::DualView< const LO *, typename Transfer< LO, GO, NT >::device_type > Tpetra::Details::Transfer< LO, GO, NT >::getRemoteLIDs_dv | ( | ) | const |
List of entries in the target Map to receive from other processes, as a const DualView (that is sync'd to both host and device).
Definition at line 188 of file Tpetra_Details_Transfer_def.hpp.
Teuchos::ArrayView< const LO > Tpetra::Details::Transfer< LO, GO, NT >::getRemoteLIDs | ( | ) | const |
List of entries in the target Map to receive from other processes.
Definition at line 204 of file Tpetra_Details_Transfer_def.hpp.
size_t Tpetra::Details::Transfer< LO, GO, NT >::getNumExportIDs | ( | ) | const |
Number of entries that must be sent by the calling process to other processes.
Definition at line 211 of file Tpetra_Details_Transfer_def.hpp.
Kokkos::DualView< const LO *, typename Transfer< LO, GO, NT >::device_type > Tpetra::Details::Transfer< LO, GO, NT >::getExportLIDs_dv | ( | ) | const |
List of entries in the source Map that will be sent to other processes, as a const DualView (that is sync'd to both host and device).
Definition at line 218 of file Tpetra_Details_Transfer_def.hpp.
Teuchos::ArrayView< const LO > Tpetra::Details::Transfer< LO, GO, NT >::getExportLIDs | ( | ) | const |
List of entries in the source Map that will be sent to other processes.
Definition at line 234 of file Tpetra_Details_Transfer_def.hpp.
Teuchos::ArrayView< const int > Tpetra::Details::Transfer< LO, GO, NT >::getExportPIDs | ( | ) | const |
List of processes to which entries will be sent.
The entry with local ID getExportLIDs()[i] will be sent to process getExportPiDs()[i].
Definition at line 241 of file Tpetra_Details_Transfer_def.hpp.
Teuchos::RCP< const typename Transfer< LO, GO, NT >::map_type > Tpetra::Details::Transfer< LO, GO, NT >::getSourceMap | ( | ) | const |
The source Map used to construct this Export or Import.
Definition at line 248 of file Tpetra_Details_Transfer_def.hpp.
Teuchos::RCP< const typename Transfer< LO, GO, NT >::map_type > Tpetra::Details::Transfer< LO, GO, NT >::getTargetMap | ( | ) | const |
The target Map used to construct this Export or Import.
Definition at line 255 of file Tpetra_Details_Transfer_def.hpp.
Tpetra::Distributor & Tpetra::Details::Transfer< LO, GO, NT >::getDistributor | ( | ) | const |
The Distributor that this Export or Import object uses to move data.
Definition at line 262 of file Tpetra_Details_Transfer_def.hpp.
bool Tpetra::Details::Transfer< LO, GO, NT >::isLocallyComplete | ( | ) | const |
Is this Export or Import locally complete?
If this is an Export, then do all source Map indices on the calling process exist on at least one process (not necessarily this one) in the target Map?
If this is an Import, then do all target Map indices on the calling process exist on at least one process (not necessarily this one) in the source Map?
It's not necessarily an error for an Export or Import not to be locally complete on one or more processes. For example, this may happen in the common use case of "restriction" – that is, taking a subset of a large object. Nevertheless, you may find this predicate useful for figuring out whether you set up your Maps in the way that you expect.
Definition at line 269 of file Tpetra_Details_Transfer_def.hpp.
|
virtual |
Describe this object in a human-readable way to the given output stream.
You must call this method as a collective over all processes in the communicator of the source and target Map of this object.
out | [out] Output stream to which to write. Only Process 0 in this object's communicator may write to the output stream. |
verbLevel | [in] Verbosity level. This also controls whether this method does any communication. At verbosity levels higher (greater) than Teuchos::VERB_LOW, this method behaves as a collective over the object's communicator. |
Teuchos::FancyOStream wraps std::ostream. It adds features like tab levels. If you just want to wrap std::cout, try this:
Reimplemented in Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node >, and Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 276 of file Tpetra_Details_Transfer_def.hpp.
|
protected |
Valid (nonnull) output stream for verbose output.
Definition at line 285 of file Tpetra_Details_Transfer_def.hpp.
|
protected |
Whether to print verbose debugging output.
Definition at line 295 of file Tpetra_Details_Transfer_def.hpp.
|
protected |
Implementation of describe() for subclasses (Tpetra::Import and Tpetra::Export).
out | [out] Output stream to which to write. Only Process 0 in this object's communicator may write to the output stream. |
className | [in] Name of the subclass of Transfer calling this method. |
verbLevel | [in] Verbosity level. This also controls whether this method does any communication. At verbosity levels higher (greater) than Teuchos::VERB_LOW, this method behaves as a collective over the object's communicator. |
Definition at line 302 of file Tpetra_Details_Transfer_def.hpp.
|
protected |
All the data needed for executing the Export communication plan.
Definition at line 231 of file Tpetra_Details_Transfer_decl.hpp.