Ginkgo  Generated from pipelines/224724463 branch based on develop. Ginkgo version 1.3.0
A numerical linear algebra library targeting many-core architectures
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
gko::preconditioner::Isai< IsaiType, ValueType, IndexType > Class Template Reference

The Incomplete Sparse Approximate Inverse (ISAI) Preconditioner generates an approximate inverse matrix for a given lower triangular matrix L or upper triangular matrix U. More...

#include <ginkgo/core/preconditioner/isai.hpp>

Collaboration diagram for gko::preconditioner::Isai< IsaiType, ValueType, IndexType >:
[legend]

Classes

class  Factory
 
struct  parameters_type
 

Public Types

using value_type = ValueType
 
using index_type = IndexType
 
using transposed_type = Isai< IsaiType==isai_type::lower ? isai_type::upper :isai_type::lower, ValueType, IndexType >
 
using Csr = matrix::Csr< ValueType, IndexType >
 
- Public Types inherited from gko::EnablePolymorphicAssignment< Isai< IsaiType, ValueType, IndexType > >
using result_type = Isai< IsaiType, ValueType, IndexType >
 
- Public Types inherited from gko::ConvertibleTo< Isai< IsaiType, ValueType, IndexType > >
using result_type = Isai< IsaiType, ValueType, IndexType >
 

Public Member Functions

std::shared_ptr< const Csrget_approximate_inverse () const
 Returns the approximate inverse of the given matrix (either L or U, depending on the template parameter IsaiType). More...
 
const parameters_typeget_parameters () const
 
std::unique_ptr< LinOptranspose () const override
 Returns a LinOp representing the transpose of the Transposable object. More...
 
std::unique_ptr< LinOpconj_transpose () const override
 Returns a LinOp representing the conjugate transpose of the Transposable object. More...
 
- Public Member Functions inherited from gko::EnableLinOp< Isai< IsaiType, ValueType, IndexType > >
const Isai< IsaiType, ValueType, IndexType > * apply (const LinOp *b, LinOp *x) const
 
Isai< IsaiType, ValueType, IndexType > * apply (const LinOp *b, LinOp *x)
 
const Isai< IsaiType, ValueType, IndexType > * apply (const LinOp *alpha, const LinOp *b, const LinOp *beta, LinOp *x) const
 
Isai< IsaiType, ValueType, IndexType > * apply (const LinOp *alpha, const LinOp *b, const LinOp *beta, LinOp *x)
 
- Public Member Functions inherited from gko::EnableAbstractPolymorphicObject< Isai< IsaiType, ValueType, IndexType >, LinOp >
std::unique_ptr< Isai< IsaiType, ValueType, IndexType > > create_default (std::shared_ptr< const Executor > exec) const
 
std::unique_ptr< Isai< IsaiType, ValueType, IndexType > > create_default () const
 
std::unique_ptr< Isai< IsaiType, ValueType, IndexType > > clone (std::shared_ptr< const Executor > exec) const
 
std::unique_ptr< Isai< IsaiType, ValueType, IndexType > > clone () const
 
Isai< IsaiType, ValueType, IndexType > * copy_from (const PolymorphicObject *other)
 
Isai< IsaiType, ValueType, IndexType > * copy_from (std::unique_ptr< PolymorphicObject > other)
 
Isai< IsaiType, ValueType, IndexType > * clear ()
 
- Public Member Functions inherited from gko::LinOp
LinOpapply (const LinOp *b, LinOp *x)
 Applies a linear operator to a vector (or a sequence of vectors). More...
 
const LinOpapply (const LinOp *b, LinOp *x) const
 Applies a linear operator to a vector (or a sequence of vectors). More...
 
LinOpapply (const LinOp *alpha, const LinOp *b, const LinOp *beta, LinOp *x)
 Performs the operation x = alpha * op(b) + beta * x. More...
 
const LinOpapply (const LinOp *alpha, const LinOp *b, const LinOp *beta, LinOp *x) const
 Performs the operation x = alpha * op(b) + beta * x. More...
 
const dim< 2 > & get_size () const noexcept
 Returns the size of the operator. More...
 
virtual bool apply_uses_initial_guess () const
 Returns true if the linear operator uses the data given in x as an initial guess. More...
 
- Public Member Functions inherited from gko::EnableAbstractPolymorphicObject< LinOp >
std::unique_ptr< LinOpcreate_default (std::shared_ptr< const Executor > exec) const
 
std::unique_ptr< LinOpcreate_default () const
 
std::unique_ptr< LinOpclone (std::shared_ptr< const Executor > exec) const
 
std::unique_ptr< LinOpclone () const
 
