tbb::serial::interface9::start_for< Range, Body, Partitioner > Class Template Reference

`#include <parallel_for.h>`

Inheritance diagram for tbb::serial::interface9::start_for< Range, Body, Partitioner >:
Collaboration diagram for tbb::serial::interface9::start_for< Range, Body, Partitioner >:

## Static Public Member Functions

static void | run (const Range &range, const Body &body, Partitioner &partitioner)

## Private Member Functions

void | execute ()
| start_for (const Range &range, const Body &body, Partitioner &partitioner)
| Constructor for root task. More...
| start_for (start_for &parent_, typename Partitioner::split_type &split_obj)
| Splitting constructor used to generate children. More...
Private Member Functions inherited from tbb::internal::no_copy
| no_copy (const no_copy &)=delete
| no_copy ()=default

## Private Attributes

Range | my_range
const Body | my_body
Partitioner::task_partition_type | my_partition

## Detailed Description

### template<typename Range, typename Body, typename Partitioner>
class tbb::serial::interface9::start_for< Range, Body, Partitioner >

Definition at line 53 of file serial/tbb/parallel_for.h.

## Constructor & Destructor Documentation

## start_for() [1/2]

template<typename Range , typename Body , typename Partitioner >

tbb::serial::interface9::start_for< Range, Body, Partitioner >::start_for | ( | const Range & | range,
|  | const Body & | body,
|  | Partitioner & | partitioner
| ) |  |

inline private

Constructor for root task.

Definition at line 60 of file serial/tbb/parallel_for.h.

:
my_range( range ),
my_body( body ),
my_partition( partitioner )
{
}

## start_for() [2/2]

template<typename Range , typename Body , typename Partitioner >

tbb::serial::interface9::start_for< Range, Body, Partitioner >::start_for | ( | start_for< Range, Body, Partitioner > & | parent_,
|  | typename Partitioner::split_type & | split_obj
| ) |  |

inline private

Splitting constructor used to generate children.

this becomes left child. Newly constructed object is right child.

Definition at line 69 of file serial/tbb/parallel_for.h.

:
my_range( parent_.my_range, split_obj ),
my_body( parent_.my_body ),
my_partition( parent_.my_partition, split_obj )
{
}

## Member Function Documentation

## execute()

template<typename Range , typename Body , typename Partitioner >

void tbb::serial::interface9::start_for< Range, Body, Partitioner >::execute | ( |  | ) |

private

Definition at line 90 of file serial/tbb/parallel_for.h.

{
if( !my_range.is_divisible() || !my_partition.is_divisible() ) {
ANNOTATE_TASK_BEGIN( tbb_parallel_for_range );
{
my_body( my_range );
}
ANNOTATE_TASK_END( tbb_parallel_for_range );
} else {
typename Partitioner::split_type split_obj;
start_for b( *this, split_obj );
this->execute(); // Execute the left interval first to keep the serial order.
b.execute(); // Execute the right interval then.
}
}

References tbb::serial::interface9::start_for< Range, Body, Partitioner >::execute().

Referenced by tbb::serial::interface9::start_for< Range, Body, Partitioner >::execute(), and tbb::serial::interface9::start_for< Range, Body, Partitioner >::run().

Here is the call graph for this function:
Here is the caller graph for this function:

## run()

template<typename Range , typename Body , typename Partitioner >

static void tbb::serial::interface9::start_for< Range, Body, Partitioner >::run | ( | const Range & | range,
|  | const Body & | body,
|  | Partitioner & | partitioner
| ) |  |

inline static

Definition at line 77 of file serial/tbb/parallel_for.h.

{
if( !range.empty() ) {
ANNOTATE_SITE_BEGIN( tbb_parallel_for );
{
start_for a( range, body, partitioner );
a.execute();
}
ANNOTATE_SITE_END( tbb_parallel_for );
}
}

References tbb::serial::interface9::start_for< Range, Body, Partitioner >::execute().

Referenced by tbb::serial::interface9::parallel_for().

Here is the call graph for this function:
Here is the caller graph for this function:

## Member Data Documentation

## my_body

template<typename Range , typename Body , typename Partitioner >

const Body tbb::serial::interface9::start_for< Range, Body, Partitioner >::my_body

private

Definition at line 55 of file serial/tbb/parallel_for.h.

## my_partition

template<typename Range , typename Body , typename Partitioner >

Partitioner::task_partition_type tbb::serial::interface9::start_for< Range, Body, Partitioner >::my_partition

private

Definition at line 56 of file serial/tbb/parallel_for.h.

## my_range

template<typename Range , typename Body , typename Partitioner >

Range tbb::serial::interface9::start_for< Range, Body, Partitioner >::my_range

private

Definition at line 54 of file serial/tbb/parallel_for.h.

The documentation for this class was generated from the following file:

- serial/tbb/parallel_for.h

tbb::serial::interface9::start_for::execute
void execute()
Definition: serial/tbb/parallel_for.h:90
tbb::serial::interface9::start_for::my_range
Range my_range
Definition: serial/tbb/parallel_for.h:54
tbb::serial::interface9::start_for::start_for
start_for(const Range &range, const Body &body, Partitioner &partitioner)
Constructor for root task.
Definition: serial/tbb/parallel_for.h:60
tbb::serial::interface9::start_for::my_body
const Body my_body
Definition: serial/tbb/parallel_for.h:55
tbb::serial::interface9::start_for::my_partition
Partitioner::task_partition_type my_partition
Definition: serial/tbb/parallel_for.h:56

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.