A tuple of integers comprising start, size, total. More...
#include <OffsetRange.H>

Public Types | |
| typedef IntType | value_type |
| Type of values contained. | |
| typedef IntType | size_type |
| The type that can represent the size. | |
| using | const_iterator = IndexIterator<IntType> |
| Input iterator with const access. | |
| using | const_reverse_iterator = ReverseIndexIterator<IntType> |
| Reverse input iterator with const access. | |
Public Member Functions | |
| OffsetRange (const OffsetRange &) noexcept=default | |
| Copy construct. | |
| OffsetRange (OffsetRange &&) noexcept=default | |
| Move construct. | |
| OffsetRange & | operator= (const OffsetRange &) noexcept=default |
| Copy assignment. | |
| OffsetRange & | operator= (OffsetRange &&) noexcept=default |
| Move assignment. | |
| constexpr | OffsetRange () noexcept |
| Default construct as (0,0,0). | |
| constexpr | OffsetRange (IntType len) noexcept |
| Construct with start=0 and specified size, assigns total=size. | |
| constexpr | OffsetRange (IntType beg, IntType len, IntType tot) noexcept |
| Construct from all components, no checks. | |
| bool | empty () const noexcept |
| True if zero-sized. | |
| IntType | size () const noexcept |
| The size. | |
| IntType & | size () noexcept |
| Non-const access to the size. | |
| IntType | start () const noexcept |
| The lower value of the range. | |
| IntType & | start () noexcept |
| Non-const access to start of the range. | |
| IntType | total () const noexcept |
| The total size. | |
| IntType & | total () noexcept |
| Non-const access to the total size. | |
| IntRange< IntType > | range () const noexcept |
| The (state,size) range. | |
| void | clear () noexcept |
| Reset to zero. | |
| void | reset (IntType len) noexcept |
| Reset to the specified size, with start=0 and total=size. | |
| void | reset (IntType beg, IntType len, IntType tot) noexcept |
| Reset all components. | |
| bool | equals (const OffsetRange &b) const noexcept |
| Test equality of start/size/total. | |
| int | compare (const OffsetRange &b) const noexcept |
| Compare start/size/total in that order. | |
| void | operator= (IntType len) noexcept |
| Assign to the specified size, with start=0 and total=size. | |
| template<class IntT2, class = std::enable_if_t <std::is_integral_v<IntT2> && (sizeof(IntT2) <= sizeof(IntType))>> | |
| void | operator= (const OffsetRange< IntT2 > &rhs) noexcept |
| Assign from an OffsetRange with the same or lower representation. | |
| const_iterator | at (IntType i) const |
| Return const_iterator to a position within the range, with bounds checking. | |
| constexpr IntType | operator[] (IntType i) const noexcept |
| Offset dereference, without bounds checking. | |
| bool | operator() (IntType i) const noexcept |
| True if the value is between the start and size range. | |
| bool | contains (IntType value) const noexcept |
| True if the value is between the start and size range range. | |
| IntType | begin_value () const noexcept |
| The value at the beginning of the start/size range - same as start(). | |
| IntType | end_value () const noexcept |
| The value 1 beyond the end of the start/size range. | |
| IntType | rbegin_value () const noexcept |
| The max value of the start/size range. | |
| IntType | rend_value () const noexcept |
| The value 1 before the begin of start/size range. | |
| const_iterator | begin () const noexcept |
| A const_iterator set to the beginning of the range. | |
| const_iterator | cbegin () const noexcept |
| A const_iterator set to the beginning of the range. | |
| const_iterator | cend () const noexcept |
| A const_iterator set to 1 beyond the end of the range. | |
| const_iterator | end () const noexcept |
| A const_iterator set to 1 beyond the end of the range. | |
| const_reverse_iterator | rbegin () const noexcept |
| A const_reverse_iterator set to 1 before the end of range. | |
| const_reverse_iterator | crbegin () const noexcept |
| A const_reverse_iterator set to 1 before the end of range. | |
| const_reverse_iterator | rend () const noexcept |
| A const_reverse_iterator set to 1 before the begin of range. | |
| const_reverse_iterator | crend () const noexcept |
| A const_reverse_iterator set to 1 before the begin of range. | |
A tuple of integers comprising start, size, total.
This frequently corresponds what is termed a "hyperslab", a "slice" or a "selection" for MPI addressing. For this type of use, the OffsetRange would represent the local rank addressing. Apart from the total size, it would not have information about any other ranks (like Foam::globalIndex does).
Definition at line 81 of file OffsetRange.H.
| typedef IntType value_type |
Type of values contained.
Definition at line 119 of file OffsetRange.H.
| typedef IntType size_type |
The type that can represent the size.
Definition at line 124 of file OffsetRange.H.
| using const_iterator = IndexIterator<IntType> |
Input iterator with const access.
Definition at line 129 of file OffsetRange.H.
| using const_reverse_iterator = ReverseIndexIterator<IntType> |
Reverse input iterator with const access.
Definition at line 134 of file OffsetRange.H.
|
defaultnoexcept |
Copy construct.
References OffsetRange().
Referenced by compare(), equals(), GlobalOffset< IntType >::GlobalOffset(), GlobalOffset< IntType >::GlobalOffset(), GlobalOffset< IntType >::GlobalOffset(), GlobalOffset< IntType >::GlobalOffset(), OffsetRange(), OffsetRange(), operator=(), operator=(), and operator=().


