tbb::interface9::internal::parallel_do_feeder_impl< Body, Item > Class Template Reference
Algorithms

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_task * | my_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.

{
my_barrier = new( task::allocate_root() ) empty_task();
__TBB_ASSERT(my_barrier, "root task allocation failed");
}

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.

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

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

Definition at line 200 of file parallel_do.h.

{
my_barrier->destroy(*my_barrier);
}

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

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

inline private virtual

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

Definition at line 161 of file parallel_do.h.

{
#if __TBB_CPP11_IS_COPY_CONSTRUCTIBLE_PRESENT
internal_add_copy_impl(typename std::is_copy_constructible<Item>::type(), item);
#else
internal_add_copy_impl(std::true_type(), item);
#endif
}

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::false_type | ,
|  | const Item & |
| ) |  |

inline private

Definition at line 158 of file parallel_do.h.

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

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

inline private

Definition at line 153 of file parallel_do.h.

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

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

inline private virtual

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

Definition at line 169 of file parallel_do.h.

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

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

template<class Body, typename Item>

empty_task* tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >::my_barrier

Definition at line 184 of file parallel_do.h.

Referenced by tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >::internal_add_copy_impl(), tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >::internal_add_move(), tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >::parallel_do_feeder_impl(), tbb::interface9::internal::do_task_iter< Iterator, Body, Item >::run_for_forward_iterator(), tbb::interface9::internal::do_task_iter< Iterator, Body, Item >::run_for_input_iterator(), tbb::interface9::internal::run_parallel_do(), and tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >::~parallel_do_feeder_impl().

## my_body

template<class Body, typename Item>

const Body* tbb::interface9::internal::parallel_do_feeder_impl< Body, Item >::my_body

Definition at line 183 of file parallel_do.h.

Referenced by tbb::interface9::internal::do_iteration_task< Body, Item >::execute(), tbb::interface9::internal::do_iteration_task_iter< Iterator, Body, Item >::execute(), and tbb::interface9::internal::run_parallel_do().

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

- parallel_do.h

__TBB_ASSERT
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
tbb::interface9::internal::parallel_do_feeder_impl::internal_add_copy_impl
void internal_add_copy_impl(std::true_type, const Item &item)
Definition: parallel_do.h:153
tbb::move
void move(tbb_thread &t1, tbb_thread &t2)
Definition: tbb_thread.h:319
tbb::interface9::internal::parallel_do_feeder_impl::my_barrier
empty_task * my_barrier
Definition: parallel_do.h:184
tbb::internal::true_type
bool_constant< true > true_type
Definition: tbb_stddef.h:489
tbb::task::allocate_root
static internal::allocate_root_proxy allocate_root()
Returns proxy for overloaded new that allocates a root task.
Definition: task.h:652
type
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
Definition: ittnotify_static.h:198

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.