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;
68 static void acquire_resources ();
71 static void release_resources ();
73 static rml::tbb_server* create_rml_server ( rml::tbb_client& );
78 static void auto_terminate(
void*
scheduler);
83 return DefaultNumberOfThreads ? DefaultNumberOfThreads :
86 static void one_time_init();
123 uintptr_t v = theTLS.
get();
128 uintptr_t v = theTLS.
get();
129 return v ? tls_scheduler_of(v) : init_scheduler_weak();
133 return tls_scheduler_of( theTLS.
get() );
138 auto_terminate( local_scheduler_if_initialized() );
141 static void print_version_info ();
143 static void initialize_rml_factory ();
145 static bool does_client_join_workers (
const tbb::internal::rml::tbb_client &client);
147 #if __TBB_SURVIVE_THREAD_SWITCH int AvailableHwConcurrency()
Returns maximal parallelism level supported by the current OS configuration.
static bool is_speculation_enabled
void const char const char int ITT_FORMAT __itt_group_sync s
static basic_tls< uintptr_t > theTLS
TLS for scheduler instances associated with individual threads.
static generic_scheduler * local_scheduler_weak()
static const int automatic
Typedef for number of threads that is automatic.
static bool is_rethrow_broken
static generic_scheduler * local_scheduler()
Obtain the thread-local instance of the TBB scheduler.
Class that supports TBB initialization.
The class handles access to the single instance of market, and to TLS to keep scheduler instances...
static generic_scheduler * local_scheduler_if_initialized()
static bool speculation_enabled()
static void terminate_auto_initialized_scheduler()
Undo automatic initialization if necessary; call when a thread exits.
static bool rethrow_exception_broken()
Work stealing task scheduler.
static bool UsePrivateRML
static unsigned default_num_threads()
std::size_t stack_size_type
static unsigned DefaultNumberOfThreads
Caches the maximal level of parallelism supported by the hardware.
static generic_scheduler * tls_scheduler_of(uintptr_t v)
Converts TLS value to the scheduler pointer.
static rml::tbb_factory theRMLServerFactory