11 #ifndef AMESOS2_TPETRAROWMATRIX_MATRIXADAPTER_DECL_HPP 
   12 #define AMESOS2_TPETRAROWMATRIX_MATRIXADAPTER_DECL_HPP 
   14 #include "Amesos2_config.h" 
   16 #include <Teuchos_ArrayView.hpp> 
   17 #include <Tpetra_CrsMatrix.hpp> 
   19 #include "Amesos2_AbstractConcreteMatrixAdapter.hpp" 
   25   template <
class Matrix> 
class MatrixAdapter;
 
   43   template <
typename Scalar,
 
   44             typename LocalOrdinal,
 
   45             typename GlobalOrdinal,
 
   58     typedef Tpetra::RowMatrix<Scalar,
 
   63     typedef Scalar                                scalar_t;
 
   64     typedef LocalOrdinal                   local_ordinal_t;
 
   65     typedef GlobalOrdinal                 global_ordinal_t;
 
   72     typedef typename super_t::global_size_t  global_size_t;
 
   86     template<
typename KV_GO, 
typename KV_S>
 
   87     void getGlobalRowCopy_kokkos_view_impl(global_ordinal_t row,
 
   92     void getGlobalRowCopy_impl(global_ordinal_t row,
 
   93                                const Teuchos::ArrayView<global_ordinal_t>& indices,
 
   94                                const Teuchos::ArrayView<scalar_t>& vals,
 
   97     void getGlobalColCopy_impl(global_ordinal_t col,
 
   98                                const Teuchos::ArrayView<global_ordinal_t>& indices,
 
   99                                const Teuchos::ArrayView<scalar_t>& vals,
 
  102     global_size_t getGlobalNNZ_impl() 
const;
 
  104     size_t getLocalNNZ_impl() 
const;
 
  106     size_t getMaxRowNNZ_impl() 
const;
 
  108     size_t getMaxColNNZ_impl() 
const;
 
  110     size_t getGlobalRowNNZ_impl(global_ordinal_t row) 
const;
 
  112     size_t getLocalRowNNZ_impl(local_ordinal_t row) 
const;
 
  114     size_t getGlobalColNNZ_impl(global_ordinal_t col) 
const;
 
  116     size_t getLocalColNNZ_impl(local_ordinal_t col) 
const;
 
  118     global_size_t getGlobalNumRows_impl() 
const;
 
  120     global_size_t getGlobalNumCols_impl() 
const;
 
  124     const RCP<
const Tpetra::Map<local_ordinal_t,
 
  129     const RCP<
const Tpetra::Map<local_ordinal_t,
 
  132     getRowMap_impl() 
const;
 
  134     const RCP<
const Tpetra::Map<local_ordinal_t,
 
  137     getColMap_impl() 
const;
 
  139     const RCP<const Teuchos::Comm<int> > getComm_impl() 
const;
 
  141     bool isLocallyIndexed_impl() 
const;
 
  143     bool isGloballyIndexed_impl() 
const;
 
  148     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;
 
  149     RCP<const super_t> reindex_impl(Teuchos::RCP<
const Tpetra::Map<local_ordinal_t, global_ordinal_t, node_t>> &contigRowMap, Teuchos::RCP<
const Tpetra::Map<local_ordinal_t, global_ordinal_t, node_t>> &contigColMap, 
const EPhase current_phase) 
const;
 
  151     template<
typename KV_S, 
typename KV_GO, 
typename KV_GS, 
typename host_ordinal_type_array, 
typename host_scalar_type_array>
 
  152     local_ordinal_t gather_impl(KV_S& nzvals, KV_GO& indices, KV_GS& pointers,
 
  153                                 host_ordinal_type_array &perm_g2l,
 
  154                                 host_ordinal_type_array &recvCountRows, host_ordinal_type_array &recvDisplRows,
 
  155                                 host_ordinal_type_array &recvCounts, host_ordinal_type_array &recvDispls,
 
  156                                 host_ordinal_type_array &transpose_map, host_scalar_type_array &nzvals_t,
 
  157                                 bool column_major, 
EPhase current_phase) 
const;
 
  160     void getSparseRowPtr_kokkos_view(KV & view)
 const {
 
  161       deep_copy_or_assign_view(view, this->mat_->getLocalMatrixDevice().graph.row_map);
 
  165     void  getSparseColInd_kokkos_view(KV & view)
 const {
 
  166       deep_copy_or_assign_view(view, this->mat_->getLocalMatrixDevice().graph.entries);
 
  170     void getSparseValues_kokkos_view(KV & view)
 const {
 
  171       deep_copy_or_assign_view(view, this->mat_->getLocalMatrixDevice().values);
 
  178 #endif        // AMESOS2_TPETRAROWMATRIX_MATRIXADAPTER_DECL_HPP 
EPhase
Used to indicate a phase in the direct solution. 
Definition: Amesos2_TypeDecl.hpp:31
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:66
A Matrix adapter interface for Amesos2. 
Definition: Amesos2_MatrixAdapter_decl.hpp:42
Definition: Amesos2_AbstractConcreteMatrixAdapter.hpp:55
Indicates that the concrete class can use the generic getC{c|r}s methods implemented in MatrixAdapter...
Definition: Amesos2_TypeDecl.hpp:57
EDistribution
Definition: Amesos2_TypeDecl.hpp:89