From 881b411e778355560f9f05d5a053b2518f0c290d Mon Sep 17 00:00:00 2001 From: Nathan Ellingwood Date: Wed, 15 Jan 2020 16:51:36 -0800 Subject: [PATCH] gemv: call scal for degenerate matrices Related to #539 --- src/blas/KokkosBlas2_gemv.hpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/blas/KokkosBlas2_gemv.hpp b/src/blas/KokkosBlas2_gemv.hpp index 5dad74a5f4..5cfa6d4f05 100644 --- a/src/blas/KokkosBlas2_gemv.hpp +++ b/src/blas/KokkosBlas2_gemv.hpp @@ -52,6 +52,8 @@ #include #include // requires C++11, but so does Kokkos +#include + namespace KokkosBlas { /// \brief Dense matrix-vector multiply: y = beta*y + alpha*A*x. @@ -139,15 +141,9 @@ gemv (const char trans[], typename YViewType::device_type, Kokkos::MemoryTraits > YVT; - if ((trans[0] == 'T' || trans[0] == 't') && A.extent(0) == 0 -#ifdef KOKKOS_ENABLE_CUDA - && !std::is_same::value -#endif - ) + if (A.extent(0) == 0 || A.extent(1) == 0) { - const bool eti_spec_avail = KokkosBlas::Impl::gemv_eti_spec_avail::value; - typedef Impl::GEMV fallback_impl_type; - fallback_impl_type::gemv (trans, alpha, A, x, beta, y); + KokkosBlas::scal(y, beta, y); } else {