From 16c97ddb69fc3b710e1c771ae13e66d864b45b87 Mon Sep 17 00:00:00 2001 From: Brian Kelley Date: Thu, 2 Feb 2023 09:59:03 -0700 Subject: [PATCH] Call concurrency(), not impl_thread_pool_size() For host serial/parallel backends. concurrency() is implemented in terms of impl_thread_pool_size() so it's equivalent, but is part of the public interface. --- sparse/impl/KokkosSparse_spmv_impl.hpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/sparse/impl/KokkosSparse_spmv_impl.hpp b/sparse/impl/KokkosSparse_spmv_impl.hpp index d3e495c426..e9eb301b23 100644 --- a/sparse/impl/KokkosSparse_spmv_impl.hpp +++ b/sparse/impl/KokkosSparse_spmv_impl.hpp @@ -512,21 +512,7 @@ static void spmv_beta_transpose(typename YVector::const_value_type& alpha, #if defined(KOKKOS_ENABLE_SERIAL) || defined(KOKKOS_ENABLE_OPENMP) || \ defined(KOKKOS_ENABLE_THREADS) { - int impl_thread_pool_size(0); -#if defined(KOKKOS_ENABLE_SERIAL) - if (std::is_same::value) - impl_thread_pool_size = 1; -#endif -#if defined(KOKKOS_ENABLE_OPENMP) - if (std::is_same::value) - impl_thread_pool_size = Kokkos::OpenMP::impl_thread_pool_size(); -#endif -#if defined(KOKKOS_ENABLE_THREADS) - if (std::is_same::value) - impl_thread_pool_size = Kokkos::Threads::impl_thread_pool_size(); -#endif - - if (impl_thread_pool_size == 1) { + if (execution_space().concurrency() == 1) { /// serial impl typedef typename AMatrix::non_const_value_type value_type; typedef Kokkos::Details::ArithTraits ATV;