Template Numerical Library: TNL::Algorithms::Segments::BiEllpackSegmentView< Index, Organization, WarpSize > Class Template Reference

Template Numerical Library version\ main:0b2c40fb1

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
TNL::Algorithms::Segments::BiEllpackSegmentView< Index, Organization, WarpSize > Class Template Reference

Data structure for accessing particular segment of BiEllpack segments. More...

`#include <TNL/Algorithms/Segments/BiEllpackSegmentView.h>`

Collaboration diagram for TNL::Algorithms::Segments::BiEllpackSegmentView< Index, Organization, WarpSize >:
[legend]

## Public Types
using | GroupsWidthType = Containers::StaticVector< getGroupsCount(), IndexType >
using | IndexType = Index
| Type for indexing elements in related segments.

## Public Member Functions
__cuda_callable__ | BiEllpackSegmentView (BiEllpackSegmentView &&) noexcept=default
| Move constructor.
__cuda_callable__ | BiEllpackSegmentView (const BiEllpackSegmentView &)=default
| Copy constructor.
__cuda_callable__ | BiEllpackSegmentView (IndexType segmentIdx, IndexType offset, IndexType inStripIdx, const GroupsWidthType &groupsWidth)
| Constructor.
__cuda_callable__ IndexType | getGlobalIndex (IndexType localIdx) const
| Get global index of an element with rank localIdx 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__ BiEllpackSegmentView & | operator= (BiEllpackSegmentView &&) noexcept=default
| Move assignment operator.
__cuda_callable__ BiEllpackSegmentView & | operator= (const BiEllpackSegmentView &)=default
| Copy assignment operator.
__cuda_callable__ void | setSegmentIndex (IndexType index)
| Set index of the segment.

## Static Public Member Functions
static constexpr int | getGroupsCount ()
| Returns the number of groups used for the segments.
static constexpr int | getLogWarpSize ()
| Returns the log of the warp size used for the segments.
static constexpr int | getWarpSize ()
| Returns the warp size used for the segments.

## Protected Attributes
IndexType | groupOffset
GroupsWidthType | groupsWidth
IndexType | inStripIdx
IndexType | segmentIdx
IndexType | segmentSize

## Detailed Description

template<typename Index, ElementsOrganization Organization, int WarpSize = Backend::getWarpSize()>
class TNL::Algorithms::Segments::BiEllpackSegmentView< Index, Organization, WarpSize >

Data structure for accessing particular segment of BiEllpack segments.

Template Parameters

  Index | is type for indexing elements in related segments.
  Organization | is the organization of the elements in the segments—either row-major or column-major order.
  WarpSize | is the warp size used for the 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.

## Constructor & Destructor Documentation

## ◆ BiEllpackSegmentView()

template<typename Index, ElementsOrganization Organization, int WarpSize = Backend::getWarpSize()>

__cuda_callable__ TNL::Algorithms::Segments::BiEllpackSegmentView< Index, Organization, WarpSize >::BiEllpackSegmentView | ( | IndexType | segmentIdx,
|  | IndexType | offset,
|  | IndexType | inStripIdx,
|  | const GroupsWidthType & | groupsWidth )
| inline

Constructor.

Parameters

  segmentIdx | is the segment index.
  offset | is offset of the first group of the strip the segment belongs to.
  inStripIdx | is index of the segment within its strip.
  groupsWidth | is a static vector containing widths of the strip groups.

## Member Function Documentation

## ◆ getGlobalIndex()

template<typename Index, ElementsOrganization Organization, int WarpSize = Backend::getWarpSize()>

__cuda_callable__ IndexType TNL::Algorithms::Segments::BiEllpackSegmentView< Index, Organization, WarpSize >::getGlobalIndex | ( | IndexType | localIdx | ) | const
| inlinenodiscard

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

Parameters

  localIdx | is the rank of the element in the segment.

Returns
  global index of the element.

## ◆ getSegmentIndex()

template<typename Index, ElementsOrganization Organization, int WarpSize = Backend::getWarpSize()>

__cuda_callable__ IndexType TNL::Algorithms::Segments::BiEllpackSegmentView< Index, Organization, WarpSize >::getSegmentIndex | ( |  | ) | const
| inlinenodiscard

Get index of the segment.

Returns
  index of the segment.

## ◆ getSize()

template<typename Index, ElementsOrganization Organization, int WarpSize = Backend::getWarpSize()>

__cuda_callable__ IndexType TNL::Algorithms::Segments::BiEllpackSegmentView< Index, Organization, WarpSize >::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, ElementsOrganization Organization, int WarpSize = Backend::getWarpSize()>

__cuda_callable__ void TNL::Algorithms::Segments::BiEllpackSegmentView< Index, Organization, WarpSize >::setSegmentIndex | ( | IndexType | index | ) |
| inline

Set index of the segment.

Parameters

  index | of the segment.

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

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