#include <common.h>
Inheritance diagram for rpa::range_outp< It >:

Public Types | |
| typedef It | iterator |
| typedef It | result_t |
Public Member Functions | |
| range_outp (const result_t &aBeg) | |
| Allowed, because used in sequential context. | |
| const result_t & | result (void) const |
| void | leave_seq (const result_t &aR) |
| void | leave_par (const result_t &aR) |
| iterator | begout (void) const |
| slice | chop (size_t aN) |
| void | chop (size_t aN, slice &aR) |
| slice | tail (void) |
| Used only for simple scheduling, and for the last thread. | |
| size_t | ceiling (void) const |
Protected Attributes | |
| It | _It |
| Not VOLATILE because for sequential use only. | |
| seqnum_t | _NbChops |
Private Member Functions | |
| range_outp () | |
| range_outp & | operator= (const range_outp &) |
Classes | |
| struct | slice |
Does compile but does not link for parallel use, because we FORBID the use of non-explicitly thread-safe output iterators. Allowed for sequential use.
| typedef It rpa::range_outp< It >::iterator |
Reimplemented in rpa::range_step< It, void >::range_type_iterator_lock< It2, Mutex >.
| typedef It rpa::range_outp< It >::result_t |
Reimplemented in rpa::range_step< It, void >::range_type_iterator_lock< It2, Mutex >.
| rpa::range_outp< It >::range_outp | ( | ) | [private] |
| rpa::range_outp< It >::range_outp | ( | const result_t & | aBeg | ) | [inline, explicit] |
Allowed, because used in sequential context.
| iterator rpa::range_outp< It >::begout | ( | void | ) | const [inline] |
| size_t rpa::range_outp< It >::ceiling | ( | void | ) | const [inline] |
Used to limit the maximum size of a 'chop' when the output is a fixed-size output buffer. In all other cases including this one, simply returns the step of the dynamic scheduling scheme.
| void rpa::range_outp< It >::chop | ( | size_t | aN, | |
| slice & | aR | |||
| ) | [inline] |
Once a slice was created by the first 'chop' in a given sub-thread, it is later reused and receive new 'segments' to process. This allows to reuse resources such as buffers.
| slice rpa::range_outp< It >::chop | ( | size_t | aN | ) | [inline] |
Example of use : The output iterator is a buffered output iterator into a std::list as a buffer, with a limited size, and therefore with a mutex. This is absurd because std::list can hold as many elements as wished. Because we can use std::list::splice which is constant-time, this uses a back_insert_iterator as output buffer : Pre-allocating elements would be useless because the buffers are not reallocated, simply reinjected into the main output container. The best we could do would be to reserve elements.
| void rpa::range_outp< It >::leave_par | ( | const result_t & | aR | ) | [inline] |
| void rpa::range_outp< It >::leave_seq | ( | const result_t & | aR | ) | [inline] |
| range_outp& rpa::range_outp< It >::operator= | ( | const range_outp< It > & | ) | [private] |
| const result_t& rpa::range_outp< It >::result | ( | void | ) | const [inline] |
| slice rpa::range_outp< It >::tail | ( | void | ) | [inline] |
Used only for simple scheduling, and for the last thread.
Was not necessary now because there is normally no use of an iterator_lock with a non-input_iterator. on the contrary, range_size is used with random_access (Exceptionnaly with forward_iterator).
It rpa::range_outp< It >::_It [protected] |
Not VOLATILE because for sequential use only.
And protected because 'obuf_iterator' uses it as a base class, and only redefines 'chop'.
seqnum_t rpa::range_outp< It >::_NbChops [protected] |
1.4.7