#include <remove_copy_if.h>
Inheritance diagram for rpa::remove_copy_if_t< Range, ItOut, UnaOp >:
Public Types | |
typedef remove_copy_if_args< Range, typename range_traits< Range, ItOut >::range_out, UnaOp, ItOut > | args_t |
typedef args_t::result_type | result_type |
typedef Range | RngIn |
typedef args_t::range_out_t | RngOut |
Public Member Functions | |
remove_copy_if_t (const Range &aRng, ItOut aOut, UnaOp aFunc) | |
remove_copy_if_t (const remove_copy_if_t &aT) | |
RngIn & | seqIn (void) |
A simple 'getter' function. | |
const result_type & | operator() (thread_tree< void, void >) |
Only a helper, identical to operator()(void). | |
template<class ThrIter> | |
const result_type & | operator() (thread_tree< ThrIter, void > aThrTree) |
Operator for parallel execution, which receives a subthreads tree. | |
template<class ThrIter, class ThrMain> | |
present< thread_tree< ThrIter, ThrMain >, remove_copy_if_t > | operator() (thread_tree< ThrIter, ThrMain > aThrTree) |
This models an execution with a functor and a thread. |
The output iterator type is used to determine the output sequence type, using the input sequence. In other words : The input sequence drives the output sequence.
typedef remove_copy_if_args< Range, typename range_traits< Range, ItOut >::range_out, UnaOp, ItOut > rpa::remove_copy_if_t< Range, ItOut, UnaOp >::args_t |
typedef args_t::result_type rpa::remove_copy_if_t< Range, ItOut, UnaOp >::result_type |
typedef Range rpa::remove_copy_if_t< Range, ItOut, UnaOp >::RngIn |
typedef args_t::range_out_t rpa::remove_copy_if_t< Range, ItOut, UnaOp >::RngOut |
rpa::remove_copy_if_t< Range, ItOut, UnaOp >::remove_copy_if_t | ( | const Range & | aRng, | |
ItOut | aOut, | |||
UnaOp | aFunc | |||
) | [inline] |
rpa::remove_copy_if_t< Range, ItOut, UnaOp >::remove_copy_if_t | ( | const remove_copy_if_t< Range, ItOut, UnaOp > & | aT | ) | [inline] |
present< thread_tree< ThrIter, ThrMain >, remove_copy_if_t > rpa::remove_copy_if_t< Range, ItOut, UnaOp >::operator() | ( | thread_tree< ThrIter, ThrMain > | aThrTree | ) | [inline] |
This models an execution with a functor and a thread.
We should FORBID to call 'result' while the thread is running. The returned object stores all the variables that the 'future' needs, because it holds reference on the functor and the thread.
const result_type& rpa::remove_copy_if_t< Range, ItOut, UnaOp >::operator() | ( | thread_tree< ThrIter, void > | aThrTree | ) | [inline] |
Operator for parallel execution, which receives a subthreads tree.
This operator can be called once only, because it changes the functor. A thread tree can encapsulate any thread pool type : List, vector, array, etc... if the number of threads and an iterator on their beginning can be given.
Trivial case of no threads.
Functors can be used only once, because they are internally modified. By the way, this allows post-execution analysis.
The number of available threads is used when calculating the number of threads we will actually used and the number of elements to be computed once-at-a-time in STL algorithms. Must be done once and prior to any use of the range.
Now that the actual number of threads to use is known, maybe calculate immediately.
Returning directly is not possible because, for some cases, the internal output iterator is different from the return value : obuf_iterator for example, at the lowest execution levels, gives to the STL algorithm a back_inserter.
const result_type& rpa::remove_copy_if_t< Range, ItOut, UnaOp >::operator() | ( | thread_tree< void, void > | ) | [inline] |
Only a helper, identical to operator()(void).
RngIn& rpa::remove_copy_if_t< Range, ItOut, UnaOp >::seqIn | ( | void | ) | [inline] |
A simple 'getter' function.