task_group_context.cpp
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.
*/
#include "scheduler.h"
#include "itt_notify.h"
namespace tbb {
#if __TBB_TASK_GROUP_CONTEXT
using namespace internal;
//------------------------------------------------------------------------
// captured_exception
//------------------------------------------------------------------------
inline char* duplicate_string ( const char* src ) {
char* dst = NULL;
if ( src ) {
size_t len = strlen(src) + 1;
dst = (char*)allocate_via_handler_v3(len);
strncpy (dst, src, len);
}
return dst;
}
captured_exception::~captured_exception () throw() {
clear();
}
void captured_exception::set ( const char* a_name, const char* info ) throw() {
my_exception_name = duplicate_string( a_name );
my_exception_info = duplicate_string( info );
}
void captured_exception::clear () throw() {
deallocate_via_handler_v3 (const_cast<char*>(my_exception_name));
deallocate_via_handler_v3 (const_cast<char*>(my_exception_info));
}
captured_exception* captured_exception::move () throw() {
captured_exception *e = (captured_exception*)allocate_via_handler_v3(sizeof(captured_exception));
if ( e ) {
::new (e) captured_exception();
e->my_exception_name = my_exception_name;
e->my_exception_info = my_exception_info;
e->my_dynamic = true;
my_exception_name = my_exception_info = NULL;
}
return e;
}
void captured_exception::destroy () throw() {
__TBB_ASSERT ( my_dynamic, "Method destroy can be used only on objects created by clone or allocate" );
if ( my_dynamic ) {
this->captured_exception::~captured_exception();
deallocate_via_handler_v3 (this);
}
}
captured_exception* captured_exception::allocate ( const char* a_name, const char* info ) {
captured_exception *e = (captured_exception*)allocate_via_handler_v3( sizeof(captured_exception) );
if ( e ) {
::new (e) captured_exception(a_name, info);
e->my_dynamic = true;
}
return e;
}
const char* captured_exception::name() const throw() {
return my_exception_name;
}
const char* captured_exception::what() const throw() {
return my_exception_info;
}
//------------------------------------------------------------------------
// tbb_exception_ptr
//------------------------------------------------------------------------
#if !TBB_USE_CAPTURED_EXCEPTION
namespace internal {
template<typename T>
tbb_exception_ptr* AllocateExceptionContainer( const T& src ) {
tbb_exception_ptr *eptr = (tbb_exception_ptr*)allocate_via_handler_v3( sizeof(tbb_exception_ptr) );
if ( eptr )
new (eptr) tbb_exception_ptr(src);
return eptr;
}
tbb_exception_ptr* tbb_exception_ptr::allocate () {
return AllocateExceptionContainer( std::current_exception() );
}
tbb_exception_ptr* tbb_exception_ptr::allocate ( const tbb_exception& ) {
return AllocateExceptionContainer( std::current_exception() );
}
tbb_exception_ptr* tbb_exception_ptr::allocate ( captured_exception& src ) {
tbb_exception_ptr *res = AllocateExceptionContainer( src );
src.destroy();
return res;
}
void tbb_exception_ptr::destroy () throw() {
this->tbb_exception_ptr::~tbb_exception_ptr();
deallocate_via_handler_v3 (this);
}
} // namespace internal
#endif /* !TBB_USE_CAPTURED_EXCEPTION */
//------------------------------------------------------------------------
// task_group_context
//------------------------------------------------------------------------
task_group_context::~task_group_context () {
if ( __TBB_load_relaxed(my_kind) == binding_completed ) {
if ( governor::is_set(my_owner) ) {
// Local update of the context list
uintptr_t local_count_snapshot = my_owner->my_context_state_propagation_epoch;
my_owner->my_local_ctx_list_update.store<relaxed>(1);
// Prevent load of nonlocal update flag from being hoisted before the
// store to local update flag.
atomic_fence();
if ( my_owner->my_nonlocal_ctx_list_update.load<relaxed>() ) {
spin_mutex::scoped_lock lock(my_owner->my_context_list_mutex);
my_node.my_prev->my_next = my_node.my_next;
my_node.my_next->my_prev = my_node.my_prev;
my_owner->my_local_ctx_list_update.store<relaxed>(0);
}
else {
my_node.my_prev->my_next = my_node.my_next;
my_node.my_next->my_prev = my_node.my_prev;
// Release fence is necessary so that update of our neighbors in
// the context list was committed when possible concurrent destroyer
// proceeds after local update flag is reset by the following store.
my_owner->my_local_ctx_list_update.store<release>(0);
if ( local_count_snapshot != the_context_state_propagation_epoch ) {
// Another thread was propagating cancellation request when we removed
// ourselves from the list. We must ensure that it is not accessing us
// when this destructor finishes. We'll be able to acquire the lock
// below only after the other thread finishes with us.
spin_mutex::scoped_lock lock(my_owner->my_context_list_mutex);
}
}
}
else {
// Nonlocal update of the context list
// Synchronizes with generic_scheduler::cleanup_local_context_list()
// TODO: evaluate and perhaps relax, or add some lock instead
if ( internal::as_atomic(my_kind).fetch_and_store(dying) == detached ) {
my_node.my_prev->my_next = my_node.my_next;
my_node.my_next->my_prev = my_node.my_prev;
}
else {
//TODO: evaluate and perhaps relax
my_owner->my_nonlocal_ctx_list_update.fetch_and_increment<full_fence>();
//TODO: evaluate and perhaps remove
spin_wait_until_eq( my_owner->my_local_ctx_list_update, 0u );
my_owner->my_context_list_mutex.lock();
my_node.my_prev->my_next = my_node.my_next;
my_node.my_next->my_prev = my_node.my_prev;
my_owner->my_context_list_mutex.unlock();
//TODO: evaluate and perhaps relax
my_owner->my_nonlocal_ctx_list_update.fetch_and_decrement<full_fence>();
}
}
}
#if __TBB_FP_CONTEXT
internal::punned_cast<cpu_ctl_env*>(&my_cpu_ctl_env)->~cpu_ctl_env();
#endif
poison_value(my_version_and_traits);
if ( my_exception )
my_exception->destroy();
ITT_STACK(itt_caller != ITT_CALLER_NULL, caller_destroy, itt_caller);
}
void task_group_context::init () {
#if DO_ITT_NOTIFY
// Check version of task group context to avoid reporting misleading identifier.
if( ( my_version_and_traits & version_mask ) < 3 )
my_name = internal::CUSTOM_CTX;
#endif
ITT_TASK_GROUP(this, my_name, NULL);
__TBB_STATIC_ASSERT ( sizeof(my_version_and_traits) >= 4, "Layout of my_version_and_traits must be reconsidered on this platform" );
__TBB_STATIC_ASSERT ( sizeof(task_group_context) == 2 * NFS_MaxLineSize, "Context class has wrong size - check padding and members alignment" );
__TBB_ASSERT ( (uintptr_t(this) & (sizeof(my_cancellation_requested) - 1)) == 0, "Context is improperly aligned" );
__TBB_ASSERT ( __TBB_load_relaxed(my_kind) == isolated || __TBB_load_relaxed(my_kind) == bound, "Context can be created only as isolated or bound" );
my_parent = NULL;
my_node.my_next = NULL;
my_node.my_prev = NULL;
my_cancellation_requested = 0;
my_exception = NULL;
my_owner = NULL;
my_state = 0;
itt_caller = ITT_CALLER_NULL;
#if __TBB_TASK_PRIORITY
my_priority = normalized_normal_priority;
#endif /* __TBB_TASK_PRIORITY */
#if __TBB_FP_CONTEXT
__TBB_STATIC_ASSERT( sizeof(my_cpu_ctl_env) == sizeof(internal::uint64_t), "The reserved space for FPU settings are not equal sizeof(uint64_t)" );
__TBB_STATIC_ASSERT( sizeof(cpu_ctl_env) <= sizeof(my_cpu_ctl_env), "FPU settings storage does not fit to uint64_t" );
suppress_unused_warning( my_cpu_ctl_env.space );
cpu_ctl_env &ctl = *internal::punned_cast<cpu_ctl_env*>(&my_cpu_ctl_env);
new ( &ctl ) cpu_ctl_env;
if ( my_version_and_traits & fp_settings )
ctl.get_env();
#endif
}
void task_group_context::register_with ( generic_scheduler *local_sched ) {
__TBB_ASSERT( local_sched, NULL );
my_owner = local_sched;
// state propagation logic assumes new contexts are bound to head of the list
my_node.my_prev = &local_sched->my_context_list_head;
// Notify threads that may be concurrently destroying contexts registered
// in this scheduler's list that local list update is underway.
local_sched->my_local_ctx_list_update.store<relaxed>(1);
// Prevent load of global propagation epoch counter from being hoisted before
// speculative stores above, as well as load of nonlocal update flag from
// being hoisted before the store to local update flag.
atomic_fence();
// Finalize local context list update
if ( local_sched->my_nonlocal_ctx_list_update.load<relaxed>() ) {
spin_mutex::scoped_lock lock(my_owner->my_context_list_mutex);
local_sched->my_context_list_head.my_next->my_prev = &my_node;
my_node.my_next = local_sched->my_context_list_head.my_next;
my_owner->my_local_ctx_list_update.store<relaxed>(0);
local_sched->my_context_list_head.my_next = &my_node;
}
else {
local_sched->my_context_list_head.my_next->my_prev = &my_node;
my_node.my_next = local_sched->my_context_list_head.my_next;
my_owner->my_local_ctx_list_update.store<release>(0);
// Thread-local list of contexts allows concurrent traversal by another thread
// while propagating state change. To ensure visibility of my_node's members
// to the concurrently traversing thread, the list's head is updated by means
// of store-with-release.
__TBB_store_with_release(local_sched->my_context_list_head.my_next, &my_node);
}
}
void task_group_context::bind_to ( generic_scheduler *local_sched ) {
__TBB_ASSERT ( __TBB_load_relaxed(my_kind) == binding_required, "Already bound or isolated?" );
__TBB_ASSERT ( !my_parent, "Parent is set before initial binding" );
my_parent = local_sched->my_innermost_running_task->prefix().context;
#if __TBB_FP_CONTEXT
// Inherit FPU settings only if the context has not captured FPU settings yet.
if ( !(my_version_and_traits & fp_settings) )
copy_fp_settings(*my_parent);
#endif
// Condition below prevents unnecessary thrashing parent context's cache line
if ( !(my_parent->my_state & may_have_children) )
my_parent->my_state |= may_have_children; // full fence is below
if ( my_parent->my_parent ) {
// Even if this context were made accessible for state change propagation
// (by placing __TBB_store_with_release(s->my_context_list_head.my_next, &my_node)
// above), it still could be missed if state propagation from a grand-ancestor
// was underway concurrently with binding.
// Speculative propagation from the parent together with epoch counters
// detecting possibility of such a race allow to avoid taking locks when
// there is no contention.
// Acquire fence is necessary to prevent reordering subsequent speculative
// loads of parent state data out of the scope where epoch counters comparison
// can reliably validate it.
uintptr_t local_count_snapshot = __TBB_load_with_acquire( my_parent->my_owner->my_context_state_propagation_epoch );
// Speculative propagation of parent's state. The speculation will be
// validated by the epoch counters check further on.
my_cancellation_requested = my_parent->my_cancellation_requested;
#if __TBB_TASK_PRIORITY
my_priority = my_parent->my_priority;
#endif /* __TBB_TASK_PRIORITY */
register_with( local_sched ); // Issues full fence
// If no state propagation was detected by the following condition, the above
// full fence guarantees that the parent had correct state during speculative
// propagation before the fence. Otherwise the propagation from parent is
// repeated under the lock.
if ( local_count_snapshot != the_context_state_propagation_epoch ) {
// Another thread may be propagating state change right now. So resort to lock.
context_state_propagation_mutex_type::scoped_lock lock(the_context_state_propagation_mutex);
my_cancellation_requested = my_parent->my_cancellation_requested;
#if __TBB_TASK_PRIORITY
my_priority = my_parent->my_priority;
#endif /* __TBB_TASK_PRIORITY */
}
}
else {
register_with( local_sched ); // Issues full fence
// As we do not have grand-ancestors, concurrent state propagation (if any)
// may originate only from the parent context, and thus it is safe to directly
// copy the state from it.
my_cancellation_requested = my_parent->my_cancellation_requested;
#if __TBB_TASK_PRIORITY
my_priority = my_parent->my_priority;
#endif /* __TBB_TASK_PRIORITY */
}
__TBB_store_relaxed(my_kind, binding_completed);
}
template <typename T>
void task_group_context::propagate_task_group_state ( T task_group_context::*mptr_state, task_group_context& src, T new_state ) {
if (this->*mptr_state == new_state) {
// Nothing to do, whether descending from "src" or not, so no need to scan.
// Hopefully this happens often thanks to earlier invocations.
// This optimization is enabled by LIFO order in the context lists:
// - new contexts are bound to the beginning of lists;
// - descendants are newer than ancestors;
// - earlier invocations are therefore likely to "paint" long chains.
}
else if (this == &src) {
// This clause is disjunct from the traversal below, which skips src entirely.
// Note that src.*mptr_state is not necessarily still equal to new_state (another thread may have changed it again).
// Such interference is probably not frequent enough to aim for optimisation by writing new_state again (to make the other thread back down).
// Letting the other thread prevail may also be fairer.
}
else {
for ( task_group_context *ancestor = my_parent; ancestor != NULL; ancestor = ancestor->my_parent ) {
__TBB_ASSERT(internal::is_alive(ancestor->my_version_and_traits), "context tree was corrupted");
if ( ancestor == &src ) {
for ( task_group_context *ctx = this; ctx != ancestor; ctx = ctx->my_parent )
ctx->*mptr_state = new_state;
break;
}
}
}
}
template <typename T>
void generic_scheduler::propagate_task_group_state ( T task_group_context::*mptr_state, task_group_context& src, T new_state ) {
spin_mutex::scoped_lock lock(my_context_list_mutex);
// Acquire fence is necessary to ensure that the subsequent node->my_next load
// returned the correct value in case it was just inserted in another thread.
// The fence also ensures visibility of the correct my_parent value.
context_list_node_t *node = __TBB_load_with_acquire(my_context_list_head.my_next);
while ( node != &my_context_list_head ) {
task_group_context &ctx = __TBB_get_object_ref(task_group_context, my_node, node);
if ( ctx.*mptr_state != new_state )
ctx.propagate_task_group_state( mptr_state, src, new_state );
node = node->my_next;
__TBB_ASSERT( is_alive(ctx.my_version_and_traits), "Local context list contains destroyed object" );
}
// Sync up local propagation epoch with the global one. Release fence prevents
// reordering of possible store to *mptr_state after the sync point.
__TBB_store_with_release(my_context_state_propagation_epoch, the_context_state_propagation_epoch);
}
template <typename T>
bool market::propagate_task_group_state ( T task_group_context::*mptr_state, task_group_context& src, T new_state ) {
if ( !(src.my_state & task_group_context::may_have_children) )
return true;
// The whole propagation algorithm is under the lock in order to ensure correctness
// in case of concurrent state changes at the different levels of the context tree.
// See comment at the bottom of scheduler.cpp
context_state_propagation_mutex_type::scoped_lock lock(the_context_state_propagation_mutex);
if ( src.*mptr_state != new_state )
// Another thread has concurrently changed the state. Back down.
return false;
// Advance global state propagation epoch
__TBB_FetchAndAddWrelease(&the_context_state_propagation_epoch, 1);
// Propagate to all workers and masters and sync up their local epochs with the global one
unsigned num_workers = my_first_unused_worker_idx;
for ( unsigned i = 0; i < num_workers; ++i ) {
generic_scheduler *s = my_workers[i];
// If the worker is only about to be registered, skip it.
if ( s )
s->propagate_task_group_state( mptr_state, src, new_state );
}
// Propagate to all master threads
// The whole propagation sequence is locked, thus no contention is expected
for( scheduler_list_type::iterator it = my_masters.begin(); it != my_masters.end(); it++ )
it->propagate_task_group_state( mptr_state, src, new_state );
return true;
}
bool task_group_context::cancel_group_execution () {
__TBB_ASSERT ( my_cancellation_requested == 0 || my_cancellation_requested == 1, "Invalid cancellation state");
if ( my_cancellation_requested || as_atomic(my_cancellation_requested).compare_and_swap(1, 0) ) {
// This task group and any descendants have already been canceled.
// (A newly added descendant would inherit its parent's my_cancellation_requested,
// not missing out on any cancellation still being propagated, and a context cannot be uncanceled.)
return false;
}
governor::local_scheduler_weak()->my_market->propagate_task_group_state( &task_group_context::my_cancellation_requested, *this, (uintptr_t)1 );
return true;
}
bool task_group_context::is_group_execution_cancelled () const {
return my_cancellation_requested != 0;
}
// IMPORTANT: It is assumed that this method is not used concurrently!
void task_group_context::reset () {
// No fences are necessary since this context can be accessed from another thread
// only after stealing happened (which means necessary fences were used).
if ( my_exception ) {
my_exception->destroy();
my_exception = NULL;
}
my_cancellation_requested = 0;
}
#if __TBB_FP_CONTEXT
// IMPORTANT: It is assumed that this method is not used concurrently!
void task_group_context::capture_fp_settings () {
// No fences are necessary since this context can be accessed from another thread
// only after stealing happened (which means necessary fences were used).
cpu_ctl_env &ctl = *internal::punned_cast<cpu_ctl_env*>(&my_cpu_ctl_env);
if ( !(my_version_and_traits & fp_settings) ) {
new ( &ctl ) cpu_ctl_env;
my_version_and_traits |= fp_settings;
}
ctl.get_env();
}
void task_group_context::copy_fp_settings( const task_group_context &src ) {
__TBB_ASSERT( !(my_version_and_traits & fp_settings), "The context already has FPU settings." );
__TBB_ASSERT( src.my_version_and_traits & fp_settings, "The source context does not have FPU settings." );
cpu_ctl_env &ctl = *internal::punned_cast<cpu_ctl_env*>(&my_cpu_ctl_env);
cpu_ctl_env &src_ctl = *internal::punned_cast<cpu_ctl_env*>(&src.my_cpu_ctl_env);
new (&ctl) cpu_ctl_env( src_ctl );
my_version_and_traits |= fp_settings;
}
#endif /* __TBB_FP_CONTEXT */
void task_group_context::register_pending_exception () {
if ( my_cancellation_requested )
return;
#if TBB_USE_EXCEPTIONS
try {
throw;
} TbbCatchAll( this );
#endif /* TBB_USE_EXCEPTIONS */
}
#if __TBB_TASK_PRIORITY
void task_group_context::set_priority ( priority_t prio ) {
__TBB_ASSERT( prio == priority_low || prio == priority_normal || prio == priority_high, "Invalid priority level value" );
intptr_t p = normalize_priority(prio);
if ( my_priority == p && !(my_state & task_group_context::may_have_children))
return;
my_priority = p;
internal::generic_scheduler* s = governor::local_scheduler_if_initialized();
if ( !s || !s->my_arena || !s->my_market->propagate_task_group_state(&task_group_context::my_priority, *this, p) )
return;
// need to find out the right arena for priority update.
// The executing status check only guarantees being inside some working arena.
if ( s->my_innermost_running_task->state() == task::executing )
// Updating arena priority here does not eliminate necessity of checking each
// task priority and updating arena priority if necessary before the task execution.
// These checks will be necessary because:
// a) set_priority() may be invoked before any tasks from this task group are spawned;
// b) all spawned tasks from this task group are retrieved from the task pools.
// These cases create a time window when arena priority may be lowered.
s->my_market->update_arena_priority( *s->my_arena, p );
}
priority_t task_group_context::priority () const {
return static_cast<priority_t>(priority_from_normalized_rep[my_priority]);
}
#endif /* __TBB_TASK_PRIORITY */
#endif /* __TBB_TASK_GROUP_CONTEXT */
} // namespace tbb
tbb::internal::__TBB_load_with_acquire
T __TBB_load_with_acquire(const volatile T &location)
Definition: tbb_machine.h:712
tbb::internal::deallocate_via_handler_v3
void __TBB_EXPORTED_FUNC deallocate_via_handler_v3(void *p)
Deallocates memory using FreeHandler.
Definition: cache_aligned_allocator.cpp:232
internal
Definition: _flow_graph_async_msg_impl.h:24
tbb::relaxed
No ordering.
Definition: atomic.h:61
tbb::task_group_context::copy_fp_settings
void copy_fp_settings(const task_group_context &src)
Copies FPU control setting from another context.
__TBB_ASSERT
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
tbb::task_group_context::priority
__TBB_DEPRECATED priority_t priority() const
Retrieves current priority of the current task group.
tbb::internal::market::my_first_unused_worker_idx
atomic< unsigned > my_first_unused_worker_idx
First unused index of worker.
Definition: market.h:86
tbb
The graph class.
Definition: serial/tbb/parallel_for.h:46
tbb::task_group_context::my_cancellation_requested
uintptr_t my_cancellation_requested
Specifies whether cancellation was requested for this task group.
Definition: task.h:429
tbb::priority_normal
Definition: task.h:307
tbb::internal::tbb_exception_ptr::allocate
static tbb_exception_ptr * allocate()
tbb::task_group_context::cancel_group_execution
bool __TBB_EXPORTED_METHOD cancel_group_execution()
Initiates cancellation of all tasks in this cancellation group and its subordinate groups.
tbb::captured_exception::allocate
static captured_exception * allocate(const char *name, const char *info)
Functionally equivalent to {captured_exception e(name,info); return e.move();}.
tbb::task_group_context::~task_group_context
__TBB_EXPORTED_METHOD ~task_group_context()
tbb::captured_exception::destroy
void __TBB_EXPORTED_METHOD destroy() __TBB_override
Destroys objects created by the move() method.
tbb::internal::governor::local_scheduler_if_initialized
static generic_scheduler * local_scheduler_if_initialized()
Definition: governor.h:139
tbb::spin_mutex::scoped_lock
friend class scoped_lock
Definition: spin_mutex.h:179
tbb::task_group_context::propagate_task_group_state
void propagate_task_group_state(T task_group_context::*mptr_state, task_group_context &src, T new_state)
Propagates any state change detected to *this, and as an optimisation possibly also upward along the ...
itt_notify.h
scheduler.h
tbb::full_fence
Sequential consistency.
Definition: atomic.h:55
tbb::task::executing
task is running, and will be destroyed after method execute() completes.
Definition: task.h:626
tbb::captured_exception::what
const char *__TBB_EXPORTED_METHOD what() const __TBB_override
Returns the result of originally intercepted exception's what() method.
tbb::captured_exception::name
const char *__TBB_EXPORTED_METHOD name() const __TBB_override
Returns RTTI name of the originally intercepted exception.
tbb::priority_t
priority_t
Definition: task.h:306
tbb::task_group_context::bind_to
void bind_to(internal::generic_scheduler *local_sched)
Registers this context with the local scheduler and binds it to its parent context.
tbb::internal::__TBB_store_relaxed
void __TBB_store_relaxed(volatile T &location, V value)
Definition: tbb_machine.h:742
tbb::task_group_context::reset
void __TBB_EXPORTED_METHOD reset()
Forcefully reinitializes the context after the task tree it was associated with is completed.
__TBB_STATIC_ASSERT
#define __TBB_STATIC_ASSERT(condition, msg)
Definition: tbb_stddef.h:553
tbb::task_group_context::register_pending_exception
void __TBB_EXPORTED_METHOD register_pending_exception()
Records the pending exception, and cancels the task group.
tbb::internal::__TBB_store_with_release
void __TBB_store_with_release(volatile T &location, V value)
Definition: tbb_machine.h:716
ITT_CALLER_NULL
#define ITT_CALLER_NULL
Definition: itt_notify.h:45
ITT_TASK_GROUP
#define ITT_TASK_GROUP(type, name, parent)
Definition: itt_notify.h:120
lock
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 * lock
Definition: ittnotify_static.h:121
tbb::task_group_context::is_group_execution_cancelled
bool __TBB_EXPORTED_METHOD is_group_execution_cancelled() const
Returns true if the context received cancellation request.
tbb::internal::NFS_MaxLineSize
const size_t NFS_MaxLineSize
Compile-time constant that is upper bound on cache line/sector size.
Definition: tbb_stddef.h:216
tbb::priority_low
Definition: task.h:308
tbb::task_group_context::capture_fp_settings
void __TBB_EXPORTED_METHOD capture_fp_settings()
Captures the current FPU control settings to the context.
tbb::internal::allocate_via_handler_v3
void *__TBB_EXPORTED_FUNC allocate_via_handler_v3(size_t n)
Allocates memory using MallocHandler.
Definition: cache_aligned_allocator.cpp:224
s
void const char const char int ITT_FORMAT __itt_group_sync s
Definition: ittnotify_static.h:91
tbb::internal::market::generic_scheduler
friend class generic_scheduler
Definition: market.h:46
tbb::internal::suppress_unused_warning
void suppress_unused_warning(const T1 &)
Utility template function to prevent "unused" warnings by various compilers.
Definition: tbb_stddef.h:398
__TBB_get_object_ref
#define __TBB_get_object_ref(class_name, member_name, member_addr)
Returns address of the object containing a member with the given name and address.
Definition: tbb_stddef.h:270
ITT_STACK
#define ITT_STACK(precond, name, obj)
Definition: itt_notify.h:118
tbb::internal::governor::is_set
static bool is_set(generic_scheduler *s)
Used to check validity of the local scheduler TLS contents.
Definition: governor.cpp:120
tbb::task_group_context::init
void __TBB_EXPORTED_METHOD init()
Out-of-line part of the constructor.
poison_value
#define poison_value(g)
Definition: scheduler_common.h:235
tbb::internal::as_atomic
atomic< T > & as_atomic(T &t)
Definition: atomic.h:572
tbb::priority_high
Definition: task.h:309
tbb::internal::governor::local_scheduler_weak
static generic_scheduler * local_scheduler_weak()
Definition: governor.h:134
tbb::captured_exception::set
void __TBB_EXPORTED_METHOD set(const char *name, const char *info)
tbb::captured_exception::~captured_exception
__TBB_EXPORTED_METHOD ~captured_exception()
tbb::internal::generic_scheduler::my_market
market * my_market
The market I am in.
Definition: scheduler.h:172
tbb::atomic_fence
void atomic_fence()
Sequentially consistent full memory fence.
Definition: tbb_machine.h:342
p
void const char const char int ITT_FORMAT __itt_group_sync p
Definition: ittnotify_static.h:91
tbb::internal::spin_wait_until_eq
void spin_wait_until_eq(const volatile T &location, const U value)
Spin UNTIL the value of the variable is equal to a given value.
Definition: tbb_machine.h:402
__TBB_FetchAndAddWrelease
#define __TBB_FetchAndAddWrelease(P, V)
Definition: tbb_machine.h:312
tbb::release
Release.
Definition: atomic.h:59
tbb::internal::tbb_exception_ptr::destroy
void destroy()
Destroys this objects.
tbb::task_group_context::set_priority
__TBB_DEPRECATED void set_priority(priority_t)
Changes priority of the task group.
tbb::task_group_context::register_with
void register_with(internal::generic_scheduler *local_sched)
Registers this context with the local scheduler.
tbb::captured_exception::move
captured_exception *__TBB_EXPORTED_METHOD move() __TBB_override
Creates and returns pointer to the deep copy of this exception object.
tbb::task_group_context::may_have_children
Definition: task.h:386
tbb::task_group_context::my_priority
intptr_t my_priority
Priority level of the task group (in normalized representation)
Definition: task.h:448
tbb::internal::__TBB_load_relaxed
T __TBB_load_relaxed(const volatile T &location)
Definition: tbb_machine.h:738
tbb::captured_exception::clear
void __TBB_EXPORTED_METHOD clear()

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.