21 #ifndef _TBB_governor_H 22 #define _TBB_governor_H 25 #include "../rml/include/rml_tbb.h" 30 #if __TBB_SURVIVE_THREAD_SWITCH 38 class generic_scheduler;
72 static void acquire_resources ();
75 static void release_resources ();
77 static rml::tbb_server* create_rml_server ( rml::tbb_client& );
82 static void auto_terminate(
void*
scheduler);
87 return DefaultNumberOfThreads ? DefaultNumberOfThreads :
90 static void one_time_init();
127 uintptr_t v = theTLS.
get();
132 uintptr_t v = theTLS.
get();
133 return v ? tls_scheduler_of(v) : init_scheduler_weak();
137 return tls_scheduler_of( theTLS.
get() );
142 auto_terminate( local_scheduler_if_initialized() );
145 static void print_version_info ();
147 static void initialize_rml_factory ();
149 static bool does_client_join_workers (
const tbb::internal::rml::tbb_client &client);
151 #if __TBB_SURVIVE_THREAD_SWITCH static bool is_speculation_enabled
static unsigned DefaultNumberOfThreads
Caches the maximal level of parallelism supported by the hardware.
Work stealing task scheduler.
static basic_tls< uintptr_t > theTLS
TLS for scheduler instances associated with individual threads.
static generic_scheduler * local_scheduler()
Obtain the thread-local instance of the TBB scheduler.
static void terminate_auto_initialized_scheduler()
Undo automatic initialization if necessary; call when a thread exits.
static rml::tbb_factory theRMLServerFactory
static generic_scheduler * tls_scheduler_of(uintptr_t v)
Converts TLS value to the scheduler pointer.
static bool rethrow_exception_broken()
static const int automatic
Typedef for number of threads that is automatic.
int AvailableHwConcurrency()
Returns maximal parallelism level supported by the current OS configuration.
Class that supports TBB initialization.
static generic_scheduler * local_scheduler_if_initialized()
std::size_t stack_size_type
void const char const char int ITT_FORMAT __itt_group_sync s
static unsigned default_num_threads()
static bool is_rethrow_broken
The class handles access to the single instance of market, and to TLS to keep scheduler instances...
static bool speculation_enabled()
static generic_scheduler * local_scheduler_weak()
static bool UsePrivateRML