5#ifndef GKO_PUBLIC_CORE_MATRIX_CSR_HPP_
6#define GKO_PUBLIC_CORE_MATRIX_CSR_HPP_
9#include <ginkgo/core/base/array.hpp>
10#include <ginkgo/core/base/index_set.hpp>
11#include <ginkgo/core/base/lin_op.hpp>
12#include <ginkgo/core/base/math.hpp>
13#include <ginkgo/core/matrix/permutation.hpp>
14#include <ginkgo/core/matrix/scaled_permutation.hpp>
21template <
typename ValueType>
24template <
typename ValueType>
27template <
typename ValueType,
typename IndexType>
30template <
typename ValueType,
typename IndexType>
33template <
typename ValueType,
typename IndexType>
36template <
typename ValueType,
typename IndexType>
39template <
typename ValueType,
typename IndexType>
42template <
typename ValueType,
typename IndexType>
45template <
typename ValueType,
typename IndexType>
48template <
typename ValueType,
typename IndexType>
51template <
typename IndexType>
58template <
typename ValueType = default_precision,
typename IndexType =
int32>
102template <
typename ValueType = default_precision,
typename IndexType =
int32>
104 public ConvertibleTo<Csr<next_precision<ValueType>, IndexType>>,
105#if GINKGO_ENABLE_HALF
107 Csr<next_precision<next_precision<ValueType>>, IndexType>>,
122 remove_complex<Csr<ValueType, IndexType>>>,
125 friend class Coo<ValueType, IndexType>;
126 friend class Dense<ValueType>;
128 friend class Ell<ValueType, IndexType>;
129 friend class Hybrid<ValueType, IndexType>;
130 friend class Sellp<ValueType, IndexType>;
132 friend class Fbcsr<ValueType, IndexType>;
133 friend class CsrBuilder<ValueType, IndexType>;
157 using value_type = ValueType;
158 using index_type = IndexType;
214 virtual std::shared_ptr<strategy_type>
copy() = 0;
217 void set_name(std::string name) { name_ = name; }
239 auto host_mtx_exec = mtx_row_ptrs.
get_executor()->get_master();
241 const bool is_mtx_on_host{host_mtx_exec ==
243 const index_type* row_ptrs{};
244 if (is_mtx_on_host) {
247 row_ptrs_host = mtx_row_ptrs;
250 auto num_rows = mtx_row_ptrs.
get_size() - 1;
251 max_length_per_row_ = 0;
252 for (
size_type i = 0; i < num_rows; i++) {
253 max_length_per_row_ = std::max(max_length_per_row_,
254 row_ptrs[i + 1] - row_ptrs[i]);
258 int64_t
clac_size(
const int64_t nnz)
override {
return 0; }
260 index_type get_max_length_per_row() const noexcept
262 return max_length_per_row_;
265 std::shared_ptr<strategy_type>
copy()
override
267 return std::make_shared<classical>();
271 index_type max_length_per_row_;
290 int64_t
clac_size(
const int64_t nnz)
override {
return 0; }
292 std::shared_ptr<strategy_type>
copy()
override
294 return std::make_shared<merge_path>();
315 int64_t
clac_size(
const int64_t nnz)
override {
return 0; }
317 std::shared_ptr<strategy_type>
copy()
override
319 return std::make_shared<cusparse>();
339 int64_t
clac_size(
const int64_t nnz)
override {
return 0; }
341 std::shared_ptr<strategy_type>
copy()
override
343 return std::make_shared<sparselib>();
369 :
load_balance(exec->get_num_warps(), exec->get_warp_size())
378 :
load_balance(exec->get_num_warps(), exec->get_warp_size(), false)
389 :
load_balance(exec->get_num_subgroups(), 32, false,
"intel")
404 bool cuda_strategy =
true,
405 std::string strategy_name =
"none")
408 warp_size_(warp_size),
409 cuda_strategy_(cuda_strategy),
410 strategy_name_(strategy_name)
419 auto host_srow_exec = mtx_srow->
get_executor()->get_master();
420 auto host_mtx_exec = mtx_row_ptrs.
get_executor()->get_master();
421 const bool is_srow_on_host{host_srow_exec ==
423 const bool is_mtx_on_host{host_mtx_exec ==
427 const index_type* row_ptrs{};
429 if (is_srow_on_host) {
432 srow_host = *mtx_srow;
435 if (is_mtx_on_host) {
438 row_ptrs_host = mtx_row_ptrs;
444 const auto num_rows = mtx_row_ptrs.
get_size() - 1;
445 const auto num_elems = row_ptrs[num_rows];
446 const auto bucket_divider =
447 num_elems > 0 ?
ceildiv(num_elems, warp_size_) : 1;
448 for (
size_type i = 0; i < num_rows; i++) {
452 if (bucket < nwarps) {
458 srow[i] += srow[i - 1];
460 if (!is_srow_on_host) {
461 *mtx_srow = srow_host;
468 if (warp_size_ > 0) {
470 if (nnz >=
static_cast<int64_t
>(2e8)) {
472 }
else if (nnz >=
static_cast<int64_t
>(2e7)) {
474 }
else if (nnz >=
static_cast<int64_t
>(2e6)) {
476 }
else if (nnz >=
static_cast<int64_t
>(2e5)) {
479 if (strategy_name_ ==
"intel") {
481 if (nnz >=
static_cast<int64_t
>(2e8)) {
483 }
else if (nnz >=
static_cast<int64_t
>(2e7)) {
487#if GINKGO_HIP_PLATFORM_HCC
488 if (!cuda_strategy_) {
490 if (nnz >=
static_cast<int64_t
>(1e7)) {
492 }
else if (nnz >=
static_cast<int64_t
>(1e6)) {
498 auto nwarps = nwarps_ * multiple;
505 std::shared_ptr<strategy_type>
copy()
override
507 return std::make_shared<load_balance>(
508 nwarps_, warp_size_, cuda_strategy_, strategy_name_);
515 std::string strategy_name_;
522 const index_type nvidia_row_len_limit = 1024;
525 const index_type nvidia_nnz_limit{
static_cast<index_type
>(1e6)};
528 const index_type amd_row_len_limit = 768;
531 const index_type amd_nnz_limit{
static_cast<index_type
>(1e8)};
534 const index_type intel_row_len_limit = 25600;
537 const index_type intel_nnz_limit{
static_cast<index_type
>(3e8)};
557 :
automatical(exec->get_num_warps(), exec->get_warp_size())
566 :
automatical(exec->get_num_warps(), exec->get_warp_size(), false)
577 :
automatical(exec->get_num_subgroups(), 32, false,
"intel")
592 bool cuda_strategy =
true,
593 std::string strategy_name =
"none")
596 warp_size_(warp_size),
597 cuda_strategy_(cuda_strategy),
598 strategy_name_(strategy_name),
599 max_length_per_row_(0)
608 index_type nnz_limit = nvidia_nnz_limit;
609 index_type row_len_limit = nvidia_row_len_limit;
610 if (strategy_name_ ==
"intel") {
611 nnz_limit = intel_nnz_limit;
612 row_len_limit = intel_row_len_limit;
614#if GINKGO_HIP_PLATFORM_HCC
615 if (!cuda_strategy_) {
616 nnz_limit = amd_nnz_limit;
617 row_len_limit = amd_row_len_limit;
620 auto host_mtx_exec = mtx_row_ptrs.
get_executor()->get_master();
621 const bool is_mtx_on_host{host_mtx_exec ==
624 const index_type* row_ptrs{};
625 if (is_mtx_on_host) {
628 row_ptrs_host = mtx_row_ptrs;
631 const auto num_rows = mtx_row_ptrs.
get_size() - 1;
632 if (row_ptrs[num_rows] > nnz_limit) {
634 cuda_strategy_, strategy_name_);
635 if (is_mtx_on_host) {
636 actual_strategy.
process(mtx_row_ptrs, mtx_srow);
638 actual_strategy.
process(row_ptrs_host, mtx_srow);
640 this->set_name(actual_strategy.
get_name());
642 index_type maxnum = 0;
643 for (
size_type i = 0; i < num_rows; i++) {
644 maxnum = std::max(maxnum, row_ptrs[i + 1] - row_ptrs[i]);
646 if (maxnum > row_len_limit) {
648 nwarps_, warp_size_, cuda_strategy_, strategy_name_);
649 if (is_mtx_on_host) {
650 actual_strategy.
process(mtx_row_ptrs, mtx_srow);
652 actual_strategy.
process(row_ptrs_host, mtx_srow);
654 this->set_name(actual_strategy.
get_name());
657 if (is_mtx_on_host) {
658 actual_strategy.
process(mtx_row_ptrs, mtx_srow);
659 max_length_per_row_ =
660 actual_strategy.get_max_length_per_row();
662 actual_strategy.
process(row_ptrs_host, mtx_srow);
663 max_length_per_row_ =
664 actual_strategy.get_max_length_per_row();
666 this->set_name(actual_strategy.
get_name());
673 return std::make_shared<load_balance>(
674 nwarps_, warp_size_, cuda_strategy_, strategy_name_)
678 index_type get_max_length_per_row() const noexcept
680 return max_length_per_row_;
683 std::shared_ptr<strategy_type>
copy()
override
685 return std::make_shared<automatical>(
686 nwarps_, warp_size_, cuda_strategy_, strategy_name_);
693 std::string strategy_name_;
694 index_type max_length_per_row_;
697 friend class Csr<previous_precision<ValueType>, IndexType>;
704#if GINKGO_ENABLE_HALF
705 friend class Csr<previous_precision<previous_precision<ValueType>>,
713 result)
const override;
781 std::unique_ptr<Permutation<IndexType>> value_permutation;
832 bool invert =
false)
const;
879 bool invert =
false)
const;
911 bool invert =
false)
const;
948 bool is_sorted_by_column_index()
const;
1074 strategy_ = std::move(strategy->copy());
1087 GKO_ASSERT_EQUAL_DIMENSIONS(alpha,
dim<2>(1, 1));
1100 GKO_ASSERT_EQUAL_DIMENSIONS(alpha,
dim<2>(1, 1));
1112 static std::unique_ptr<Csr>
create(std::shared_ptr<const Executor> exec,
1113 std::shared_ptr<strategy_type> strategy);
1127 std::shared_ptr<const Executor> exec,
const dim<2>& size = {},
1129 std::shared_ptr<strategy_type> strategy =
nullptr);
1151 std::shared_ptr<const Executor> exec,
const dim<2>& size,
1154 std::shared_ptr<strategy_type> strategy =
nullptr);
1160 template <
typename InputValueType,
typename InputColumnIndexType,
1161 typename InputRowPtrType>
1163 "explicitly construct the gko::array argument instead of passing "
1164 "initializer lists")
1167 std::initializer_list<InputValueType> values,
1168 std::initializer_list<InputColumnIndexType> col_idxs,
1169 std::initializer_list<InputRowPtrType> row_ptrs)
1192 std::shared_ptr<const Executor> exec,
const dim<2>& size,
1193 gko::detail::const_array_view<ValueType>&& values,
1194 gko::detail::const_array_view<IndexType>&& col_idxs,
1195 gko::detail::const_array_view<IndexType>&& row_ptrs,
1196 std::shared_ptr<strategy_type> strategy =
nullptr);
1226 const span& row_span,
const span& column_span)
const;
1253 Csr(std::shared_ptr<const Executor> exec,
const dim<2>& size = {},
1255 std::shared_ptr<strategy_type> strategy =
nullptr);
1257 Csr(std::shared_ptr<const Executor> exec,
const dim<2>& size,
1260 std::shared_ptr<strategy_type> strategy =
nullptr);
1262 void apply_impl(
const LinOp* b,
LinOp* x)
const override;
1264 void apply_impl(
const LinOp* alpha,
const LinOp* b,
const LinOp* beta,
1265 LinOp* x)
const override;
1268 static std::shared_ptr<strategy_type> make_default_strategy(
1269 std::shared_ptr<const Executor> exec)
1271 auto cuda_exec = std::dynamic_pointer_cast<const CudaExecutor>(exec);
1272 auto hip_exec = std::dynamic_pointer_cast<const HipExecutor>(exec);
1273 auto dpcpp_exec = std::dynamic_pointer_cast<const DpcppExecutor>(exec);
1274 std::shared_ptr<strategy_type> new_strategy;
1276 new_strategy = std::make_shared<automatical>(cuda_exec);
1277 }
else if (hip_exec) {
1278 new_strategy = std::make_shared<automatical>(hip_exec);
1279 }
else if (dpcpp_exec) {
1280 new_strategy = std::make_shared<automatical>(dpcpp_exec);
1282 new_strategy = std::make_shared<classical>();
1284 return new_strategy;
1288 template <
typename CsrType>
1289 void convert_strategy_helper(CsrType* result)
const
1292 std::shared_ptr<typename CsrType::strategy_type> new_strat;
1293 if (
dynamic_cast<classical*
>(strat)) {
1294 new_strat = std::make_shared<typename CsrType::classical>();
1295 }
else if (
dynamic_cast<merge_path*
>(strat)) {
1296 new_strat = std::make_shared<typename CsrType::merge_path>();
1297 }
else if (
dynamic_cast<cusparse*
>(strat)) {
1298 new_strat = std::make_shared<typename CsrType::cusparse>();
1299 }
else if (
dynamic_cast<sparselib*
>(strat)) {
1300 new_strat = std::make_shared<typename CsrType::sparselib>();
1302 auto rexec = result->get_executor();
1304 std::dynamic_pointer_cast<const CudaExecutor>(rexec);
1305 auto hip_exec = std::dynamic_pointer_cast<const HipExecutor>(rexec);
1307 std::dynamic_pointer_cast<const DpcppExecutor>(rexec);
1308 auto lb =
dynamic_cast<load_balance*
>(strat);
1312 std::make_shared<typename CsrType::load_balance>(
1315 new_strat = std::make_shared<typename CsrType::automatical>(
1318 }
else if (hip_exec) {
1321 std::make_shared<typename CsrType::load_balance>(
1324 new_strat = std::make_shared<typename CsrType::automatical>(
1327 }
else if (dpcpp_exec) {
1330 std::make_shared<typename CsrType::load_balance>(
1333 new_strat = std::make_shared<typename CsrType::automatical>(
1338 auto this_cuda_exec =
1339 std::dynamic_pointer_cast<const CudaExecutor>(
1341 auto this_hip_exec =
1342 std::dynamic_pointer_cast<const HipExecutor>(
1344 auto this_dpcpp_exec =
1345 std::dynamic_pointer_cast<const DpcppExecutor>(
1347 if (this_cuda_exec) {
1350 std::make_shared<typename CsrType::load_balance>(
1354 std::make_shared<typename CsrType::automatical>(
1357 }
else if (this_hip_exec) {
1360 std::make_shared<typename CsrType::load_balance>(
1364 std::make_shared<typename CsrType::automatical>(
1367 }
else if (this_dpcpp_exec) {
1370 std::make_shared<typename CsrType::load_balance>(
1374 std::make_shared<typename CsrType::automatical>(
1382 new_strat = std::make_shared<typename CsrType::classical>();
1386 result->set_strategy(new_strat);
1395 strategy_->process(row_ptrs_, &srow_);
1415 std::shared_ptr<strategy_type> strategy_;
1421 void add_scaled_identity_impl(
const LinOp* a,
const LinOp* b)
override;
1434template <
typename ValueType,
typename IndexType>
1441 if (std::dynamic_pointer_cast<load_balance>(strategy)) {
1443 std::dynamic_pointer_cast<const HipExecutor>(executor)) {
1444 result->
set_strategy(std::make_shared<load_balance>(exec));
1445 }
else if (
auto exec = std::dynamic_pointer_cast<const CudaExecutor>(
1447 result->
set_strategy(std::make_shared<load_balance>(exec));
1449 }
else if (std::dynamic_pointer_cast<automatical>(strategy)) {
1451 std::dynamic_pointer_cast<const HipExecutor>(executor)) {
1452 result->
set_strategy(std::make_shared<automatical>(exec));
1453 }
else if (
auto exec = std::dynamic_pointer_cast<const CudaExecutor>(
1455 result->
set_strategy(std::make_shared<automatical>(exec));
Definition polymorphic_object.hpp:479
Definition executor.hpp:1542
Definition lin_op.hpp:793
Definition lin_op.hpp:878
Definition polymorphic_object.hpp:668
Definition executor.hpp:615
Definition lin_op.hpp:117
Definition executor.hpp:1387
Definition lin_op.hpp:484
std::shared_ptr< const Executor > get_executor() const noexcept
Definition polymorphic_object.hpp:243
Definition lin_op.hpp:605
Definition lin_op.hpp:817
Definition lin_op.hpp:433
Definition lin_op.hpp:660
void resize_and_reset(size_type size)
Definition array.hpp:622
value_type * get_data() noexcept
Definition array.hpp:673
std::shared_ptr< const Executor > get_executor() const noexcept
Definition array.hpp:689
const value_type * get_const_data() const noexcept
Definition array.hpp:682
size_type get_size() const noexcept
Definition array.hpp:656
Definition device_matrix_data.hpp:36
Definition index_set.hpp:56
std::shared_ptr< strategy_type > copy() override
Definition csr.hpp:683
automatical(int64_t nwarps, int warp_size=32, bool cuda_strategy=true, std::string strategy_name="none")
Definition csr.hpp:591
automatical()
Definition csr.hpp:546
int64_t clac_size(const int64_t nnz) override
Definition csr.hpp:671
automatical(std::shared_ptr< const CudaExecutor > exec)
Definition csr.hpp:556
void process(const array< index_type > &mtx_row_ptrs, array< index_type > *mtx_srow) override
Definition csr.hpp:602
automatical(std::shared_ptr< const DpcppExecutor > exec)
Definition csr.hpp:576
automatical(std::shared_ptr< const HipExecutor > exec)
Definition csr.hpp:565
void process(const array< index_type > &mtx_row_ptrs, array< index_type > *mtx_srow) override
Definition csr.hpp:236
std::shared_ptr< strategy_type > copy() override
Definition csr.hpp:265
classical()
Definition csr.hpp:234
int64_t clac_size(const int64_t nnz) override
Definition csr.hpp:258
int64_t clac_size(const int64_t nnz) override
Definition csr.hpp:315
std::shared_ptr< strategy_type > copy() override
Definition csr.hpp:317
cusparse()
Definition csr.hpp:309
void process(const array< index_type > &mtx_row_ptrs, array< index_type > *mtx_srow) override
Definition csr.hpp:311
void process(const array< index_type > &mtx_row_ptrs, array< index_type > *mtx_srow) override
Definition csr.hpp:413
std::shared_ptr< strategy_type > copy() override
Definition csr.hpp:505
load_balance(std::shared_ptr< const HipExecutor > exec)
Definition csr.hpp:377
load_balance()
Definition csr.hpp:358
int64_t clac_size(const int64_t nnz) override
Definition csr.hpp:466
load_balance(int64_t nwarps, int warp_size=32, bool cuda_strategy=true, std::string strategy_name="none")
Definition csr.hpp:403
load_balance(std::shared_ptr< const CudaExecutor > exec)
Definition csr.hpp:368
load_balance(std::shared_ptr< const DpcppExecutor > exec)
Definition csr.hpp:388
int64_t clac_size(const int64_t nnz) override
Definition csr.hpp:290
std::shared_ptr< strategy_type > copy() override
Definition csr.hpp:292
merge_path()
Definition csr.hpp:284
void process(const array< index_type > &mtx_row_ptrs, array< index_type > *mtx_srow) override
Definition csr.hpp:286
int64_t clac_size(const int64_t nnz) override
Definition csr.hpp:339
void process(const array< index_type > &mtx_row_ptrs, array< index_type > *mtx_srow) override
Definition csr.hpp:335
sparselib()
Definition csr.hpp:333
std::shared_ptr< strategy_type > copy() override
Definition csr.hpp:341
virtual int64_t clac_size(const int64_t nnz)=0
std::string get_name()
Definition csr.hpp:190
virtual std::shared_ptr< strategy_type > copy()=0
virtual void process(const array< index_type > &mtx_row_ptrs, array< index_type > *mtx_srow)=0
strategy_type(std::string name)
Definition csr.hpp:181
std::unique_ptr< LinOp > column_permute(const array< IndexType > *permutation_indices) const override
std::pair< std::unique_ptr< Csr >, permuting_reuse_info > permute_reuse(ptr_param< const Permutation< index_type > > permutation, permute_mode mode=permute_mode::symmetric) const
Csr & operator=(const Csr &)
std::unique_ptr< Csr > scale_permute(ptr_param< const ScaledPermutation< value_type, index_type > > permutation, permute_mode=permute_mode::symmetric) const
void write(mat_data &data) const override
std::unique_ptr< absolute_type > compute_absolute() const override
const index_type * get_const_row_ptrs() const noexcept
Definition csr.hpp:1014
std::unique_ptr< Csr< ValueType, IndexType > > create_submatrix(const span &row_span, const span &column_span) const
static std::unique_ptr< Csr > create(std::shared_ptr< const Executor > exec, const dim< 2 > &size={}, size_type num_nonzeros={}, std::shared_ptr< strategy_type > strategy=nullptr)
void read(device_mat_data &&data) override
const index_type * get_const_srow() const noexcept
Definition csr.hpp:1033
void set_strategy(std::shared_ptr< strategy_type > strategy)
Definition csr.hpp:1072
void inv_scale(ptr_param< const LinOp > alpha)
Definition csr.hpp:1097
virtual void scale_impl(const LinOp *alpha)
void read(const device_mat_data &data) override
index_type * get_srow() noexcept
Definition csr.hpp:1024
static std::unique_ptr< Csr > create(std::shared_ptr< const Executor > exec, std::shared_ptr< strategy_type > strategy)
size_type get_num_srow_elements() const noexcept
Definition csr.hpp:1043
std::unique_ptr< LinOp > inverse_permute(const array< IndexType > *inverse_permutation_indices) const override
std::pair< std::unique_ptr< Csr >, permuting_reuse_info > permute_reuse(ptr_param< const Permutation< index_type > > row_permutation, ptr_param< const Permutation< index_type > > column_permutation, bool invert=false) const
virtual void inv_scale_impl(const LinOp *alpha)
std::unique_ptr< LinOp > row_permute(const array< IndexType > *permutation_indices) const override
std::unique_ptr< Csr< ValueType, IndexType > > create_submatrix(const index_set< IndexType > &row_index_set, const index_set< IndexType > &column_index_set) const
std::unique_ptr< Diagonal< ValueType > > extract_diagonal() const override
void make_srow()
Definition csr.hpp:1392
static std::unique_ptr< Csr > create(std::shared_ptr< const Executor > exec, const dim< 2 > &size, array< value_type > values, array< index_type > col_idxs, array< index_type > row_ptrs, std::shared_ptr< strategy_type > strategy=nullptr)
index_type * get_row_ptrs() noexcept
Definition csr.hpp:1005
std::unique_ptr< Csr > permute(ptr_param< const Permutation< index_type > > permutation, permute_mode mode=permute_mode::symmetric) const
std::unique_ptr< const Dense< ValueType > > create_const_value_view() const
static std::unique_ptr< const Csr > create_const(std::shared_ptr< const Executor > exec, const dim< 2 > &size, gko::detail::const_array_view< ValueType > &&values, gko::detail::const_array_view< IndexType > &&col_idxs, gko::detail::const_array_view< IndexType > &&row_ptrs, std::shared_ptr< strategy_type > strategy=nullptr)
std::unique_ptr< LinOp > transpose() const override
const value_type * get_const_values() const noexcept
Definition csr.hpp:964
std::unique_ptr< LinOp > inverse_column_permute(const array< IndexType > *inverse_permutation_indices) const override
std::unique_ptr< LinOp > inverse_row_permute(const array< IndexType > *inverse_permutation_indices) const override
void compute_absolute_inplace() override
size_type get_num_stored_elements() const noexcept
Definition csr.hpp:1053
std::shared_ptr< strategy_type > get_strategy() const noexcept
Definition csr.hpp:1062
std::unique_ptr< LinOp > permute(const array< IndexType > *permutation_indices) const override
const index_type * get_const_col_idxs() const noexcept
Definition csr.hpp:995
void read(const mat_data &data) override
void sort_by_column_index()
std::pair< std::unique_ptr< Csr >, permuting_reuse_info > transpose_reuse() const
std::unique_ptr< Csr > scale_permute(ptr_param< const ScaledPermutation< value_type, index_type > > row_permutation, ptr_param< const ScaledPermutation< value_type, index_type > > column_permutation, bool invert=false) const
std::unique_ptr< Dense< ValueType > > create_value_view()
void scale(ptr_param< const LinOp > alpha)
Definition csr.hpp:1084
value_type * get_values() noexcept
Definition csr.hpp:955
index_type * get_col_idxs() noexcept
Definition csr.hpp:986
std::unique_ptr< Csr > permute(ptr_param< const Permutation< index_type > > row_permutation, ptr_param< const Permutation< index_type > > column_permutation, bool invert=false) const
std::unique_ptr< LinOp > conj_transpose() const override
Definition diagonal.hpp:52
Fixed-block compressed sparse row storage matrix format.
Definition fbcsr.hpp:112
Definition permutation.hpp:111
Definition scaled_permutation.hpp:37
Definition sparsity_csr.hpp:55
Definition utils_helper.hpp:41
permute_mode
Definition permutation.hpp:42
The Ginkgo namespace.
Definition abstract_factory.hpp:20
typename detail::next_precision_impl< T >::type next_precision
Definition math.hpp:438
std::size_t size_type
Definition types.hpp:89
constexpr int64 ceildiv(int64 num, int64 den)
Definition math.hpp:590
constexpr T min(const T &x, const T &y)
Definition math.hpp:719
typename detail::to_complex_s< T >::type to_complex
Definition math.hpp:279
detail::temporary_clone< detail::pointee< Ptr > > make_temporary_clone(std::shared_ptr< const Executor > exec, Ptr &&ptr)
Definition temporary_clone.hpp:208
typename detail::remove_complex_s< T >::type remove_complex
Definition math.hpp:260
void update_values(ptr_param< const Csr > input, ptr_param< Csr > output) const
permuting_reuse_info(std::unique_ptr< Permutation< index_type > > value_permutation)
Definition matrix_data.hpp:126