Template Numerical Library version\ main:0b2c40fb1
Loading...
Searching...
No Matches
TNL::Algorithms::Segments::ChunkedEllpackSegmentView< Index, RowMajorOrder > Class Template Reference

Data structure for accessing particular segment of row-major Chunked Ellpack segments. More...

#include <TNL/Algorithms/Segments/ChunkedEllpackSegmentView.h>

Public Types

using IndexType = Index
 Type for indexing elements in related segments.

Public Member Functions

__cuda_callable__ ChunkedEllpackSegmentView (ChunkedEllpackSegmentView &&) noexcept=default
 Move constructor.
__cuda_callable__ ChunkedEllpackSegmentView (const ChunkedEllpackSegmentView &)=default
 Copy constructor.
__cuda_callable__ ChunkedEllpackSegmentView (IndexType segmentIdx, IndexType offset, IndexType size)
 Constructor with all parameters.
__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__ ChunkedEllpackSegmentViewoperator= (ChunkedEllpackSegmentView &&) noexcept=default
 Move assignment operator.
__cuda_callable__ ChunkedEllpackSegmentViewoperator= (const ChunkedEllpackSegmentView &)=default
 Copy assignment operator.
__cuda_callable__ void setSegmentIndex (IndexType index)
 Set index of the segment.

Protected Attributes

IndexType segmentIdx
IndexType segmentOffset
IndexType segmentSize

Detailed Description

template<typename Index>
class TNL::Algorithms::Segments::ChunkedEllpackSegmentView< Index, RowMajorOrder >

Data structure for accessing particular segment of row-major Chunked Ellpack segments.

Template Parameters
Indexis type for indexing elements in related segments.

See the template specializations TNL::Algorithms::Segments::SegmentView< Index, ColumnMajorOrder > and TNL::Algorithms::Segments::SegmentView< Index, RowMajorOrder > for column-major and row-major elements organization respectively. They have equivalent interface.

Member Function Documentation

◆ getGlobalIndex()

template<typename Index>
__cuda_callable__ IndexType TNL::Algorithms::Segments::ChunkedEllpackSegmentView< Index, RowMajorOrder >::getGlobalIndex ( IndexType localIndex) const
inlinenodiscard

Get global index of an element with rank localIndex in the segment.

Parameters
localIndexis the rank of the element in the segment.
Returns
global index of the element.

◆ getSegmentIndex()

template<typename Index>
__cuda_callable__ IndexType TNL::Algorithms::Segments::ChunkedEllpackSegmentView< Index, RowMajorOrder >::getSegmentIndex ( ) const
inlinenodiscard

Get index of the segment.

Returns
index of the segment.

◆ getSize()

template<typename Index>
__cuda_callable__ IndexType TNL::Algorithms::Segments::ChunkedEllpackSegmentView< Index, RowMajorOrder >::getSize ( ) const
inlinenodiscard

Get the size of the segment, i.e. number of elements in the segment.

Returns
number of elements in the segment.

◆ setSegmentIndex()

template<typename Index>
__cuda_callable__ void TNL::Algorithms::Segments::ChunkedEllpackSegmentView< Index, RowMajorOrder >::setSegmentIndex ( IndexType index)
inline

Set index of the segment.

Parameters
indexof the segment.

The documentation for this class was generated from the following file: