|
dune-common 2.12-git
|
Loading...
Searching...
No Matches
mdspan.hh
Go to the documentation of this file.
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
103 template <class E = extents_type, class D = data_handle_type, class M = mapping_type, class A = accessor_type,
117 std::enable_if_t<(sizeof...(IndexTypes) == E::rank() || sizeof...(IndexTypes) == E::rank_dynamic()), int> = 0,
172 template <class OtherElementType, class OtherExtends, class OtherLayoutPolicy, class OtherAccessor,
173 std::enable_if_t<std::is_constructible_v<mapping_type, const typename OtherLayoutPolicy::template mapping<OtherExtends>&>, int> = 0,
176 explicit(!std::is_convertible_v<const typename OtherLayoutPolicy::template mapping<OtherExtends>&, mapping_type>
179 constexpr mdspan (const mdspan<OtherElementType,OtherExtends,OtherLayoutPolicy,OtherAccessor>& other) noexcept
312 static constexpr std::size_t static_extent (rank_type r) noexcept { return extents_type::static_extent(r); }
382 -> mdspan<std::remove_all_extents_t<CArray>, Std::extents<std::size_t, std::extent_v<CArray,0>>>;
decltype(auto) constexpr unpackIntegerSequence(F &&f, std::integer_sequence< I, i... > sequence)
Unpack an std::integer_sequence<I,i...> to std::integral_constant<I,i>...
Definition indices.hh:124
typename Impl::DExtentsImpl< IndexType, std::make_integer_sequence< std::size_t, R > >::type dextents
Alias of extents of given rank R and purely dynamic extents. See [mdspan.extents.dextents].
Definition extents.hh:258
STL namespace.
Multidimensional index space with dynamic and static extents.
Definition extents.hh:55
constexpr mdspan(data_handle_type p, const mapping_type &m, const accessor_type &a)
Construct from the pointer to the data of the tensor, an index mapping, and an accessor.
Definition mdspan.hh:164
constexpr reference at(const std::array< Index, extents_type::rank()> &indices) const
Access specified element with bounds checking.
Definition mdspan.hh:279
static constexpr rank_type rank_dynamic() noexcept
Number of dimensions of the tensor.
Definition mdspan.hh:309
static constexpr bool is_always_unique()
Return true only if for every i and j where (i != j || ...) => mapping(i...) != mapping(j....
Definition mdspan.hh:333
constexpr bool is_strided() const
Return true only if for every rank index r of extents there exists an integer sr such that,...
Definition mdspan.hh:353
constexpr mdspan(data_handle_type p, const mapping_type &m)
Construct from the pointer to the data of the tensor and an index mapping.
Definition mdspan.hh:159
constexpr mdspan(data_handle_type p, const extents_type &e)
Construct from the pointer to the data of the tensor and its extents.
Definition mdspan.hh:152
static constexpr bool is_always_exhaustive()
Return true only if for all k in the range [0, mapping.required_span_size() ) there exists an i such ...
Definition mdspan.hh:336
constexpr reference at(std::span< Index, extents_type::rank()> indices) const
Access specified element with bounds checking.
Definition mdspan.hh:266
constexpr reference operator[](Index index) const
Access specified element at position [i0] For a rank one mdspan, the operator[i] is added to support ...
Definition mdspan.hh:222
constexpr const extents_type & extents() const noexcept
Number of elements in all dimensions of the tensor,.
Definition mdspan.hh:290
constexpr index_type extent(rank_type r) const noexcept
Number of elements in the r'th dimension of the tensor.
Definition mdspan.hh:315
friend constexpr void swap(mdspan &x, mdspan &y) noexcept
Overloads the std::swap algorithm for std::mdspan. Exchanges the state of x with that of y.
Definition mdspan.hh:360
static constexpr bool is_always_strided()
Return true only if for every rank index r of extents there exists an integer sr such that,...
Definition mdspan.hh:339
constexpr size_type size() const noexcept
The number of elements accessible by this multi-dimensional span.
Definition mdspan.hh:318
typename accessor_type::data_handle_type data_handle_type
Definition mdspan.hh:84
constexpr bool empty() const noexcept
Checks if the size of the index space is zero.
Definition mdspan.hh:327
constexpr reference at(Indices... indices) const
Access specified element with bounds checking.
Definition mdspan.hh:255
constexpr const accessor_type & accessor() const noexcept
The accessor policy object.
Definition mdspan.hh:296
constexpr bool is_exhaustive() const
Return true only if for all k in the range [0, mapping.required_span_size() ) there exists an i such ...
Definition mdspan.hh:346
static constexpr rank_type rank() noexcept
Number of dimensions of the tensor.
Definition mdspan.hh:306
static constexpr std::size_t static_extent(rank_type r) noexcept
Number of elements in the r'th dimension of the tensor.
Definition mdspan.hh:312
constexpr const mapping_type & mapping() const noexcept
Index mapping of a layout policy.
Definition mdspan.hh:293
constexpr const data_handle_type & data_handle() const noexcept
The pointer to the underlying flat sequence.
Definition mdspan.hh:299
constexpr index_type stride(rank_type r) const
The stride along the specified dimension.
Definition mdspan.hh:356
constexpr bool is_unique() const
Return true only if for every i and j where (i != j || ...) => mapping(i...) != mapping(j....
Definition mdspan.hh:342
constexpr mdspan()
Default constructor value-initializes all members.
Definition mdspan.hh:108
typename layout_type::template mapping< extents_type > mapping_type
Definition mdspan.hh:80
T apply(T... args)
T swap(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8