Skip to content

Commit

Permalink
Pass *this to in_parallel in OpenMP::impl_thread_pool_size()
Browse files Browse the repository at this point in the history
  • Loading branch information
dalg24 committed Feb 2, 2023
1 parent 5bb7e0a commit c005e60
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/src/OpenMP/Kokkos_OpenMP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit c005e60

Please sign in to comment.