Home ⌂Doc Index ◂Up ▴
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 33 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  }
static internal::allocate_root_proxy allocate_root()
Returns proxy for overloaded new that allocates a root task.
Definition: task.h:663
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165

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  }
static internal::allocate_root_proxy allocate_root()
Returns proxy for overloaded new that allocates a root task.
Definition: task.h:663
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165

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
165 #else
167 #endif
168  }
bool_constant< true > true_type
Definition: tbb_stddef.h:489
void internal_add_copy_impl(std::true_type, const Item &item)
Definition: parallel_do.h:153
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_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type type

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 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_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 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  }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165

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 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  }
void move(tbb_thread &t1, tbb_thread &t2)
Definition: tbb_thread.h:319

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-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.