3#ifndef TETL_MDSPAN_LAYOUT_STRIDE_HPP
4#define TETL_MDSPAN_LAYOUT_STRIDE_HPP
19template <
typename Extents>
28 static constexpr auto rank = extents_type::rank();
34 template <typename OtherIndexType>
45 template <
typename OtherIndexType>
52 template <
typename Str
idedLayoutMapping>
53 constexpr explicit(
false )
mapping(StridedLayoutMapping
const&)
noexcept;
66 template <
typename... Indices>
68 (
sizeof...(Indices) ==
rank)
72 [[nodiscard]]
constexpr auto operator()(Indices... is)
const noexcept ->
index_type
79 [[nodiscard]]
static constexpr auto is_always_unique() noexcept ->
bool {
return true; }
83 [[nodiscard]]
static constexpr auto is_unique() noexcept ->
bool {
return true; }
84 [[nodiscard]]
static constexpr auto is_strided() noexcept ->
bool {
return true; }
87 template <typename OtherMapping>
88 friend constexpr auto operator==(
mapping const&, OtherMapping const&) noexcept ->
bool;
#define TETL_NO_UNIQUE_ADDRESS
Definition attributes.hpp:41
#define TETL_PRECONDITION(...)
Definition check.hpp:16
Definition adjacent_find.hpp:8
constexpr auto as_const(T &t) noexcept -> add_const_t< T > &
Forms lvalue reference to const type of t.
Definition as_const.hpp:12
etl::make_index_sequence< sizeof...(T)> index_sequence_for
Definition index_sequence.hpp:18
etl::make_integer_sequence< etl::size_t, Size > make_index_sequence
Definition index_sequence.hpp:15
etl::integer_sequence< etl::size_t, Ints... > index_sequence
Definition index_sequence.hpp:12
span(c_array< Type, Extent > &) -> span< Type, Extent >
constexpr bool is_nothrow_constructible_v
Definition is_nothrow_constructible.hpp:50
constexpr bool is_convertible_v
Definition is_convertible.hpp:46
A container that encapsulates fixed size arrays.
Definition array.hpp:48
Definition layout_stride.hpp:20
constexpr mapping() noexcept=default
typename extents_type::rank_type rank_type
Definition layout_stride.hpp:24
constexpr auto strides() const noexcept -> array< index_type, rank >
Definition layout_stride.hpp:59
typename extents_type::index_type index_type
Definition layout_stride.hpp:22
Extents extents_type
Definition layout_stride.hpp:21
static constexpr auto is_always_exhaustive() noexcept -> bool
Definition layout_stride.hpp:81
constexpr auto is_exhaustive() const noexcept -> bool
constexpr auto operator=(mapping const &) noexcept -> mapping &=default
static constexpr auto is_always_strided() noexcept -> bool
Definition layout_stride.hpp:80
static constexpr auto is_strided() noexcept -> bool
Definition layout_stride.hpp:84
constexpr mapping(extents_type const &ext, array< OtherIndexType, rank > const &s) noexcept
Definition layout_stride.hpp:47
constexpr auto stride(rank_type i) const noexcept -> index_type
Definition layout_stride.hpp:60
static constexpr auto is_always_unique() noexcept -> bool
Definition layout_stride.hpp:79
typename extents_type::size_type size_type
Definition layout_stride.hpp:23
layout_stride layout_type
Definition layout_stride.hpp:25
static constexpr auto is_unique() noexcept -> bool
Definition layout_stride.hpp:83
constexpr auto extents() const noexcept -> extents_type const &
Definition layout_stride.hpp:58
constexpr auto required_span_size() const noexcept -> index_type
If Type is an array type, provides the member constant value equal to the number of dimensions of the...
Definition rank.hpp:16
A non-owning view over a contiguous sequence of objects.
Definition span.hpp:83