|
Kokkos Node API and Local Linear Algebra Kernels Version of the Day
|
Default implementation of sparse matrix-vector multiplication and solve routines, for device-based nodes. More...
#include <Kokkos_DefaultSparseOps.hpp>
Classes | |
| struct | rebind |
| Sparse operations type for a different scalar type. More... | |
Public Types | |
Typedefs and structs | |
| typedef Scalar | ScalarType |
| The type of the individual entries of the sparse matrix. | |
| typedef Ordinal | OrdinalType |
| The type of the (local) indices describing the structure of the sparse matrix. | |
| typedef Node | NodeType |
| The Kokkos Node type. | |
Public Member Functions | |
Constructors/Destructor | |
| DefaultDeviceSparseOps (const RCP< Node > &node) | |
| Constructor accepting and retaining a node object. | |
| ~DefaultDeviceSparseOps () | |
| Destructor. | |
Accessor routines. | |
| RCP< Node > | getNode () const |
| The Kokkos Node with which this object was instantiated. | |
Initialization of structure | |
| void | initializeStructure (const CrsGraphDeviceCompute< Ordinal, Node, DefaultDeviceSparseOps< void, Ordinal, Node > > &graph) |
| Initialize structure of matrix, using CrsGraphDeviceCompute. | |
| void | initializeValues (const CrsMatrixDeviceCompute< Scalar, Ordinal, Node, DefaultDeviceSparseOps< void, Ordinal, Node > > &matrix) |
| Initialize values of matrix, using CrsMatrixDeviceCompute. | |
| void | clear () |
| Clear all matrix structure and values. | |
Computational methods | |
| template<class DomainScalar , class RangeScalar > | |
| void | multiply (Teuchos::ETransp trans, RangeScalar alpha, const MultiVector< DomainScalar, Node > &X, MultiVector< RangeScalar, Node > &Y) const |
| Y := alpha * Op(A) * X. | |
| template<class DomainScalar , class RangeScalar > | |
| void | multiply (Teuchos::ETransp trans, RangeScalar alpha, const MultiVector< DomainScalar, Node > &X, RangeScalar beta, MultiVector< RangeScalar, Node > &Y) const |
| Y := Y + alpha * Op(A) * X. | |
| template<class DomainScalar , class RangeScalar > | |
| void | solve (Teuchos::ETransp trans, Teuchos::EUplo uplo, Teuchos::EDiag diag, const MultiVector< DomainScalar, Node > &Y, MultiVector< RangeScalar, Node > &X) const |
| Solve Y = Op(A) X for X, where we assume A is triangular. | |
| template<class VectorScalar > | |
| void | leftScale (const MultiVector< VectorScalar, Node > &X) |
| Left-scales a matrix by a vector. | |
Protected Member Functions | |
| DefaultDeviceSparseOps (const DefaultDeviceSparseOps &source) | |
| Copy constructor (protected and unimplemented) | |
Protected Attributes | |
| RCP< Node > | node_ |
| The Kokkos Node with which this object was instantiated. | |
Default implementation of sparse matrix-vector multiplication and solve routines, for device-based nodes.
Definition at line 718 of file Kokkos_DefaultSparseOps.hpp.
| typedef Scalar Kokkos::DefaultDeviceSparseOps< Scalar, Ordinal, Node >::ScalarType |
The type of the individual entries of the sparse matrix.
Definition at line 724 of file Kokkos_DefaultSparseOps.hpp.
| typedef Ordinal Kokkos::DefaultDeviceSparseOps< Scalar, Ordinal, Node >::OrdinalType |
The type of the (local) indices describing the structure of the sparse matrix.
Definition at line 726 of file Kokkos_DefaultSparseOps.hpp.
| typedef Node Kokkos::DefaultDeviceSparseOps< Scalar, Ordinal, Node >::NodeType |
The Kokkos Node type.
Definition at line 728 of file Kokkos_DefaultSparseOps.hpp.
| Kokkos::DefaultDeviceSparseOps< Scalar, Ordinal, Node >::DefaultDeviceSparseOps | ( | const RCP< Node > & | node | ) |
Constructor accepting and retaining a node object.
Definition at line 853 of file Kokkos_DefaultSparseOps.hpp.
| Kokkos::DefaultDeviceSparseOps< Scalar, Ordinal, Node >::~DefaultDeviceSparseOps | ( | ) |
Destructor.
Definition at line 860 of file Kokkos_DefaultSparseOps.hpp.
| Kokkos::DefaultDeviceSparseOps< Scalar, Ordinal, Node >::DefaultDeviceSparseOps | ( | const DefaultDeviceSparseOps< Scalar, Ordinal, Node > & | source | ) | [protected] |
Copy constructor (protected and unimplemented)
| RCP< Node > Kokkos::DefaultDeviceSparseOps< Scalar, Ordinal, Node >::getNode | ( | ) | const |
The Kokkos Node with which this object was instantiated.
Definition at line 864 of file Kokkos_DefaultSparseOps.hpp.
| void Kokkos::DefaultDeviceSparseOps< Scalar, Ordinal, Node >::initializeStructure | ( | const CrsGraphDeviceCompute< Ordinal, Node, DefaultDeviceSparseOps< void, Ordinal, Node > > & | graph | ) |
Initialize structure of matrix, using CrsGraphDeviceCompute.
Definition at line 880 of file Kokkos_DefaultSparseOps.hpp.
| void Kokkos::DefaultDeviceSparseOps< Scalar, Ordinal, Node >::initializeValues | ( | const CrsMatrixDeviceCompute< Scalar, Ordinal, Node, DefaultDeviceSparseOps< void, Ordinal, Node > > & | matrix | ) |
Initialize values of matrix, using CrsMatrixDeviceCompute.
Definition at line 898 of file Kokkos_DefaultSparseOps.hpp.
| void Kokkos::DefaultDeviceSparseOps< Scalar, Ordinal, Node >::clear | ( | ) |
Clear all matrix structure and values.
Definition at line 869 of file Kokkos_DefaultSparseOps.hpp.
| void Kokkos::DefaultDeviceSparseOps< Scalar, Ordinal, Node >::multiply | ( | Teuchos::ETransp | trans, |
| RangeScalar | alpha, | ||
| const MultiVector< DomainScalar, Node > & | X, | ||
| MultiVector< RangeScalar, Node > & | Y | ||
| ) | const |
Y := alpha * Op(A) * X.
Apply the local sparse matrix A (or its transpose or conjugate transpose) to a multivector X, overwriting Y with the result. Op(A) means A, the transpose of A, or the conjugate transpose of A, depending on the trans argument.
| DomainScalar | The type of entries in the input multivector X. This may differ from the type of entries in A or in Y. |
| RangeScalar | The type of entries in the output multivector Y. This may differ from the type of entries in A or in X. |
Definition at line 981 of file Kokkos_DefaultSparseOps.hpp.
| void Kokkos::DefaultDeviceSparseOps< Scalar, Ordinal, Node >::multiply | ( | Teuchos::ETransp | trans, |
| RangeScalar | alpha, | ||
| const MultiVector< DomainScalar, Node > & | X, | ||
| RangeScalar | beta, | ||
| MultiVector< RangeScalar, Node > & | Y | ||
| ) | const |
Y := Y + alpha * Op(A) * X.
Apply the local sparse matrix A (or its transpose or conjugate transpose) to a multivector X, accumulating the result into Y. Op(A) means A, the transpose of A, or the conjugate transpose of A, depending on the trans argument.
| DomainScalar | The type of entries in the input multivector X. This may differ from the type of entries in A or in Y. |
| RangeScalar | The type of entries in the output multivector Y. This may differ from the type of entries in A or in X. |
Definition at line 1043 of file Kokkos_DefaultSparseOps.hpp.
| void Kokkos::DefaultDeviceSparseOps< Scalar, Ordinal, Node >::solve | ( | Teuchos::ETransp | trans, |
| Teuchos::EUplo | uplo, | ||
| Teuchos::EDiag | diag, | ||
| const MultiVector< DomainScalar, Node > & | Y, | ||
| MultiVector< RangeScalar, Node > & | X | ||
| ) | const |
Solve Y = Op(A) X for X, where we assume A is triangular.
Solve the (upper or lower) triangular system Y = Op(A) X. Op(A) means A, the transpose of A, or the conjugate transpose of A, depending on the trans argument.
| DomainScalar | The type of entries in the input multivector X. This may differ from the type of entries in A or in Y. |
| RangeScalar | The type of entries in the output multivector Y. This may differ from the type of entries in A or in X. |
Definition at line 914 of file Kokkos_DefaultSparseOps.hpp.
| void Kokkos::DefaultDeviceSparseOps< Scalar, Ordinal, Node >::leftScale | ( | const MultiVector< VectorScalar, Node > & | X | ) |
Left-scales a matrix by a vector.
Definition at line 1110 of file Kokkos_DefaultSparseOps.hpp.
RCP<Node> Kokkos::DefaultDeviceSparseOps< Scalar, Ordinal, Node >::node_ [protected] |
The Kokkos Node with which this object was instantiated.
Definition at line 840 of file Kokkos_DefaultSparseOps.hpp.
1.7.4