hpx/runtime_local/thread_mapper.hpp

See Public API for a list of names and headers that are part of the public HPX API.

namespace hpx
namespace util
class thread_mapper

Public Types

using callback_type = detail::thread_mapper_callback_type

Public Functions

HPX_NON_COPYABLE(thread_mapper)
thread_mapper()
~thread_mapper()
std::uint32_t register_thread(char const *label, runtime_local::os_thread_type type)
bool unregister_thread()
std::uint32_t get_thread_index(std::string const &label) const
std::uint32_t get_thread_count() const
bool register_callback(std::uint32_t tix, callback_type const&)
bool revoke_callback(std::uint32_t tix)
std::thread::id get_thread_id(std::uint32_t tix) const
std::uint64_t get_thread_native_handle(std::uint32_t tix) const
std::string const &get_thread_label(std::uint32_t tix) const
runtime_local::os_thread_type get_thread_type(std::uint32_t tix) const
bool enumerate_os_threads(hpx::function<bool(os_thread_data const&)> const &f) const
os_thread_data get_os_thread_data(std::string const &label) const

Public Static Attributes

constexpr std::uint32_t invalid_index = std::uint32_t(-1)
constexpr std::uint64_t invalid_tid = std::uint64_t(-1)

Private Types

using mutex_type = hpx::spinlock
using thread_map_type = std::vector<detail::os_thread_data>
using label_map_type = std::map<std::string, std::size_t>

Private Members

mutex_type mtx_
thread_map_type thread_map_
label_map_type label_map_