#include <common.h>
Public Types | |
typedef It | iterator |
typedef It | result_t |
Public Member Functions | |
range_fwrd (const result_t &aBeg) | |
const result_t & | result (void) const |
Always returns the same data type as the one given to the constructor. | |
void | leave_seq (const iterator &anIter) |
This is used to set, what will be the return value of the parallel algorithm. | |
void | leave_par (const iterator &anIter) |
iterator | begout (void) const |
slice | chop (size_t aN) |
void | chop (size_t aN, slice &aSR) |
Naive implementation for reusing objects, because we assume they're cheap. | |
slice | tail (void) |
size_t | ceiling (void) const |
Limits the maximum size of a 'chop' if the output is a fixed-size buffer. | |
Protected Attributes | |
It | _It |
seqnum_t | _NbChops |
Private Member Functions | |
range_fwrd () | |
Classes | |
class | slice |
What ranges are :
typedef It rpa::range_fwrd< It >::iterator |
typedef It rpa::range_fwrd< It >::result_t |
rpa::range_fwrd< It >::range_fwrd | ( | ) | [private] |
rpa::range_fwrd< It >::range_fwrd | ( | const result_t & | aBeg | ) | [inline, explicit] |
The input parameter is an iterator that may, for example, given as output iterator to a STL algorithm.
iterator rpa::range_fwrd< It >::begout | ( | void | ) | const [inline] |
This is passed to an algorithm in the main thread, when executing in sequential context (For exemple, when there are no sub-threads).
size_t rpa::range_fwrd< It >::ceiling | ( | void | ) | const [inline] |
Limits the maximum size of a 'chop' if the output is a fixed-size buffer.
In all other cases including this one, simply returns the step range_step.
void rpa::range_fwrd< It >::chop | ( | size_t | aN, | |
slice & | aSR | |||
) | [inline] |
Naive implementation for reusing objects, because we assume they're cheap.
Needed only for 'heavy' slices (buffers). Must call 'chop(int)' first.
slice rpa::range_fwrd< It >::chop | ( | size_t | aN | ) | [inline] |
Is called by '<input-sequence>.chop()' 'chop' may be called with aN=0 elements, because :
void rpa::range_fwrd< It >::leave_par | ( | const iterator & | anIter | ) | [inline] |
void rpa::range_fwrd< It >::leave_seq | ( | const iterator & | anIter | ) | [inline] |
This is used to set, what will be the return value of the parallel algorithm.
Because the return value is homogeneous to the output iterator, this return value can be used for later insertions in other algorithms.
const result_t& rpa::range_fwrd< It >::result | ( | void | ) | const [inline] |
Always returns the same data type as the one given to the constructor.
This way, if the range was initialised with a back_insert_iterator, we still get a back_insert_iterator as return type.
slice rpa::range_fwrd< It >::tail | ( | void | ) | [inline] |
Is called by '<input-sequence>.tail()', when the input sequence is a range_size. Last call after zero or several 'chop' calls.
It rpa::range_fwrd< It >::_It [protected] |
Stores the output iterator when threads are allocated. It is read by several threads, and therefore must be volatile.
seqnum_t rpa::range_fwrd< It >::_NbChops [protected] |