From dd700586b53de9de32485a3842235c018e8249ab Mon Sep 17 00:00:00 2001 From: Brian Kelley Date: Wed, 20 Mar 2024 14:14:17 -0600 Subject: [PATCH] Fix signed/unsigned comparison warnings This is only hit when spmv is called with integer scalars, which doesn't happen in our CI but does often in Tpetra. --- sparse/impl/KokkosSparse_spmv_bsrmatrix_spec.hpp | 2 +- sparse/impl/KokkosSparse_spmv_spec.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sparse/impl/KokkosSparse_spmv_bsrmatrix_spec.hpp b/sparse/impl/KokkosSparse_spmv_bsrmatrix_spec.hpp index dddf6e1472..5c2bf0edfa 100644 --- a/sparse/impl/KokkosSparse_spmv_bsrmatrix_spec.hpp +++ b/sparse/impl/KokkosSparse_spmv_bsrmatrix_spec.hpp @@ -349,7 +349,7 @@ struct SPMV_MV_BSRMATRIX, "This implementation is only for integer Scalar types."); - for (typename AMatrix::non_const_size_type j = 0; j < X.extent(1); ++j) { + for (size_t j = 0; j < X.extent(1); ++j) { const auto x_j = Kokkos::subview(X, Kokkos::ALL(), j); auto y_j = Kokkos::subview(Y, Kokkos::ALL(), j); typedef SPMV_BSRMATRIX, "This implementation is only for integer Scalar types."); KokkosKernels::Experimental::Controls defaultControls; - for (typename AMatrix::non_const_size_type j = 0; j < x.extent(1); ++j) { + for (size_t j = 0; j < x.extent(1); ++j) { auto x_j = Kokkos::subview(x, Kokkos::ALL(), j); auto y_j = Kokkos::subview(y, Kokkos::ALL(), j); typedef SPMV