A class which describes a collection of equally spaced Idxs which form a index range.
More...
|
| IdxRangeSlice ()=default |
| Default constructor for IdxRangeSlice creating an empty index range.
|
|
KOKKOS_FUNCTION | IdxRangeSlice (Idx< Dims... > front, IdxStep< Dims... > size, IdxStep< Dims... > stride) |
| Build a IdxRangeSlice from vectors of valid Idxs in each dimension.
|
|
template<class... DDoms, class = std::enable_if_t<(is_subidx_range_collection_v<DDoms> && ...)>> |
KOKKOS_FUNCTION | IdxRangeSlice (DDoms const &... valid_indices) |
| Build a IdxRangeSlice from a set of 1D IdxRangeSlices.
|
|
template<class... DDims> |
KOKKOS_FUNCTION bool | contains (Idx< DDims... > elem) const |
| Check if the specified Idx is found in this index range slice.
|
|
template<class... DDims> |
KOKKOS_FUNCTION bool | contains (IdxRange< DDims... > idx_range) const |
| Check if all elements of the specified IdxRange are found in this index range slice.
|
|
template<class Dim , class = std::enable_if_t<ddc::in_tags_v<Dim, tags_seq>>> |
KOKKOS_FUNCTION std::size_t | get_index (Idx< Dim > elem) const |
| Get the index of the Idx within the index range slice.
|
|
KOKKOS_FUNCTION constexpr IdxStep< Dims... > | extents () const noexcept |
| Get the size of the index range slice in each dimension.
|
|
template<class QueryDDim > |
KOKKOS_FUNCTION constexpr IdxStep< QueryDDim > | extent () const noexcept |
| Get the size of the index range slice in the specified dimension.
|
|
KOKKOS_FUNCTION constexpr std::size_t | size () const |
| Get the total number of elements in the index range slice.
|
|
KOKKOS_FUNCTION constexpr Idx< Dims... > | front () const noexcept |
| Get the first element in the index range slice.
|
|
KOKKOS_FUNCTION constexpr Idx< Dims... > | back () const noexcept |
| Get the last element in the index range slice.
|
|
template<class QueryDim > |
KOKKOS_FUNCTION constexpr IdxStep< QueryDim > | stride () const noexcept |
| Get the stride from one element of the index range slice to another.
|
|
KOKKOS_FUNCTION constexpr IdxStep< Dims... > | strides () const noexcept |
| Get the strides from one element of the index range slice to another.
|
|
KOKKOS_FUNCTION auto | begin () const |
| Get the iterator to the first element of the IdxRangeSlice.
|
|
KOKKOS_FUNCTION auto | end () const |
| Get the iterator to the end of the IdxRangeSlice.
|
|
template<class... Dims>
class IdxRangeSlice< Dims >
A class which describes a collection of equally spaced Idxs which form a index range.
This class should eventually be replaced by a DDC functionality when this becomes available.