diff --git a/src/sparse/impl/KokkosSparse_spmv_bsrmatrix_spec.hpp b/src/sparse/impl/KokkosSparse_spmv_bsrmatrix_spec.hpp index 5a0907dd7a..cbbbd39f12 100644 --- a/src/sparse/impl/KokkosSparse_spmv_bsrmatrix_spec.hpp +++ b/src/sparse/impl/KokkosSparse_spmv_bsrmatrix_spec.hpp @@ -288,27 +288,13 @@ struct SPMV_MV_BSRMATRIX impl_type; for (typename AMatrix::non_const_size_type 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); + const auto x_j = Kokkos::subview(X, Kokkos::ALL(), j); + auto y_j = Kokkos::subview(Y, Kokkos::ALL(), j); impl_type::spmv_bsrmatrix(controls, mode, alpha, A, x_j, beta, y_j); } }