A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/language/../error/error_code/../../container/mdspan/extents.html below:

std::extents, std::dextents, std::dims - cppreference.com

template< class IndexType, std::size_t... Extents >
class extents;
(1) (since C++23) template< class IndexType, std::size_t Rank >
using dextents = /* see below */
(2) (since C++23) (3) (since C++26)

1) Represents a multidimensional index space of rank equal to sizeof...(Extents).

2)

A convenient alias template for an all-dynamic

extents

. Let

d

denote

std::dynamic_extent

, each specialization of it

dextents<IndexType, Rank>

is equivalent to

extents<IndexType /*, d, d, ..., d*/>

(i.e.

d

is repeated a total of

Rank

times).

3)

A convenient alias template for an all-dynamic

extents

with

std::size_t

as the default index type.

Each specialization of extents models regular and is TriviallyCopyable.

[edit] Template parameters IndexType - the type of each non-dynamic Extents. Shall be a signed or unsigned integer type. Otherwise, the program is ill-formed Extents - represents extent (size of an integer interval) for each rank index. Each element of it is either equal to std::dynamic_extent (in this case, it represents a dynamic extent and the extent size will be determined dynamically), or is representable as a value of type IndexType (then it represents a static extent and the extent size is just the value of it), or else the program is ill-formed Rank - denotes the rank of an all-dynamic extents [edit] Member types [edit] Data members Member name Definition std::array<index_type, rank_dynamic()> dynamic-extents (private) An array which stores the size of each dynamic extents.
(exposition-only member object*) [edit] Member functions constructs an extents
(public member function) [edit] Observers returns the static rank of an extents
(public static member function) [edit] returns the dynamic rank of an extents
(public static member function) [edit] returns static extent size of an extents at a certain rank index
(public static member function) [edit] returns dynamic extent size of an extents at a certain rank index
(public member function) [edit] Helpers returns the product of extent size in range [​0​i)
(exposition-only member function*)[edit] returns the product of extents size in range [i + 1rank())
(exposition-only member function*)[edit] casts the input into an integer type
(exposition-only member function*)[edit] returns the number of dynamic extents below a certain rank index
(exposition-only member function*)[edit] returns the number r such that in range [​0​r + 1) there is exactly i + 1 dynamic extents for a certain argument i
(exposition-only member function*)[edit] [edit] Non-member functions compare underlying extents in each dimension of two extents
(function) [edit] [edit] Deduction guides(C++23) [edit] Example [edit] See also obtains the number of dimensions of an array type
(class template) [edit] obtains the size of an array type along a specified dimension
(class template) [edit]

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4