Tpetra parallel linear algebra
Version of the Day
|
Implementation detail of Import and Export. More...
#include <Tpetra_ImportExportData_decl.hpp>
Public Member Functions | |
ImportExportData (const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target) | |
Constructor. More... | |
ImportExportData (const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target, const Teuchos::RCP< Teuchos::FancyOStream > &out) | |
Constructor with output stream. More... | |
ImportExportData (const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target, const Teuchos::RCP< Teuchos::ParameterList > &plist) | |
Constructor with ParameterList for Distributor. More... | |
ImportExportData (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) | |
Constructor with output stream, and ParameterList for Distributor. More... | |
~ImportExportData ()=default | |
Destructor. More... | |
Teuchos::RCP< ImportExportData < LocalOrdinal, GlobalOrdinal, Node > > | reverseClone () |
Copy the data, but reverse the direction of the transfer as well as reversing the Distributor. More... | |
Public Attributes | |
const Teuchos::RCP< const Map < LocalOrdinal, GlobalOrdinal, Node > > | source_ |
Source Map of the Import or Export. More... | |
const Teuchos::RCP< const Map < LocalOrdinal, GlobalOrdinal, Node > > | target_ |
Target Map of the Import or Export. More... | |
Teuchos::RCP < Teuchos::FancyOStream > | out_ |
Output stream for verbose debugging output. More... | |
bool | verbose_ = false |
Whether to print verbose debugging output. More... | |
Kokkos::DualView< LocalOrdinal *, device_type > | permuteToLIDs_ |
Index of target Map LIDs to which to permute. More... | |
Kokkos::DualView< LocalOrdinal *, device_type > | permuteFromLIDs_ |
Index of source Map LIDs from which to permute. More... | |
Kokkos::DualView< LocalOrdinal *, device_type > | remoteLIDs_ |
"Incoming" indices. More... | |
bool | remoteLIDsContiguous_ = false |
Whether the remote LIDs are contiguous. More... | |
bool | exportLIDsContiguous_ = false |
Whether the export LIDs are contiguous. More... | |
Kokkos::DualView< LocalOrdinal *, device_type > | exportLIDs_ |
"Outgoing" local indices. More... | |
Teuchos::Array< int > | exportPIDs_ |
Ranks of the processes to which the source object sends data. More... | |
size_t | numSameIDs_ |
Number of initial identical indices. More... | |
Distributor | distributor_ |
Object that actually distributes (sends and receives) data. More... | |
bool | isLocallyComplete_ |
Is this Export or Import locally complete? More... | |
Implementation detail of Import and Export.
LocalOrdinal | The type of local indices. See the documentation of Map for requirements. |
GlobalOrdinal | The type of global indices. See the documentation of Map for requirements. |
Node | The Kokkos Node type. See the documentation of Map for requirements. |
Import and Export both require the same data. We use this class as a container for those data. They include incoming ("remote") and outgoing ("export") local indices (LIDs), LIDs to permute on the source and target of the Import or Export, and process ranks ("image IDs") to which to send.
Definition at line 51 of file Tpetra_ImportExportData_decl.hpp.
Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::ImportExportData | ( | const Teuchos::RCP< const map_type > & | source, |
const Teuchos::RCP< const map_type > & | target | ||
) |
Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::ImportExportData | ( | const Teuchos::RCP< const map_type > & | source, |
const Teuchos::RCP< const map_type > & | target, | ||
const Teuchos::RCP< Teuchos::FancyOStream > & | out | ||
) |
Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::ImportExportData | ( | const Teuchos::RCP< const map_type > & | source, |
const Teuchos::RCP< const map_type > & | target, | ||
const Teuchos::RCP< Teuchos::ParameterList > & | plist | ||
) |
Constructor with ParameterList for Distributor.
source | [in] Source Map of the Import or Export |
target | [in] Target Map of the Import or Export |
plist | [in/out] List of parameters for the Distributor |
Definition at line 53 of file Tpetra_ImportExportData_def.hpp.
Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::ImportExportData | ( | 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 | ||
) |
Constructor with output stream, and ParameterList for Distributor.
source | [in] Source Map of the Import or Export |
target | [in] Target Map of the Import or Export |
out | [in/out] Output stream (for debugging output) |
plist | [in/out] List of parameters for the Distributor |
Definition at line 22 of file Tpetra_ImportExportData_def.hpp.
|
default |
Destructor.
Teuchos::RCP< ImportExportData< LocalOrdinal, GlobalOrdinal, Node > > Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::reverseClone | ( | ) |
Copy the data, but reverse the direction of the transfer as well as reversing the Distributor.
"Reverse the direction of the transfer" means that an Import becomes an Export in the opposite direction, and vice versa.
Definition at line 62 of file Tpetra_ImportExportData_def.hpp.
const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::source_ |
Source Map of the Import or Export.
Definition at line 106 of file Tpetra_ImportExportData_decl.hpp.
const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::target_ |
Target Map of the Import or Export.
Definition at line 109 of file Tpetra_ImportExportData_decl.hpp.
Teuchos::RCP<Teuchos::FancyOStream> Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::out_ |
Output stream for verbose debugging output.
Definition at line 112 of file Tpetra_ImportExportData_decl.hpp.
bool Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::verbose_ = false |
Whether to print verbose debugging output.
Definition at line 115 of file Tpetra_ImportExportData_decl.hpp.
Kokkos::DualView<LocalOrdinal*, device_type> Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::permuteToLIDs_ |
Index of target Map LIDs to which to permute.
After the initial numSameIDs_ indices which are the same in both the source and target Map, zero or more global indices (GIDs) remain. They exist in both the source and target Maps, but are in a different order. Therefore, they may have different local indices (LIDs), and require permutation.
For each remaining GIDs g in the target Map, if the source Map also owns g, then permuteToLIDs_ gets the corresponding LID in the target Map.
Definition at line 133 of file Tpetra_ImportExportData_decl.hpp.
Kokkos::DualView<LocalOrdinal*, device_type> Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::permuteFromLIDs_ |
Index of source Map LIDs from which to permute.
After the initial numSameIDs_ indices which are the same in both the source and target Map, zero or more global indices (GIDs) remain. They exist in both the source and target Maps, but are in a different order. Therefore, they may have different local indices (LIDs), and require permutation.
For each remaining GID g in the target Map, if the source Map also owns g, then permuteFromLIDs_ gets the corresponding LID in the source Map.
Definition at line 146 of file Tpetra_ImportExportData_decl.hpp.
Kokkos::DualView<LocalOrdinal*, device_type> Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::remoteLIDs_ |
bool Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::remoteLIDsContiguous_ = false |
Whether the remote LIDs are contiguous.
Definition at line 157 of file Tpetra_ImportExportData_decl.hpp.
bool Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::exportLIDsContiguous_ = false |
Whether the export LIDs are contiguous.
Definition at line 160 of file Tpetra_ImportExportData_decl.hpp.
Kokkos::DualView<LocalOrdinal*, device_type> Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::exportLIDs_ |
Teuchos::Array<int> Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::exportPIDs_ |
Ranks of the processes to which the source object sends data.
Definition at line 171 of file Tpetra_ImportExportData_decl.hpp.
size_t Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::numSameIDs_ |
Number of initial identical indices.
The number of initial indices (IDs) that are identical between the source and target Maps. This count stops at the first different ID.
Note that we didn't specify whether the IDs are global (GID) or local (LID). That is because if the two Maps start with the same sequence of GIDs on the calling process, then those GIDs map to the same LIDs on the calling process. Thus, when we say "ID" in the previous paragraph, we include both GID and LID.
Definition at line 185 of file Tpetra_ImportExportData_decl.hpp.
Distributor Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::distributor_ |
Object that actually distributes (sends and receives) data.
The Import or Export object that controls this ImportExportData container is responsible for initializing the Distributor. The Distributor's constructor just gives it the communicator; it does not complete initialization.
Definition at line 193 of file Tpetra_ImportExportData_decl.hpp.
bool Tpetra::ImportExportData< LocalOrdinal, GlobalOrdinal, Node >::isLocallyComplete_ |
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 211 of file Tpetra_ImportExportData_decl.hpp.