RowGatherer< IndexType > Class Template Reference#
|
Reference API
|
Public Types |
Public Member Functions |
Static Public Member Functions |
Protected Member Functions |
Friends |
List of all members
gko::matrix::RowGatherer< IndexType > Class Template Reference
#include <ginkgo/core/matrix/row_gatherer.hpp>
Inheritance diagram for gko::matrix::RowGatherer< IndexType >:
Public Types | |
| using | index_type = IndexType |
Public Types inherited from gko::EnablePolymorphicAssignment< ConcreteLinOp > | |
| using | result_type = ConcreteLinOp |
Public Types inherited from gko::ConvertibleTo< ResultType > | |
| using | result_type = ResultType |
Public Member Functions | |
| index_type * | get_row_idxs () noexcept |
| const index_type * | get_const_row_idxs () const noexcept |
Public Member Functions inherited from gko::EnableLinOp< ConcreteLinOp, PolymorphicBase > | |
| const ConcreteLinOp * | apply (ptr_param< const LinOp > b, ptr_param< LinOp > x) const |
| ConcreteLinOp * | apply (ptr_param< const LinOp > b, ptr_param< LinOp > x) |
| const ConcreteLinOp * | apply (ptr_param< const LinOp > alpha, ptr_param< const LinOp > b, ptr_param< const LinOp > beta, ptr_param< LinOp > x) const |
| ConcreteLinOp * | apply (ptr_param< const LinOp > alpha, ptr_param< const LinOp > b, ptr_param< const LinOp > beta, ptr_param< LinOp > x) |
Public Member Functions inherited from gko::EnableAbstractPolymorphicObject< AbstractObject, PolymorphicBase > | |
| std::unique_ptr< AbstractObject > | create_default (std::shared_ptr< const Executor > exec) const |
| std::unique_ptr< AbstractObject > | create_default () const |
| std::unique_ptr< AbstractObject > | clone (std::shared_ptr< const Executor > exec) const |
| std::unique_ptr< AbstractObject > | clone () const |
| AbstractObject * | copy_from (const PolymorphicObject *other) |
| template<typename Derived > | |
| std::enable_if_t< std::is_base_of< PolymorphicObject, std::decay_t< Derived > >::value, AbstractObject > * | copy_from (std::unique_ptr< Derived > &&other) |
| template<typename Derived > | |
| std::enable_if_t< std::is_base_of< PolymorphicObject, std::decay_t< Derived > >::value, AbstractObject > * | copy_from (const std::unique_ptr< Derived > &other) |
| AbstractObject * | copy_from (const std::shared_ptr< const PolymorphicObject > &other) |
| AbstractObject * | move_from (ptr_param< PolymorphicObject > other) |
| AbstractObject * | clear () |
Public Member Functions inherited from gko::PolymorphicObject | |
| PolymorphicObject & | operator= (const PolymorphicObject &) |
| std::unique_ptr< PolymorphicObject > | create_default (std::shared_ptr< const Executor > exec) const |
| std::unique_ptr< PolymorphicObject > | create_default () const |
| std::unique_ptr< PolymorphicObject > | clone (std::shared_ptr< const Executor > exec) const |
| std::unique_ptr< PolymorphicObject > | clone () const |
| PolymorphicObject * | copy_from (const PolymorphicObject *other) |
| template<typename Derived , typename Deleter > | |
| std::enable_if_t< std::is_base_of< PolymorphicObject, std::decay_t< Derived > >::value, PolymorphicObject > * | copy_from (std::unique_ptr< Derived, Deleter > &&other) |
| template<typename Derived , typename Deleter > | |
| std::enable_if_t< std::is_base_of< PolymorphicObject, std::decay_t< Derived > >::value, PolymorphicObject > * | copy_from (const std::unique_ptr< Derived, Deleter > &other) |
| PolymorphicObject * | copy_from (const std::shared_ptr< const PolymorphicObject > &other) |
| PolymorphicObject * | move_from (ptr_param< PolymorphicObject > other) |
| PolymorphicObject * | clear () |
| std::shared_ptr< const Executor > | get_executor () const noexcept |
Public Member Functions inherited from gko::log::EnableLogging< PolymorphicObject > | |
| void | add_logger (std::shared_ptr< const Logger > logger) override |
| void | remove_logger (const Logger *logger) override |
| void | remove_logger (ptr_param< const Logger > logger) |
| const std::vector< std::shared_ptr< const Logger > > & | get_loggers () const override |
| void | clear_loggers () override |
Public Member Functions inherited from gko::log::Loggable | |
| void | remove_logger (ptr_param< const Logger > logger) |
Public Member Functions inherited from gko::EnablePolymorphicAssignment< ConcreteLinOp > | |
| void | convert_to (result_type *result) const override |
| void | move_to (result_type *result) override |
Public Member Functions inherited from gko::ConvertibleTo< ResultType > | |
| virtual void | convert_to (result_type *result) const =0 |
| void | convert_to (ptr_param< result_type > result) const |
| virtual void | move_to (result_type *result)=0 |
| void | move_to (ptr_param< result_type > result) |
Static Public Member Functions | |
| static std::unique_ptr< RowGatherer > | create (std::shared_ptr< const Executor > exec, const dim< 2 > &size={}) |
| static std::unique_ptr< RowGatherer > | create (std::shared_ptr< const Executor > exec, const dim< 2 > &size, array< index_type > row_idxs) |
| static std::unique_ptr< const RowGatherer > | create_const (std::shared_ptr< const Executor > exec, const dim< 2 > &size, gko::detail::const_array_view< IndexType > &&row_idxs) |
Protected Member Functions | |
| RowGatherer (std::shared_ptr< const Executor > exec, const dim< 2 > &size={}) | |
| RowGatherer (std::shared_ptr< const Executor > exec, const dim< 2 > &size, array< index_type > row_idxs) | |
| void | apply_impl (const LinOp *in, LinOp *out) const override |
| void | apply_impl (const LinOp *alpha, const LinOp *in, const LinOp *beta, LinOp *out) const override |
Protected Member Functions inherited from gko::EnableLinOp< ConcreteLinOp, PolymorphicBase > | |
| ConcreteLinOp * | self () noexcept |
| const ConcreteLinOp * | self () const noexcept |
Protected Member Functions inherited from gko::EnablePolymorphicObject< ConcreteObject, PolymorphicBase > | |
| std::unique_ptr< PolymorphicObject > | create_default_impl (std::shared_ptr< const Executor > exec) const override |
| PolymorphicObject * | copy_from_impl (const PolymorphicObject *other) override |
| PolymorphicObject * | copy_from_impl (std::unique_ptr< PolymorphicObject > other) override |
| PolymorphicObject * | move_from_impl (PolymorphicObject *other) override |
| PolymorphicObject * | move_from_impl (std::unique_ptr< PolymorphicObject > other) override |
| PolymorphicObject * | clear_impl () override |
Protected Member Functions inherited from gko::PolymorphicObject | |
| PolymorphicObject (std::shared_ptr< const Executor > exec) | |
| PolymorphicObject (const PolymorphicObject &other) | |
Protected Member Functions inherited from gko::log::EnableLogging< PolymorphicObject > | |
| void | log (Params &&... params) const |
Friends | |
| class | EnablePolymorphicObject< RowGatherer, LinOp > |
Additional Inherited Members | |
Protected Attributes inherited from gko::log::EnableLogging< PolymorphicObject > | |
| std::vector< std::shared_ptr< const Logger > > | loggers_ |
Detailed Description
template<typename IndexType = int32>
class gko::matrix::RowGatherer< IndexType >
class gko::matrix::RowGatherer< IndexType >
RowGatherer is a matrix "format" which stores the gather indices arrays which can be used to gather rows to another matrix.
- Template Parameters
-
IndexType precision of rowgatherer array indices.
- Note
- This format is used mainly to allow for an abstraction of the rowgatherer and provides the user with an apply method which calls the respective Dense rowgatherer operation. As such it only stores an array of the rowgatherer indices.
Member Function Documentation
◆ create() [1/2]
template<typename IndexType = int32>
|
static |
Creates a RowGatherer matrix from an already allocated (and initialized) row gathering array
- Parameters
-
exec Executor associated to the matrix size size of the rowgatherer array. row_idxs array of rowgatherer array
- Note
- If
row_idxsis not an rvalue, not an array of IndexType, or is on the wrong executor, an internal copy will be created, and the original array data will not be used in the matrix.
- Returns
- A smart pointer to the newly created matrix.
◆ create() [2/2]
template<typename IndexType = int32>
|
static |
Creates uninitialized RowGatherer arrays of the specified size.
- Parameters
-
exec Executor associated to the matrix size size of the RowGatherable matrix
- Returns
- A smart pointer to the newly created matrix.
◆ create_const()
template<typename IndexType = int32>
|
static |
Creates a constant (immutable) RowGatherer matrix from a constant array.
- Parameters
-
exec the executor to create the matrix on size the dimensions of the matrix row_idxs the gathered row indices of the matrix
- Returns
- A smart pointer to the constant matrix wrapping the input arrays (if they reside on the same executor as the matrix) or a copy of the arrays on the correct executor.
◆ get_const_row_idxs()
template<typename IndexType = int32>
|
inlinenoexcept |
Returns a pointer to the row index array for gathering.
- Returns
- the pointer to the row index array for gathering.
- 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_row_idxs()
template<typename IndexType = int32>
|
inlinenoexcept |
Returns a pointer to the row index array for gathering.
- Returns
- the pointer to the row index array for gathering.
References gko::array< ValueType >::get_data().
The documentation for this class was generated from the following file:
- ginkgo/core/matrix/row_gatherer.hpp
Generated by
Public Types inherited from