Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/container/mdspan/stride"

From cppreference.com
< cpp‎ | container‎ | mdspan
m (fmt.)
m ({{c}})
 
Line 7: Line 7:
 
{{dcl end}}
 
{{dcl end}}
  
Returns the stride of the layout mapping {{rlpi|/#Data members|map_}} in {{tt|r}}{{sup|th}} dimension. Equivalent to {{c|return map_.stride(r);}}.
+
Returns the stride of the layout mapping {{rlpi|/#Data members|map_}} in {{c|r}}{{sup|th}} dimension. Equivalent to {{c|return map_.stride(r);}}.
  
 
===Parameters===
 
===Parameters===
Line 18: Line 18:
  
 
===Example===
 
===Example===
{{example|code=
+
{{example}}
|output=
+
}}
+
  
 
===See also===
 
===See also===

Latest revision as of 00:54, 3 November 2023

 
 
 
 
constexpr index_type stride( rank_type r ) const;
(since C++23)

Returns the stride of the layout mapping map_ in rth dimension. Equivalent to return map_.stride(r);.

Contents

[edit] Parameters

r - the index of the dimension

[edit] Return value

The stride.

[edit] Example

[edit] See also