Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
Go to the documentation of this file.
17 #ifndef _TBB_governor_H
18 #define _TBB_governor_H
21 #include "../rml/include/rml_tbb.h"
26 #if __TBB_SURVIVE_THREAD_SWITCH
34 class generic_scheduler;
154 #if __TBB_SURVIVE_THREAD_SWITCH
static const int automatic
Typedef for number of threads that is automatic.
static generic_scheduler * tls_scheduler_of(uintptr_t v)
Converts TLS value to the scheduler pointer.
Class that supports TBB initialization.
static void sign_on(generic_scheduler *s)
Register TBB scheduler instance in thread-local storage.
static void assume_scheduler(generic_scheduler *s)
Temporarily set TLS slot to the given scheduler.
static unsigned default_num_threads()
static void acquire_resources()
Create key for thread-local storage and initialize RML.
static bool speculation_enabled()
Work stealing task scheduler.
static generic_scheduler * local_scheduler_weak()
static void release_resources()
Destroy the thread-local storage key and deinitialize RML.
static bool is_rethrow_broken
static uintptr_t tls_value_of(generic_scheduler *s)
Computes the value of the TLS.
static void auto_terminate(void *scheduler)
The internal routine to undo automatic initialization.
static bool does_client_join_workers(const tbb::internal::rml::tbb_client &client)
static bool rethrow_exception_broken()
std::size_t stack_size_type
static void print_version_info()
static size_t DefaultPageSize
Caches the size of OS regular memory page.
static generic_scheduler * init_scheduler(int num_threads, stack_size_type stack_size, bool auto_init)
Processes scheduler initialization request (possibly nested) in a master thread.
static bool is_speculation_enabled
static generic_scheduler * local_scheduler_if_initialized()
static bool UsePrivateRML
static bool is_set(generic_scheduler *s)
Used to check validity of the local scheduler TLS contents.
static void initialize_rml_factory()
static generic_scheduler * init_scheduler_weak()
Automatic initialization of scheduler in a master thread with default settings without arena.
static basic_tls< uintptr_t > theTLS
TLS for scheduler instances associated with individual threads.
void const char const char int ITT_FORMAT __itt_group_sync s
static unsigned DefaultNumberOfThreads
Caches the maximal level of parallelism supported by the hardware.
static rml::tbb_server * create_rml_server(rml::tbb_client &)
static size_t default_page_size()
size_t DefaultSystemPageSize()
Returns OS regular memory page size.
static void terminate_auto_initialized_scheduler()
Undo automatic initialization if necessary; call when a thread exits.
The class handles access to the single instance of market, and to TLS to keep scheduler instances.
static rml::tbb_factory theRMLServerFactory
static void one_time_init()
static generic_scheduler * local_scheduler()
Obtain the thread-local instance of the TBB scheduler.
int AvailableHwConcurrency()
Returns maximal parallelism level supported by the current OS configuration.
static bool terminate_scheduler(generic_scheduler *s, bool blocking)
Processes scheduler termination request (possibly nested) in a master thread.
static void sign_off(generic_scheduler *s)
Unregister TBB scheduler instance from thread-local storage.
Copyright © 2005-2020 Intel Corporation. All Rights Reserved.
Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
registered trademarks or trademarks of Intel Corporation or its
subsidiaries in the United States and other countries.
* Other names and brands may be claimed as the property of others.