Template Numerical Library: TNL::Algorithms::Segments::SegmentElement< Index > Class Template Reference

Template Numerical Library version\ main:16b9213d5

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
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

  Index | is 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

  segmentIdx | is in index of the parent segment.
  localIdx | is a rank of the element in the segment.
  globalIdx | is 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:

- src/TNL/Algorithms/Segments/SegmentElement.h