From c005e607a07f4c1fb9563ca6fce7c4151f9c5519 Mon Sep 17 00:00:00 2001 From: Damien L-G Date: Thu, 2 Feb 2023 15:34:05 -0500 Subject: [PATCH] Pass *this to in_parallel in OpenMP::impl_thread_pool_size() --- core/src/OpenMP/Kokkos_OpenMP.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/OpenMP/Kokkos_OpenMP.cpp b/core/src/OpenMP/Kokkos_OpenMP.cpp index 6185c32ac8..4ad5238654 100644 --- a/core/src/OpenMP/Kokkos_OpenMP.cpp +++ b/core/src/OpenMP/Kokkos_OpenMP.cpp @@ -100,14 +100,15 @@ bool OpenMP::in_parallel(OpenMP const &exec_space) noexcept { int OpenMP::impl_thread_pool_size() const noexcept { #ifdef KOKKOS_ENABLE_DEPRECATED_CODE_3 - return OpenMP::in_parallel() + return OpenMP::in_parallel(*this) ? omp_get_num_threads() : (Impl::t_openmp_instance ? Impl::t_openmp_instance->m_pool_size : impl_internal_space_instance()->m_pool_size); #else - return OpenMP::in_parallel() ? omp_get_num_threads() - : impl_internal_space_instance()->m_pool_size; + return OpenMP::in_parallel(*this) + ? omp_get_num_threads() + : impl_internal_space_instance()->m_pool_size; #endif }