Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
Parallel iteration over a stream, with optional addition of more work. More...
#include <parallel_while.h>
Public Types | |
typedef Body::argument_type | value_type |
Type of items. More... | |
Public Member Functions | |
parallel_while () | |
Construct empty non-running parallel while. More... | |
~parallel_while () | |
Destructor cleans up data members before returning. More... | |
template<typename Stream > | |
void | run (Stream &stream, const Body &body) |
Apply body.apply to each item in the stream. More... | |
void | add (const value_type &item) |
Add a work item while running. More... | |
Private Attributes | |
const Body * | my_body |
empty_task * | my_barrier |
Additional Inherited Members | |
![]() | |
no_copy (const no_copy &)=delete | |
no_copy ()=default | |
Parallel iteration over a stream, with optional addition of more work.
The Body b has the requirement:
"b(v)"
"b.argument_type"
where v is an argument_type
Definition at line 29 of file parallel_while.h.
typedef Body::argument_type tbb::parallel_while< Body >::value_type |
Type of items.
Definition at line 142 of file parallel_while.h.
|
inline |
|
inline |
Destructor cleans up data members before returning.
Definition at line 134 of file parallel_while.h.
References tbb::parallel_while< Body >::my_barrier.
void tbb::parallel_while< Body >::add | ( | const value_type & | item | ) |
Add a work item while running.
Should be executed only by body.apply or a thread spawned therefrom.
Definition at line 176 of file parallel_while.h.
References __TBB_ASSERT, and tbb::task::self().
void tbb::parallel_while< Body >::run | ( | Stream & | stream, |
const Body & | body | ||
) |
Apply body.apply to each item in the stream.
A Stream s has the requirements
"S::value_type"
"s.pop_if_present(value) is convertible to bool
Definition at line 162 of file parallel_while.h.
References tbb::task::allocate_root(), tbb::task::set_ref_count(), and tbb::task::spawn_and_wait_for_all().
|
private |
Definition at line 157 of file parallel_while.h.
Referenced by tbb::parallel_while< Body >::~parallel_while().
|
private |
Definition at line 156 of file parallel_while.h.