RowGatherer is a matrix "format" which stores the gather indices arrays which can be used to gather rows to another matrix.
More...
#include <ginkgo/core/matrix/row_gatherer.hpp>
|
|
using | index_type = IndexType |
|
using | result_type |
|
| index_type * | get_row_idxs () noexcept |
| | Returns a pointer to the row index array for gathering.
|
| const index_type * | get_const_row_idxs () const noexcept |
| | Returns a pointer to the row index array for gathering.
|
|
const RowGatherer< int32 > * | apply (ptr_param< const LinOp > b, ptr_param< LinOp > x) const |
|
void | convert_to (result_type *result) const override |
|
void | move_to (result_type *result) override |
|
| static std::unique_ptr< RowGatherer > | create (std::shared_ptr< const Executor > exec, const dim< 2 > &size={}) |
| | Creates uninitialized RowGatherer arrays of the specified size.
|
| static std::unique_ptr< RowGatherer > | create (std::shared_ptr< const Executor > exec, const dim< 2 > &size, array< index_type > row_idxs) |
| | Creates a RowGatherer matrix from an already allocated (and initialized) row gathering array.
|
| 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) |
| | Creates a constant (immutable) RowGatherer matrix from a constant array.
|
|
|
class | EnablePolymorphicObject< RowGatherer, LinOp > |
template<typename IndexType = int32>
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.
◆ create() [1/2]
template<typename IndexType = int32>
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_idxs is 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>
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>
| std::unique_ptr< const RowGatherer > gko::matrix::RowGatherer< IndexType >::create_const |
( |
std::shared_ptr< const Executor > | exec, |
|
|
const dim< 2 > & | size, |
|
|
gko::detail::const_array_view< IndexType > && | row_idxs ) |
|
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>
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.
◆ get_row_idxs()
template<typename IndexType = int32>
Returns a pointer to the row index array for gathering.
- Returns
- the pointer to the row index array for gathering.
The documentation for this class was generated from the following file: