![]() |
Ginkgo
Generated from pipelines/1363093349 branch based on develop. Ginkgo version 1.9.0
A numerical linear algebra library targeting many-core architectures
|
strategy_type is to decide how to set the hybrid config. More...
#include <ginkgo/core/matrix/hybrid.hpp>
Public Member Functions | |
strategy_type () | |
Creates a strategy_type. | |
void | compute_hybrid_config (const array< size_type > &row_nnz, size_type *ell_num_stored_elements_per_row, size_type *coo_nnz) |
Computes the config of the Hybrid matrix (ell_num_stored_elements_per_row and coo_nnz). More... | |
size_type | get_ell_num_stored_elements_per_row () const noexcept |
Returns the number of stored elements per row of the ell part. More... | |
size_type | get_coo_nnz () const noexcept |
Returns the number of nonzeros of the coo part. More... | |
virtual size_type | compute_ell_num_stored_elements_per_row (array< size_type > *row_nnz) const =0 |
Computes the number of stored elements per row of the ell part. More... | |
strategy_type is to decide how to set the hybrid config.
It computes the number of stored elements per row of the ell part and then set the number of residual nonzeros as the number of nonzeros of the coo part.
The practical strategy method should inherit strategy_type and implement its compute_ell_num_stored_elements_per_row
function.
|
pure virtual |
Computes the number of stored elements per row of the ell part.
row_nnz | the number of nonzeros of each row |
Implemented in gko::matrix::Hybrid< ValueType, IndexType >::automatic, gko::matrix::Hybrid< ValueType, IndexType >::minimal_storage_limit, gko::matrix::Hybrid< ValueType, IndexType >::imbalance_bounded_limit, gko::matrix::Hybrid< ValueType, IndexType >::imbalance_limit, and gko::matrix::Hybrid< ValueType, IndexType >::column_limit.
Referenced by gko::matrix::Hybrid< ValueType, IndexType >::strategy_type::compute_hybrid_config().
|
inline |
Computes the config of the Hybrid matrix (ell_num_stored_elements_per_row and coo_nnz).
For now, it copies row_nnz to the reference executor and performs all operations on the reference executor.
row_nnz | the number of nonzeros of each row |
ell_num_stored_elements_per_row | the output number of stored elements per row of the ell part |
coo_nnz | the output number of nonzeros of the coo part |
References gko::matrix::Hybrid< ValueType, IndexType >::strategy_type::compute_ell_num_stored_elements_per_row(), gko::array< ValueType >::get_executor(), and gko::array< ValueType >::get_size().
|
inlinenoexcept |
Returns the number of nonzeros of the coo part.
|
inlinenoexcept |
Returns the number of stored elements per row of the ell part.