class template
std::mdspan
- Header
<mdspan>- Scope
std- cppreference
- std::mdspan
Synopsis
template<
class ElementType,
class Extents,
class LayoutPolicy = layout_right,
class AccessorPolicy = default_accessor<ElementType>>
class mdspan;Member types
| Name | Declaration |
|---|---|
accessor_typetype alias · member type | = AccessorPolicy |
data_handle_typetype alias · member type | = accessor_type::data_handle_type |
element_typetype alias · member type | = ElementType |
extents_typetype alias · member type | = Extents |
index_typetype alias · member type | = extents_type::index_type |
layout_typetype alias · member type | = LayoutPolicy |
mapping_typetype alias · member type | = layout_type::mapping<extents_type> |
rank_typetype alias · member type | = extents_type::rank_type |
referencetype alias · member type | = accessor_type::reference |
size_typetype alias · member type | = extents_type::size_type |
value_typetype alias · member type | = remove_cv_t<element_type> |
Member functions
| Name | Declaration |
|---|---|
mdspanconstructor · 10 overloads | mdspan() +9 more |
operator=operator · 2 overloads | mdspan& operator=(const mdspan& rhs) +1 more |
accessormember function | const accessor_type& accessor() const |
atmember function template · 3 overloads | reference at(span<OtherIndexType, rank()> indices) const +2 more |
data_handlemember function | const data_handle_type& data_handle() const |
emptymember function | bool empty() const |
extentmember function | index_type extent(rank_type r) const |
extentsmember function | const extents_type& extents() const |
is_exhaustivemember function | bool is_exhaustive() const |
is_stridedmember function | bool is_strided() const |
is_uniquemember function | bool is_unique() const |
mappingmember function | const mapping_type& mapping() const |
operator[]operator template · 3 overloads | reference operator[](span<OtherIndexType, rank()> indices) const +2 more |
sizemember function | size_type size() const |
stridemember function | index_type stride(rank_type r) const |
Static member functions
| Name | Declaration |
|---|---|
is_always_exhaustivestatic member function | bool is_always_exhaustive() |
is_always_stridedstatic member function | bool is_always_strided() |
is_always_uniquestatic member function | bool is_always_unique() |
rankstatic member function | rank_type rank() |
rank_dynamicstatic member function | rank_type rank_dynamic() |
static_extentstatic member function | size_t static_extent(rank_type r) |