Amesos2 - Direct Sparse Solver Interfaces
Version of the Day
|
MatrixAdapter definitions for KokkosSparse::CrsMatrix objects. More...
#include <Amesos2_KokkosCrsMatrix_MatrixAdapter_decl.hpp>
Public Types | |
typedef KokkosSparse::CrsMatrix < Scalar, LocalOrdinal, ExecutionSpace > | matrix_t |
typedef MatrixTraits< matrix_t > ::scalar_t | scalar_t |
typedef MatrixTraits< matrix_t > ::local_ordinal_t | local_ordinal_t |
typedef MatrixTraits< matrix_t > ::global_ordinal_t | global_ordinal_t |
typedef MatrixTraits< matrix_t > ::node_t | node_t |
typedef MatrixTraits< matrix_t > ::global_size_t | global_size_t |
typedef MatrixTraits< matrix_t > ::sparse_ptr_type | spmtx_ptr_t |
typedef MatrixTraits< matrix_t > ::sparse_idx_type | spmtx_idx_t |
typedef MatrixTraits< matrix_t > ::sparse_values_type | spmtx_vals_t |
typedef no_special_impl | get_crs_spec |
typedef no_special_impl | get_ccs_spec |
typedef ConcreteMatrixAdapter < matrix_t > | type |
typedef MatrixTraits< matrix_t > ::major_access | major_access |
typedef ConcreteMatrixAdapter < KokkosSparse::CrsMatrix < Scalar, LocalOrdinal, ExecutionSpace > > | adapter_t |
typedef MatrixTraits < KokkosSparse::CrsMatrix < Scalar, LocalOrdinal, ExecutionSpace > >::local_matrix_t | local_matrix_t |
Public Member Functions | |
ConcreteMatrixAdapter (Teuchos::RCP< matrix_t > m) | |
Teuchos::RCP< const MatrixAdapter< matrix_t > > | get_impl (const Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > map, EDistribution distribution=ROOTED) const |
const Teuchos::RCP< const Teuchos::Comm< int > > | getComm_impl () const |
global_size_t | getGlobalNumRows_impl () const |
global_size_t | getGlobalNumCols_impl () const |
global_size_t | getGlobalNNZ_impl () const |
spmtx_ptr_t | getSparseRowPtr () const |
spmtx_idx_t | getSparseColInd () const |
spmtx_vals_t | getSparseValues () const |
template<class KV > | |
void | getSparseRowPtr_kokkos_view (KV &view) const |
template<class KV > | |
void | getSparseColInd_kokkos_view (KV &view) const |
template<class KV > | |
void | getSparseValues_kokkos_view (KV &view) const |
size_t | getGlobalRowNNZ_impl (global_ordinal_t row) const |
size_t | getLocalRowNNZ_impl (local_ordinal_t row) const |
size_t | getGlobalColNNZ_impl (global_ordinal_t col) const |
size_t | getLocalColNNZ_impl (local_ordinal_t col) const |
global_size_t | getRowIndexBase () const |
global_size_t | getColumnIndexBase () const |
const Teuchos::RCP< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > | getMap_impl () const |
const Teuchos::RCP< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > | getRowMap_impl () const |
const Teuchos::RCP< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > | getColMap_impl () const |
void | getGlobalRowCopy_impl (global_ordinal_t row, const Teuchos::ArrayView< global_ordinal_t > &indices, const Teuchos::ArrayView< scalar_t > &vals, size_t &nnz) const |
void | getGlobalColCopy_impl (global_ordinal_t col, const Teuchos::ArrayView< global_ordinal_t > &indices, const Teuchos::ArrayView< scalar_t > &vals, size_t &nnz) const |
void | getCrs (const Teuchos::ArrayView< scalar_t > nzval, const Teuchos::ArrayView< global_ordinal_t > colind, const Teuchos::ArrayView< global_size_t > rowptr, global_size_t &nnz, const Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > rowmap, EStorage_Ordering ordering=ARBITRARY, EDistribution distribution=ROOTED) const |
Gets a compressed-row storage summary of this . More... | |
void | getCrs (const Teuchos::ArrayView< scalar_t > nzval, const Teuchos::ArrayView< global_ordinal_t > colind, const Teuchos::ArrayView< global_size_t > rowptr, global_size_t &nnz, EDistribution distribution, EStorage_Ordering ordering=ARBITRARY) const |
void | getCrs_kokkos_view (KV_S &nzval, KV_GO &colind, KV_GS &rowptr, global_size_t &nnz, const Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > rowmap, EStorage_Ordering ordering=ARBITRARY, EDistribution distribution=ROOTED) const |
void | getCcs (const Teuchos::ArrayView< scalar_t > nzval, const Teuchos::ArrayView< global_ordinal_t > rowind, const Teuchos::ArrayView< global_size_t > colptr, global_size_t &nnz, const Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > colmap, EStorage_Ordering ordering=ARBITRARY, EDistribution distribution=ROOTED) const |
Gets a compressed-column storage summary of this . More... | |
void | getCcs (const Teuchos::ArrayView< scalar_t > nzval, const Teuchos::ArrayView< global_ordinal_t > rowind, const Teuchos::ArrayView< global_size_t > colptr, global_size_t &nnz, EDistribution distribution, EStorage_Ordering ordering=ARBITRARY) const |
void | getCcs_kokkos_view (KV_S &nzval, KV_GO &colind, KV_GS &rowptr, global_size_t &nnz, const Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > colmap, EStorage_Ordering ordering=ARBITRARY, EDistribution distribution=ROOTED) const |
const Teuchos::RCP< const Teuchos::Comm< int > > | getComm () const |
Returns the Teuchos::Comm object associated with this matrix. | |
global_size_t | getGlobalNumRows () const |
Get the number of rows in this matrix. | |
global_size_t | getGlobalNumCols () const |
Get the number of columns in this matrix. | |
global_size_t | getGlobalNNZ () const |
Get the global number of non-zeros in this sparse matrix. | |
size_t | getLocalNumRows () const |
Get the number of rows local to the calling process. | |
size_t | getLocalNumCols () const |
Get the number of columns local to the calling process. | |
size_t | getLocalNNZ () const |
Get the local number of non-zeros on this processor. | |
Teuchos::RCP< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > | getMap () const |
Teuchos::RCP< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > | getRowMap () const |
Teuchos::RCP< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > | getColMap () const |
Teuchos::RCP< const type > | get (const Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > map, EDistribution distribution=ROOTED) const |
std::string | description () const |
Returns a short description of this Solver. | |
void | describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const |
Describes of this matrix adapter with some level of verbosity. | |
spmtx_ptr_t | returnRowPtr () const |
Return raw pointer from CRS row pointer of matrixA_. | |
spmtx_idx_t | returnColInd () const |
Return raw pointer from CRS column indices of matrixA_. | |
spmtx_vals_t | returnValues () const |
Return raw pointer from CRS values of matrixA_. | |
void | returnRowPtr_kokkos_view (KV &view) const |
Return kokkos view of CRS row pointer of matrixA_. | |
void | returnColInd_kokkos_view (KV &view) const |
Return kokkos view of CRS column indices of matrixA_. | |
void | returnValues_kokkos_view (KV &view) const |
Return kokkos view of CRS values of matrixA_. | |
Protected Member Functions | |
void | getGlobalRowCopy (global_ordinal_t row, const Teuchos::ArrayView< global_ordinal_t > &indices, const Teuchos::ArrayView< scalar_t > &vals, size_t &nnz) const |
void | getGlobalColCopy (global_ordinal_t col, const Teuchos::ArrayView< global_ordinal_t > &indices, const Teuchos::ArrayView< scalar_t > &vals, size_t &nnz) const |
size_t | getMaxRowNNZ () const |
size_t | getMaxColNNZ () const |
size_t | getGlobalRowNNZ (global_ordinal_t row) const |
size_t | getLocalRowNNZ (local_ordinal_t row) const |
size_t | getGlobalColNNZ (global_ordinal_t col) const |
size_t | getLocalColNNZ (local_ordinal_t col) const |
bool | isLocallyIndexed () const |
bool | isGloballyIndexed () const |
MatrixAdapter definitions for KokkosSparse::CrsMatrix objects.
All other significant functionality is inherited from this class's superclass.
|
inherited |
Gets a compressed-row storage summary of this
.
Extracts a compressed-row storage format of the matrix and stores the information in the user-supplied containers.
[out] | nzval | will hold the values of the nonzero entries of this |
[out] | colind | will hold the column indices of this for each row. |
[out] | rowptr | is of size nrow + 1 and rowptr[j] stores the location in nzval and colind which starts row j of this . rowptr[nrow] = nnz , where nrow is the number of rows in this matrix. |
[out] | nnz | is the local number of nonzero entries in the representation of this matrix. For example, if this processor has 12 of the 23 nzvals in its rows, then nnz will be 12 on exit. |
[in] | rowmap | A Tpetra::Map describing the desired distribution of the rows of the CRS representation on the calling processors. |
[in] | ordering | |
[in] | distribution | (optional: default = ROOTED
|
std::length_error | Thrown if nzval or colind is not large enough to hold the global number of nonzero values. |
std::length_error | Thrown if rowptr is not at least nrow + 1 in size, the required size. |
std::runtime_error | Thrown if there is an error while extracting row values from the underlying matrix. |
|
inherited |
Convenience overload for the getCrs function that uses an enum to describe some of the most basic distributions that could be desired.
|
inherited |
Gets a compressed-column storage summary of this
.
Extracts a compressed-column storage format of the matrix and stores the information in the user-supplied containers.
[out] | nzval | will hold the values of the nonzero entries of this |
[out] | rowind | will hold the row indices of this for each column. |
[out] | colptr | is of size ncol + 1 and colptr[j] stores the location in nzval and rowind which starts column j of this . colptr[ncol] = nnz , where ncol is the number of columns in this matrix. |
[out] | nnz | is the number of nonzero entries in this matrix. |
[in] | colmap | A Tpetra::Map describing the desired distribution of the columns of the CCS representation on the calling processors. |
[in] | ordering | |
[in] | distribution | (optional: default = ROOTED
|
std::length_error | Thrown if nzval or rowind is not large enough to hold the global number of nonzero values. |
std::length_error | Thrown if colptr is not at least ncol + 1 in size, the required size. |
std::runtime_error | Thrown if there is an error while extracting row values from the underlying matrix. |
|
inherited |
Convenience overload for the getCcs function that uses an enum to describe some of the most basic distributions that could be desired.
|
protectedinherited |
[out] | row | the global matrix row |
[out] | indices | global column indices |
[out] | vals | the non-zero values in row row |
[out] | nnz | the number of nonzeros extracted from row row |
|
protectedinherited |
[out] | col | the global matrix col |
[out] | indices | global column indices |
[out] | vals | the non-zero values in row row |
[out] | nnz | the number of nonzeros extracted from row row |