3#ifndef TETL_MDSPAN_LAYOUT_RIGHT_HPP
4#define TETL_MDSPAN_LAYOUT_RIGHT_HPP
19template <
typename Extents>
36 template <
typename OtherExtents>
40 : _extents{other.extents()}
44 template <
typename OtherExtents>
48 : _extents{other.extents()}
52 template <
typename OtherExtents>
62 return static_cast<index_type>(
extents().fwd_prod_of_extents(extents_type::rank()));
65 template <
typename... Indices>
76 requires(extents_type::rank() > 0)
79 return static_cast<index_type>(_extents.rev_prod_of_extents(r));
82 [[nodiscard]]
static constexpr auto is_always_unique() noexcept ->
bool {
return true; }
86 [[nodiscard]]
static constexpr auto is_unique() noexcept ->
bool {
return true; }
87 [[nodiscard]]
static constexpr auto is_exhaustive() noexcept ->
bool {
return true; }
88 [[nodiscard]]
static constexpr auto is_strided() noexcept ->
bool {
return true; }
90 template <
typename OtherExtents>
93 return lhs.extents() == rhs.extents();
#define TETL_NO_UNIQUE_ADDRESS
Definition attributes.hpp:41
#define TETL_PRECONDITION(...)
Definition check.hpp:16
Definition adjacent_find.hpp:8
constexpr bool is_constructible_v
Definition is_constructible.hpp:24
etl::make_index_sequence< sizeof...(T)> index_sequence_for
Definition index_sequence.hpp:18
etl::integer_sequence< etl::size_t, Ints... > index_sequence
Definition index_sequence.hpp:12
constexpr bool is_nothrow_constructible_v
Definition is_nothrow_constructible.hpp:50
constexpr bool is_convertible_v
Definition is_convertible.hpp:46
Definition layout_left.hpp:19
Definition layout_right.hpp:20
constexpr auto operator()(Indices... indices) const noexcept -> index_type
Definition layout_right.hpp:68
constexpr mapping() noexcept=default
typename extents_type::rank_type rank_type
Definition layout_right.hpp:24
typename extents_type::index_type index_type
Definition layout_right.hpp:22
static constexpr auto is_exhaustive() noexcept -> bool
Definition layout_right.hpp:87
Extents extents_type
Definition layout_right.hpp:21
static constexpr auto is_always_exhaustive() noexcept -> bool
Definition layout_right.hpp:83
friend constexpr auto operator==(mapping const &lhs, mapping< OtherExtents > const &rhs) noexcept -> bool
Definition layout_right.hpp:91
static constexpr auto is_always_strided() noexcept -> bool
Definition layout_right.hpp:84
static constexpr auto is_strided() noexcept -> bool
Definition layout_right.hpp:88
static constexpr auto is_always_unique() noexcept -> bool
Definition layout_right.hpp:82
typename extents_type::size_type size_type
Definition layout_right.hpp:23
constexpr auto stride(rank_type r) const noexcept -> index_type requires(extents_type::rank() > 0)
Definition layout_right.hpp:75
layout_right layout_type
Definition layout_right.hpp:25
static constexpr auto is_unique() noexcept -> bool
Definition layout_right.hpp:86
constexpr auto extents() const noexcept -> extents_type const &
Definition layout_right.hpp:58
constexpr auto required_span_size() const noexcept -> index_type
Definition layout_right.hpp:60
constexpr explicit(extents_type::rank() > 0) mapping(layout_stride constexpr auto operator=(mapping const &) noexcept -> mapping &=default
Definition layout_stride.hpp:20