Template Numerical Library version\ main:bb09b17
Loading...
Searching...
No Matches
TNL::Algorithms::Segments::SegmentElement< Index > Class Template Reference

Simple structure representing one element of a segment. More...

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

Public Types

using IndexType = Index
 Type used for indexing of the elements.
 

Public Member Functions

__cuda_callable__ SegmentElement (IndexType segmentIdx, IndexType localIdx, IndexType globalIdx)
 Constructor of the segment element with all parameters.
 
__cuda_callable__ IndexType globalIndex () const
 Returns index of the element in the related container.
 
__cuda_callable__ IndexType localIndex () const
 Returns rank of the element in the segment.
 
__cuda_callable__ IndexType segmentIndex () const
 Returns index of the parent segment.
 

Protected Attributes

const IndexType globalIdx
 
const IndexType localIdx
 
const IndexType segmentIdx
 

Detailed Description

template<typename Index>
class TNL::Algorithms::Segments::SegmentElement< Index >

Simple structure representing one element of a segment.

Template Parameters
Indexis type used for indexing of the elements.

Constructor & Destructor Documentation

◆ SegmentElement()

template<typename Index >
__cuda_callable__ TNL::Algorithms::Segments::SegmentElement< Index >::SegmentElement ( IndexType segmentIdx,
IndexType localIdx,
IndexType globalIdx )
inline

Constructor of the segment element with all parameters.

Parameters
segmentIdxis in index of the parent segment.
localIdxis a rank of the element in the segment.
globalIdxis an index of the element in the related container.

Member Function Documentation

◆ globalIndex()

template<typename Index >
__cuda_callable__ IndexType TNL::Algorithms::Segments::SegmentElement< Index >::globalIndex ( ) const
inlinenodiscard

Returns index of the element in the related container.

Returns
index of the element in the related container.

◆ localIndex()

template<typename Index >
__cuda_callable__ IndexType TNL::Algorithms::Segments::SegmentElement< Index >::localIndex ( ) const
inlinenodiscard

Returns rank of the element in the segment.

Returns
rank of the element in the segment.

◆ segmentIndex()

template<typename Index >
__cuda_callable__ IndexType TNL::Algorithms::Segments::SegmentElement< Index >::segmentIndex ( ) const
inlinenodiscard

Returns index of the parent segment.

Returns
index of the parent segment.

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