ALP User Documentation
0.8.preview
Algebraic Programming User Documentation
|
An iterator over a collection of \( c \) items that for each item \( i \in \{0,1,\dots,c-1\} \) returns \( f(i) \), where \( f \) is of the form \( o + s( \lfloor i/r \rfloor ) \). More...
Public Types | |
typedef grb::utils::internal::PosBasedIterator< T, std::tuple< size_t, size_t, size_t >, Sequence< T > > | RealType |
The return type of the factory methods. | |
Static Public Member Functions | |
static RealType | make_iterator (const size_t count, const bool start, const size_t offset=static_cast< size_t >(0), const size_t stride=static_cast< size_t >(1), const size_t repetitions=static_cast< size_t >(1), T dummy=T(), const size_t s=0, const size_t P=1) |
Constructs an iterator over a given sequence. More... | |
An iterator over a collection of \( c \) items that for each item \( i \in \{0,1,\dots,c-1\} \) returns \( f(i) \), where \( f \) is of the form \( o + s( \lfloor i/r \rfloor ) \).
In this formula,
T | The value type of the iterator, i.e., the type returned by \( f \). |
This class implements a factory for retrieving sequence iterators.
Rather than using sequence iterators directly, however, users may consider referring to grb::utils::containers::Range instead.
|
inlinestatic |
Constructs an iterator over a given sequence.
[in] | count | The number of elements in the sequence. |
[in] | start | Whether the iterator is in start position (or in end position instead). |
[in] | offset | The first element in the sequence. |
[in] | stride | The distance between two elements in the sequence. |
[in] | repetitions | The number of times each element is repeated. |
[in] | dummy | A dummy initialiser for return elements; optional, in case T is not default-constructible. |
The following are optional arguments for optionally creating parallel I/O iterators:
[in] | s | The process ID; default is zero. |
[in] | P | The number of processes; default is one. |
The parameter s must be strictly smaller than P, and P must be larger than zero.