NeoN
A framework for CFD software
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
NeoN::SegmentedVectorView< ValueType, IndexType > Class Template Reference

A class representing a segment of indices. More...

#include <segmentedVector.hpp>

Public Member Functions

KOKKOS_INLINE_FUNCTION Kokkos::pair< IndexType, IndexType > bounds (localIdx segI) const
 Get the bounds of a segment.
 
KOKKOS_INLINE_FUNCTION Kokkos::pair< IndexType, IndexType > range (localIdx segI) const
 Get the range, ie. [start,end), of a segment.
 
KOKKOS_INLINE_FUNCTION View< ValueType > view (localIdx segI) const
 Get a subview of values corresponding to a segment.
 
KOKKOS_INLINE_FUNCTION IndexType operator[] (localIdx i) const
 Access an element of the segments.
 

Public Attributes

View< ValueType > values
 A View with the values.
 
View< IndexType > segments
 A View of indices representing the segments.
 

Detailed Description

template<typename ValueType, typename IndexType = NeoN::localIdx>
class NeoN::SegmentedVectorView< ValueType, IndexType >

A class representing a segment of indices.

Template Parameters
IndexTypeThe type of the indices.

Definition at line 58 of file segmentedVector.hpp.

Member Function Documentation

◆ bounds()

template<typename ValueType , typename IndexType = NeoN::localIdx>
KOKKOS_INLINE_FUNCTION Kokkos::pair< IndexType, IndexType > NeoN::SegmentedVectorView< ValueType, IndexType >::bounds ( localIdx  segI) const
inline

Get the bounds of a segment.

Parameters
segIThe index of the segment.
Returns
A pair of indices representing the start and end of the segment.

Definition at line 79 of file segmentedVector.hpp.

◆ operator[]()

template<typename ValueType , typename IndexType = NeoN::localIdx>
KOKKOS_INLINE_FUNCTION IndexType NeoN::SegmentedVectorView< ValueType, IndexType >::operator[] ( localIdx  i) const
inline

Access an element of the segments.

Parameters
iThe index of the element.
Returns
The value of the element at the specified index.

Definition at line 118 of file segmentedVector.hpp.

◆ range()

template<typename ValueType , typename IndexType = NeoN::localIdx>
KOKKOS_INLINE_FUNCTION Kokkos::pair< IndexType, IndexType > NeoN::SegmentedVectorView< ValueType, IndexType >::range ( localIdx  segI) const
inline

Get the range, ie. [start,end), of a segment.

Parameters
segIThe index of the segment.
Returns
A pair of indices representing the start and length of the segment.

Definition at line 91 of file segmentedVector.hpp.

◆ view()

template<typename ValueType , typename IndexType = NeoN::localIdx>
KOKKOS_INLINE_FUNCTION View< ValueType > NeoN::SegmentedVectorView< ValueType, IndexType >::view ( localIdx  segI) const
inline

Get a subview of values corresponding to a segment.

Template Parameters
ValueTypeThe type of the values.
Parameters
segIThe index of the segment.
Returns
A subview of values corresponding to the segment.

Definition at line 105 of file segmentedVector.hpp.

Member Data Documentation

◆ segments

template<typename ValueType , typename IndexType = NeoN::localIdx>
View<IndexType> NeoN::SegmentedVectorView< ValueType, IndexType >::segments

A View of indices representing the segments.

Definition at line 70 of file segmentedVector.hpp.

◆ values

template<typename ValueType , typename IndexType = NeoN::localIdx>
View<ValueType> NeoN::SegmentedVectorView< ValueType, IndexType >::values

A View with the values.

Definition at line 65 of file segmentedVector.hpp.


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