Namespaces
Variants
Actions

std::layout_right::mapping<Extents>::stride

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

Returns the stride of the mapping at a rank index i. Equivalent to return extents().rev-prod-of-extents(i);.

This overload participates in overload resolution only if extents_type​::​rank() > 0 is true.

The behavior is undefined if i >= extents_type::rank() is true.

Contents

[edit] Parameters

i - a rank index in the range [0extents_type::rank())

[edit] Return value

The stride at a specified rank index.

[edit] Example

[edit] See also

obtains the stride along the specified dimension
(public member function of std::layout_stride::mapping<Extents>) [edit]
obtains the stride along the specified dimension
(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