45 #ifndef AMESOS2_TPETRAROWMATRIX_MATRIXADAPTER_DECL_HPP
46 #define AMESOS2_TPETRAROWMATRIX_MATRIXADAPTER_DECL_HPP
48 #include "Amesos2_config.h"
50 #include <Teuchos_ArrayView.hpp>
51 #include <Tpetra_CrsMatrix.hpp>
53 #include "Amesos2_AbstractConcreteMatrixAdapter.hpp"
59 template <
class Matrix>
class MatrixAdapter;
77 template <
typename Scalar,
78 typename LocalOrdinal,
79 typename GlobalOrdinal,
92 typedef Tpetra::RowMatrix<Scalar,
97 typedef Scalar scalar_t;
98 typedef LocalOrdinal local_ordinal_t;
99 typedef GlobalOrdinal global_ordinal_t;
106 typedef typename super_t::global_size_t global_size_t;
120 template<
typename KV_GO,
typename KV_S>
121 void getGlobalRowCopy_kokkos_view_impl(global_ordinal_t row,
126 void getGlobalRowCopy_impl(global_ordinal_t row,
127 const Teuchos::ArrayView<global_ordinal_t>& indices,
128 const Teuchos::ArrayView<scalar_t>& vals,
131 void getGlobalColCopy_impl(global_ordinal_t col,
132 const Teuchos::ArrayView<global_ordinal_t>& indices,
133 const Teuchos::ArrayView<scalar_t>& vals,
136 global_size_t getGlobalNNZ_impl()
const;
138 size_t getLocalNNZ_impl()
const;
140 size_t getMaxRowNNZ_impl()
const;
142 size_t getMaxColNNZ_impl()
const;
144 size_t getGlobalRowNNZ_impl(global_ordinal_t row)
const;
146 size_t getLocalRowNNZ_impl(local_ordinal_t row)
const;
148 size_t getGlobalColNNZ_impl(global_ordinal_t col)
const;
150 size_t getLocalColNNZ_impl(local_ordinal_t col)
const;
152 global_size_t getGlobalNumRows_impl()
const;
154 global_size_t getGlobalNumCols_impl()
const;
158 const RCP<
const Tpetra::Map<local_ordinal_t,
163 const RCP<
const Tpetra::Map<local_ordinal_t,
166 getRowMap_impl()
const;
168 const RCP<
const Tpetra::Map<local_ordinal_t,
171 getColMap_impl()
const;
173 const RCP<const Teuchos::Comm<int> > getComm_impl()
const;
175 bool isLocallyIndexed_impl()
const;
177 bool isGloballyIndexed_impl()
const;
182 RCP<const super_t> get_impl(
const Teuchos::Ptr<
const Tpetra::Map<local_ordinal_t,global_ordinal_t,node_t> > map,
EDistribution distribution = ROOTED)
const;
185 void getSparseRowPtr_kokkos_view(KV & view)
const {
186 deep_copy_or_assign_view(view, this->mat_->getLocalMatrixDevice().graph.row_map);
190 void getSparseColInd_kokkos_view(KV & view)
const {
191 deep_copy_or_assign_view(view, this->mat_->getLocalMatrixDevice().graph.entries);
195 void getSparseValues_kokkos_view(KV & view)
const {
196 deep_copy_or_assign_view(view, this->mat_->getLocalMatrixDevice().values);
203 #endif // AMESOS2_TPETRAROWMATRIX_MATRIXADAPTER_DECL_HPP
Utility functions for Amesos2.
Copy or assign views based on memory spaces.
Indicates that the object of an adapter provides row access to its data.
Definition: Amesos2_TypeDecl.hpp:100
A Matrix adapter interface for Amesos2.
Definition: Amesos2_MatrixAdapter_decl.hpp:76
Definition: Amesos2_AbstractConcreteMatrixAdapter.hpp:89
Indicates that the concrete class can use the generic getC{c|r}s methods implemented in MatrixAdapter...
Definition: Amesos2_TypeDecl.hpp:91
EDistribution
Definition: Amesos2_TypeDecl.hpp:123