A class representing a segment of indices.
More...
#include <segmentedField.hpp>
|
KOKKOS_INLINE_FUNCTION Kokkos::pair< IndexType, IndexType > | bounds (std::size_t segI) const |
| Get the bounds of a segment.
|
|
KOKKOS_INLINE_FUNCTION Kokkos::pair< IndexType, IndexType > | range (std::size_t segI) const |
| Get the range, ie. [start,end), of a segment.
|
|
KOKKOS_INLINE_FUNCTION std::span< ValueType > | span (std::size_t segI) const |
| Get a subspan of values corresponding to a segment.
|
|
KOKKOS_INLINE_FUNCTION IndexType | operator[] (std::size_t i) const |
| Access an element of the segments.
|
|
|
std::span< ValueType > | values |
| A span with the values.
|
|
std::span< IndexType > | segments |
| A span of indices representing the segments.
|
|
template<typename ValueType, typename IndexType = NeoFOAM::localIdx>
class NeoFOAM::SegmentedFieldView< ValueType, IndexType >
A class representing a segment of indices.
- Template Parameters
-
IndexType | The type of the indices. |
Definition at line 51 of file segmentedField.hpp.
◆ bounds()
template<typename ValueType , typename IndexType = NeoFOAM::localIdx>
KOKKOS_INLINE_FUNCTION Kokkos::pair< IndexType, IndexType > NeoFOAM::SegmentedFieldView< ValueType, IndexType >::bounds |
( |
std::size_t |
segI | ) |
const |
|
inline |
Get the bounds of a segment.
- Parameters
-
segI | The index of the segment. |
- Returns
- A pair of indices representing the start and end of the segment.
Definition at line 72 of file segmentedField.hpp.
◆ operator[]()
template<typename ValueType , typename IndexType = NeoFOAM::localIdx>
Access an element of the segments.
- Parameters
-
i | The index of the element. |
- Returns
- The value of the element at the specified index.
Definition at line 111 of file segmentedField.hpp.
◆ range()
template<typename ValueType , typename IndexType = NeoFOAM::localIdx>
KOKKOS_INLINE_FUNCTION Kokkos::pair< IndexType, IndexType > NeoFOAM::SegmentedFieldView< ValueType, IndexType >::range |
( |
std::size_t |
segI | ) |
const |
|
inline |
Get the range, ie. [start,end), of a segment.
- Parameters
-
segI | The index of the segment. |
- Returns
- A pair of indices representing the start and length of the segment.
Definition at line 84 of file segmentedField.hpp.
◆ span()
template<typename ValueType , typename IndexType = NeoFOAM::localIdx>
Get a subspan of values corresponding to a segment.
- Template Parameters
-
ValueType | The type of the values. |
- Parameters
-
segI | The index of the segment. |
- Returns
- A subspan of values corresponding to the segment.
Definition at line 98 of file segmentedField.hpp.
◆ segments
template<typename ValueType , typename IndexType = NeoFOAM::localIdx>
◆ values
template<typename ValueType , typename IndexType = NeoFOAM::localIdx>
The documentation for this class was generated from the following file: