hpx::get_worker_thread_num, hpx::get_local_worker_thread_num, hpx::get_local_worker_thread_num, hpx::get_thread_pool_num, hpx::get_thread_pool_num#
Defined in header hpx/runtime.hpp.
See Public API for a list of names and headers that are part of the public HPX API.
-
namespace hpx
Functions
- HPX_CXX_EXPORT std::size_t get_worker_thread_num () noexcept
Return the number of the current OS-thread running in the runtime instance the current HPX-thread is executed with.
This function returns the zero based index of the OS-thread which executes the current HPX-thread.
Note
The returned value is zero based and its maximum value is smaller than the overall number of OS-threads executed (as returned by get_os_thread_count()).
Note
This function needs to be executed on a HPX-thread. It will fail otherwise (it will return -1).
- HPX_CXX_EXPORT std::size_t get_worker_thread_num (error_code &ec) noexcept
Return the number of the current OS-thread running in the runtime instance the current HPX-thread is executed with.
This function returns the zero based index of the OS-thread which executes the current HPX-thread.
Note
The returned value is zero based and its maximum value is smaller than the overall number of OS-threads executed (as returned by get_os_thread_count()). It will return -1 if the current thread is not a known thread or if the runtime is not in running state.
Note
This function needs to be executed on a HPX-thread. It will fail otherwise (it will return -1).
- Parameters
ec – [in,out] this represents the error status on exit (obsolete, ignored).
- HPX_CXX_EXPORT std::size_t get_local_worker_thread_num () noexcept
Return the number of the current OS-thread running in the current thread pool the current HPX-thread is executed with.
This function returns the zero based index of the OS-thread on the current thread pool which executes the current HPX-thread.
Note
The returned value is zero based and its maximum value is smaller than the number of OS-threads executed on the current thread pool. It will return -1 if the current thread is not a known thread or if the runtime is not in running state.
Note
This function needs to be executed on a HPX-thread. It will fail otherwise (it will return -1).
- HPX_CXX_EXPORT std::size_t get_local_worker_thread_num (error_code &ec) noexcept
Return the number of the current OS-thread running in the current thread pool the current HPX-thread is executed with.
This function returns the zero based index of the OS-thread on the current thread pool which executes the current HPX-thread.
Note
The returned value is zero based and its maximum value is smaller than the number of OS-threads executed on the current thread pool. It will return -1 if the current thread is not a known thread or if the runtime is not in running state.
Note
This function needs to be executed on a HPX-thread. It will fail otherwise (it will return -1).
- Parameters
ec – [in,out] this represents the error status on exit (obsolete, ignored).
- HPX_CXX_EXPORT std::size_t get_thread_pool_num () noexcept
Return the number of the current thread pool the current HPX-thread is executed with.
This function returns the zero based index of the thread pool which executes the current HPX-thread.
Note
The returned value is zero based and its maximum value is smaller than the number of thread pools started by the runtime. It will return -1 if the current thread pool is not a known thread pool or if the runtime is not in running state.
Note
This function needs to be executed on a HPX-thread. It will fail otherwise (it will return -1).
- HPX_CXX_EXPORT std::size_t get_thread_pool_num (error_code &ec) noexcept
Return the number of the current thread pool the current HPX-thread is executed with.
This function returns the zero based index of the thread pool which executes the current HPX-thread.
Note
The returned value is zero based and its maximum value is smaller than the number of thread pools started by the runtime. It will return -1 if the current thread pool is not a known thread pool or if the runtime is not in running state.
Note
This function needs to be executed on a HPX-thread. It will fail otherwise (it will return -1).
- Parameters
ec – [in,out] this represents the error status on exit (obsolete, ignored).
-
namespace threads