|
defaultnoexcept |
Move construct.
References Foam::noexcept, and OffsetRange().

|
inlineconstexprnoexcept |
Default construct as (0,0,0).
Definition at line 24 of file OffsetRangeI.H.
References Foam::noexcept.
|
inlineconstexprnoexcept |
Construct with start=0 and specified size, assigns total=size.
Definition at line 33 of file OffsetRangeI.H.
References Foam::noexcept.
|
inlineconstexprnoexcept |
Construct from all components, no checks.
Definition at line 42 of file OffsetRangeI.H.
References Foam::noexcept.
|
defaultnoexcept |
Copy assignment.
References Foam::noexcept, and OffsetRange().

|
defaultnoexcept |
Move assignment.
References Foam::noexcept, and OffsetRange().

|
inlinenoexcept |
True if zero-sized.
Definition at line 193 of file OffsetRange.H.
References empty(), and Foam::noexcept.
Referenced by empty().


|
inlinenoexcept |
The size.
Definition at line 198 of file OffsetRange.H.
References Foam::noexcept.
Referenced by GlobalOffset< label >::localSize().

|
inlinenoexcept |
Non-const access to the size.
Definition at line 203 of file OffsetRange.H.
References Foam::noexcept.
|
inlinenoexcept |
The lower value of the range.
Definition at line 208 of file OffsetRange.H.
References Foam::noexcept.
Referenced by GlobalOffset< label >::localStart(), and GlobalOffset< label >::toGlobal().

|
inlinenoexcept |
Non-const access to start of the range.
Definition at line 213 of file OffsetRange.H.
References Foam::noexcept.
|
inlinenoexcept |
The total size.
Definition at line 218 of file OffsetRange.H.
References Foam::noexcept.
Referenced by GlobalOffset< label >::totalSize().

|
inlinenoexcept |
Non-const access to the total size.
Definition at line 223 of file OffsetRange.H.
References Foam::noexcept.
|
inlinenoexcept |
The (state,size) range.
Definition at line 228 of file OffsetRange.H.
References Foam::noexcept.
Referenced by GlobalOffset< IntType >::GlobalOffset().

|
inlinenoexcept |
|
inlinenoexcept |
Reset to the specified size, with start=0 and total=size.
Can also use operator= assignment
Definition at line 102 of file OffsetRangeI.H.
Referenced by operator=(), GlobalOffset< IntType >::reset(), and GlobalOffset< IntType >::reset().

