Ginkgo  Generated from pipelines/1589998975 branch based on develop. Ginkgo version 1.10.0
A numerical linear algebra library targeting many-core architectures
Public Member Functions | List of all members
gko::matrix::Csr< ValueType, IndexType >::merge_path Class Reference

merge_path is a strategy_type which uses the merge_path algorithm. More...

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

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

Public Member Functions

 merge_path ()
 Creates a merge_path strategy.
 
void process (const array< index_type > &mtx_row_ptrs, array< index_type > *mtx_srow) override
 Computes srow according to row pointers. More...
 
int64_t clac_size (const int64_t nnz) override
 Computes the srow size according to the number of nonzeros. More...
 
std::shared_ptr< strategy_typecopy () override
 Copy a strategy. More...
 
- Public Member Functions inherited from gko::matrix::Csr< ValueType, IndexType >::strategy_type
 strategy_type (std::string name)
 Creates a strategy_type. More...
 
std::string get_name ()
 Returns the name of strategy. More...
 

Detailed Description

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

merge_path is a strategy_type which uses the merge_path algorithm.

merge_path is according to Merrill and Garland: Merge-Based Parallel Sparse Matrix-Vector Multiplication

Member Function Documentation

◆ clac_size()

template<typename ValueType = default_precision, typename IndexType = int32>
int64_t gko::matrix::Csr< ValueType, IndexType >::merge_path::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 >::merge_path::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 >::merge_path::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.


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