Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
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 34 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 187 of file parallel_do.h.

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

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 194 of file parallel_do.h.

195  {
196  my_barrier = new( task::allocate_root(context) ) empty_task();
197  __TBB_ASSERT(my_barrier, "root task allocation failed");
198  }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
static internal::allocate_root_proxy allocate_root()
Returns proxy for overloaded new that allocates a root task.
Definition: task.h:636

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 162 of file parallel_do.h.

163  {
164 #if __TBB_CPP11_IS_COPY_CONSTRUCTIBLE_PRESENT
166 #else
168 #endif
169  }
bool_constant< true > true_type
Definition: tbb_stddef.h:472
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 ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type type
void internal_add_copy_impl(std::true_type, const Item &item)
Definition: parallel_do.h:154

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

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::true_type  ,
const Item &  item 
)
inlineprivate

Definition at line 154 of file parallel_do.h.

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

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_copy_impl() [2/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 159 of file parallel_do.h.

159  {
160  __TBB_ASSERT(false, "Overloading for r-value reference doesn't work or it's not movable and not copyable object");
161  }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169

References __TBB_ASSERT.

◆ 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 170 of file parallel_do.h.

171  {
172  typedef do_iteration_task<Body, Item> iteration_type;
173  iteration_type& t = *new (task::allocate_additional_child_of(*my_barrier)) iteration_type(std::move(item), *this);
174  task::spawn(t);
175  }
void move(tbb_thread &t1, tbb_thread &t2)
Definition: tbb_thread.h:309

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

Here is the call graph for this function:

Member Data Documentation

◆ my_barrier

◆ my_body


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

Copyright © 2005-2019 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.