40 #ifndef TPETRA_DETAILS_UNPACKCRSMATRIXANDCOMBINE_DECL_HPP
41 #define TPETRA_DETAILS_UNPACKCRSMATRIXANDCOMBINE_DECL_HPP
43 #include "TpetraCore_config.h"
45 #include "Kokkos_DualView.hpp"
70 #ifndef DOXYGEN_SHOULD_SKIP_THIS
73 template<
class T>
class Array;
75 template<
class T>
class ArrayView;
77 #endif // DOXYGEN_SHOULD_SKIP_THIS
81 #ifndef DOXYGEN_SHOULD_SKIP_THIS
84 #endif // DOXYGEN_SHOULD_SKIP_THIS
129 template<
typename ST,
typename LO,
typename GO,
typename NT>
132 const Teuchos::ArrayView<const char>& imports,
133 const Teuchos::ArrayView<const size_t>& numPacketsPerLID,
134 const Teuchos::ArrayView<const LO>& importLIDs,
135 size_t constantNumPackets,
136 Distributor & distor,
139 template<
typename ST,
typename LO,
typename GO,
typename NT>
141 unpackCrsMatrixAndCombineNew(
142 const CrsMatrix<ST, LO, GO, NT>& sourceMatrix,
143 Kokkos::DualView<
char*,
145 Kokkos::DualView<
size_t*,
147 const Kokkos::DualView<
const LO*,
149 const size_t constantNumPackets,
208 template<
typename Scalar,
typename LocalOrdinal,
typename GlobalOrdinal,
typename Node>
211 const CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> & sourceMatrix,
212 const Teuchos::ArrayView<const LocalOrdinal> &importLIDs,
213 const Teuchos::ArrayView<const char> &imports,
214 const Teuchos::ArrayView<const size_t>& numPacketsPerLID,
215 size_t constantNumPackets,
219 const Teuchos::ArrayView<const LocalOrdinal>& permuteToLIDs,
220 const Teuchos::ArrayView<const LocalOrdinal>& permuteFromLIDs);
236 template<
typename Scalar,
typename LocalOrdinal,
typename GlobalOrdinal,
typename Node>
239 const CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> & sourceMatrix,
240 const Teuchos::ArrayView<const LocalOrdinal>& importLIDs,
241 const Teuchos::ArrayView<const char>& imports,
242 const Teuchos::ArrayView<const size_t>& numPacketsPerLID,
243 const size_t constantNumPackets,
246 const size_t numSameIDs,
247 const Teuchos::ArrayView<const LocalOrdinal>& permuteToLIDs,
248 const Teuchos::ArrayView<const LocalOrdinal>& permuteFromLIDs,
249 size_t TargetNumRows,
250 size_t TargetNumNonzeros,
251 const int MyTargetPID,
252 const Teuchos::ArrayView<size_t>& CRS_rowptr,
253 const Teuchos::ArrayView<GlobalOrdinal>& CRS_colind,
254 const Teuchos::ArrayView<
typename CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>::impl_scalar_type>& CRS_vals,
255 const Teuchos::ArrayView<const int>& SourcePids,
256 Teuchos::Array<int>& TargetPids);
261 #endif // TPETRA_DETAILS_UNPACKCRSMATRIXANDCOMBINE_DECL_HPP
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, Distributor &distor, 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, Distributor &distor, CombineMode combineMode)
Unpack the imported column indices and values, and combine into matrix.
Declaration of Tpetra::CombineMode enum, and a function for setting a Tpetra::CombineMode parameter i...
CombineMode
Rule for combining data in an Import or Export.
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, Distributor &distor, 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
Forward declaration of Tpetra::CrsMatrix.
Declaration of the Tpetra::DistObject class.
Kokkos::Device< typename device_type::execution_space, buffer_memory_space > buffer_device_type