Template Numerical Library version\ main:481315e2
|
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) |
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 |
|
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. |
|
inline |
Returns iterator pointing at the beginning of the segment.
|
inline |
Returns constant iterator pointing at the beginning of the segment.
|
inline |
Returns constant iterator pointing at the end of the segment.
|
inline |
Returns iterator pointing at the end of the segment.
|
inline |
Get global index of an element with rank localIndex in the segment.
localIndex | is the rank of the element in the segment. |
|
inline |
Get index of the segment.
|
inline |
Get the size of the segment, i.e. number of elements in the segment.