classical Class Reference

classical Class Reference#

Reference API: gko::matrix::Csr< ValueType, IndexType >::classical Class Reference
Reference API
gko::matrix::Csr< ValueType, IndexType >::classical Class Reference

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

Inheritance diagram for gko::matrix::Csr< ValueType, IndexType >::classical:
[legend]

Public Member Functions

 classical ()
 
void process (const array< index_type > &mtx_row_ptrs, array< index_type > *mtx_srow) override
 
int64_t clac_size (const int64_t nnz) override
 
index_type get_max_length_per_row () const noexcept
 
std::shared_ptr< strategy_typecopy () override
 
- Public Member Functions inherited from gko::matrix::Csr< ValueType, IndexType >::strategy_type
 strategy_type (std::string name)
 
std::string get_name ()
 

Additional Inherited Members

- Protected Member Functions inherited from gko::matrix::Csr< ValueType, IndexType >::strategy_type
void set_name (std::string name)
 

Detailed Description

template<typename ValueType = default_precision, typename IndexType = int32>
class gko::matrix::Csr< ValueType, IndexType >::classical

classical is a strategy_type which uses the same number of threads on each row. Classical strategy uses multithreads to calculate on parts of rows and then do a reduction of these threads results. The number of threads per row depends on the max number of stored elements per row.

Constructor & Destructor Documentation

◆ classical()

template<typename ValueType = default_precision, typename IndexType = int32>
gko::matrix::Csr< ValueType, IndexType >::classical::classical ( )
inline

Creates a classical strategy.

Member Function Documentation

◆ clac_size()

template<typename ValueType = default_precision, typename IndexType = int32>
int64_t gko::matrix::Csr< ValueType, IndexType >::classical::clac_size ( const int64_t  nnz)
inlineoverridevirtual

Computes the srow size according to the number of nonzeros.

Parameters
nnzthe number of nonzeros
Returns
the size of srow

Implements gko::matrix::Csr< ValueType, IndexType >::strategy_type.

◆ copy()

template<typename ValueType = default_precision, typename IndexType = int32>
std::shared_ptr< strategy_type > gko::matrix::Csr< ValueType, IndexType >::classical::copy ( )
inlineoverridevirtual

Copy a strategy. This is a workaround until strategies are revamped, since strategies like automatical do not work when actually shared.

Implements gko::matrix::Csr< ValueType, IndexType >::strategy_type.

◆ process()

template<typename ValueType = default_precision, typename IndexType = int32>
void gko::matrix::Csr< ValueType, IndexType >::classical::process ( const array< index_type > &  mtx_row_ptrs,
array< index_type > *  mtx_srow 
)
inlineoverridevirtual

Computes srow according to row pointers.

Parameters
mtx_row_ptrsthe row pointers of the matrix
mtx_srowthe srow of the matrix

Implements gko::matrix::Csr< ValueType, IndexType >::strategy_type.

References gko::array< ValueType >::get_const_data(), gko::array< ValueType >::get_executor(), and gko::array< ValueType >::get_size().

Referenced by gko::matrix::Csr< ValueType, IndexType >::automatical::process().


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