|
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
101 template <class E = extents_type, class D = data_handle_type, class M = mapping_type, class A = accessor_type,
115 std::enable_if_t<(sizeof...(IndexTypes) == E::rank() || sizeof...(IndexTypes) == E::rank_dynamic()), int> = 0,
170 template <class OtherElementType, class OtherExtends, class OtherLayoutPolicy, class OtherAccessor,
171 std::enable_if_t<std::is_constructible_v<mapping_type, const typename OtherLayoutPolicy::template mapping<OtherExtends>&>, int> = 0,
174 explicit(!std::is_convertible_v<const typename OtherLayoutPolicy::template mapping<OtherExtends>&, mapping_type>
177 constexpr mdspan (const mdspan<OtherElementType,OtherExtends,OtherLayoutPolicy,OtherAccessor>& other) noexcept
273 static constexpr std::size_t static_extent (rank_type r) noexcept { return extents_type::static_extent(r); }
343 -> 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:162
static constexpr rank_type rank_dynamic() noexcept
Number of dimensions of the tensor.
Definition mdspan.hh:270
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:294
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:314
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:157
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:150
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:297
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:220
constexpr const extents_type & extents() const noexcept
Number of elements in all dimensions of the tensor,.
Definition mdspan.hh:251
constexpr index_type extent(rank_type r) const noexcept
Number of elements in the r'th dimension of the tensor.
Definition mdspan.hh:276
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:321
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:300
constexpr size_type size() const noexcept
The number of elements accessible by this multi-dimensional span.
Definition mdspan.hh:279
typename accessor_type::data_handle_type data_handle_type
Definition mdspan.hh:82
constexpr bool empty() const noexcept
Checks if the size of the index space is zero.
Definition mdspan.hh:288
constexpr const accessor_type & accessor() const noexcept
The accessor policy object.
Definition mdspan.hh:257
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:307
static constexpr rank_type rank() noexcept
Number of dimensions of the tensor.
Definition mdspan.hh:267
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:273
constexpr const mapping_type & mapping() const noexcept
Index mapping of a layout policy.
Definition mdspan.hh:254
constexpr const data_handle_type & data_handle() const noexcept
The pointer to the underlying flat sequence.
Definition mdspan.hh:260
constexpr index_type stride(rank_type r) const
The stride along the specified dimension.
Definition mdspan.hh:317
constexpr bool is_unique() const
Return true only if for every i and j where (i != j || ...) => mapping(i...) != mapping(j....
Definition mdspan.hh:303
constexpr mdspan()
Default constructor value-initializes all members.
Definition mdspan.hh:106
typename layout_type::template mapping< extents_type > mapping_type
Definition mdspan.hh:78
T apply(T... args)
T swap(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8