Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
arene::base::extent_slice< OffsetType, ExtentType, StrideType > Class Template Reference

represents a set of extent regularly spaced integer indices More...

Public Types

using extent_type = ExtentType
 extent type
 
using offset_type = OffsetType
 offset type
 
using stride_type = StrideType
 stride type
 

Public Attributes

extent_type extent {}
 extent of indices Number of indices in this slice.
 
offset_type offset {}
 start of indices First index in this slice, i.e. offset from zero.
 
stride_type stride {}
 stride of indices Stride (or step) between indices in this slice.
 

Detailed Description

template<class OffsetType, class ExtentType = OffsetType, class StrideType = std::integral_constant<std::size_t, 1>>
class arene::base::extent_slice< OffsetType, ExtentType, StrideType >

represents a set of extent regularly spaced integer indices

Template Parameters
OffsetTypetype used to specify the offset
ExtentTypetype used to specify the extent
StrideTypetype used to specify the stride

extent_slice<int>{1, 4, 3} indicates the indices 1, 4, 7, and 10. The slice contains 4 indices, starting from 1, with a stride of 3.

Member Typedef Documentation

◆ extent_type

template<class OffsetType, class ExtentType = OffsetType, class StrideType = std::integral_constant<std::size_t, 1>>
using arene::base::extent_slice< OffsetType, ExtentType, StrideType >::extent_type = ExtentType

extent type

◆ offset_type

template<class OffsetType, class ExtentType = OffsetType, class StrideType = std::integral_constant<std::size_t, 1>>
using arene::base::extent_slice< OffsetType, ExtentType, StrideType >::offset_type = OffsetType

offset type

◆ stride_type

template<class OffsetType, class ExtentType = OffsetType, class StrideType = std::integral_constant<std::size_t, 1>>
using arene::base::extent_slice< OffsetType, ExtentType, StrideType >::stride_type = StrideType

stride type

Member Data Documentation

◆ extent

template<class OffsetType, class ExtentType = OffsetType, class StrideType = std::integral_constant<std::size_t, 1>>
extent_type arene::base::extent_slice< OffsetType, ExtentType, StrideType >::extent {}

extent of indices Number of indices in this slice.

Attention
This value must be non-negative to represent a valid slice.

◆ offset

template<class OffsetType, class ExtentType = OffsetType, class StrideType = std::integral_constant<std::size_t, 1>>
offset_type arene::base::extent_slice< OffsetType, ExtentType, StrideType >::offset {}

start of indices First index in this slice, i.e. offset from zero.

Attention
This value must be non-negative to represent a valid slice.

◆ stride

template<class OffsetType, class ExtentType = OffsetType, class StrideType = std::integral_constant<std::size_t, 1>>
stride_type arene::base::extent_slice< OffsetType, ExtentType, StrideType >::stride {}

stride of indices Stride (or step) between indices in this slice.

Attention
This value must be positive to represent a valid slice.

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