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
97template <
typename ST,
typename LO,
typename GO,
typename NT>
99 const Teuchos::ArrayView<const char>& imports,
100 const Teuchos::ArrayView<const size_t>& numPacketsPerLID,
101 const Teuchos::ArrayView<const LO>& importLIDs,
102 size_t constantNumPackets,
105template <
typename ST,
typename LO,
typename GO,
typename NT>
106void unpackCrsMatrixAndCombineNew(
108 Kokkos::DualView<
char*,
111 Kokkos::DualView<
size_t*,
114 const Kokkos::DualView<
const LO*,
116 const size_t constantNumPackets,
174template <
typename Scalar,
typename LocalOrdinal,
typename GlobalOrdinal,
typename Node>
178 const Teuchos::ArrayView<const LocalOrdinal>& importLIDs,
179 const Teuchos::ArrayView<const char>& imports,
180 const Teuchos::ArrayView<const size_t>& numPacketsPerLID,
181 size_t constantNumPackets,
184 const Teuchos::ArrayView<const LocalOrdinal>& permuteToLIDs,
185 const Teuchos::ArrayView<const LocalOrdinal>& permuteFromLIDs);
202template <
typename Scalar,
typename LocalOrdinal,
typename GlobalOrdinal,
typename Node>
205 const Kokkos::View<LocalOrdinal
const*,
206 Kokkos::Device<
typename Node::device_type::execution_space,
207 Tpetra::Details::DefaultTypes::comm_buffer_memory_space<typename Node::device_type>>
208#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_4
213 const Kokkos::View<
const char*,
214 Kokkos::Device<
typename Node::device_type::execution_space,
215 Tpetra::Details::DefaultTypes::comm_buffer_memory_space<typename Node::device_type>>
216#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_4
221 const Kokkos::View<
const size_t*,
222 Kokkos::Device<
typename Node::device_type::execution_space,
223 Tpetra::Details::DefaultTypes::comm_buffer_memory_space<typename Node::device_type>>
224#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_4
229 const size_t numSameIDs,
230 const Kokkos::View<LocalOrdinal
const*,
231 Kokkos::Device<
typename Node::device_type::execution_space,
232 Tpetra::Details::DefaultTypes::comm_buffer_memory_space<typename Node::device_type>>
233#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_4
238 const Kokkos::View<LocalOrdinal
const*,
239 Kokkos::Device<
typename Node::device_type::execution_space,
240 Tpetra::Details::DefaultTypes::comm_buffer_memory_space<typename Node::device_type>>
241#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_4
246 size_t TargetNumRows,
247 const int MyTargetPID,
248 Teuchos::ArrayRCP<size_t>& CRS_rowptr,
249 Teuchos::ArrayRCP<GlobalOrdinal>& CRS_colind,
250 Teuchos::ArrayRCP<Scalar>& CRS_vals,
251 const Teuchos::ArrayView<const int>& SourcePids,
252 Teuchos::Array<int>& TargetPids);
254template <
typename Scalar,
typename LocalOrdinal,
typename GlobalOrdinal,
typename Node>
257 const Kokkos::View<LocalOrdinal
const*,
258 Kokkos::Device<
typename Node::device_type::execution_space,
259 Tpetra::Details::DefaultTypes::comm_buffer_memory_space<typename Node::device_type>>
260#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_4
265 const Kokkos::View<
const char*,
266 Kokkos::Device<
typename Node::device_type::execution_space,
267 Tpetra::Details::DefaultTypes::comm_buffer_memory_space<typename Node::device_type>>
268#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_4
273 const Kokkos::View<
const size_t*,
274 Kokkos::Device<
typename Node::device_type::execution_space,
275 Tpetra::Details::DefaultTypes::comm_buffer_memory_space<typename Node::device_type>>
276#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_4
281 const size_t numSameIDs,
282 const Kokkos::View<LocalOrdinal
const*,
283 Kokkos::Device<
typename Node::device_type::execution_space,
284 Tpetra::Details::DefaultTypes::comm_buffer_memory_space<typename Node::device_type>>
285#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_4
290 const Kokkos::View<LocalOrdinal
const*,
291 Kokkos::Device<
typename Node::device_type::execution_space,
292 Tpetra::Details::DefaultTypes::comm_buffer_memory_space<typename Node::device_type>>
293#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_4
298 size_t TargetNumRows,
299 const int MyTargetPID,
300 Kokkos::View<size_t*, typename Node::device_type>& ,
301 Kokkos::View<GlobalOrdinal*, typename Node::device_type>& ,
303 const Teuchos::ArrayView<const int>& SourcePids,
304 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.