Skip to content

Commit

Permalink
Fix inner loops underflow
Browse files Browse the repository at this point in the history
Signed-off-by: James Foucar <jgfouca@sandia.gov>
  • Loading branch information
jgfouca committed Oct 18, 2024
1 parent ffa73e9 commit e332845
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sparse/impl/KokkosSparse_trsv_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ struct TrsvWrap {
for (lno_t c = numCols; c-- > 0;) {
const offset_type beg = ptr(c);
const offset_type end = ptr(c + 1);
for (offset_type k = end - 1; k >= beg; --k) {
for (offset_type k = end; k-- > beg;) {
const lno_t r = ind(k);
const auto A_rc = val(k);
/*(vqd 20 Jul 2020) This assumes that the diagonal entry
Expand Down Expand Up @@ -489,7 +489,7 @@ struct TrsvWrap {
for (lno_t c = numCols; c-- > 0;) {
const offset_type beg = ptr(c);
const offset_type end = ptr(c + 1);
for (offset_type k = end - 1; k >= beg; --k) {
for (offset_type k = end; k-- > beg;) {
const lno_t r = ind(k);
const scalar_t A_rc = STS::conj(val(k));
/*(vqd 20 Jul 2020) This assumes that the diagonal entry
Expand Down

0 comments on commit e332845

Please sign in to comment.