Ginkgo  Generated from pipelines/1363093349 branch based on develop. Ginkgo version 1.9.0
A numerical linear algebra library targeting many-core architectures
Public Member Functions | List of all members
gko::matrix::Hybrid< ValueType, IndexType >::strategy_type Class Referenceabstract

strategy_type is to decide how to set the hybrid config. More...

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

Inheritance diagram for gko::matrix::Hybrid< ValueType, IndexType >::strategy_type:
[legend]

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...
 

Detailed Description

template<typename ValueType = default_precision, typename IndexType = int32>
class gko::matrix::Hybrid< ValueType, IndexType >::strategy_type

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.

Member Function Documentation

◆ compute_ell_num_stored_elements_per_row()

template<typename ValueType = default_precision, typename IndexType = int32>
virtual size_type gko::matrix::Hybrid< ValueType, IndexType >::strategy_type::compute_ell_num_stored_elements_per_row ( array< size_type > *  row_nnz) const
pure virtual

◆ compute_hybrid_config()

template<typename ValueType = default_precision, typename IndexType = int32>
void gko::matrix::Hybrid< ValueType, IndexType >::strategy_type::compute_hybrid_config ( const array< size_type > &  row_nnz,
size_type ell_num_stored_elements_per_row,
size_type coo_nnz 
)
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.

Parameters
row_nnzthe number of nonzeros of each row
ell_num_stored_elements_per_rowthe output number of stored elements per row of the ell part
coo_nnzthe 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().

◆ get_coo_nnz()

template<typename ValueType = default_precision, typename IndexType = int32>
size_type gko::matrix::Hybrid< ValueType, IndexType >::strategy_type::get_coo_nnz ( ) const
inlinenoexcept

Returns the number of nonzeros of the coo part.

Returns
the number of nonzeros of the coo part

◆ get_ell_num_stored_elements_per_row()

template<typename ValueType = default_precision, typename IndexType = int32>
size_type gko::matrix::Hybrid< ValueType, IndexType >::strategy_type::get_ell_num_stored_elements_per_row ( ) const
inlinenoexcept

Returns the number of stored elements per row of the ell part.

Returns
the number of stored elements per row of the ell part

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