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;
71 static void acquire_resources ();
74 static void release_resources ();
76 static rml::tbb_server* create_rml_server ( rml::tbb_client& );
81 static void auto_terminate(
void*
scheduler);
86 return DefaultNumberOfThreads ? DefaultNumberOfThreads :
90 return DefaultPageSize ? DefaultPageSize :
93 static void one_time_init();
130 uintptr_t v = theTLS.
get();
135 uintptr_t v = theTLS.
get();
136 return v ? tls_scheduler_of(v) : init_scheduler_weak();
140 return tls_scheduler_of( theTLS.
get() );
145 auto_terminate( local_scheduler_if_initialized() );
148 static void print_version_info ();
150 static void initialize_rml_factory ();
152 static bool does_client_join_workers (
const tbb::internal::rml::tbb_client &client);
154 #if __TBB_SURVIVE_THREAD_SWITCH static generic_scheduler * local_scheduler_if_initialized()
static size_t default_page_size()
The class handles access to the single instance of market, and to TLS to keep scheduler instances...
static bool UsePrivateRML
static bool is_speculation_enabled
static bool rethrow_exception_broken()
size_t DefaultSystemPageSize()
Returns OS regular memory page size.
static unsigned default_num_threads()
std::size_t stack_size_type
static void terminate_auto_initialized_scheduler()
Undo automatic initialization if necessary; call when a thread exits.
static generic_scheduler * local_scheduler()
Obtain the thread-local instance of the TBB scheduler.
static bool speculation_enabled()
static generic_scheduler * local_scheduler_weak()
static bool is_rethrow_broken
Class that supports TBB initialization.
int AvailableHwConcurrency()
Returns maximal parallelism level supported by the current OS configuration.
static unsigned DefaultNumberOfThreads
Caches the maximal level of parallelism supported by the hardware.
Work stealing task scheduler.
static generic_scheduler * tls_scheduler_of(uintptr_t v)
Converts TLS value to the scheduler pointer.
static const int automatic
Typedef for number of threads that is automatic.
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 size_t DefaultPageSize
Caches the size of OS regular memory page.
static rml::tbb_factory theRMLServerFactory