|
inlinenoexcept |
Reset all components.
Definition at line 111 of file OffsetRangeI.H.
|
inlinenoexcept |
Test equality of start/size/total.
Definition at line 133 of file OffsetRangeI.H.
References b, and OffsetRange().
Referenced by Foam::operator!=(), and Foam::operator==().


|
inlinenoexcept |
Compare start/size/total in that order.
Definition at line 150 of file OffsetRangeI.H.
References b, and OffsetRange().
Referenced by Foam::operator<(), Foam::operator<=(), Foam::operator>(), and Foam::operator>=().


|
inlinenoexcept |
Assign to the specified size, with start=0 and total=size.
Definition at line 274 of file OffsetRange.H.
References Foam::noexcept, and reset().

|
inlinenoexcept |
Assign from an OffsetRange with the same or lower representation.
Definition at line 288 of file OffsetRange.H.
References OffsetRange(), and Foam::rhs().

|
inline |
Return const_iterator to a position within the range, with bounds checking.
Definition at line 301 of file OffsetRange.H.
|
inlineconstexprnoexcept |
Offset dereference, without bounds checking.
Definition at line 174 of file OffsetRangeI.H.
|
inlinenoexcept |
True if the value is between the start and size range.
Behaviour identical to contains() - usable as a predicate
Definition at line 313 of file OffsetRange.H.
References contains().

|
inlinenoexcept |
True if the value is between the start and size range range.
Definition at line 125 of file OffsetRangeI.H.
Referenced by GlobalOffset< label >::isLocal(), and operator()().

|
inlinenoexcept |
The value at the beginning of the start/size range - same as start().
Definition at line 65 of file OffsetRangeI.H.
References Foam::noexcept.
Referenced by begin(), and cbegin().

|
inlinenoexcept |
The value 1 beyond the end of the start/size range.
Definition at line 72 of file OffsetRangeI.H.
References Foam::noexcept.
Referenced by cend(), and end().

|
inlinenoexcept |
The max value of the start/size range.
Definition at line 79 of file OffsetRangeI.H.
References Foam::noexcept.
Referenced by crbegin(), and rbegin().

|
inlinenoexcept |
The value 1 before the begin of start/size range.
Definition at line 86 of file OffsetRangeI.H.
References Foam::noexcept.
Referenced by crend(), and rend().

|
inlinenoexcept |
A const_iterator set to the beginning of the range.
Definition at line 352 of file OffsetRange.H.
References begin(), begin_value(), and Foam::noexcept.
Referenced by begin().


|
inlinenoexcept |
A const_iterator set to the beginning of the range.
Definition at line 357 of file OffsetRange.H.
References begin_value(), and Foam::noexcept.

|
inlinenoexcept |
A const_iterator set to 1 beyond the end of the range.
Definition at line 362 of file OffsetRange.H.
References end_value(), and Foam::noexcept.

|
inlinenoexcept |
A const_iterator set to 1 beyond the end of the range.
Definition at line 367 of file OffsetRange.H.
References end_value(), and Foam::noexcept.

|
inlinenoexcept |
A const_reverse_iterator set to 1 before the end of range.
Definition at line 376 of file OffsetRange.H.
References Foam::noexcept, and rbegin_value().

|
inlinenoexcept |
A const_reverse_iterator set to 1 before the end of range.
Definition at line 382 of file OffsetRange.H.
References Foam::noexcept, and rbegin_value().

|
inlinenoexcept |
A const_reverse_iterator set to 1 before the begin of range.
Definition at line 387 of file OffsetRange.H.
References Foam::noexcept, and rend_value().

|
inlinenoexcept |
A const_reverse_iterator set to 1 before the begin of range.
Definition at line 392 of file OffsetRange.H.
References Foam::noexcept, and rend_value().
