task_arena.h
Go to the documentation of this file.
/*
Copyright (c) 2005-2020 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#ifndef __TBB_task_arena_H
#define __TBB_task_arena_H
#define __TBB_task_arena_H_include_area
#include "internal/_warning_suppress_enable_notice.h"
#include "task.h"
#include "tbb_exception.h"
#include "internal/_template_helpers.h"
#if __TBB_NUMA_SUPPORT
#include "info.h"
#endif /*__TBB_NUMA_SUPPORT*/
#if TBB_USE_THREADING_TOOLS
#include "atomic.h" // for as_atomic
#endif
#include "aligned_space.h"
namespace tbb {
namespace this_task_arena {
int max_concurrency();
} // namespace this_task_arena
namespace internal {
class arena;
class task_scheduler_observer_v3;
} // namespace internal
namespace interface7 {
class task_arena;
namespace internal {
using namespace tbb::internal; //e.g. function_task from task.h
class delegate_base : no_assign {
public:
virtual void operator()() const = 0;
virtual ~delegate_base() {}
};
// If decltype is available, the helper detects the return type of functor of specified type,
// otherwise it defines the void type.
template <typename F>
struct return_type_or_void {
#if __TBB_CPP11_DECLTYPE_PRESENT && !__TBB_CPP11_DECLTYPE_OF_FUNCTION_RETURN_TYPE_BROKEN
typedef decltype(declval<F>()()) type;
#else
typedef void type;
#endif
};
template<typename F, typename R>
class delegated_function : public delegate_base {
F &my_func;
tbb::aligned_space<R> my_return_storage;
// The function should be called only once.
void operator()() const __TBB_override {
new (my_return_storage.begin()) R(my_func());
}
public:
delegated_function(F& f) : my_func(f) {}
// The function can be called only after operator() and only once.
R consume_result() const {
return tbb::internal::move(*(my_return_storage.begin()));
}
~delegated_function() {
my_return_storage.begin()->~R();
}
};
template<typename F>
class delegated_function<F,void> : public delegate_base {
F &my_func;
void operator()() const __TBB_override {
my_func();
}
public:
delegated_function(F& f) : my_func(f) {}
void consume_result() const {}
friend class task_arena_base;
};
class task_arena_base {
#if __TBB_NUMA_SUPPORT
public:
// TODO: consider version approach to resolve backward compatibility potential issues.
struct constraints {
constraints(numa_node_id id = automatic, int maximal_concurrency = automatic)
: numa_id(id)
, max_concurrency(maximal_concurrency)
{}
numa_node_id numa_id;
int max_concurrency;
};
#endif /*__TBB_NUMA_SUPPORT*/
protected:
internal::arena* my_arena;
#if __TBB_TASK_GROUP_CONTEXT
task_group_context *my_context;
#endif
int my_max_concurrency;
unsigned my_master_slots;
intptr_t my_version_and_traits;
bool my_initialized;
#if __TBB_NUMA_SUPPORT
numa_node_id my_numa_id;
// Do not access my_numa_id without the following runtime check.
// Despite my_numa_id is accesible, it does not exist in task_arena_base on user side
// if TBB_PREVIEW_NUMA_SUPPORT macro is not defined by the user. To be sure that
// my_numa_id exists in task_arena_base layout we check the traits.
// TODO: Consider increasing interface version for task_arena_base instead of this runtime check.
numa_node_id numa_id() {
return (my_version_and_traits & numa_support_flag) == numa_support_flag ? my_numa_id : automatic;
}
#endif
enum {
default_flags = 0
#if __TBB_TASK_GROUP_CONTEXT
| (task_group_context::default_traits & task_group_context::exact_exception) // 0 or 1 << 16
, exact_exception_flag = task_group_context::exact_exception // used to specify flag for context directly
#endif
#if __TBB_NUMA_SUPPORT
, numa_support_flag = 1
#endif
};
task_arena_base(int max_concurrency, unsigned reserved_for_masters)
: my_arena(0)
#if __TBB_TASK_GROUP_CONTEXT
, my_context(0)
#endif
, my_max_concurrency(max_concurrency)
, my_master_slots(reserved_for_masters)
#if __TBB_NUMA_SUPPORT
, my_version_and_traits(default_flags | numa_support_flag)
#else
, my_version_and_traits(default_flags)
#endif
, my_initialized(false)
#if __TBB_NUMA_SUPPORT
, my_numa_id(automatic)
#endif
{}
#if __TBB_NUMA_SUPPORT
task_arena_base(const constraints& constraints_, unsigned reserved_for_masters)
: my_arena(0)
#if __TBB_TASK_GROUP_CONTEXT
, my_context(0)
#endif
, my_max_concurrency(constraints_.max_concurrency)
, my_master_slots(reserved_for_masters)
, my_version_and_traits(default_flags | numa_support_flag)
, my_initialized(false)
, my_numa_id(constraints_.numa_id )
{}
#endif /*__TBB_NUMA_SUPPORT*/
void __TBB_EXPORTED_METHOD internal_initialize();
void __TBB_EXPORTED_METHOD internal_terminate();
void __TBB_EXPORTED_METHOD internal_attach();
void __TBB_EXPORTED_METHOD internal_enqueue( task&, intptr_t ) const;
void __TBB_EXPORTED_METHOD internal_execute( delegate_base& ) const;
void __TBB_EXPORTED_METHOD internal_wait() const;
static int __TBB_EXPORTED_FUNC internal_current_slot();
static int __TBB_EXPORTED_FUNC internal_max_concurrency( const task_arena * );
public:
static const int automatic = -1;
static const int not_initialized = -2;
};
#if __TBB_TASK_ISOLATION
void __TBB_EXPORTED_FUNC isolate_within_arena( delegate_base& d, intptr_t isolation = 0 );
template<typename R, typename F>
R isolate_impl(F& f) {
delegated_function<F, R> d(f);
isolate_within_arena(d);
return d.consume_result();
}
#endif /* __TBB_TASK_ISOLATION */
} // namespace internal
class task_arena : public internal::task_arena_base {
friend class tbb::internal::task_scheduler_observer_v3;
friend void task::enqueue(task&, task_arena&
#if __TBB_TASK_PRIORITY
, priority_t
#endif
);
friend int tbb::this_task_arena::max_concurrency();
void mark_initialized() {
__TBB_ASSERT( my_arena, "task_arena initialization is incomplete" );
#if __TBB_TASK_GROUP_CONTEXT
__TBB_ASSERT( my_context, "task_arena initialization is incomplete" );
#endif
#if TBB_USE_THREADING_TOOLS
// Actual synchronization happens in internal_initialize & internal_attach.
// The race on setting my_initialized is benign, but should be hidden from Intel(R) Inspector
internal::as_atomic(my_initialized).fetch_and_store<release>(true);
#else
my_initialized = true;
#endif
}
template<typename F>
void enqueue_impl( __TBB_FORWARDING_REF(F) f
#if __TBB_TASK_PRIORITY
, priority_t p = priority_t(0)
#endif
) {
#if !__TBB_TASK_PRIORITY
intptr_t p = 0;
#endif
initialize();
#if __TBB_TASK_GROUP_CONTEXT
internal_enqueue(*new(task::allocate_root(*my_context)) internal::function_task< typename internal::strip<F>::type >(internal::forward<F>(f)), p);
#else
internal_enqueue(*new(task::allocate_root()) internal::function_task< typename internal::strip<F>::type >(internal::forward<F>(f)), p);
#endif /* __TBB_TASK_GROUP_CONTEXT */
}
template<typename R, typename F>
R execute_impl(F& f) {
initialize();
internal::delegated_function<F, R> d(f);
internal_execute(d);
return d.consume_result();
}
public:
task_arena(int max_concurrency_ = automatic, unsigned reserved_for_masters = 1)
: task_arena_base(max_concurrency_, reserved_for_masters)
{}
#if __TBB_NUMA_SUPPORT
task_arena(const constraints& constraints_, unsigned reserved_for_masters = 1)
: task_arena_base(constraints_, reserved_for_masters)
{}
task_arena(const task_arena &s) // copy settings but not the reference or instance
: task_arena_base(constraints(s.my_numa_id, s.my_max_concurrency), s.my_master_slots)
{}
#else
task_arena(const task_arena &s) // copy settings but not the reference or instance
: task_arena_base(s.my_max_concurrency, s.my_master_slots)
{}
#endif /*__TBB_NUMA_SUPPORT*/
struct attach {};
explicit task_arena( attach )
: task_arena_base(automatic, 1) // use default settings if attach fails
{
internal_attach();
if( my_arena ) my_initialized = true;
}
inline void initialize() {
if( !my_initialized ) {
internal_initialize();
mark_initialized();
}
}
inline void initialize(int max_concurrency_, unsigned reserved_for_masters = 1) {
// TODO: decide if this call must be thread-safe
__TBB_ASSERT(!my_arena, "Impossible to modify settings of an already initialized task_arena");
if( !my_initialized ) {
my_max_concurrency = max_concurrency_;
my_master_slots = reserved_for_masters;
initialize();
}
}
#if __TBB_NUMA_SUPPORT
inline void initialize(constraints constraints_, unsigned reserved_for_masters = 1) {
// TODO: decide if this call must be thread-safe
__TBB_ASSERT(!my_arena, "Impossible to modify settings of an already initialized task_arena");
if( !my_initialized ) {
my_numa_id = constraints_.numa_id;
my_max_concurrency = constraints_.max_concurrency;
my_master_slots = reserved_for_masters;
initialize();
}
}
#endif /*__TBB_NUMA_SUPPORT*/
inline void initialize(attach) {
// TODO: decide if this call must be thread-safe
__TBB_ASSERT(!my_arena, "Impossible to modify settings of an already initialized task_arena");
if( !my_initialized ) {
internal_attach();
if ( !my_arena ) internal_initialize();
mark_initialized();
}
}
inline void terminate() {
if( my_initialized ) {
internal_terminate();
my_initialized = false;
}
}
~task_arena() {
terminate();
}
bool is_active() const { return my_initialized; }
#if __TBB_CPP11_RVALUE_REF_PRESENT
template<typename F>
void enqueue( F&& f ) {
enqueue_impl(std::forward<F>(f));
}
#else
template<typename F>
void enqueue( const F& f ) {
enqueue_impl(f);
}
#endif
#if __TBB_TASK_PRIORITY
template<typename F>
#if __TBB_CPP11_RVALUE_REF_PRESENT
__TBB_DEPRECATED void enqueue( F&& f, priority_t p ) {
#if __TBB_PREVIEW_CRITICAL_TASKS
__TBB_ASSERT(p == priority_low || p == priority_normal || p == priority_high
|| p == internal::priority_critical, "Invalid priority level value");
#else
__TBB_ASSERT(p == priority_low || p == priority_normal || p == priority_high, "Invalid priority level value");
#endif
enqueue_impl(std::forward<F>(f), p);
}
#else
__TBB_DEPRECATED void enqueue( const F& f, priority_t p ) {
#if __TBB_PREVIEW_CRITICAL_TASKS
__TBB_ASSERT(p == priority_low || p == priority_normal || p == priority_high
|| p == internal::priority_critical, "Invalid priority level value");
#else
__TBB_ASSERT(p == priority_low || p == priority_normal || p == priority_high, "Invalid priority level value");
#endif
enqueue_impl(f,p);
}
#endif
#endif// __TBB_TASK_PRIORITY
template<typename F>
typename internal::return_type_or_void<F>::type execute(F& f) {
return execute_impl<typename internal::return_type_or_void<F>::type>(f);
}
template<typename F>
typename internal::return_type_or_void<F>::type execute(const F& f) {
return execute_impl<typename internal::return_type_or_void<F>::type>(f);
}
#if __TBB_EXTRA_DEBUG
void debug_wait_until_empty() {
initialize();
internal_wait();
}
#endif //__TBB_EXTRA_DEBUG
inline static int current_thread_index() {
return internal_current_slot();
}
inline int max_concurrency() const {
// Handle special cases inside the library
return (my_max_concurrency>1) ? my_max_concurrency : internal_max_concurrency(this);
}
};
namespace this_task_arena {
#if __TBB_TASK_ISOLATION
template<typename F>
typename internal::return_type_or_void<F>::type isolate(F& f) {
return internal::isolate_impl<typename internal::return_type_or_void<F>::type>(f);
}
template<typename F>
typename internal::return_type_or_void<F>::type isolate(const F& f) {
return internal::isolate_impl<typename internal::return_type_or_void<F>::type>(f);
}
#endif /* __TBB_TASK_ISOLATION */
} // namespace this_task_arena
} // namespace interfaceX
using interface7::task_arena;
namespace this_task_arena {
using namespace interface7::this_task_arena;
inline int current_thread_index() {
int idx = tbb::task_arena::current_thread_index();
return idx == -1 ? tbb::task_arena::not_initialized : idx;
}
inline int max_concurrency() {
return tbb::task_arena::internal_max_concurrency(NULL);
}
} // namespace this_task_arena
#if __TBB_TASK_PRIORITY
void task::enqueue( task& t, task_arena& arena, priority_t p ) {
#else
void task::enqueue( task& t, task_arena& arena ) {
intptr_t p = 0;
#endif
arena.initialize();
arena.internal_enqueue(t, p);
}
} // namespace tbb
#include "internal/_warning_suppress_disable_notice.h"
#undef __TBB_task_arena_H_include_area
#endif /* __TBB_task_arena_H */
aligned_space.h
atomic.h
info.h
_template_helpers.h
_warning_suppress_disable_notice.h
_warning_suppress_enable_notice.h
__TBB_EXPORTED_FUNC
#define __TBB_EXPORTED_FUNC
Definition: scalable_allocator.h:38
task.h
__TBB_DEPRECATED
#define __TBB_DEPRECATED
Definition: tbb_config.h:637
__TBB_TASK_PRIORITY
#define __TBB_TASK_PRIORITY
Definition: tbb_config.h:572
__TBB_TASK_GROUP_CONTEXT
#define __TBB_TASK_GROUP_CONTEXT
Definition: tbb_config.h:542
tbb_exception.h
__TBB_EXPORTED_METHOD
#define __TBB_EXPORTED_METHOD
Definition: tbb_stddef.h:98
__TBB_ASSERT
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
__TBB_override
#define __TBB_override
Definition: tbb_stddef.h:240
__TBB_FORWARDING_REF
#define __TBB_FORWARDING_REF(A)
Definition: tbb_stddef.h:517
s
void const char const char int ITT_FORMAT __itt_group_sync s
Definition: ittnotify_static.h:91
d
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d
Definition: ittnotify_static.h:109
void
void
Definition: ittnotify_static.h:91
p
void const char const char int ITT_FORMAT __itt_group_sync p
Definition: ittnotify_static.h:91
type
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type type
Definition: ittnotify_static.h:198
tbb
The graph class.
Definition: serial/tbb/parallel_for.h:46
tbb::priority_t
priority_t
Definition: task.h:317
tbb::priority_normal
@ priority_normal
Definition: task.h:318
tbb::priority_high
@ priority_high
Definition: task.h:320
tbb::priority_low
@ priority_low
Definition: task.h:319
tbb::move
void move(tbb_thread &t1, tbb_thread &t2)
Definition: tbb_thread.h:319
tbb::release
@ release
Release.
Definition: atomic.h:59
tbb::internal
Identifiers declared inside namespace internal should never be used directly by client code.
Definition: atomic.h:65
tbb::internal::priority_critical
static const int priority_critical
Definition: task.h:313
tbb::internal::as_atomic
atomic< T > & as_atomic(T &t)
Definition: atomic.h:572
internal
Definition: _flow_graph_async_msg_impl.h:24
tbb::interface7::internal::isolate_within_arena
void __TBB_EXPORTED_FUNC isolate_within_arena(delegate_base &d, intptr_t isolation=0)
tbb::interface7::internal::isolate_impl
R isolate_impl(F &f)
Definition: task_arena.h:214
tbb::this_task_arena::current_thread_index
int current_thread_index()
Returns the index, aka slot number, of the calling thread in its current arena.
Definition: task_arena.h:484
tbb::this_task_arena::max_concurrency
int max_concurrency()
Returns the maximal number of threads that can work inside the arena.
Definition: task_arena.h:490
tbb::interface7::this_task_arena::isolate
internal::return_type_or_void< F >::type isolate(const F &f)
Definition: task_arena.h:471
tbb::internal::strip::type
T type
Definition: _template_helpers.h:38
tbb::task_group_context
Used to form groups of tasks.
Definition: task.h:358
tbb::task_group_context::exact_exception
@ exact_exception
Definition: task.h:383
tbb::task_group_context::default_traits
@ default_traits
Definition: task.h:391
tbb::task
Base class for user-defined tasks.
Definition: task.h:615
tbb::task::enqueue
static void enqueue(task &t)
Enqueue task for starvation-resistant execution.
Definition: task.h:836
tbb::task::allocate_root
static internal::allocate_root_proxy allocate_root()
Returns proxy for overloaded new that allocates a root task.
Definition: task.h:663
tbb::internal::function_task
Definition: task.h:1051
tbb::interface7::internal::delegate_base
Definition: task_arena.h:56
tbb::interface7::internal::delegate_base::operator()
virtual void operator()() const =0
tbb::interface7::internal::delegate_base::~delegate_base
virtual ~delegate_base()
Definition: task_arena.h:59
tbb::interface7::internal::return_type_or_void
Definition: task_arena.h:65
tbb::interface7::internal::delegated_function
Definition: task_arena.h:74
tbb::interface7::internal::delegated_function::delegated_function
delegated_function(F &f)
Definition: task_arena.h:82
tbb::interface7::internal::delegated_function::operator()
void operator()() const __TBB_override
Definition: task_arena.h:78
tbb::interface7::internal::delegated_function::~delegated_function
~delegated_function()
Definition: task_arena.h:87
tbb::interface7::internal::delegated_function::consume_result
R consume_result() const
Definition: task_arena.h:84
tbb::interface7::internal::delegated_function::my_return_storage
tbb::aligned_space< R > my_return_storage
Definition: task_arena.h:76
tbb::interface7::internal::delegated_function::my_func
F & my_func
Definition: task_arena.h:75
tbb::interface7::internal::delegated_function< F, void >::operator()
void operator()() const __TBB_override
Definition: task_arena.h:95
tbb::interface7::internal::delegated_function< F, void >::consume_result
void consume_result() const
Definition: task_arena.h:100
tbb::interface7::internal::delegated_function< F, void >::delegated_function
delegated_function(F &f)
Definition: task_arena.h:99
tbb::interface7::internal::delegated_function< F, void >::my_func
F & my_func
Definition: task_arena.h:94
tbb::interface7::internal::task_arena_base
Definition: task_arena.h:105
tbb::interface7::internal::task_arena_base::not_initialized
static const int not_initialized
Definition: task_arena.h:206
tbb::interface7::internal::task_arena_base::internal_wait
void __TBB_EXPORTED_METHOD internal_wait() const
tbb::interface7::internal::task_arena_base::my_version_and_traits
intptr_t my_version_and_traits
Special settings.
Definition: task_arena.h:134
tbb::interface7::internal::task_arena_base::my_initialized
bool my_initialized
Definition: task_arena.h:136
tbb::interface7::internal::task_arena_base::internal_max_concurrency
static int __TBB_EXPORTED_FUNC internal_max_concurrency(const task_arena *)
tbb::interface7::internal::task_arena_base::internal_enqueue
void __TBB_EXPORTED_METHOD internal_enqueue(task &, intptr_t) const
tbb::interface7::internal::task_arena_base::my_arena
internal::arena * my_arena
NULL if not currently initialized.
Definition: task_arena.h:120
tbb::interface7::internal::task_arena_base::my_context
task_group_context * my_context
default context of the arena
Definition: task_arena.h:124
tbb::interface7::internal::task_arena_base::task_arena_base
task_arena_base(int max_concurrency, unsigned reserved_for_masters)
Definition: task_arena.h:163
tbb::interface7::internal::task_arena_base::internal_attach
void __TBB_EXPORTED_METHOD internal_attach()
tbb::interface7::internal::task_arena_base::my_master_slots
unsigned my_master_slots
Reserved master slots.
Definition: task_arena.h:131
tbb::interface7::internal::task_arena_base::internal_execute
void __TBB_EXPORTED_METHOD internal_execute(delegate_base &) const
tbb::interface7::internal::task_arena_base::my_max_concurrency
int my_max_concurrency
Concurrency level for deferred initialization.
Definition: task_arena.h:128
tbb::interface7::internal::task_arena_base::internal_initialize
void __TBB_EXPORTED_METHOD internal_initialize()
tbb::interface7::internal::task_arena_base::internal_current_slot
static int __TBB_EXPORTED_FUNC internal_current_slot()
tbb::interface7::internal::task_arena_base::internal_terminate
void __TBB_EXPORTED_METHOD internal_terminate()
tbb::interface7::task_arena
Definition: task_arena.h:228
tbb::interface7::task_arena::max_concurrency
int max_concurrency() const
Returns the maximal number of threads that can work inside the arena.
Definition: task_arena.h:453
tbb::interface7::task_arena::task_arena
task_arena(const task_arena &s)
Copies settings from another task_arena.
Definition: task_arena.h:298
tbb::interface7::task_arena::task_arena
task_arena(attach)
Creates an instance of task_arena attached to the current arena of the thread.
Definition: task_arena.h:307
tbb::interface7::task_arena::initialize
void initialize()
Forces allocation of the resources for the task_arena as specified in constructor arguments.
Definition: task_arena.h:315
tbb::interface7::task_arena::~task_arena
~task_arena()
Definition: task_arena.h:368
tbb::interface7::task_arena::execute
internal::return_type_or_void< F >::type execute(const F &f)
Definition: task_arena.h:432
tbb::interface7::task_arena::initialize
void initialize(attach)
Attaches this instance to the current arena of the thread.
Definition: task_arena.h:347
tbb::interface7::task_arena::enqueue
void enqueue(F &&f)
Definition: task_arena.h:381
tbb::interface7::task_arena::task_arena
task_arena(int max_concurrency_=automatic, unsigned reserved_for_masters=1)
Creates task_arena with certain concurrency limits.
Definition: task_arena.h:282
tbb::interface7::task_arena::execute_impl
R execute_impl(F &f)
Definition: task_arena.h:268
tbb::interface7::task_arena::execute
internal::return_type_or_void< F >::type execute(F &f)
Definition: task_arena.h:423
tbb::interface7::task_arena::enqueue_impl
void enqueue_impl(__TBB_FORWARDING_REF(F) f, priority_t p=priority_t(0))
Definition: task_arena.h:251
tbb::interface7::task_arena::initialize
void initialize(int max_concurrency_, unsigned reserved_for_masters=1)
Overrides concurrency level and forces initialization of internal representation.
Definition: task_arena.h:323
tbb::interface7::task_arena::terminate
void terminate()
Definition: task_arena.h:359
tbb::interface7::task_arena::enqueue
__TBB_DEPRECATED void enqueue(F &&f, priority_t p)
Definition: task_arena.h:396
tbb::interface7::task_arena::current_thread_index
static int current_thread_index()
Definition: task_arena.h:448
tbb::interface7::task_arena::is_active
bool is_active() const
Definition: task_arena.h:374
tbb::interface7::task_arena::mark_initialized
void mark_initialized()
Definition: task_arena.h:236
tbb::interface7::task_arena::attach
Tag class used to indicate the "attaching" constructor.
Definition: task_arena.h:304
tbb::internal::task_scheduler_observer_v3
Definition: task_scheduler_observer.h:39
tbb::internal::no_assign
Base class for types that should not be assigned.
Definition: tbb_stddef.h:322
tbb::internal::arena
Definition: arena.h:277

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.