Ginkgo: gko::matrix::Csr< ValueType, IndexType >::sparselib Class Reference

| Ginkgo Generated from branch based on main. Ginkgo version 1.11.0 A numerical linear algebra library targeting many-core architectures

Loading...
Searching...
No Matches
gko::matrix::Csr< ValueType, IndexType >::sparselib Class Reference

sparselib is a strategy_type which uses the sparselib csr. More...

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

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

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

## Detailed Description

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

sparselib is a strategy_type which uses the sparselib csr.

Note
  Uses cusparse in cuda and hipsparse in hip.

## Member Function Documentation

## ◆ clac_size()

template<typename ValueType = default_precision, typename IndexType = int32>

int64_t gko::matrix::Csr< ValueType, IndexType >::sparselib::clac_size | ( | const int64_t | nnz | ) |
| inlineoverridevirtual

Computes the srow size according to the number of nonzeros.

Parameters

  nnz | the 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 >::sparselib::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 >::sparselib::process | ( | const array< index_type > & | mtx_row_ptrs,
|  | array< index_type > * | mtx_srow )
| inlineoverridevirtual

Computes srow according to row pointers.

Parameters

  mtx_row_ptrs | the row pointers of the matrix
  mtx_srow | the srow of the matrix

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

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

- ginkgo/core/matrix/csr.hpp