Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
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 
)
inlineprivate

Constructor for root task.

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

60  :
61  my_range( range ),
62  my_body( body ),
63  my_partition( partitioner )
64  {
65  }
Partitioner::task_partition_type my_partition

◆ 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 
)
inlineprivate

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.

69  :
70  my_range( parent_.my_range, split_obj ),
71  my_body( parent_.my_body ),
72  my_partition( parent_.my_partition, split_obj )
73  {
74  }
Partitioner::task_partition_type my_partition

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.

90  {
91  if( !my_range.is_divisible() || !my_partition.is_divisible() ) {
92  ANNOTATE_TASK_BEGIN( tbb_parallel_for_range );
93  {
94  my_body( my_range );
95  }
96  ANNOTATE_TASK_END( tbb_parallel_for_range );
97  } else {
98  typename Partitioner::split_type split_obj;
99  start_for b( *this, split_obj );
100  this->execute(); // Execute the left interval first to keep the serial order.
101  b.execute(); // Execute the right interval then.
102  }
103 }
start_for(const Range &range, const Body &body, Partitioner &partitioner)
Constructor for root task.
Partitioner::task_partition_type my_partition

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 
)
inlinestatic

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

77  {
78  if( !range.empty() ) {
79  ANNOTATE_SITE_BEGIN( tbb_parallel_for );
80  {
81  start_for a( range, body, partitioner );
82  a.execute();
83  }
84  ANNOTATE_SITE_END( tbb_parallel_for );
85  }
86  }
start_for(const Range &range, const Body &body, Partitioner &partitioner)
Constructor for root task.

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:

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.