Ginkgo  Generated from pipelines/1330831941 branch based on master. Ginkgo version 1.8.0
A numerical linear algebra library targeting many-core architectures
Public Member Functions | Public Attributes | List of all members
gko::matrix::Csr< ValueType, IndexType >::automatical Class Reference
Inheritance diagram for gko::matrix::Csr< ValueType, IndexType >::automatical:
[legend]
Collaboration diagram for gko::matrix::Csr< ValueType, IndexType >::automatical:
[legend]

Public Member Functions

 automatical ()
 Creates an automatical strategy. More...
 
 automatical (std::shared_ptr< const CudaExecutor > exec)
 Creates an automatical strategy with CUDA executor. More...
 
 automatical (std::shared_ptr< const HipExecutor > exec)
 Creates an automatical strategy with HIP executor. More...
 
 automatical (std::shared_ptr< const DpcppExecutor > exec)
 Creates an automatical strategy with Dpcpp executor. More...
 
 automatical (int64_t nwarps, int warp_size=32, bool cuda_strategy=true, std::string strategy_name="none")
 Creates an automatical strategy with specified parameters. More...
 
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...
 
index_type get_max_length_per_row () const noexcept
 
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...
 

Public Attributes

const index_type nvidia_row_len_limit = 1024
 
const index_type nvidia_nnz_limit {static_cast<index_type>(1e6)}
 
const index_type amd_row_len_limit = 768
 
const index_type amd_nnz_limit {static_cast<index_type>(1e8)}
 
const index_type intel_row_len_limit = 25600
 
const index_type intel_nnz_limit {static_cast<index_type>(3e8)}
 

Constructor & Destructor Documentation

◆ automatical() [1/5]

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

Creates an automatical strategy.

Warning
this is deprecated! Please rely on the new automatic strategy instantiation or use one of the other constructors.

◆ automatical() [2/5]

template<typename ValueType = default_precision, typename IndexType = int32>
gko::matrix::Csr< ValueType, IndexType >::automatical::automatical ( std::shared_ptr< const CudaExecutor exec)
inline

Creates an automatical strategy with CUDA executor.

Parameters
execthe CUDA executor

◆ automatical() [3/5]

template<typename ValueType = default_precision, typename IndexType = int32>
gko::matrix::Csr< ValueType, IndexType >::automatical::automatical ( std::shared_ptr< const HipExecutor exec)
inline

Creates an automatical strategy with HIP executor.

Parameters
execthe HIP executor

◆ automatical() [4/5]

template<typename ValueType = default_precision, typename IndexType = int32>
gko::matrix::Csr< ValueType, IndexType >::automatical::automatical ( std::shared_ptr< const DpcppExecutor exec)
inline

Creates an automatical strategy with Dpcpp executor.

Parameters
execthe Dpcpp executor
Note
TODO: porting - we hardcode the subgroup size is 32

◆ automatical() [5/5]

template<typename ValueType = default_precision, typename IndexType = int32>
gko::matrix::Csr< ValueType, IndexType >::automatical::automatical ( int64_t  nwarps,
int  warp_size = 32,
bool  cuda_strategy = true,
std::string  strategy_name = "none" 
)
inline

Creates an automatical strategy with specified parameters.

Parameters
nwarpsthe number of warps in the executor
warp_sizethe warp size of the executor
cuda_strategywhether the cuda_strategy needs to be used.
Note
The warp_size must be the size of full warp. When using this constructor, set_strategy needs to be called with correct parameters which is replaced during the conversion.

Member Function Documentation

◆ clac_size()

template<typename ValueType = default_precision, typename IndexType = int32>
int64_t gko::matrix::Csr< ValueType, IndexType >::automatical::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 >::automatical::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 >::automatical::process ( const array< index_type > &  mtx_row_ptrs,
array< index_type > *  mtx_srow 
)
inlineoverridevirtual

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