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 * tls_scheduler_of(uintptr_t v)
Converts TLS value to the scheduler pointer.
static rml::tbb_factory theRMLServerFactory
std::size_t stack_size_type
static generic_scheduler * local_scheduler_weak()
void const char const char int ITT_FORMAT __itt_group_sync s
int AvailableHwConcurrency()
Returns maximal parallelism level supported by the current OS configuration.
static generic_scheduler * local_scheduler()
Obtain the thread-local instance of the TBB scheduler.
static bool is_rethrow_broken
Work stealing task scheduler.
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.
static size_t DefaultPageSize
Caches the size of OS regular memory page.
static basic_tls< uintptr_t > theTLS
TLS for scheduler instances associated with individual threads.
Class that supports TBB initialization.
static unsigned default_num_threads()
The class handles access to the single instance of market, and to TLS to keep scheduler instances...
static const int automatic
Typedef for number of threads that is automatic.
static bool rethrow_exception_broken()
static bool UsePrivateRML
static unsigned DefaultNumberOfThreads
Caches the maximal level of parallelism supported by the hardware.
static size_t default_page_size()
static bool is_speculation_enabled
static generic_scheduler * local_scheduler_if_initialized()
static bool speculation_enabled()