tbb/parallel_for.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_parallel_for_H
#define __TBB_parallel_for_H
#define __TBB_parallel_for_H_include_area
#include "internal/_warning_suppress_enable_notice.h"
#include <new>
#include "task.h"
#include "partitioner.h"
#include "blocked_range.h"
#include "tbb_exception.h"
#include "internal/_tbb_trace_impl.h"
namespace tbb {
namespace interface9 {
namespace internal {
void* allocate_sibling(task* start_for_task, size_t bytes);
template<typename Range, typename Body, typename Partitioner>
class start_for: public task {
Range my_range;
const Body my_body;
typename Partitioner::task_partition_type my_partition;
task* execute() __TBB_override;
void note_affinity( affinity_id id ) __TBB_override {
my_partition.note_affinity( id );
}
public:
start_for( const Range& range, const Body& body, Partitioner& partitioner ) :
my_range(range),
my_body(body),
my_partition(partitioner)
{
tbb::internal::fgt_algorithm(tbb::internal::PARALLEL_FOR_TASK, this, NULL);
}
start_for( start_for& parent_, typename Partitioner::split_type& split_obj) :
my_range(parent_.my_range, split_obj),
my_body(parent_.my_body),
my_partition(parent_.my_partition, split_obj)
{
my_partition.set_affinity(*this);
tbb::internal::fgt_algorithm(tbb::internal::PARALLEL_FOR_TASK, this, (void *)&parent_);
}
start_for( start_for& parent_, const Range& r, depth_t d ) :
my_range(r),
my_body(parent_.my_body),
my_partition(parent_.my_partition, split())
{
my_partition.set_affinity(*this);
my_partition.align_depth( d );
tbb::internal::fgt_algorithm(tbb::internal::PARALLEL_FOR_TASK, this, (void *)&parent_);
}
static void run( const Range& range, const Body& body, Partitioner& partitioner ) {
if( !range.empty() ) {
#if !__TBB_TASK_GROUP_CONTEXT || TBB_JOIN_OUTER_TASK_GROUP
start_for& a = *new(task::allocate_root()) start_for(range,body,partitioner);
#else
// Bound context prevents exceptions from body to affect nesting or sibling algorithms,
// and allows users to handle exceptions safely by wrapping parallel_for in the try-block.
task_group_context context(PARALLEL_FOR);
start_for& a = *new(task::allocate_root(context)) start_for(range,body,partitioner);
#endif /* __TBB_TASK_GROUP_CONTEXT && !TBB_JOIN_OUTER_TASK_GROUP */
// REGION BEGIN
fgt_begin_algorithm( tbb::internal::PARALLEL_FOR_TASK, (void*)&context );
task::spawn_root_and_wait(a);
fgt_end_algorithm( (void*)&context );
// REGION END
}
}
#if __TBB_TASK_GROUP_CONTEXT
static void run( const Range& range, const Body& body, Partitioner& partitioner, task_group_context& context ) {
if( !range.empty() ) {
start_for& a = *new(task::allocate_root(context)) start_for(range,body,partitioner);
// REGION BEGIN
fgt_begin_algorithm( tbb::internal::PARALLEL_FOR_TASK, (void*)&context );
task::spawn_root_and_wait(a);
fgt_end_algorithm( (void*)&context );
// END REGION
}
}
#endif /* __TBB_TASK_GROUP_CONTEXT */
void run_body( Range &r ) {
fgt_alg_begin_body( tbb::internal::PARALLEL_FOR_TASK, (void *)const_cast<Body*>(&(this->my_body)), (void*)this );
my_body( r );
fgt_alg_end_body( (void *)const_cast<Body*>(&(this->my_body)) );
}
void offer_work(typename Partitioner::split_type& split_obj) {
spawn( *new( allocate_sibling(static_cast<task*>(this), sizeof(start_for)) ) start_for(*this, split_obj) );
}
void offer_work(const Range& r, depth_t d = 0) {
spawn( *new( allocate_sibling(static_cast<task*>(this), sizeof(start_for)) ) start_for(*this, r, d) );
}
};
// TODO: 'inline' here is to avoid multiple definition error but for sake of code size this should not be inlined
inline void* allocate_sibling(task* start_for_task, size_t bytes) {
task* parent_ptr = new( start_for_task->allocate_continuation() ) flag_task();
start_for_task->set_parent(parent_ptr);
parent_ptr->set_ref_count(2);
return &parent_ptr->allocate_child().allocate(bytes);
}
template<typename Range, typename Body, typename Partitioner>
task* start_for<Range,Body,Partitioner>::execute() {
my_partition.check_being_stolen( *this );
my_partition.execute(*this, my_range);
return NULL;
}
} // namespace internal
} // namespace interfaceX
namespace internal {
using interface9::internal::start_for;
template<typename Function, typename Index>
class parallel_for_body : internal::no_assign {
const Function &my_func;
const Index my_begin;
const Index my_step;
public:
parallel_for_body( const Function& _func, Index& _begin, Index& _step )
: my_func(_func), my_begin(_begin), my_step(_step) {}
void operator()( const tbb::blocked_range<Index>& r ) const {
// A set of local variables to help the compiler with vectorization of the following loop.
Index b = r.begin();
Index e = r.end();
Index ms = my_step;
Index k = my_begin + b*ms;
#if __INTEL_COMPILER
#pragma ivdep
#if __TBB_ASSERT_ON_VECTORIZATION_FAILURE
#pragma vector always assert
#endif
#endif
for ( Index i = b; i < e; ++i, k += ms ) {
my_func( k );
}
}
};
} // namespace internal
// Requirements on Range concept are documented in blocked_range.h
template<typename Range, typename Body>
void parallel_for( const Range& range, const Body& body ) {
internal::start_for<Range,Body,const __TBB_DEFAULT_PARTITIONER>::run(range,body,__TBB_DEFAULT_PARTITIONER());
}
template<typename Range, typename Body>
void parallel_for( const Range& range, const Body& body, const simple_partitioner& partitioner ) {
internal::start_for<Range,Body,const simple_partitioner>::run(range,body,partitioner);
}
template<typename Range, typename Body>
void parallel_for( const Range& range, const Body& body, const auto_partitioner& partitioner ) {
internal::start_for<Range,Body,const auto_partitioner>::run(range,body,partitioner);
}
template<typename Range, typename Body>
void parallel_for( const Range& range, const Body& body, const static_partitioner& partitioner ) {
internal::start_for<Range,Body,const static_partitioner>::run(range,body,partitioner);
}
template<typename Range, typename Body>
void parallel_for( const Range& range, const Body& body, affinity_partitioner& partitioner ) {
internal::start_for<Range,Body,affinity_partitioner>::run(range,body,partitioner);
}
#if __TBB_TASK_GROUP_CONTEXT
template<typename Range, typename Body>
void parallel_for( const Range& range, const Body& body, task_group_context& context ) {
internal::start_for<Range,Body,const __TBB_DEFAULT_PARTITIONER>::run(range, body, __TBB_DEFAULT_PARTITIONER(), context);
}
template<typename Range, typename Body>
void parallel_for( const Range& range, const Body& body, const simple_partitioner& partitioner, task_group_context& context ) {
internal::start_for<Range,Body,const simple_partitioner>::run(range, body, partitioner, context);
}
template<typename Range, typename Body>
void parallel_for( const Range& range, const Body& body, const auto_partitioner& partitioner, task_group_context& context ) {
internal::start_for<Range,Body,const auto_partitioner>::run(range, body, partitioner, context);
}
template<typename Range, typename Body>
void parallel_for( const Range& range, const Body& body, const static_partitioner& partitioner, task_group_context& context ) {
internal::start_for<Range,Body,const static_partitioner>::run(range, body, partitioner, context);
}
template<typename Range, typename Body>
void parallel_for( const Range& range, const Body& body, affinity_partitioner& partitioner, task_group_context& context ) {
internal::start_for<Range,Body,affinity_partitioner>::run(range,body,partitioner, context);
}
#endif /* __TBB_TASK_GROUP_CONTEXT */
namespace strict_ppl {
template <typename Index, typename Function, typename Partitioner>
void parallel_for_impl(Index first, Index last, Index step, const Function& f, Partitioner& partitioner) {
if (step <= 0 )
internal::throw_exception(internal::eid_nonpositive_step); // throws std::invalid_argument
else if (last > first) {
// Above "else" avoids "potential divide by zero" warning on some platforms
Index end = (last - first - Index(1)) / step + Index(1);
tbb::blocked_range<Index> range(static_cast<Index>(0), end);
internal::parallel_for_body<Function, Index> body(f, first, step);
tbb::parallel_for(range, body, partitioner);
}
}
template <typename Index, typename Function>
void parallel_for(Index first, Index last, Index step, const Function& f) {
parallel_for_impl<Index,Function,const auto_partitioner>(first, last, step, f, auto_partitioner());
}
template <typename Index, typename Function>
void parallel_for(Index first, Index last, Index step, const Function& f, const simple_partitioner& partitioner) {
parallel_for_impl<Index,Function,const simple_partitioner>(first, last, step, f, partitioner);
}
template <typename Index, typename Function>
void parallel_for(Index first, Index last, Index step, const Function& f, const auto_partitioner& partitioner) {
parallel_for_impl<Index,Function,const auto_partitioner>(first, last, step, f, partitioner);
}
template <typename Index, typename Function>
void parallel_for(Index first, Index last, Index step, const Function& f, const static_partitioner& partitioner) {
parallel_for_impl<Index,Function,const static_partitioner>(first, last, step, f, partitioner);
}
template <typename Index, typename Function>
void parallel_for(Index first, Index last, Index step, const Function& f, affinity_partitioner& partitioner) {
parallel_for_impl(first, last, step, f, partitioner);
}
template <typename Index, typename Function>
void parallel_for(Index first, Index last, const Function& f) {
parallel_for_impl<Index,Function,const auto_partitioner>(first, last, static_cast<Index>(1), f, auto_partitioner());
}
template <typename Index, typename Function>
void parallel_for(Index first, Index last, const Function& f, const simple_partitioner& partitioner) {
parallel_for_impl<Index,Function,const simple_partitioner>(first, last, static_cast<Index>(1), f, partitioner);
}
template <typename Index, typename Function>
void parallel_for(Index first, Index last, const Function& f, const auto_partitioner& partitioner) {
parallel_for_impl<Index,Function,const auto_partitioner>(first, last, static_cast<Index>(1), f, partitioner);
}
template <typename Index, typename Function>
void parallel_for(Index first, Index last, const Function& f, const static_partitioner& partitioner) {
parallel_for_impl<Index,Function,const static_partitioner>(first, last, static_cast<Index>(1), f, partitioner);
}
template <typename Index, typename Function>
void parallel_for(Index first, Index last, const Function& f, affinity_partitioner& partitioner) {
parallel_for_impl(first, last, static_cast<Index>(1), f, partitioner);
}
#if __TBB_TASK_GROUP_CONTEXT
template <typename Index, typename Function, typename Partitioner>
void parallel_for_impl(Index first, Index last, Index step, const Function& f, Partitioner& partitioner, tbb::task_group_context &context) {
if (step <= 0 )
internal::throw_exception(internal::eid_nonpositive_step); // throws std::invalid_argument
else if (last > first) {
// Above "else" avoids "potential divide by zero" warning on some platforms
Index end = (last - first - Index(1)) / step + Index(1);
tbb::blocked_range<Index> range(static_cast<Index>(0), end);
internal::parallel_for_body<Function, Index> body(f, first, step);
tbb::parallel_for(range, body, partitioner, context);
}
}
template <typename Index, typename Function>
void parallel_for(Index first, Index last, Index step, const Function& f, tbb::task_group_context &context) {
parallel_for_impl<Index,Function,const auto_partitioner>(first, last, step, f, auto_partitioner(), context);
}
template <typename Index, typename Function>
void parallel_for(Index first, Index last, Index step, const Function& f, const simple_partitioner& partitioner, tbb::task_group_context &context) {
parallel_for_impl<Index,Function,const simple_partitioner>(first, last, step, f, partitioner, context);
}
template <typename Index, typename Function>
void parallel_for(Index first, Index last, Index step, const Function& f, const auto_partitioner& partitioner, tbb::task_group_context &context) {
parallel_for_impl<Index,Function,const auto_partitioner>(first, last, step, f, partitioner, context);
}
template <typename Index, typename Function>
void parallel_for(Index first, Index last, Index step, const Function& f, const static_partitioner& partitioner, tbb::task_group_context &context) {
parallel_for_impl<Index,Function,const static_partitioner>(first, last, step, f, partitioner, context);
}
template <typename Index, typename Function>
void parallel_for(Index first, Index last, Index step, const Function& f, affinity_partitioner& partitioner, tbb::task_group_context &context) {
parallel_for_impl(first, last, step, f, partitioner, context);
}
template <typename Index, typename Function>
void parallel_for(Index first, Index last, const Function& f, tbb::task_group_context &context) {
parallel_for_impl<Index,Function,const auto_partitioner>(first, last, static_cast<Index>(1), f, auto_partitioner(), context);
}
template <typename Index, typename Function>
void parallel_for(Index first, Index last, const Function& f, const simple_partitioner& partitioner, tbb::task_group_context &context) {
parallel_for_impl<Index,Function,const simple_partitioner>(first, last, static_cast<Index>(1), f, partitioner, context);
}
template <typename Index, typename Function>
void parallel_for(Index first, Index last, const Function& f, const auto_partitioner& partitioner, tbb::task_group_context &context) {
parallel_for_impl<Index,Function,const auto_partitioner>(first, last, static_cast<Index>(1), f, partitioner, context);
}
template <typename Index, typename Function>
void parallel_for(Index first, Index last, const Function& f, const static_partitioner& partitioner, tbb::task_group_context &context) {
parallel_for_impl<Index,Function,const static_partitioner>(first, last, static_cast<Index>(1), f, partitioner, context);
}
template <typename Index, typename Function>
void parallel_for(Index first, Index last, const Function& f, affinity_partitioner& partitioner, tbb::task_group_context &context) {
parallel_for_impl(first, last, static_cast<Index>(1), f, partitioner, context);
}
#endif /* __TBB_TASK_GROUP_CONTEXT */
} // namespace strict_ppl
using strict_ppl::parallel_for;
} // namespace tbb
#if TBB_PREVIEW_SERIAL_SUBSET
#define __TBB_NORMAL_EXECUTION
#include "../serial/tbb/parallel_for.h"
#undef __TBB_NORMAL_EXECUTION
#endif
#include "internal/_warning_suppress_disable_notice.h"
#undef __TBB_parallel_for_H_include_area
#endif /* __TBB_parallel_for_H */
blocked_range.h
_tbb_trace_impl.h
_warning_suppress_disable_notice.h
_warning_suppress_enable_notice.h
partitioner.h
task.h
__TBB_DEFAULT_PARTITIONER
#define __TBB_DEFAULT_PARTITIONER
Definition: tbb_config.h:597
tbb_exception.h
__TBB_override
#define __TBB_override
Definition: tbb_stddef.h:240
end
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 end
Definition: ittnotify_static.h:182
task
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 * task
Definition: ittnotify_static.h:119
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
tbb::parallel_for
void parallel_for(const Range &range, const Body &body)
Parallel iteration over range with default partitioner.
Definition: tbb/parallel_for.h:200
tbb
The graph class.
Definition: serial/tbb/parallel_for.h:46
tbb::internal::fgt_algorithm
static void fgt_algorithm(string_index, void *, void *)
Definition: _tbb_trace_impl.h:44
tbb::internal::fgt_begin_algorithm
static void fgt_begin_algorithm(string_index, void *)
Definition: _tbb_trace_impl.h:45
tbb::internal::throw_exception
void throw_exception(exception_id eid)
Versionless convenience wrapper for throw_exception_v4()
Definition: tbb_exception.h:105
tbb::internal::fgt_end_algorithm
static void fgt_end_algorithm(void *)
Definition: _tbb_trace_impl.h:46
tbb::internal::fgt_alg_begin_body
static void fgt_alg_begin_body(string_index, void *, void *)
Definition: _tbb_trace_impl.h:47
tbb::internal::last
auto last(Container &c) -> decltype(begin(c))
Definition: _range_iterator.h:40
tbb::internal::eid_nonpositive_step
@ eid_nonpositive_step
Definition: tbb_exception.h:70
tbb::internal::first
auto first(Container &c) -> decltype(begin(c))
Definition: _range_iterator.h:34
tbb::internal::fgt_alg_end_body
static void fgt_alg_end_body(void *)
Definition: _tbb_trace_impl.h:48
tbb::strict_ppl::parallel_for
void parallel_for(Index first, Index last, Index step, const Function &f)
Parallel iteration over a range of integers with a step provided and default partitioner.
Definition: tbb/parallel_for.h:289
tbb::strict_ppl::parallel_for_impl
void parallel_for_impl(Index first, Index last, Index step, const Function &f, Partitioner &partitioner)
Implementation of parallel iteration over stepped range of integers with explicit step and partitione...
Definition: tbb/parallel_for.h:275
internal
Definition: _flow_graph_async_msg_impl.h:24
tbb::interface9::internal::depth_t
unsigned char depth_t
Definition: partitioner.h:150
tbb::interface9::internal::allocate_sibling
void * allocate_sibling(task *start_for_task, size_t bytes)
allocate right task with new parent
Definition: tbb/parallel_for.h:131
tbb::blocked_range
A range over which to iterate.
Definition: blocked_range.h:45
tbb::blocked_range::begin
const_iterator begin() const
Beginning of range.
Definition: blocked_range.h:69
tbb::blocked_range::end
const_iterator end() const
One past last value in range.
Definition: blocked_range.h:72
tbb::interface9::internal::start_for
Task type used in parallel_for.
Definition: tbb/parallel_for.h:42
tbb::interface9::internal::start_for::my_body
const Body my_body
Definition: tbb/parallel_for.h:44
tbb::interface9::internal::start_for::note_affinity
void note_affinity(affinity_id id) __TBB_override
Update affinity info, if any.
Definition: tbb/parallel_for.h:49
tbb::interface9::internal::start_for::offer_work
void offer_work(typename Partitioner::split_type &split_obj)
spawn right task, serves as callback for partitioner
Definition: tbb/parallel_for.h:120
tbb::interface9::internal::start_for::start_for
start_for(start_for &parent_, typename Partitioner::split_type &split_obj)
Splitting constructor used to generate children.
Definition: tbb/parallel_for.h:64
tbb::interface9::internal::start_for::my_range
Range my_range
Definition: tbb/parallel_for.h:43
tbb::interface9::internal::start_for::my_partition
Partitioner::task_partition_type my_partition
Definition: tbb/parallel_for.h:45
tbb::interface9::internal::start_for::run
static void run(const Range &range, const Body &body, Partitioner &partitioner, task_group_context &context)
Definition: tbb/parallel_for.h:101
tbb::interface9::internal::start_for::start_for
start_for(start_for &parent_, const Range &r, depth_t d)
Construct right child from the given range as response to the demand.
Definition: tbb/parallel_for.h:74
tbb::interface9::internal::start_for::run
static void run(const Range &range, const Body &body, Partitioner &partitioner)
Definition: tbb/parallel_for.h:83
tbb::interface9::internal::start_for::execute
task * execute() __TBB_override
execute task for parallel_for
Definition: tbb/parallel_for.h:140
tbb::interface9::internal::start_for::run_body
void run_body(Range &r)
Run body for range, serves as callback for partitioner.
Definition: tbb/parallel_for.h:113
tbb::interface9::internal::start_for::offer_work
void offer_work(const Range &r, depth_t d=0)
spawn right task, serves as callback for partitioner
Definition: tbb/parallel_for.h:124
tbb::interface9::internal::start_for::start_for
start_for(const Range &range, const Body &body, Partitioner &partitioner)
Constructor for root task.
Definition: tbb/parallel_for.h:55
tbb::internal::parallel_for_body
Calls the function with values from range [begin, end) with a step provided.
Definition: tbb/parallel_for.h:155
tbb::internal::parallel_for_body::my_step
const Index my_step
Definition: tbb/parallel_for.h:158
tbb::internal::parallel_for_body::my_begin
const Index my_begin
Definition: tbb/parallel_for.h:157
tbb::internal::parallel_for_body::operator()
void operator()(const tbb::blocked_range< Index > &r) const
Definition: tbb/parallel_for.h:163
tbb::internal::parallel_for_body::parallel_for_body
parallel_for_body(const Function &_func, Index &_begin, Index &_step)
Definition: tbb/parallel_for.h:160
tbb::internal::parallel_for_body::my_func
const Function & my_func
Definition: tbb/parallel_for.h:156
tbb::interface9::internal::flag_task
Join task node that contains shared flag for stealing feedback.
Definition: partitioner.h:128
tbb::simple_partitioner
A simple partitioner.
Definition: partitioner.h:586
tbb::auto_partitioner
An auto partitioner.
Definition: partitioner.h:613
tbb::static_partitioner
A static partitioner.
Definition: partitioner.h:632
tbb::affinity_partitioner
An affinity partitioner.
Definition: partitioner.h:651
tbb::internal::allocate_child_proxy::allocate
task &__TBB_EXPORTED_METHOD allocate(size_t size) const
Definition: task.cpp:114
tbb::task_group_context
Used to form groups of tasks.
Definition: task.h:358
tbb::task
Base class for user-defined tasks.
Definition: task.h:615
tbb::task::execute
virtual task * execute()=0
Should be overridden by derived classes.
tbb::task::allocate_continuation
internal::allocate_continuation_proxy & allocate_continuation()
Returns proxy for overloaded new that allocates a continuation task of *this.
Definition: task.h:676
tbb::task::set_parent
void set_parent(task *p)
sets parent task pointer to specified value
Definition: task.h:868
tbb::task::allocate_child
internal::allocate_child_proxy & allocate_child()
Returns proxy for overloaded new that allocates a child task of *this.
Definition: task.h:681
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::task::set_ref_count
void set_ref_count(int count)
Set reference count.
Definition: task.h:761
tbb::task::context
task_group_context * context()
This method is deprecated and will be removed in the future.
Definition: task.h:878
tbb::task::affinity_id
internal::affinity_id affinity_id
An id as used for specifying affinity.
Definition: task.h:940
tbb::task::spawn_root_and_wait
static void spawn_root_and_wait(task &root)
Spawn task allocated by allocate_root, wait for it to complete, and deallocate it.
Definition: task.h:808
tbb::internal::no_assign
Base class for types that should not be assigned.
Definition: tbb_stddef.h:322
tbb::split
Dummy type that distinguishes splitting constructor from copy constructor.
Definition: tbb_stddef.h:416

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.