void task::change_group ( task_group_context& ctx ) { prefix().context = &ctx; if ( ctx.my_kind == task_group_context::binding_required ) { internal::generic_scheduler* s = governor::local_scheduler(); // If we are in the outermost task dispatch loop of a master thread, then // there is nothing to bind this context to, and we skip the binding part // treating the context as isolated. if ( s->my_innermost_running_task == s->my_dummy_task ) ctx.my_kind = task_group_context::isolated; else ctx.bind_to( s ); } ITT_STACK_CREATE(ctx.itt_caller); }
void task::change_group ( task_group_context& ctx ) { prefix().context = &ctx; internal::generic_scheduler* s = governor::local_scheduler(); if ( __TBB_load_relaxed(ctx.my_kind) == task_group_context::binding_required ) { // If we are in the outermost task dispatch loop of a master thread, then // there is nothing to bind this context to, and we skip the binding part // treating the context as isolated. if ( s->master_outermost_level() ) __TBB_store_relaxed(ctx.my_kind, task_group_context::isolated); else ctx.bind_to( s ); } #if __TBB_FP_CONTEXT if ( __TBB_load_relaxed(ctx.my_kind) == task_group_context::isolated && !(ctx.my_version_and_traits & task_group_context::fp_settings) ) ctx.copy_fp_settings( *s->my_arena->my_default_ctx ); #endif ITT_STACK_CREATE(ctx.itt_caller); }