Intel(R) Threading Building Blocks Doxygen Documentation version 4.2.3
Loading...
Searching...
No Matches
tbb::interface9::internal::parallel_do_feeder_impl< Body, Item > Class Template Reference

For internal use only. More...

#include <parallel_do.h>

Inheritance diagram for tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >:
Collaboration diagram for tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >:

Public Member Functions

 parallel_do_feeder_impl ()
 
 parallel_do_feeder_impl (tbb::task_group_context &context)
 
 ~parallel_do_feeder_impl ()
 
- Public Member Functions inherited from tbb::interface9::parallel_do_feeder< Item >
void add (const Item &item)
 Add a work item to a running parallel_do. More...
 
void add (Item &&item)
 

Public Attributes

const Body * my_body
 
empty_taskmy_barrier
 

Private Member Functions

void internal_add_copy_impl (std::true_type, const Item &item)
 
void internal_add_copy_impl (std::false_type, const Item &)
 
void internal_add_copy (const Item &item) __TBB_override
 
void internal_add_move (Item &&item) __TBB_override
 

Detailed Description

template<class Body, typename Item>
class tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >

For internal use only.

Implements new task adding procedure.

Definition at line 149 of file parallel_do.h.

Constructor & Destructor Documentation

◆ parallel_do_feeder_impl() [1/2]

template<class Body , typename Item >
tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >::parallel_do_feeder_impl ( )
inline

Definition at line 186 of file parallel_do.h.

187 {
188 my_barrier = new( task::allocate_root() ) empty_task();
189 __TBB_ASSERT(my_barrier, "root task allocation failed");
190 }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
static internal::allocate_root_proxy allocate_root()
Returns proxy for overloaded new that allocates a root task.
Definition: task.h:663

References __TBB_ASSERT, tbb::task::allocate_root(), and tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >::my_barrier.

Here is the call graph for this function:

◆ parallel_do_feeder_impl() [2/2]

template<class Body , typename Item >
tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >::parallel_do_feeder_impl ( tbb::task_group_context context)
inline

Definition at line 193 of file parallel_do.h.

194 {
195 my_barrier = new( task::allocate_root(context) ) empty_task();
196 __TBB_ASSERT(my_barrier, "root task allocation failed");
197 }

References __TBB_ASSERT, tbb::task::allocate_root(), and tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >::my_barrier.

Here is the call graph for this function:

◆ ~parallel_do_feeder_impl()

template<class Body , typename Item >
tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >::~parallel_do_feeder_impl ( )
inline

Member Function Documentation

◆ internal_add_copy()

template<class Body , typename Item >
void tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >::internal_add_copy ( const Item &  item)
inlineprivatevirtual

Implements tbb::interface9::parallel_do_feeder< Item >.

Definition at line 161 of file parallel_do.h.

162 {
163#if __TBB_CPP11_IS_COPY_CONSTRUCTIBLE_PRESENT
164 internal_add_copy_impl(typename std::is_copy_constructible<Item>::type(), item);
165#else
166 internal_add_copy_impl(std::true_type(), item);
167#endif
168 }
void internal_add_copy_impl(std::true_type, const Item &item)
Definition: parallel_do.h:153

References tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >::internal_add_copy_impl().

Here is the call graph for this function:

◆ internal_add_copy_impl() [1/2]

template<class Body , typename Item >
void tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >::internal_add_copy_impl ( std::false_type  ,
const Item &   
)
inlineprivate

Definition at line 158 of file parallel_do.h.

158 {
159 __TBB_ASSERT(false, "Overloading for r-value reference doesn't work or it's not movable and not copyable object");
160 }

References __TBB_ASSERT.

◆ internal_add_copy_impl() [2/2]

template<class Body , typename Item >
void tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >::internal_add_copy_impl ( std::true_type  ,
const Item &  item 
)
inlineprivate

Definition at line 153 of file parallel_do.h.

153 {
154 typedef do_iteration_task<Body, Item> iteration_type;
155 iteration_type& t = *new (task::allocate_additional_child_of(*my_barrier)) iteration_type(item, *this);
156 task::spawn(t);
157 }

References tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >::my_barrier.

Referenced by tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >::internal_add_copy().

Here is the caller graph for this function:

◆ internal_add_move()

template<class Body , typename Item >
void tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >::internal_add_move ( Item &&  item)
inlineprivatevirtual

Implements tbb::interface9::parallel_do_feeder< Item >.

Definition at line 169 of file parallel_do.h.

170 {
171 typedef do_iteration_task<Body, Item> iteration_type;
172 iteration_type& t = *new (task::allocate_additional_child_of(*my_barrier)) iteration_type(std::move(item), *this);
173 task::spawn(t);
174 }

References tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >::my_barrier.

Member Data Documentation

◆ my_barrier

◆ my_body


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.