Namespaces
Variants
Actions

std::layout_stride::mapping<Extents>::required_span_size

From cppreference.com
< cpp‎ | container‎ | mdspan‎ | layout stride‎ | mapping
 
C++
 
Containers library
 
std::mdspan
 
std::layout_stride::mapping
constexpr index_type required_span_size() const noexcept;
(since C++23)

Returns the required size of the mapping.

Let s be equal to:

  • 1, if extents().rank() == 0 is true,
  • otherwise, 0, if the size of the multidimensional index space extents() is 0,
  • otherwise, 1 plus the sum of products of extents().extent(r) - 1 and extents_type::index-cast(strides_[r]) for all r in the range [0extents().rank()).

A call is equivalent to return s;.

[edit] Return value

The required size of the mapping.

[edit] Example

[edit] See also

returns the required size of the mapping
(public member function of std::layout_left::mapping<Extents>) [edit]
returns the required size of the mapping
(public member function of std::layout_right::mapping<Extents>) [edit]
returns the size of the multidimensional index space
(public member function of std::mdspan<T,Extents,LayoutPolicy,AccessorPolicy>) [edit]

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant