From a20a5436e724bf01a0cd8f43e669ceca044d6fad Mon Sep 17 00:00:00 2001 From: Ulrich Hetmaniuk Date: Thu, 6 Jan 2022 15:52:31 -0700 Subject: [PATCH] Fix typo --- .../impl/KokkosSparse_spmv_bsrmatrix_spec.hpp | 125 +++++++++--------- 1 file changed, 63 insertions(+), 62 deletions(-) diff --git a/src/sparse/impl/KokkosSparse_spmv_bsrmatrix_spec.hpp b/src/sparse/impl/KokkosSparse_spmv_bsrmatrix_spec.hpp index 445b8657f4..5a0907dd7a 100644 --- a/src/sparse/impl/KokkosSparse_spmv_bsrmatrix_spec.hpp +++ b/src/sparse/impl/KokkosSparse_spmv_bsrmatrix_spec.hpp @@ -217,54 +217,55 @@ struct SPMV_MV_BSRMATRIX::is_complex == false) use_tc = true; - } + } #endif #if defined(KOKKOS_ARCH_AMPERE) - typedef typename XVector::non_const_value_type XScalar; - typedef typename AMatrix::non_const_value_type AScalar; - typedef Kokkos::Experimental::half_t Half; + typedef typename XVector::non_const_value_type XScalar; + typedef typename AMatrix::non_const_value_type AScalar; + typedef Kokkos::Experimental::half_t Half; - /* Ampere has double += double * double and float += half * half + /* Ampere has double += double * double and float += half * half - use whichever is requested. - If none requested, used mixed precision if the inputs are mixed, otherwise - use double - */ + use whichever is requested. + If none requested, used mixed precision if the inputs are mixed, otherwise + use double + */ - // input precision matches a tensor core fragment type - constexpr bool operandsHalfHalfFloat = std::is_same::value && - std::is_same::value && - std::is_same::value; + // input precision matches a tensor core fragment type + constexpr bool operandsHalfHalfFloat = std::is_same::value && + std::is_same::value && + std::is_same::value; - if (use_tc) { - if (requestMixed) { - BsrMatrixSpMVTensorCoreDispatcher::dispatch(alpha, A, - X, beta, - Y); - return; - } else if (requestDouble) { - BsrMatrixSpMVTensorCoreDispatcher::dispatch(alpha, A, X, beta, Y); - return; - } else if (operandsHalfHalfFloat) { - BsrMatrixSpMVTensorCoreDispatcher::dispatch(alpha, A, - X, beta, - Y); - return; - } else { - BsrMatrixSpMVTensorCoreDispatcher::dispatch(alpha, A, x, beta, y); - return; + if (use_tc) { + if (requestMixed) { + BsrMatrixSpMVTensorCoreDispatcher::dispatch(alpha, A, + X, beta, + Y); + return; + } else if (requestDouble) { + BsrMatrixSpMVTensorCoreDispatcher::dispatch(alpha, A, X, beta, Y); + return; + } else if (operandsHalfHalfFloat) { + BsrMatrixSpMVTensorCoreDispatcher::dispatch(alpha, A, + X, beta, + Y); + return; + } else { + BsrMatrixSpMVTensorCoreDispatcher::dispatch(alpha, A, x, beta, y); + return; + } } - } #elif defined(KOKKOS_ARCH_VOLTA) /* Volta has float += half * half use it for all matrices @@ -284,32 +285,32 @@ struct SPMV_MV_BSRMATRIX