#include <limits.h>
#include <iterator>
#include <rpa/synchro.h>
#include <rpa/containers/move.h>
Namespaces | |
namespace | rpa |
Classes | |
struct | rpa::resizer< Cont > |
For reserving room in buffers. More... | |
struct | rpa::resizer< Cont & > |
The parameter may be a reference. More... | |
struct | rpa::resizer< Type[N] > |
For a C-style static array, it is not needed to do any resizing. More... | |
struct | rpa::functor_traits< Ftor > |
Models the fact that some algorithms have an implicit functor. More... | |
struct | rpa::void_functor |
We need a real type for specifying a kind of 'void' or 'default' functor. More... | |
struct | rpa::functor_traits< void > |
Specialization when there is no functor at all. More... | |
struct | rpa::threadify_t< Ftor, Thr > |
'threadify_t' transforms a 'threadable' functor, into a 'plain functor. More... | |
struct | rpa::threadify_t< Ftor, thread_tree< ThrSubIter, ThrMain > > |
Specialization for more than one level of sub-threads. More... | |
struct | rpa::threadify_t< void_functor, Thr > |
struct | rpa::adv< Iter, std::forward_iterator_tag > |
struct | rpa::adv< Iter, std::bidirectional_iterator_tag > |
struct | rpa::adv< Iter, std::random_access_iterator_tag > |
struct | rpa::tuple2< _T1, _T2 > |
tuple2 holds two objects of arbitrary type. This is a subset of std::pair. More... | |
struct | rpa::true_t |
For debugging only. More... | |
struct | rpa::false_t |
struct | rpa::container_traits< Container > |
For a container type, gives some type information. More... | |
struct | rpa::container_traits< Type[N] > |
If the so-called 'container' is a C-style fixed-size array. More... | |
struct | rpa::container_traits< Container & > |
struct | rpa::container_traits< Type(&)[N] > |
This is a specialization of container_traits for C-style fixed arrays. More... | |
struct | rpa::insert_invalidates_iterators< Container > |
Tells whether an insertion into an container invalidates iterators or not. More... | |
struct | rpa::output_iterator_traits< It2 > |
struct | rpa::output_iterator_traits< std::back_insert_iterator< Container > > |
struct | rpa::Carray_to_iterator< IterBuf > |
struct | rpa::Carray_to_iterator< Buffer[N] > |
If the iterator on buffers is a C-style array, we process it like a pointer. More... | |
class | rpa::fmt_output_to_buffer< Buffer > |
class | rpa::obuf_base< IterOut, Buffer > |
Just for storing some internal data types. More... | |
class | rpa::obuf_base< std::back_insert_iterator< Container >, Buffer > |
class | rpa::obuf_storage< Buffer, IterBuf > |
class | rpa::obuf_storage< Buffer, IterBuf >::internal_buffer |
class | rpa::obuf_storage< Type[N], IterBuf > |
class | rpa::obuf_storage< Type[N], IterBuf >::internal_buffer |
This shares the same container properties as the physical buffer it points to. More... | |
class | rpa::obuf_storage< Buffer, void > |
struct | rpa::obuf_storage< Buffer, void >::internal_empty |
Empty structure to avoid any memory manipulation. More... | |
class | rpa::obuf_storage< Buffer, void >::internal_buffer |
This contains an actual object allocated on the stack. More... | |
class | rpa::obuf_storage< Type[N], void > |
struct | rpa::obuf_storage< Type[N], void >::internal_empty |
Empty structure to avoid any memory manipulation. More... | |
class | rpa::obuf_storage< Type[N], void >::internal_buffer |
This contains an actual object allocated on the stack. More... | |
class | rpa::obuf_guard< Mutex > |
Encapsulates the mutex and the maximum size of per-threads buffers. More... | |
class | rpa::obuf_guard< Mutex >::inner_guard |
class | rpa::obuf_iterator< IterOut, Buffer, IterBuf, Mutex > |
'obuf_iterator' attempts to encapsulate output iterators, More... | |
class | rpa::obuf_iterator< IterOut, Buffer, void, Mutex > |
Specialization when there is no generator of buffers. More... | |
class | rpa::obuf_iterator< IterOut, Buffer, IterBuf, void > |
No mutex, so infinite-size buffer. More... | |
class | rpa::obuf_iterator< IterOut, Buffer, void, void > |
Specialization for when no iterator on available buffers is provided. More... | |
class | rpa::obuf_iterator< IterOut, Type[N], IterBuf, void > |
struct | rpa::iterator_buffer_traits< IterBuf > |
Given an iterator on buffers, this gives the datatype of individual buffers. More... | |
class | rpa::range_fwrd< It > |
For forward_tag iterators if single-thread access. This is an output range. More... | |
class | rpa::range_fwrd< It >::slice |
class | rpa::iterator_lock< It, Mutex > |
To protect an output iterator. More... | |
class | rpa::iterator_lock< It, void > |
To specify that an output iterator is lock-free (NOT IMPLEMENTED YET). More... | |
class | rpa::range_outp< It > |
General case, for thread-unsafe iterators. More... | |
struct | rpa::range_outp< It >::slice |
class | rpa::range_outp< iterator_lock< It, Mutex > > |
class | rpa::range_outp< iterator_lock< It, Mutex > >::slice |
class | rpa::range_outp< iterator_lock< It, Mutex > >::slice::iterator |
class | rpa::range_outp< iterator_lock< It, void > > |
Specialisation for an atomic output iterator. More... | |
class | rpa::range_outp< iterator_lock< It, void > >::slice |
class | rpa::range_outp< iterator_lock< It, void > >::slice::iterator |
The original output iterator is shared by all slices. More... | |
class | rpa::obuf_slice_unbounded< RangeOutp > |
This represents the slice of an obuf_iterator with infinite-size buffers. More... | |
class | rpa::obuf_slice_bounded< RangeOutp > |
This is the slice used by an obuf_iterator whose buffers have a size limit. More... | |
class | rpa::range_outp< obuf_iterator< IterOut, Buffer, BufIter, void > > |
General case of buffering any iterator, with unbounded buffers. More... | |
class | rpa::range_outp< obuf_iterator< IterOut, Buffer, BufIter, Mutex > > |
General case of buffering any iterator, with bounded buffers. More... | |
class | rpa::range_lambda< It > |
class | rpa::range_void< It > |
class | rpa::range_void< It >::range_out< It2, IterCat > |
For selecting the right output sequence. More... | |
struct | rpa::range_void< It >::range_out< It2, IterCat >::slice |
struct | rpa::range_void< It >::range_out< It2, IterCat >::slice::iterator |
class | rpa::chunk_t |
Used to store the minimum size of a chunk of elements, for efficiency. More... | |
class | rpa::range_size< It > |
class | rpa::range_size< It >::slice |
Models a slice begin/end given by 'chop' or 'tail', processed by a single sub-thread. More... | |
struct | rpa::range_size< It >::range_out< It2, IterCat > |
struct | rpa::range_size< It >::range_out< It2, std::output_iterator_tag > |
class | rpa::range_step_base< It > |
class | rpa::range_step_base< It >::slice |
Created by 'segmenting' an input range, ie, a range made of a pair of iterators. More... | |
class | rpa::range_step_aux< It > |
struct | rpa::range_step_aux< It >::range_out< It2, IterCat > |
struct | rpa::range_step_aux< It >::range_out< It2, std::output_iterator_tag > |
Most general case. More... | |
class | rpa::range_step< It, Mutex > |
class | rpa::slice_generator< GeneratorValue > |
struct | rpa::slice_generator< void > |
class | rpa::range_step< It, void > |
struct | rpa::range_step< It, void >::range_out< It2, IterCat2 > |
class | rpa::range_step< It, void >::range_out< It2, IterCat2 >::range_type |
This is the class actually used as the output range. More... | |
class | rpa::range_step< It, void >::range_out< It2, IterCat2 >::range_type::generator_t |
In the general case, there cannot be anything unique for the generator. More... | |
class | rpa::range_step< It, void >::range_out< It2, IterCat2 >::range_type::slice |
Given to each sub-thread. More... | |
struct | rpa::range_step< It, void >::range_out< It2, std::bidirectional_iterator_tag > |
For exemple, if we write into an output sequence which is already allocated. More... | |
class | rpa::range_step< It, void >::range_out< It2, std::bidirectional_iterator_tag >::range_type |
class | rpa::range_step< It, void >::range_out< It2, std::bidirectional_iterator_tag >::range_type::generator_t |
The unique key if the generator is the iterator itself, which is of course unique. More... | |
class | rpa::range_step< It, void >::range_out< It2, std::bidirectional_iterator_tag >::range_type::slice |
Given to each sub-thread : The amount of work to process on the output. More... | |
struct | rpa::range_step< It, void >::range_out< It2, std::forward_iterator_tag > |
struct | rpa::range_step< It, void >::range_out< It2, std::random_access_iterator_tag > |
class | rpa::range_step< It, void >::range_out< It2, std::random_access_iterator_tag >::range_type |
class | rpa::range_step< It, void >::range_out< It2, std::random_access_iterator_tag >::range_type::generator_t |
class | rpa::range_step< It, void >::range_out< It2, std::random_access_iterator_tag >::range_type::slice |
Given to each sub-thread so that an algorithm can write into it. More... | |
struct | rpa::range_step< It, void >::range_out< obuf_iterator< IterOut, Buffer, IterBuf, Mutex >, std::forward_iterator_tag > |
This template specialization, to forbid this case to happen. More... | |
struct | rpa::range_step< It, void >::range_out< obuf_iterator< IterOut, Buffer, IterBuf, Mutex >, std::input_iterator_tag > |
This template specialization, to forbid this case to happen. More... | |
struct | rpa::range_step< It, void >::range_out< obuf_iterator< IterOut, Buffer, IterBuf, Mutex >, std::bidirectional_iterator_tag > |
This template specialization, to forbid this case to happen. More... | |
struct | rpa::range_step< It, void >::range_out< obuf_iterator< IterOut, Buffer, IterBuf, Mutex >, std::random_access_iterator_tag > |
This template specialization, to forbid this case to happen. More... | |
struct | rpa::range_step< It, void >::range_out< obuf_iterator< IterOut, Buffer, IterBuf, Mutex >, std::output_iterator_tag > |
class | rpa::range_step< It, void >::range_type_iterator_lock< It2, Mutex > |
This to avoid an ambiguous template instantiation. More... | |
struct | rpa::range_step< It, void >::range_type_iterator_lock< It2, Mutex >::generator_t |
In the general case, there cannot be anything unique for the generator. More... | |
struct | rpa::range_step< It, void >::range_out< iterator_lock< It2, Mutex >, std::forward_iterator_tag > |
This template specialization, to forbid this case to happen. More... | |
struct | rpa::range_step< It, void >::range_out< iterator_lock< It2, Mutex >, std::input_iterator_tag > |
This template specialization, to forbid this case to happen. More... | |
struct | rpa::range_step< It, void >::range_out< iterator_lock< It2, Mutex >, std::bidirectional_iterator_tag > |
This template specialization, to forbid this case to happen. More... | |
struct | rpa::range_step< It, void >::range_out< iterator_lock< It2, Mutex >, std::random_access_iterator_tag > |
This template specialization, to forbid this case to happen. More... | |
struct | rpa::range_step< It, void >::range_out< iterator_lock< It2, Mutex >, std::output_iterator_tag > |
For the moment, just to compile, and reuse the defaut existing range_out. More... | |
struct | rpa::range_step< It, void >::chop_atom_t< Rng2 > |
struct | rpa::range_step< It, void >::chop_atom_t< range_outp< obuf_iterator< IterOut, Buffer, IterBuf, Mutex > > > |
class | rpa::iterator_jump_fllw< It > |
class | rpa::iterator_jump_lead< It > |
class | rpa::range_jump< It > |
class | rpa::range_jump< It >::slice |
class | rpa::range_jump< It >::range_out< It2, IterCat > |
In the general case, we keep the original order. More... | |
class | rpa::range_jump< It >::range_out< It2, IterCat >::slice |
struct | rpa::range_jump< It >::range_out< It2, std::output_iterator_tag > |
struct | rpa::range_traits< RngIn, IterOut > |
Defines | |
#define | DBG_BIG 90000000 |
For debugging : A big irrealistic number totally beyond tests programs needs. | |
#define | MAX_CEILING UINT_MAX |
Maximum possible size for a output buffer size. | |
#define | StepUndef UINT_MAX |
#define | JUMP_DEFAULT (size_t)(~0) |
Typedefs | |
typedef int | rpa::seqnum_t |
The sequence number of an output slice, to reorder results at reduction. | |
Functions | |
template<class Object> | |
void | rpa::resize (Object &anObj, size_t aSz) |
Helper function to resize a container, or quasi-container. | |
template<class Container, class IterIn> | |
size_t | rpa::append (Container &refCont, IterIn itBeg, IterIn itEnd, size_t szReserve) |
Used for 'back_inserting' a whole lot of elements. | |
template<class IterA, class IterB> | |
bool | rpa::__iterator_in (IterA aBeg, IterA aEnd, IterB anI, std::forward_iterator_tag) |
Checks that an interator is between to others. | |
template<class IterA, class IterB> | |
bool | rpa::__iterator_in (IterA aBeg, IterA aEnd, IterB anI, std::bidirectional_iterator_tag) |
Checks that an interator is between two others. For debugging. | |
template<class IterA, class IterB> | |
bool | rpa::__iterator_in (IterA aBeg, IterA aEnd, IterB anI, std::random_access_iterator_tag) |
Constant-time test to check that an iterator is in an interval. | |
template<class IterA, class IterB> | |
bool | rpa::__iterator_in (IterA aBeg, IterA aEnd, IterB anI, std::input_iterator_tag) |
template<class IterA, class IterB> | |
bool | rpa::iterator_in (IterA aBeg, IterA aEnd, IterB anI) |
Checks that an interator is between two others. For debugging. | |
template<class Container, class Iterator> | |
size_t | rpa::__ressz (const Container &aC, Iterator aEnd, std::random_access_iterator_tag) |
Returns the smallest number but bigger or equal to a container's size. | |
template<class Container, class Iterator> | |
size_t | rpa::__ressz (const Container &aC, Iterator, std::forward_iterator_tag) |
Returns the smallest number but bigger or equal to a container's size. | |
template<class Container, class Iterator> | |
size_t | rpa::__ressz (const Container &aC, Iterator, std::bidirectional_iterator_tag) |
Same as forward_iterator_category. | |
template<class Buffer> | |
size_t | rpa::adjust (size_t aAskedSz) |
Adjusts the desired buffer'size to this buffer type's maximum. | |
template<class ContOut> | |
obuf_iterator< std::back_insert_iterator< ContOut >, ContOut, void, void > | rpa::obuf_back_inserter (ContOut &aC) |
Helper function for creating obuf_iterator objects. | |
template<class ContOut, class IterBuf> | |
obuf_iterator< std::back_insert_iterator< ContOut >, typename iterator_buffer_traits< IterBuf >::buffer_type, IterBuf, void > | rpa::obuf_back_inserter (ContOut &aC, IterBuf aIterBuf) |
The buffer type is deduced from the type of the iterator on buffers. | |
template<class ContOut, class Mutex> | |
obuf_iterator< std::back_insert_iterator< ContOut >, ContOut, void, Mutex > | rpa::obuf_back_inserter (ContOut &aC, Mutex *aMtxPtr, size_t aSzMax) |
template<class ContOut, class IterBuf, class Mutex> | |
obuf_iterator< std::back_insert_iterator< ContOut >, typename iterator_buffer_traits< IterBuf >::buffer_type, IterBuf, Mutex > | rpa::obuf_back_inserter (ContOut &aC, IterBuf aIterBuf, Mutex *aMtxPtr, size_t aSzMax) |
The buffer type is deduced from the type of the iterator on buffers. | |
template<class Iterator, class Mutex> | |
iterator_lock< Iterator, Mutex > | rpa::hold_lock (const Iterator &anIter, Mutex &aMutex) |
Helper function which associates a mutex with an output iterator. | |
template<class Iterator> | |
iterator_lock< Iterator, void > | rpa::lock_free (const Iterator &anIter) |
Helper functions specifying lock-free output iterators. | |
template<class It> | |
range_size< It > | rpa::make_range_size (It aBeg, It aEnd, chunk_t aCM=chunk_t()) |
Helper, if the element numbers can be deduced with the iterators. | |
template<class It> | |
range_size< It > | rpa::make_range_size (It aBeg, It aEnd, size_t aSize, chunk_t aCM=chunk_t()) |
template<class It, class Mutex> | |
range_step< It, Mutex > | rpa::make_range_step (It aBeg, It aEnd, size_t aStep, Mutex &aMtx, chunk_t aCM=chunk_t()) |
This helper function creates a range_step, as expected. | |
template<class It> | |
range_step< It, void > | rpa::make_range_step (It aBeg, It aEnd, size_t aStep, chunk_t aCM=chunk_t()) |
Helper to create an atomic range_step (Dynamic scheduling), without mutex. | |
template<class It> | |
range_jump< It > | rpa::make_range_jump (It aBeg, It aEnd) |
Helper function to easily create a 'range_jump'. |
#define DBG_BIG 90000000 |
For debugging : A big irrealistic number totally beyond tests programs needs.
#define JUMP_DEFAULT (size_t)(~0) |
#define MAX_CEILING UINT_MAX |
Maximum possible size for a output buffer size.
This is the value returned by all output ranges except obuf_iterator with a fixed-size output buffer.
#define StepUndef UINT_MAX |
We do not use a 'static const size_t', because the source reformatter of kdevelop makes strange things. In fact, should be a ptrdiff_t instead.