Tpetra parallel linear algebra Version of the Day
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Tpetra::LocalCrsMatrixOperator< MultiVectorScalar, MatrixScalar, Device > Class Template Referenceabstract

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

#include <Tpetra_LocalCrsMatrixOperator_decl.hpp>

Inheritance diagram for Tpetra::LocalCrsMatrixOperator< MultiVectorScalar, MatrixScalar, Device >:
Inheritance graph
[legend]

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.
 
virtual void apply (Kokkos::View< const scalar_type **, array_layout, device_type, Kokkos::MemoryTraits< Kokkos::Unmanaged > > X, Kokkos::View< scalar_type **, array_layout, device_type, Kokkos::MemoryTraits< Kokkos::Unmanaged > > Y, const Teuchos::ETransp mode, const scalar_type alpha, const scalar_type beta) const=0
 Compute Y := beta*Y + alpha*Op(A)*X.
 

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() [1/2]

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
override

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.

Definition at line 50 of file Tpetra_LocalCrsMatrixOperator_def.hpp.

◆ applyImbalancedRows()

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.

◆ apply() [2/2]

virtual void Tpetra::LocalOperator< MultiVectorScalar , Device >::apply ( Kokkos::View< const scalar_type **, array_layout, device_type, Kokkos::MemoryTraits< Kokkos::Unmanaged > >  X,
Kokkos::View< scalar_type **, array_layout, device_type, Kokkos::MemoryTraits< Kokkos::Unmanaged > >  Y,
const Teuchos::ETransp  mode,
const scalar_type  alpha,
const scalar_type  beta 
) const
pure virtualinherited

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.

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