![]() |
Ginkgo Generated from branch based on main. Ginkgo version 1.9.0
A numerical linear algebra library targeting many-core architectures
|
strategy_type is to decide how to set the csr algorithm. More...
#include <ginkgo/core/matrix/csr.hpp>
Public Member Functions | |
strategy_type (std::string name) | |
Creates a strategy_type. | |
std::string | get_name () |
Returns the name of strategy. | |
virtual void | process (const array< index_type > &mtx_row_ptrs, array< index_type > *mtx_srow)=0 |
Computes srow according to row pointers. | |
virtual int64_t | clac_size (const int64_t nnz)=0 |
Computes the srow size according to the number of nonzeros. | |
virtual std::shared_ptr< strategy_type > | copy ()=0 |
Copy a strategy. | |
Friends | |
class | automatical |
strategy_type is to decide how to set the csr algorithm.
The practical strategy method should inherit strategy_type and implement its process
, clac_size
function and the corresponding device kernel.
|
inline |
Creates a strategy_type.
name | the name of strategy |
|
pure virtual |
Computes the srow size according to the number of nonzeros.
nnz | the number of nonzeros |
Implemented in gko::matrix::Csr< ValueType, IndexType >::automatical, gko::matrix::Csr< ValueType, IndexType >::classical, gko::matrix::Csr< ValueType, IndexType >::cusparse, gko::matrix::Csr< ValueType, IndexType >::load_balance, gko::matrix::Csr< ValueType, IndexType >::merge_path, and gko::matrix::Csr< ValueType, IndexType >::sparselib.
|
pure virtual |
Copy a strategy.
This is a workaround until strategies are revamped, since strategies like automatical
do not work when actually shared.
Implemented in gko::matrix::Csr< ValueType, IndexType >::automatical, gko::matrix::Csr< ValueType, IndexType >::classical, gko::matrix::Csr< ValueType, IndexType >::cusparse, gko::matrix::Csr< ValueType, IndexType >::load_balance, gko::matrix::Csr< ValueType, IndexType >::merge_path, and gko::matrix::Csr< ValueType, IndexType >::sparselib.
|
inline |
Returns the name of strategy.
Referenced by gko::matrix::Csr< ValueType, IndexType >::automatical::process().
|
pure virtual |
Computes srow according to row pointers.
mtx_row_ptrs | the row pointers of the matrix |
mtx_srow | the srow of the matrix |
Implemented in gko::matrix::Csr< ValueType, IndexType >::automatical, gko::matrix::Csr< ValueType, IndexType >::classical, gko::matrix::Csr< ValueType, IndexType >::cusparse, gko::matrix::Csr< ValueType, IndexType >::load_balance, gko::matrix::Csr< ValueType, IndexType >::merge_path, and gko::matrix::Csr< ValueType, IndexType >::sparselib.