Tpetra parallel linear algebra Version of the Day
Loading...
Searching...
No Matches
Tpetra::LocalCrsMatrixOperator< MultiVectorScalar, MatrixScalar, Device > Class Template Reference

Abstract interface for local operators (e.g., matrices and preconditioners). More...

#include <Tpetra_LocalCrsMatrixOperator_decl.hpp>

Inheritance diagram for Tpetra::LocalCrsMatrixOperator< MultiVectorScalar, MatrixScalar, Device >:

Public Member Functions

void apply (Kokkos::View< const mv_scalar_type **, array_layout, device_type, Kokkos::MemoryTraits< Kokkos::Unmanaged > > X, Kokkos::View< mv_scalar_type **, array_layout, device_type, Kokkos::MemoryTraits< Kokkos::Unmanaged > > Y, const Teuchos::ETransp mode, const mv_scalar_type alpha, const mv_scalar_type beta) const override
 Compute Y := beta*Y + alpha*Op(A)*X.
void applyImbalancedRows (Kokkos::View< const mv_scalar_type **, array_layout, device_type, Kokkos::MemoryTraits< Kokkos::Unmanaged > > X, Kokkos::View< mv_scalar_type **, array_layout, device_type, Kokkos::MemoryTraits< Kokkos::Unmanaged > > Y, const Teuchos::ETransp mode, const mv_scalar_type alpha, const mv_scalar_type beta) const
 Compute Y := beta*Y + alpha*Op(A)*X, with a hint to use an SPMV algorithm for imbalanced rows.

Detailed Description

template<class MultiVectorScalar, class MatrixScalar, class Device>
class Tpetra::LocalCrsMatrixOperator< MultiVectorScalar, MatrixScalar, Device >

Abstract interface for local operators (e.g., matrices and preconditioners).

Template Parameters
MultiVectorScalarThe type of the entries of the input and output (multi)vectors.
MatrixScalarThe type of the entries of the sparse matrix.
DeviceThe Kokkos Device type; must be a specialization of Kokkos::Device.

Definition at line 30 of file Tpetra_LocalCrsMatrixOperator_decl.hpp.

Member Function Documentation

◆ apply()

template<class MultiVectorScalar, class MatrixScalar, class Device>
void Tpetra::LocalCrsMatrixOperator< MultiVectorScalar, MatrixScalar, Device >::apply ( Kokkos::View< const mv_scalar_type **, array_layout, device_type, Kokkos::MemoryTraits< Kokkos::Unmanaged > > X,
Kokkos::View< mv_scalar_type **, array_layout, device_type, Kokkos::MemoryTraits< Kokkos::Unmanaged > > Y,
const Teuchos::ETransp mode,
const mv_scalar_type alpha,
const mv_scalar_type beta ) const
overridevirtual

Compute Y := beta*Y + alpha*Op(A)*X.

Parameters
X[in] Input MultiVector.
Y[in/out] Output MultiVector.
mode[in] Whether to apply the transpose (Teuchos::NO_TRANS, Teuchos::TRANS, Teuchos::CONJ_TRANS).
alpha[in] Scaling factor for the result.
beta[in] Scaling factor for Y before adding the result.

Implements Tpetra::LocalOperator< MultiVectorScalar, Device >.

Definition at line 50 of file Tpetra_LocalCrsMatrixOperator_def.hpp.

◆ applyImbalancedRows()

template<class MultiVectorScalar, class MatrixScalar, class Device>
void Tpetra::LocalCrsMatrixOperator< MultiVectorScalar, MatrixScalar, Device >::applyImbalancedRows ( Kokkos::View< const mv_scalar_type **, array_layout, device_type, Kokkos::MemoryTraits< Kokkos::Unmanaged > > X,
Kokkos::View< mv_scalar_type **, array_layout, device_type, Kokkos::MemoryTraits< Kokkos::Unmanaged > > Y,
const Teuchos::ETransp mode,
const mv_scalar_type alpha,
const mv_scalar_type beta ) const

Compute Y := beta*Y + alpha*Op(A)*X, with a hint to use an SPMV algorithm for imbalanced rows.

Same behavior as apply() above, except give KokkosKernels a hint to use an SPMV algorithm that can efficiently handle matrices with imbalanced rows.

Parameters
X[in] Input MultiVector.
Y[in/out] Output MultiVector.
mode[in] Whether to apply the transpose (Teuchos::NO_TRANS, Teuchos::TRANS, Teuchos::CONJ_TRANS).
alpha[in] Scaling factor for the result.
beta[in] Scaling factor for Y before adding the result.

Definition at line 86 of file Tpetra_LocalCrsMatrixOperator_def.hpp.


The documentation for this class was generated from the following files: