libstdc++
mdspan File Reference

Go to the source code of this file.

Namespaces

namespace  std
 

Typedefs

template<typename _IndexType , size_t _Rank>
using std::dextents = decltype(__mdspan::__build_dextents_type< _IndexType >(make_index_sequence< _Rank >()))
 
template<size_t _Rank, typename _IndexType = size_t>
using std::dims = dextents< _IndexType, _Rank >
 

Enumerations

enum class  _LayoutSide { __left , __right , __unknown }
 
enum class  _SliceKind { __extent_slice , __unit_stride_slice , __full , __collapsing }
 

Functions

consteval bool std::__mdspan::__all_dynamic (std::span< const size_t > __extents)
 
consteval bool std::__mdspan::__all_static (std::span< const size_t > __extents)
 
template<typename _IndexType , size_t... _Counts>
auto std::__mdspan::__build_dextents_type (integer_sequence< size_t, _Counts... >) -> extents< _IndexType,((void) _Counts, dynamic_extent)... >
 
template<typename _Tp , size_t _Nm>
consteval bool std::__mdspan::__contains_zero (const array< _Tp, _Nm > &__exts) noexcept
 
template<typename _Tp , size_t _Nm>
constexpr bool std::__mdspan::__contains_zero (span< _Tp, _Nm > __exts) noexcept
 
template<typename _Extents >
constexpr span< const typename _Extents::index_type > std::__mdspan::__dynamic_extents (const _Extents &__exts, size_t __begin=0, size_t __end=_Extents::rank()) noexcept
 
template<size_t _K, typename _Extents , typename _Slice >
constexpr _Extents::index_type std::__mdspan::__dynamic_slice_extent (const _Extents &__exts, _Slice __slice)
 
template<typename _Extents >
constexpr bool std::__mdspan::__empty (const _Extents &__exts) noexcept
 
template<typename _Extents >
constexpr _Extents::index_type std::__mdspan::__extents_prod (const _Extents &__exts, size_t __sta_prod, size_t __begin, size_t __end) noexcept
 
template<size_t _Index, typename _Extents >
constexpr auto std::__mdspan::__extract_extent (const _Extents &__exts)
 
template<typename _Extents >
constexpr _Extents::index_type std::__mdspan::__fwd_prod (const _Extents &__exts, size_t __begin, size_t __end) noexcept
 
template<typename _Extents >
constexpr _Extents::index_type std::__mdspan::__fwd_prod (const _Extents &__exts, size_t __r) noexcept
 
template<typename _IndexType , size_t _Nm>
consteval _IndexType std::__mdspan::__fwd_prod (span< const _IndexType, _Nm > __values)
 
template<typename _PaddedMapping >
consteval size_t std::__mdspan::__get_static_stride ()
 
template<typename _IndexType , typename _OIndexTypeRef >
constexpr _IndexType std::__mdspan::__index_type_cast (_OIndexTypeRef &&__other)
 
template<typename _IndexType , typename... _Slices>
consteval auto std::__mdspan::__inv_map_rank ()
 
consteval bool std::__mdspan::__is_block (span< const _SliceKind > __slice_kinds, size_t __block_size)
 
template<typename _Extents >
constexpr bool std::__mdspan::__is_representable_extents (const _Extents &__exts) noexcept
 
template<typename _IndexType , typename _OIndexType >
consteval bool std::__mdspan::__is_representable_integer (_OIndexType __value)
 
template<typename _Extents , typename... _Indices>
constexpr _Extents::index_type std::__mdspan::__linear_index_left (const _Extents &__exts, _Indices... __indices) noexcept
 
template<typename _Slice >
consteval _SliceKind std::__mdspan::__make_slice_kind ()
 
template<typename... _Slices>
consteval array< _SliceKind, sizeof...(_Slices)> std::__mdspan::__make_slice_kind_array ()
 
template<typename _Mapping >
consteval _LayoutSide std::__mdspan::__mapping_side ()
 
template<typename _Mapping >
constexpr _Mapping::index_type std::__mdspan::__offset (const _Mapping &__m) noexcept
 
template<_LayoutSide _Side, size_t _Nm>
static consteval size_t std::__mdspan::__padded_block_begin (span< const _SliceKind, _Nm > __slice_kinds, size_t __sub_rank)
 
static consteval size_t std::__mdspan::__padded_block_begin_generic (span< const _SliceKind > __slice_kinds, size_t __sub_rank)
 
template<typename _Extents >
constexpr _Extents::index_type std::__mdspan::__rev_prod (const _Extents &__exts, size_t __r) noexcept
 
template<typename _Extents >
constexpr _Extents::index_type std::__mdspan::__size (const _Extents &__exts) noexcept
 
template<typename _Slice >
constexpr auto std::__mdspan::__slice_begin (_Slice __slice)
 
template<typename _Extents >
constexpr const array< size_t, _Extents::rank()> & std::__mdspan::__static_extents () noexcept
 
template<typename _Extents >
constexpr span< const size_t > std::__mdspan::__static_extents (size_t __begin, size_t __end) noexcept
 
template<typename _Extents , typename _IndexType = typename _Extents::index_type>
requires __is_extents<_Extents>
consteval _IndexType std::__mdspan::__static_quotient (_IndexType __nom=__gnu_cxx::__int_traits< _IndexType >::__max)
 
template<typename _IndexType >
consteval _IndexType std::__mdspan::__static_quotient (std::span< const size_t > __sta_exts, _IndexType __nom=__gnu_cxx::__int_traits< _IndexType >::__max)
 
template<typename _IndexType , size_t _Extent, typename _Slice >
consteval size_t std::__mdspan::__static_slice_extent ()
 
template<typename _IndexType , size_t... _Extents, typename... _Slices>
requires (sizeof...(_Slices) == sizeof...(_Extents))
constexpr auto std::__mdspan::__subextents (const extents< _IndexType, _Extents... > &__exts, _Slices... __slices)
 
template<typename _Mapping >
constexpr auto std::__mdspan::__submdspan_mapping_impl (const _Mapping &__mapping)
 
template<typename _Mapping , typename... _Slices>
requires (sizeof...(_Slices) > 0)
constexpr auto std::__mdspan::__submdspan_mapping_impl (const _Mapping &__mapping, _Slices... __slices)
 
template<typename _Mapping , typename... _Slices>
constexpr size_t std::__mdspan::__suboffset (const _Mapping &__mapping, const _Slices &... __slices)
 
template<typename _IndexType , typename... _Slices>
consteval auto std::__mdspan::__subrank ()
 
template<typename _SubExts , typename _Mapping , typename... _Slices>
constexpr auto std::__mdspan::__substrides (const _Mapping &__mapping, const _Slices &... __slices)
 
template<typename _SubExts , typename _Mapping , typename... _Slices>
constexpr auto std::__mdspan::__substrides_generic (const _Mapping &__mapping, const _Slices &... __slices)
 
template<typename _SubExts , typename _Mapping , typename... _Slices>
constexpr auto std::__mdspan::__substrides_standardized (const _Mapping &__mapping, const _Slices &... __slices)
 
template<typename _IndexType , size_t... _Extents, typename... _RawSlices>
requires (sizeof...(_Extents) == sizeof...(_RawSlices))
constexpr auto std::canonical_slices (const extents< _IndexType, _Extents... > &__exts, _RawSlices... __raw_slices)
 
template<typename... _Integrals>
requires (is_convertible_v<_Integrals, size_t> && ...)
 std::extents (_Integrals...) -> extents< size_t, __detail::__maybe_static_ext< _Integrals >... >
 
template<typename _CArray >
requires is_array_v<_CArray> && (rank_v<_CArray> == 1)
 std::mdspan (_CArray &) -> mdspan< remove_all_extents_t< _CArray >, extents< size_t, extent_v< _CArray, 0 > > >
 
template<typename _ElementType , typename... _Integrals>
requires (is_convertible_v<_Integrals, size_t> && ...) && (sizeof...(_Integrals) > 0)
 std::mdspan (_ElementType *, _Integrals...) -> mdspan< _ElementType, extents< size_t, __detail::__maybe_static_ext< _Integrals >... > >
 
template<typename _ElementType , typename _MappingType >
 std::mdspan (_ElementType *, const _MappingType &) -> mdspan< _ElementType, typename _MappingType::extents_type, typename _MappingType::layout_type >
 
template<typename _ElementType , typename _OIndexType , size_t _Nm>
 std::mdspan (_ElementType *, const array< _OIndexType, _Nm > &) -> mdspan< _ElementType, dextents< size_t, _Nm > >
 
template<typename _ElementType , typename _IndexType , size_t... _ExtentsPack>
 std::mdspan (_ElementType *, const extents< _IndexType, _ExtentsPack... > &) -> mdspan< _ElementType, extents< _IndexType, _ExtentsPack... > >
 
template<typename _ElementType , typename _OIndexType , size_t _Nm>
 std::mdspan (_ElementType *, span< _OIndexType, _Nm >) -> mdspan< _ElementType, dextents< size_t, _Nm > >
 
template<typename _Pointer >
requires is_pointer_v<remove_reference_t<_Pointer>>
 std::mdspan (_Pointer &&) -> mdspan< remove_pointer_t< remove_reference_t< _Pointer > >, extents< size_t > >
 
template<typename _MappingType , typename _AccessorType >
 std::mdspan (typename _AccessorType::data_handle_type, const _MappingType &, const _AccessorType &) -> mdspan< typename _AccessorType::element_type, typename _MappingType::extents_type, typename _MappingType::layout_type, _AccessorType >
 
template<typename _IndexType , size_t... _Extents, typename... _RawSlices>
requires (sizeof...(_RawSlices) == sizeof...(_Extents))
constexpr auto std::subextents (const extents< _IndexType, _Extents... > &__exts, _RawSlices... __raw_slices)
 
template<typename _ElementType , typename _Extents , typename _Layout , typename _Accessor , typename... _RawSlices>
requires (sizeof...(_RawSlices) == _Extents::rank() && __mdspan::__sliceable_mapping<typename _Layout::template mapping<_Extents>, __mdspan::__full_extent_t<_RawSlices>...>)
constexpr auto std::submdspan (const mdspan< _ElementType, _Extents, _Layout, _Accessor > &__md, _RawSlices... __raw_slices)
 

Variables

template<array _Extents>
constexpr auto std::__mdspan::__fwd_partial_prods
 
template<typename _Tp >
constexpr bool std::__mdspan::__is_constant_wrapper
 
template<_CwFixedValue _Xv, typename _Tp >
constexpr bool std::__mdspan::__is_constant_wrapper< constant_wrapper< _Xv, _Tp > >
 
template<typename _Tp >
constexpr bool std::__mdspan::__is_extent_slice
 
template<typename _OffsetType , typename _ExtentType , typename _StrideType >
constexpr bool std::__mdspan::__is_extent_slice< extent_slice< _OffsetType, _ExtentType, _StrideType > >
 
template<typename _Tp >
constexpr bool std::__mdspan::__is_extents
 
template<typename _IndexType , size_t... _Extents>
constexpr bool std::__mdspan::__is_extents< extents< _IndexType, _Extents... > >
 
template<typename _Mapping >
constexpr bool std::__mdspan::__is_left_padded_mapping
 
template<typename _Mapping >
constexpr bool std::__mdspan::__is_padded_mapping
 
template<typename _Tp >
constexpr bool std::__mdspan::__is_range_slice
 
template<typename _FirstType , typename _LastType , typename _StrideType >
constexpr bool std::__mdspan::__is_range_slice< range_slice< _FirstType, _LastType, _StrideType > >
 
template<typename _Mapping >
constexpr bool std::__mdspan::__is_right_padded_mapping
 
template<typename _Tp >
constexpr bool std::__is_submdspan_mapping_result
 
template<typename _Mapping >
constexpr bool std::__is_submdspan_mapping_result< submdspan_mapping_result< _Mapping > >
 
template<array _Extents>
constexpr auto std::__mdspan::__rev_partial_prods
 
constexpr full_extent_t std::full_extent
 

Detailed Description

This is a Standard C++ Library header.

Definition in file mdspan.

Enumeration Type Documentation

◆ _LayoutSide

enum class std::__mdspan::_LayoutSide
strong

Definition at line 1059 of file mdspan.

◆ _SliceKind

enum class std::__mdspan::_SliceKind
strong

Definition at line 1215 of file mdspan.

Function Documentation

◆ __all_dynamic()

consteval bool std::__mdspan::__all_dynamic ( std::span< const size_t >  __extents)

Definition at line 75 of file mdspan.

◆ __all_static()

consteval bool std::__mdspan::__all_static ( std::span< const size_t >  __extents)

Definition at line 66 of file mdspan.

◆ __contains_zero() [1/2]

template<typename _Tp , size_t _Nm>
consteval bool std::__mdspan::__contains_zero ( const array< _Tp, _Nm > &  __exts)
noexcept

Definition at line 559 of file mdspan.

◆ __contains_zero() [2/2]

template<typename _Tp , size_t _Nm>
constexpr bool std::__mdspan::__contains_zero ( span< _Tp, _Nm >  __exts)
constexprnoexcept

Definition at line 549 of file mdspan.

◆ __dynamic_extents()

template<typename _Extents >
constexpr span< const typename _Extents::index_type > std::__mdspan::__dynamic_extents ( const _Extents &  __exts,
size_t  __begin = 0,
size_t  __end = _Extents::rank() 
)
constexprnoexcept

Definition at line 347 of file mdspan.

◆ __dynamic_slice_extent()

template<size_t _K, typename _Extents , typename _Slice >
constexpr _Extents::index_type std::__mdspan::__dynamic_slice_extent ( const _Extents &  __exts,
_Slice  __slice 
)
constexpr

Definition at line 1014 of file mdspan.

◆ __empty()

template<typename _Extents >
constexpr bool std::__mdspan::__empty ( const _Extents &  __exts)
constexprnoexcept

Definition at line 564 of file mdspan.

◆ __extents_prod()

template<typename _Extents >
constexpr _Extents::index_type std::__mdspan::__extents_prod ( const _Extents &  __exts,
size_t  __sta_prod,
size_t  __begin,
size_t  __end 
)
constexprnoexcept

Definition at line 576 of file mdspan.

◆ __extract_extent()

template<size_t _Index, typename _Extents >
constexpr auto std::__mdspan::__extract_extent ( const _Extents &  __exts)
constexpr

Definition at line 916 of file mdspan.

◆ __fwd_prod() [1/3]

template<typename _Extents >
constexpr _Extents::index_type std::__mdspan::__fwd_prod ( const _Extents &  __exts,
size_t  __begin,
size_t  __end 
)
constexprnoexcept

Definition at line 592 of file mdspan.

◆ __fwd_prod() [2/3]

template<typename _Extents >
constexpr _Extents::index_type std::__mdspan::__fwd_prod ( const _Extents &  __exts,
size_t  __r 
)
constexprnoexcept

Definition at line 608 of file mdspan.

◆ __fwd_prod() [3/3]

template<typename _IndexType , size_t _Nm>
consteval _IndexType std::__mdspan::__fwd_prod ( span< const _IndexType, _Nm >  __values)

Definition at line 627 of file mdspan.

◆ __get_static_stride()

template<typename _PaddedMapping >
consteval size_t std::__mdspan::__get_static_stride ( )

Definition at line 846 of file mdspan.

◆ __index_type_cast()

template<typename _IndexType , typename _OIndexTypeRef >
constexpr _IndexType std::__mdspan::__index_type_cast ( _OIndexTypeRef &&  __other)
constexpr

Definition at line 85 of file mdspan.

◆ __inv_map_rank()

template<typename _IndexType , typename... _Slices>
consteval auto std::__mdspan::__inv_map_rank ( )

Definition at line 938 of file mdspan.

◆ __is_block()

consteval bool std::__mdspan::__is_block ( span< const _SliceKind >  __slice_kinds,
size_t  __block_size 
)

Definition at line 1251 of file mdspan.

◆ __is_representable_extents()

template<typename _Extents >
constexpr bool std::__mdspan::__is_representable_extents ( const _Extents &  __exts)
constexprnoexcept

Definition at line 781 of file mdspan.

◆ __is_representable_integer()

template<typename _IndexType , typename _OIndexType >
consteval bool std::__mdspan::__is_representable_integer ( _OIndexType  __value)

Definition at line 899 of file mdspan.

◆ __linear_index_left()

template<typename _Extents , typename... _Indices>
constexpr _Extents::index_type std::__mdspan::__linear_index_left ( const _Extents &  __exts,
_Indices...  __indices 
)
constexprnoexcept

Definition at line 733 of file mdspan.

◆ __make_slice_kind()

template<typename _Slice >
consteval _SliceKind std::__mdspan::__make_slice_kind ( )

Definition at line 1225 of file mdspan.

◆ __make_slice_kind_array()

template<typename... _Slices>
consteval array< _SliceKind, sizeof...(_Slices)> std::__mdspan::__make_slice_kind_array ( )

Definition at line 1242 of file mdspan.

◆ __mapping_side()

template<typename _Mapping >
consteval _LayoutSide std::__mdspan::__mapping_side ( )

Definition at line 1068 of file mdspan.

◆ __offset()

template<typename _Mapping >
constexpr _Mapping::index_type std::__mdspan::__offset ( const _Mapping &  __m)
constexprnoexcept

Definition at line 865 of file mdspan.

◆ __padded_block_begin()

template<_LayoutSide _Side, size_t _Nm>
static consteval size_t std::__mdspan::__padded_block_begin ( span< const _SliceKind, _Nm >  __slice_kinds,
size_t  __sub_rank 
)
static

Definition at line 1294 of file mdspan.

◆ __padded_block_begin_generic()

static consteval size_t std::__mdspan::__padded_block_begin_generic ( span< const _SliceKind >  __slice_kinds,
size_t  __sub_rank 
)
static

Definition at line 1271 of file mdspan.

◆ __rev_prod()

template<typename _Extents >
constexpr _Extents::index_type std::__mdspan::__rev_prod ( const _Extents &  __exts,
size_t  __r 
)
constexprnoexcept

Definition at line 638 of file mdspan.

◆ __size()

template<typename _Extents >
constexpr _Extents::index_type std::__mdspan::__size ( const _Extents &  __exts)
constexprnoexcept

Definition at line 657 of file mdspan.

◆ __slice_begin()

template<typename _Slice >
constexpr auto std::__mdspan::__slice_begin ( _Slice  __slice)
constexpr

Definition at line 955 of file mdspan.

◆ __static_extents() [1/2]

template<typename _Extents >
constexpr const array< size_t, _Extents::rank()> & std::__mdspan::__static_extents ( )
constexprnoexcept

Definition at line 302 of file mdspan.

◆ __static_extents() [2/2]

template<typename _Extents >
constexpr span< const size_t > std::__mdspan::__static_extents ( size_t  __begin,
size_t  __end 
)
constexprnoexcept

Definition at line 307 of file mdspan.

◆ __static_quotient() [1/2]

template<typename _Extents , typename _IndexType = typename _Extents::index_type>
requires __is_extents<_Extents>
consteval _IndexType std::__mdspan::__static_quotient ( _IndexType  __nom = __gnu_cxx::__int_traits<_IndexType>::__max)

Definition at line 772 of file mdspan.

◆ __static_quotient() [2/2]

template<typename _IndexType >
consteval _IndexType std::__mdspan::__static_quotient ( std::span< const size_t >  __sta_exts,
_IndexType  __nom = __gnu_cxx::__int_traits<_IndexType>::__max 
)

Definition at line 755 of file mdspan.

◆ __static_slice_extent()

template<typename _IndexType , size_t _Extent, typename _Slice >
consteval size_t std::__mdspan::__static_slice_extent ( )

Definition at line 1000 of file mdspan.

◆ __subextents()

template<typename _IndexType , size_t... _Extents, typename... _Slices>
requires (sizeof...(_Slices) == sizeof...(_Extents))
constexpr auto std::__mdspan::__subextents ( const extents< _IndexType, _Extents... > &  __exts,
_Slices...  __slices 
)
constexpr

Definition at line 1025 of file mdspan.

◆ __submdspan_mapping_impl() [1/2]

template<typename _Mapping >
constexpr auto std::__mdspan::__submdspan_mapping_impl ( const _Mapping &  __mapping)
constexpr

Definition at line 1444 of file mdspan.

◆ __submdspan_mapping_impl() [2/2]

template<typename _Mapping , typename... _Slices>
requires (sizeof...(_Slices) > 0)
constexpr auto std::__mdspan::__submdspan_mapping_impl ( const _Mapping &  __mapping,
_Slices...  __slices 
)
constexpr

Definition at line 1450 of file mdspan.

◆ __suboffset()

template<typename _Mapping , typename... _Slices>
constexpr size_t std::__mdspan::__suboffset ( const _Mapping &  __mapping,
const _Slices &...  __slices 
)
constexpr

Definition at line 967 of file mdspan.

◆ __subrank()

template<typename _IndexType , typename... _Slices>
consteval auto std::__mdspan::__subrank ( )

Definition at line 930 of file mdspan.

◆ __substrides()

template<typename _SubExts , typename _Mapping , typename... _Slices>
constexpr auto std::__mdspan::__substrides ( const _Mapping &  __mapping,
const _Slices &...  __slices 
)
constexpr

Definition at line 1197 of file mdspan.

◆ __substrides_generic()

template<typename _SubExts , typename _Mapping , typename... _Slices>
constexpr auto std::__mdspan::__substrides_generic ( const _Mapping &  __mapping,
const _Slices &...  __slices 
)
constexpr

Definition at line 1121 of file mdspan.

◆ __substrides_standardized()

template<typename _SubExts , typename _Mapping , typename... _Slices>
constexpr auto std::__mdspan::__substrides_standardized ( const _Mapping &  __mapping,
const _Slices &...  __slices 
)
constexpr

Definition at line 1149 of file mdspan.

Variable Documentation

◆ __fwd_partial_prods

template<array _Extents>
constexpr auto std::__mdspan::__fwd_partial_prods
constexpr

Definition at line 315 of file mdspan.

◆ __is_constant_wrapper

template<typename _Tp >
constexpr bool std::__mdspan::__is_constant_wrapper
constexpr

Definition at line 908 of file mdspan.

◆ __is_constant_wrapper< constant_wrapper< _Xv, _Tp > >

template<_CwFixedValue _Xv, typename _Tp >
constexpr bool std::__mdspan::__is_constant_wrapper< constant_wrapper< _Xv, _Tp > >
constexpr

Definition at line 911 of file mdspan.

◆ __is_extent_slice

template<typename _Tp >
constexpr bool std::__mdspan::__is_extent_slice
constexpr

Definition at line 884 of file mdspan.

◆ __is_extent_slice< extent_slice< _OffsetType, _ExtentType, _StrideType > >

template<typename _OffsetType , typename _ExtentType , typename _StrideType >
constexpr bool std::__mdspan::__is_extent_slice< extent_slice< _OffsetType, _ExtentType, _StrideType > >
constexpr

Definition at line 887 of file mdspan.

◆ __is_extents

template<typename _Tp >
constexpr bool std::__mdspan::__is_extents
constexpr

Definition at line 726 of file mdspan.

◆ __is_extents< extents< _IndexType, _Extents... > >

template<typename _IndexType , size_t... _Extents>
constexpr bool std::__mdspan::__is_extents< extents< _IndexType, _Extents... > >
constexpr

Definition at line 729 of file mdspan.

◆ __is_left_padded_mapping

template<typename _Mapping >
constexpr bool std::__mdspan::__is_left_padded_mapping
constexpr

Definition at line 832 of file mdspan.

◆ __is_padded_mapping

template<typename _Mapping >
constexpr bool std::__mdspan::__is_padded_mapping
constexpr

Definition at line 840 of file mdspan.

◆ __is_range_slice

template<typename _Tp >
constexpr bool std::__mdspan::__is_range_slice
constexpr

Definition at line 891 of file mdspan.

◆ __is_range_slice< range_slice< _FirstType, _LastType, _StrideType > >

template<typename _FirstType , typename _LastType , typename _StrideType >
constexpr bool std::__mdspan::__is_range_slice< range_slice< _FirstType, _LastType, _StrideType > >
constexpr

Definition at line 894 of file mdspan.

◆ __is_right_padded_mapping

template<typename _Mapping >
constexpr bool std::__mdspan::__is_right_padded_mapping
constexpr

Definition at line 836 of file mdspan.

◆ __rev_partial_prods

template<array _Extents>
constexpr auto std::__mdspan::__rev_partial_prods
constexpr

Definition at line 331 of file mdspan.