LinOpcopy_from (const PolymorphicObject *other)
 
LinOpcopy_from (std::unique_ptr< PolymorphicObject > other)
 
LinOpclear ()
 
- Public Member Functions inherited from gko::PolymorphicObject
PolymorphicObjectoperator= (const PolymorphicObject &)
 
std::unique_ptr< PolymorphicObjectcreate_default (std::shared_ptr< const Executor > exec) const
 Creates a new "default" object of the same dynamic type as this object. More...
 
std::unique_ptr< PolymorphicObjectcreate_default () const
 Creates a new "default" object of the same dynamic type as this object. More...
 
std::unique_ptr< PolymorphicObjectclone (std::shared_ptr< const Executor > exec) const
 Creates a clone of the object. More...
 
std::unique_ptr< PolymorphicObjectclone () const
 Creates a clone of the object. More...
 
PolymorphicObjectcopy_from (const PolymorphicObject *other)
 Copies another object into this object. More...
 
PolymorphicObjectcopy_from (std::unique_ptr< PolymorphicObject > other)
 Moves another object into this object. More...
 
PolymorphicObjectclear ()
 Transforms the object into its default state. More...
 
std::shared_ptr< const Executorget_executor () const noexcept
 Returns the Executor of the object. More...
 
- Public Member Functions inherited from gko::log::EnableLogging< PolymorphicObject >
void add_logger (std::shared_ptr< const Logger > logger) override
 Adds a new logger to the list of subscribed loggers. More...
 
void remove_logger (const Logger *logger) override
 Removes a logger from the list of subscribed loggers. More...
 
- Public Member Functions inherited from gko::EnablePolymorphicAssignment< Isai< IsaiType, ValueType, IndexType > >
void convert_to (result_type *result) const override
 Converts the implementer to an object of type result_type. More...
 
void move_to (result_type *result) override
 Converts the implementer to an object of type result_type by moving data from this object. More...
 

Static Public Member Functions

static auto build () -> decltype(Factory ::create())
 

Static Public Attributes

static constexpr isai_type type {IsaiType}
 

Friends

class EnableLinOp< Isai >
 
class EnablePolymorphicObject< Isai, LinOp >
 
class Isai< IsaiType==isai_type::lower ? isai_type::upper :isai_type::lower, ValueType, IndexType >
 

Detailed Description

template<isai_type IsaiType, typename ValueType, typename IndexType>
class gko::preconditioner::Isai< IsaiType, ValueType, IndexType >

The Incomplete Sparse Approximate Inverse (ISAI) Preconditioner generates an approximate inverse matrix for a given lower triangular matrix L or upper triangular matrix U.

Using the preconditioner computes $aiU * x$ or $aiL * x$ (depending on the type of the Isai) for a given vector x (may have multiple right hand sides). aiU and aiL are the approximate inverses for U and L respectively.

The sparsity pattern used for the approximate inverse is the same as the sparsity pattern of the respective triangular matrix.

For more details on the algorithm, see the paper Incomplete Sparse Approximate Inverses for Parallel Preconditioning, which is the basis for this work.

Note
GPU implementations can only handle the vector unit width width (warp size for CUDA) as number of elements per row in the sparse matrix. If there are more than width elements per row, the remaining elements will be ignored.
Template Parameters
IsaiTypedetermines if the ISAI is generated for a lower triangular matrix or an upper triangular matrix
ValueTypeprecision of matrix elements
IndexTypeprecision of matrix indexes

Member Function Documentation

◆ conj_transpose()

template<isai_type IsaiType, typename ValueType , typename IndexType >
std::unique_ptr<LinOp> gko::preconditioner::Isai< IsaiType, ValueType, IndexType >::conj_transpose ( ) const
overridevirtual

Returns a LinOp representing the conjugate transpose of the Transposable object.

Returns
a pointer to the new conjugate transposed object

Implements gko::Transposable.

◆ get_approximate_inverse()

template<isai_type IsaiType, typename ValueType , typename IndexType >
std::shared_ptr<const Csr> gko::preconditioner::Isai< IsaiType, ValueType, IndexType >::get_approximate_inverse ( ) const
inline

Returns the approximate inverse of the given matrix (either L or U, depending on the template parameter IsaiType).

Returns
the generated approximate inverse

◆ transpose()

template<isai_type IsaiType, typename ValueType , typename IndexType >
std::unique_ptr<LinOp> gko::preconditioner::Isai< IsaiType, ValueType, IndexType >::transpose ( ) const
overridevirtual

Returns a LinOp representing the transpose of the Transposable object.

Returns
a pointer to the new transposed object

Implements gko::Transposable.


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