|
Template Numerical Library version\ main:d08c4decc
|
Data structure for accessing particular segment. More...
#include <TNL/Algorithms/Segments/SegmentView.h>
Public Types | |
| using | IndexType = Index |
| Type for indexing elements in related segments. | |
| using | IteratorType = SegmentViewIterator< SegmentView > |
| Type of iterator for iterating over elements of the segment. | |
Public Member Functions | |
| __cuda_callable__ | SegmentView (const SegmentView &)=default |
| Copy constructor. | |
| __cuda_callable__ | SegmentView (IndexType segmentIdx, IndexType offset, IndexType size, IndexType step) |
| Conctructor with all parameters. | |
| __cuda_callable__ | SegmentView (SegmentView &&) noexcept=default |
| Move constructor. | |
| __cuda_callable__ IteratorType | begin () const |
| Returns iterator pointing at the beginning of the segment. | |
| __cuda_callable__ IteratorType | cbegin () const |
| Returns constant iterator pointing at the beginning of the segment. | |
| __cuda_callable__ IteratorType | cend () const |
| Returns constant iterator pointing at the end of the segment. | |
| __cuda_callable__ IteratorType | end () const |
| Returns iterator pointing at the end of the segment. | |
| __cuda_callable__ IndexType | getGlobalIndex (IndexType localIndex) const |
| Get global index of an element with rank localIndex in the segment. | |
| __cuda_callable__ IndexType | getSegmentIndex () const |
| Get index of the segment. | |
| __cuda_callable__ IndexType | getSize () const |
| Get the size of the segment, i.e. number of elements in the segment. | |
| __cuda_callable__ SegmentView & | operator= (const SegmentView &)=default |
| Copy assignment operator. | |
| __cuda_callable__ SegmentView & | operator= (SegmentView &&) noexcept=default |
| Move assignment operator. | |
Protected Attributes | |
| IndexType | segmentIdx |
| IndexType | segmentOffset |
| IndexType | segmentSize |
| IndexType | step |
Data structure for accessing particular segment.
| Index | is type for indexing elements in related segments. |
|
inline |
Conctructor with all parameters.
| segmentIdx | is an index of segment the segment view will point to. |
| offset | is an offset of the segment in the parent segments. |
| size | is a size of the segment. |
| step | is stepping between neighbouring elements in the segment. |
|
inlinenodiscard |
Returns iterator pointing at the beginning of the segment.
|
inlinenodiscard |
Returns constant iterator pointing at the beginning of the segment.
|
inlinenodiscard |
Returns constant iterator pointing at the end of the segment.
|
inlinenodiscard |
Returns iterator pointing at the end of the segment.
|
inlinenodiscard |
Get global index of an element with rank localIndex in the segment.
| localIndex | is the rank of the element in the segment. |
|
inlinenodiscard |
Get index of the segment.
|
inlinenodiscard |
Get the size of the segment, i.e. number of elements in the segment.