load_balance Class Reference#
|
Reference API
|
#include <ginkgo/core/matrix/csr.hpp>
Public Member Functions | |
| load_balance () | |
| load_balance (std::shared_ptr< const CudaExecutor > exec) | |
| load_balance (std::shared_ptr< const HipExecutor > exec) | |
| load_balance (std::shared_ptr< const DpcppExecutor > exec) | |
| load_balance (int64_t nwarps, int warp_size=32, bool cuda_strategy=true, std::string strategy_name="none") | |
| void | process (const array< index_type > &mtx_row_ptrs, array< index_type > *mtx_srow) override |
| int64_t | clac_size (const int64_t nnz) override |
| std::shared_ptr< strategy_type > | copy () 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
class gko::matrix::Csr< ValueType, IndexType >::load_balance
load_balance is a strategy_type which uses the load balance algorithm.
Constructor & Destructor Documentation
◆ load_balance() [1/5]
|
inline |
Creates a load_balance strategy.
- Warning
- this is deprecated! Please rely on the new automatic strategy instantiation or use one of the other constructors.
◆ load_balance() [2/5]
|
inline |
Creates a load_balance strategy with CUDA executor.
- Parameters
-
exec the CUDA executor
◆ load_balance() [3/5]
|
inline |
Creates a load_balance strategy with HIP executor.
- Parameters
-
exec the HIP executor
◆ load_balance() [4/5]
|
inline |
Creates a load_balance strategy with DPCPP executor.
- Parameters
-
exec the DPCPP executor
- Note
- TODO: porting - we hardcode the subgroup size is 32
◆ load_balance() [5/5]
|
inline |
Creates a load_balance strategy with specified parameters
- Parameters
-
nwarps the number of warps in the executor warp_size the warp size of the executor cuda_strategy whether the cuda_strategyneeds 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()
|
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.
References gko::ceildiv(), and gko::min().
◆ 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()
|
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.
References gko::ceildiv(), gko::array< ValueType >::get_const_data(), gko::array< ValueType >::get_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:
- ginkgo/core/matrix/csr.hpp
Generated by
Public Member Functions inherited from