Ginkgo  Generated from pipelines/164546034 branch based on develop. Ginkgo version 1.2.0
A numerical linear algebra library targeting many-core architectures
Public Types | Public Member Functions | Friends | List of all members
gko::matrix::Permutation< IndexType > Class Template Reference

Permutation is a matrix "format" which stores the row and column permutation arrays which can be used for re-ordering the rows and columns a matrix. More...

#include <ginkgo/core/matrix/permutation.hpp>

Collaboration diagram for gko::matrix::Permutation< IndexType >:
[legend]

Public Types

using index_type = IndexType
 
- Public Types inherited from gko::EnablePolymorphicAssignment< Permutation< IndexType > >
using result_type = Permutation< IndexType >
 
- Public Types inherited from gko::ConvertibleTo< Permutation< IndexType > >
using result_type = Permutation< IndexType >
 

Public Member Functions

index_type * get_permutation () noexcept
 Returns a pointer to the array of permutation. More...
 
const index_type * get_const_permutation () const noexcept
 Returns a pointer to the array of permutation. More...
 
size_type get_permutation_size () const noexcept
 Returns the number of elements explicitly stored in the permutation array. More...
 
mask_type get_permute_mask () const
 Get the permute masks. More...
 
void set_permute_mask (mask_type permute_mask)
 Set the permute masks. More...
 
- Public Member Functions inherited from gko::EnableLinOp< Permutation< IndexType > >
const Permutation< IndexType > * apply (const LinOp *b, LinOp *x) const
 
Permutation< IndexType > * apply (const LinOp *b, LinOp *x)
 
const Permutation< IndexType > * apply (const LinOp *alpha, const LinOp *b, const LinOp *beta, LinOp *x) const
 
Permutation< IndexType > * apply (const LinOp *alpha, const LinOp *b, const LinOp *beta, LinOp *x)
 
- Public Member Functions inherited from gko::EnableAbstractPolymorphicObject< Permutation< IndexType >, LinOp >
std::unique_ptr< Permutation< IndexType > > create_default (std::shared_ptr< const Executor > exec) const
 
std::unique_ptr< Permutation< IndexType > > create_default () const
 
std::unique_ptr< Permutation< IndexType > > clone (std::shared_ptr< const Executor > exec) const
 
std::unique_ptr< Permutation< IndexType > > clone () const
 
Permutation< IndexType > * copy_from (const PolymorphicObject *other)
 
Permutation< IndexType > * copy_from (std::unique_ptr< PolymorphicObject > other)
 
Permutation< 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< Permutation< 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...
 

Friends

class EnableCreateMethod< Permutation >
 
class EnablePolymorphicObject< Permutation, LinOp >
 

Additional Inherited Members

- Static Public Member Functions inherited from gko::EnableCreateMethod< Permutation< IndexType > >
static std::unique_ptr< Permutation< IndexType > > create (Args &&... args)
 

Detailed Description

template<typename IndexType = int32>
class gko::matrix::Permutation< IndexType >

Permutation is a matrix "format" which stores the row and column permutation arrays which can be used for re-ordering the rows and columns a matrix.

Template Parameters
IndexTypeprecision of permutation array indices.
Note
This format is used mainly to allow for an abstraction of the permutation/re-ordering and provides the user with an apply method which calls the respective LinOp's permute operation if the respective LinOp implements the Permutable interface. As such it only stores an array of the permutation indices.

Member Function Documentation

◆ get_const_permutation()

template<typename IndexType = int32>
const index_type* gko::matrix::Permutation< IndexType >::get_const_permutation ( ) const
inlinenoexcept

Returns a pointer to the array of permutation.

Returns
the pointer to the row permutation array.
Note
This is the constant version of the function, which can be significantly more memory efficient than the non-constant version, so always prefer this version.

References gko::Array< ValueType >::get_const_data().

◆ get_permutation()

template<typename IndexType = int32>
index_type* gko::matrix::Permutation< IndexType >::get_permutation ( )
inlinenoexcept

Returns a pointer to the array of permutation.

Returns
the pointer to the row permutation array.

References gko::Array< ValueType >::get_data().

◆ get_permutation_size()

template<typename IndexType = int32>
size_type gko::matrix::Permutation< IndexType >::get_permutation_size ( ) const
inlinenoexcept

Returns the number of elements explicitly stored in the permutation array.

Returns
the number of elements explicitly stored in the permutation array.

References gko::Array< ValueType >::get_num_elems().

◆ get_permute_mask()

template<typename IndexType = int32>
mask_type gko::matrix::Permutation< IndexType >::get_permute_mask ( ) const
inline

Get the permute masks.

Returns
permute_mask the permute masks

◆ set_permute_mask()

template<typename IndexType = int32>
void gko::matrix::Permutation< IndexType >::set_permute_mask ( mask_type  permute_mask)
inline

Set the permute masks.

Parameters
permute_maskthe permute masks

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