Tpetra parallel linear algebra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Tpetra_ImportExportData_decl.hpp
1 // @HEADER
2 // *****************************************************************************
3 // Tpetra: Templated Linear Algebra Services Package
4 //
5 // Copyright 2008 NTESS and the Tpetra contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef TPETRA_IMPORTEXPORTDATA_DECL_HPP
11 #define TPETRA_IMPORTEXPORTDATA_DECL_HPP
12 
14 #include "Tpetra_Export_fwd.hpp"
15 #include "Tpetra_Import_fwd.hpp"
16 #include "Tpetra_Map_fwd.hpp"
17 #include "Tpetra_Distributor.hpp"
18 #include "Teuchos_Array.hpp"
19 #include "Teuchos_RCP.hpp"
20 
21 #ifndef DOXYGEN_SHOULD_SKIP_THIS
22 namespace Teuchos {
23 class ParameterList; // forward declaration
24 } // namespace Teuchos
25 #endif // DOXYGEN_SHOULD_SKIP_THIS
26 
27 namespace Tpetra {
28 
48  template<class LocalOrdinal,
49  class GlobalOrdinal,
50  class Node>
52  public:
53  typedef LocalOrdinal local_ordinal_type;
54  typedef GlobalOrdinal global_ordinal_type;
55  typedef Node node_type;
57 
58  ImportExportData () = delete;
59 
64  ImportExportData (const Teuchos::RCP<const map_type>& source,
65  const Teuchos::RCP<const map_type>& target);
66 
72  ImportExportData (const Teuchos::RCP<const map_type>& source,
73  const Teuchos::RCP<const map_type>& target,
74  const Teuchos::RCP<Teuchos::FancyOStream>& out);
75 
81  ImportExportData (const Teuchos::RCP<const map_type>& source,
82  const Teuchos::RCP<const map_type>& target,
83  const Teuchos::RCP<Teuchos::ParameterList>& plist);
84 
91  ImportExportData (const Teuchos::RCP<const map_type>& source,
92  const Teuchos::RCP<const map_type>& target,
93  const Teuchos::RCP<Teuchos::FancyOStream>& out,
94  const Teuchos::RCP<Teuchos::ParameterList>& plist);
96  ~ImportExportData () = default;
97 
103  Teuchos::RCP<ImportExportData<LocalOrdinal, GlobalOrdinal, Node> > reverseClone();
104 
106  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > source_;
107 
109  const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > target_;
110 
112  Teuchos::RCP<Teuchos::FancyOStream> out_;
113 
115  bool verbose_ = false;
116 
117  using execution_space = typename Node::device_type::execution_space;
118  using memory_space =
119  ::Tpetra::Details::DefaultTypes::comm_buffer_memory_space<typename Node::device_type>;
120  using device_type = Kokkos::Device<execution_space, memory_space>;
121 
133  Kokkos::DualView<LocalOrdinal*, device_type> permuteToLIDs_;
134 
146  Kokkos::DualView<LocalOrdinal*, device_type> permuteFromLIDs_;
147 
154  Kokkos::DualView<LocalOrdinal*, device_type> remoteLIDs_;
155 
157  bool remoteLIDsContiguous_ = false;
158 
160  bool exportLIDsContiguous_ = false;
161 
168  Kokkos::DualView<LocalOrdinal*, device_type> exportLIDs_;
169 
171  Teuchos::Array<int> exportPIDs_;
172 
185  size_t numSameIDs_;
186 
194 
212 
213  private:
219  }; // class ImportExportData
220 
221 } // namespace Tpetra
222 
223 #endif // TPETRA_IMPORTEXPORTDATA_DECL_HPP
size_t numSameIDs_
Number of initial identical indices.
bool isLocallyComplete_
Is this Export or Import locally complete?
Kokkos::DualView< LocalOrdinal *, device_type > permuteFromLIDs_
Index of source Map LIDs from which to permute.
Forward declaration of Tpetra::ImportExportData.
Teuchos::Array< int > exportPIDs_
Ranks of the processes to which the source object sends data.
Forward declaration of Tpetra::Export.
Kokkos::DualView< LocalOrdinal *, device_type > exportLIDs_
&quot;Outgoing&quot; local indices.
bool remoteLIDsContiguous_
Whether the remote LIDs are contiguous.
Kokkos::DualView< LocalOrdinal *, device_type > remoteLIDs_
&quot;Incoming&quot; indices.
Forward declaration of Tpetra::Import.
Implementation detail of Import and Export.
Sets up and executes a communication plan for a Tpetra DistObject.
bool verbose_
Whether to print verbose debugging output.
~ImportExportData()=default
Destructor.
Teuchos::RCP< Teuchos::FancyOStream > out_
Output stream for verbose debugging output.
A parallel distribution of indices over processes.
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > target_
Target Map of the Import or Export.
Distributor distributor_
Object that actually distributes (sends and receives) data.
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > source_
Source Map of the Import or Export.
bool exportLIDsContiguous_
Whether the export LIDs are contiguous.
Forward declaration of Tpetra::Map.
Kokkos::DualView< LocalOrdinal *, device_type > permuteToLIDs_
Index of target Map LIDs to which to permute.
Teuchos::RCP< ImportExportData< LocalOrdinal, GlobalOrdinal, Node > > reverseClone()
Copy the data, but reverse the direction of the transfer as well as reversing the Distributor...