Skip to content

Commit

Permalink
Sparse - CrsToBsr: fix type mismatch (kokkos#2242)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucbv authored Jun 13, 2024
1 parent c53b5d5 commit 3ad65b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sparse/impl/KokkosSparse_crs_to_bsr_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ template <typename Bsr, typename Crs>
Bsr blocked_crs_to_bsr(const Crs &crs, size_t blockSize) {
using bsr_value_type = typename Bsr::value_type;
using bsr_ordinal_type = typename Bsr::ordinal_type;
using crs_size_type = typename Crs::non_const_size_type;

// copy matrix data to host
auto hRowMap = Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace(),
Expand All @@ -119,7 +120,7 @@ Bsr blocked_crs_to_bsr(const Crs &crs, size_t blockSize) {

for (bsr_ordinal_type row = 0; row < bsr_ordinal_type(hRowMap.size()) - 1;
++row) {
for (size_t ci = hRowMap(row); ci < hRowMap(row + 1); ++ci) {
for (crs_size_type ci = hRowMap(row); ci < hRowMap(row + 1); ++ci) {
bsr_ordinal_type col = hColInds(ci);
bsr_value_type val = hVals(ci);

Expand Down

0 comments on commit 3ad65b2

Please sign in to comment.