load_balance is a strategy_type which uses the load balance algorithm. More...
#include <ginkgo/core/matrix/csr.hpp>
Public Member Functions | |
load_balance () | |
Creates a load_balance strategy. | |
load_balance (std::shared_ptr< const CudaExecutor > exec) | |
Creates a load_balance strategy with CUDA executor. | |
load_balance (std::shared_ptr< const HipExecutor > exec) | |
Creates a load_balance strategy with HIP executor. | |
load_balance (std::shared_ptr< const DpcppExecutor > exec) | |
Creates a load_balance strategy with DPCPP executor. | |
load_balance (int64_t nwarps, int warp_size=32, bool cuda_strategy=true, std::string strategy_name="none") | |
Creates a load_balance strategy with specified parameters. | |
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. | |
![]() | |
strategy_type (std::string name) | |
Creates a strategy_type. | |
std::string | get_name () |
Returns the name of strategy. | |
load_balance is a strategy_type which uses the load balance algorithm.
|
inline |
Creates a load_balance strategy.
References gko::matrix::Csr< ValueType, IndexType >::create(), and load_balance().
Referenced by load_balance(), load_balance(), load_balance(), and load_balance().
|
inline |
Creates a load_balance strategy with CUDA executor.
exec | the CUDA executor |
References load_balance().
|
inline |
Creates a load_balance strategy with HIP executor.
exec | the HIP executor |
References load_balance().
|
inline |
Creates a load_balance strategy with DPCPP executor.
exec | the DPCPP executor |
References load_balance().
|
inline |
Creates a load_balance strategy with specified parameters.
nwarps | the number of warps in the executor |
warp_size | the warp size of the executor |
cuda_strategy | whether the cuda_strategy needs to be used. |
References gko::matrix::Csr< ValueType, IndexType >::strategy_type::strategy_type().
|
inlineoverridevirtual |
Computes the srow size according to the number of nonzeros.
nnz | the number of nonzeros |
Implements gko::matrix::Csr< ValueType, IndexType >::strategy_type.
References gko::ceildiv(), and gko::min().
|
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.
|
inlineoverridevirtual |
Computes srow according to row pointers.
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().