10#ifndef TPETRA_DETAILS_UNPACKCRSMATRIXANDCOMBINE_DECL_HPP
11#define TPETRA_DETAILS_UNPACKCRSMATRIXANDCOMBINE_DECL_HPP
13#include "TpetraCore_config.h"
15#include "Kokkos_DualView.hpp"
18#include "Tpetra_Details_DefaultTypes.hpp"
41#ifndef DOXYGEN_SHOULD_SKIP_THIS
44template<
class T>
class Array;
46template<
class T>
class ArrayView;
95template<
typename ST,
typename LO,
typename GO,
typename NT>
98 const Teuchos::ArrayView<const char>& imports,
99 const Teuchos::ArrayView<const size_t>& numPacketsPerLID,
100 const Teuchos::ArrayView<const LO>& importLIDs,
101 size_t constantNumPackets,
104template<
typename ST,
typename LO,
typename GO,
typename NT>
106unpackCrsMatrixAndCombineNew(
108 Kokkos::DualView<
char*,
110 Kokkos::DualView<
size_t*,
112 const Kokkos::DualView<
const LO*,
114 const size_t constantNumPackets,
172template<
typename Scalar,
typename LocalOrdinal,
typename GlobalOrdinal,
typename Node>
176 const Teuchos::ArrayView<const LocalOrdinal> &importLIDs,
177 const Teuchos::ArrayView<const char> &imports,
178 const Teuchos::ArrayView<const size_t>& numPacketsPerLID,
179 size_t constantNumPackets,
182 const Teuchos::ArrayView<const LocalOrdinal>& permuteToLIDs,
183 const Teuchos::ArrayView<const LocalOrdinal>& permuteFromLIDs);
200template<
typename Scalar,
typename LocalOrdinal,
typename GlobalOrdinal,
typename Node>
204 const Kokkos::View<LocalOrdinal
const *,
205 Kokkos::Device<
typename Node::device_type::execution_space,
206 Tpetra::Details::DefaultTypes::comm_buffer_memory_space<typename Node::device_type>>,
208 const Kokkos::View<
const char*,
209 Kokkos::Device<
typename Node::device_type::execution_space,
210 Tpetra::Details::DefaultTypes::comm_buffer_memory_space<typename Node::device_type>>
212 const Kokkos::View<
const size_t*,
213 Kokkos::Device<
typename Node::device_type::execution_space,
214 Tpetra::Details::DefaultTypes::comm_buffer_memory_space<typename Node::device_type>>
216 const size_t numSameIDs,
217 const Kokkos::View<LocalOrdinal
const *,
218 Kokkos::Device<
typename Node::device_type::execution_space,
219 Tpetra::Details::DefaultTypes::comm_buffer_memory_space<typename Node::device_type>>,
221 const Kokkos::View<LocalOrdinal
const *,
222 Kokkos::Device<
typename Node::device_type::execution_space,
223 Tpetra::Details::DefaultTypes::comm_buffer_memory_space<typename Node::device_type>>,
225 size_t TargetNumRows,
226 const int MyTargetPID,
227 Teuchos::ArrayRCP<size_t>& CRS_rowptr,
228 Teuchos::ArrayRCP<GlobalOrdinal>& CRS_colind,
229 Teuchos::ArrayRCP<Scalar>& CRS_vals,
230 const Teuchos::ArrayView<const int>& SourcePids,
231 Teuchos::Array<int>& TargetPids);
233template<
typename Scalar,
typename LocalOrdinal,
typename GlobalOrdinal,
typename Node>
237 const Kokkos::View<LocalOrdinal
const *,
238 Kokkos::Device<
typename Node::device_type::execution_space,
239 Tpetra::Details::DefaultTypes::comm_buffer_memory_space<typename Node::device_type>>,
241 const Kokkos::View<
const char*,
242 Kokkos::Device<
typename Node::device_type::execution_space,
243 Tpetra::Details::DefaultTypes::comm_buffer_memory_space<typename Node::device_type>>
245 const Kokkos::View<
const size_t*,
246 Kokkos::Device<
typename Node::device_type::execution_space,
247 Tpetra::Details::DefaultTypes::comm_buffer_memory_space<typename Node::device_type>>
249 const size_t numSameIDs,
250 const Kokkos::View<LocalOrdinal
const *,
251 Kokkos::Device<
typename Node::device_type::execution_space,
252 Tpetra::Details::DefaultTypes::comm_buffer_memory_space<typename Node::device_type>>,
254 const Kokkos::View<LocalOrdinal
const *,
255 Kokkos::Device<
typename Node::device_type::execution_space,
256 Tpetra::Details::DefaultTypes::comm_buffer_memory_space<typename Node::device_type>>,
258 size_t TargetNumRows,
259 const int MyTargetPID,
260 Kokkos::View<size_t*,typename Node::device_type>& ,
261 Kokkos::View<GlobalOrdinal*,typename Node::device_type>& ,
263 const Teuchos::ArrayView<const int>& SourcePids,
264 Kokkos::View<int*,typename Node::device_type>& );
Declaration of Tpetra::CombineMode enum, and a function for setting a Tpetra::CombineMode parameter i...
Forward declaration of Tpetra::CrsMatrix.
Declaration of the Tpetra::DistObject class.
Sparse matrix that presents a row-oriented interface that lets users read or modify entries.
typename row_matrix_type::impl_scalar_type impl_scalar_type
The type used internally in place of Scalar.
Kokkos::Device< typename device_type::execution_space, buffer_memory_space > buffer_device_type
Kokkos::Device specialization for communication buffers.
Nonmember function that computes a residual Computes R = B - A * X.
void unpackAndCombineIntoCrsArrays(const CrsGraph< LO, GO, NT > &sourceGraph, const Teuchos::ArrayView< const LO > &importLIDs, const Teuchos::ArrayView< const typename CrsGraph< LO, GO, NT >::packet_type > &imports, const Teuchos::ArrayView< const size_t > &numPacketsPerLID, const size_t constantNumPackets, const CombineMode combineMode, const size_t numSameIDs, const Teuchos::ArrayView< const LO > &permuteToLIDs, const Teuchos::ArrayView< const LO > &permuteFromLIDs, size_t TargetNumRows, size_t TargetNumNonzeros, const int MyTargetPID, const Teuchos::ArrayView< size_t > &CRS_rowptr, const Teuchos::ArrayView< GO > &CRS_colind, const Teuchos::ArrayView< const int > &SourcePids, Teuchos::Array< int > &TargetPids)
unpackAndCombineIntoCrsArrays
size_t unpackAndCombineWithOwningPIDsCount(const CrsGraph< LO, GO, NT > &sourceGraph, const Teuchos::ArrayView< const LO > &importLIDs, const Teuchos::ArrayView< const typename CrsGraph< LO, GO, NT >::packet_type > &imports, const Teuchos::ArrayView< const size_t > &numPacketsPerLID, size_t constantNumPackets, CombineMode combineMode, size_t numSameIDs, const Teuchos::ArrayView< const LO > &permuteToLIDs, const Teuchos::ArrayView< const LO > &permuteFromLIDs)
Special version of Tpetra::Details::unpackCrsGraphAndCombine that also unpacks owning process ranks.
void unpackCrsMatrixAndCombine(const CrsMatrix< ST, LO, GO, NT > &sourceMatrix, const Teuchos::ArrayView< const char > &imports, const Teuchos::ArrayView< const size_t > &numPacketsPerLID, const Teuchos::ArrayView< const LO > &importLIDs, size_t constantNumPackets, CombineMode combineMode)
Unpack the imported column indices and values, and combine into matrix.
Namespace Tpetra contains the class and methods constituting the Tpetra library.
CombineMode
Rule for combining data in an Import or Export.