Lines Matching defs:mdspan
22 #include <__fwd/mdspan.h>
63 class mdspan {
66 "mdspan: Extents template parameter must be a specialization of extents.");
67 static_assert(!is_array_v<_ElementType>, "mdspan: ElementType template parameter may not be an array type");
68 static_assert(!is_abstract_v<_ElementType>, "mdspan: ElementType template parameter may not be an abstract class");
70 "mdspan: ElementType template parameter must match AccessorPolicy::element_type");
72 "mdspan: LayoutPolicy template parameter is invalid. A common mistake is to pass a layout mapping "
99 // [mdspan.mdspan.cons], mdspan constructors, assignment, and destructor
101 _LIBCPP_HIDE_FROM_ABI constexpr mdspan()
105 _LIBCPP_HIDE_FROM_ABI constexpr mdspan(const mdspan&) = default;
106 _LIBCPP_HIDE_FROM_ABI constexpr mdspan(mdspan&&) = default;
113 _LIBCPP_HIDE_FROM_ABI explicit constexpr mdspan(data_handle_type __p, _OtherIndexTypes... __exts)
122 _LIBCPP_HIDE_FROM_ABI constexpr mdspan(data_handle_type __p, const array<_OtherIndexType, _Size>& __exts)
131 _LIBCPP_HIDE_FROM_ABI constexpr mdspan(data_handle_type __p, span<_OtherIndexType, _Size> __exts)
134 _LIBCPP_HIDE_FROM_ABI constexpr mdspan(data_handle_type __p, const extents_type& __exts)
138 _LIBCPP_HIDE_FROM_ABI constexpr mdspan(data_handle_type __p, const mapping_type& __m)
142 _LIBCPP_HIDE_FROM_ABI constexpr mdspan(data_handle_type __p, const mapping_type& __m, const accessor_type& __a)
150 _LIBCPP_HIDE_FROM_ABI constexpr mdspan(
151 const mdspan<_OtherElementType, _OtherExtents, _OtherLayoutPolicy, _OtherAccessor>& __other)
154 "mdspan: incompatible data_handle_type for mdspan construction");
156 is_constructible_v<extents_type, _OtherExtents>, "mdspan: incompatible extents for mdspan construction");
166 // e.g. mdspan<int, dextents<char,1>, non_checking_layout> m =
167 // mdspan<int, dextents<unsigned, 1>, non_checking_layout>(ptr, 200); leads to an extent of -56 on m
171 "mdspan: conversion mismatch of source dynamic extents with static extents");
176 _LIBCPP_HIDE_FROM_ABI constexpr mdspan& operator=(const mdspan&) = default;
177 _LIBCPP_HIDE_FROM_ABI constexpr mdspan& operator=(mdspan&&) = default;
180 // [mdspan.mdspan.members], members
190 "mdspan: operator[] out of bounds access");
220 "mdspan: size() is not representable as size_type");
232 _LIBCPP_HIDE_FROM_ABI friend constexpr void swap(mdspan& __x, mdspan& __y) noexcept {
243 // per LWG-4021 "mdspan::is_always_meow() should be noexcept"
263 friend class mdspan;
269 explicit mdspan(_ElementType*,
270 _OtherIndexTypes...) -> mdspan<_ElementType, extents<size_t, __maybe_static_ext<_OtherIndexTypes>...>>;
274 explicit mdspan(_ElementType*,
275 _OtherIndexTypes...) -> mdspan<_ElementType, dextents<size_t, sizeof...(_OtherIndexTypes)>>;
280 mdspan(_Pointer&&) -> mdspan<remove_pointer_t<remove_reference_t<_Pointer>>, extents<size_t>>;
284 mdspan(_CArray&) -> mdspan<remove_all_extents_t<_CArray>, extents<size_t, extent_v<_CArray, 0>>>;
287 mdspan(_ElementType*, const array<_OtherIndexType, _Size>&) -> mdspan<_ElementType, dextents<size_t, _Size>>;
290 mdspan(_ElementType*, span<_OtherIndexType, _Size>) -> mdspan<_ElementType, dextents<size_t, _Size>>;
296 mdspan(_ElementType*, const extents<_OtherIndexType, _ExtentsPack...>&)
297 -> mdspan<_ElementType, extents<_OtherIndexType, _ExtentsPack...>>;
300 mdspan(_ElementType*, const _MappingType&)
301 -> mdspan<_ElementType, typename _MappingType::extents_type, typename _MappingType::layout_type>;
304 mdspan(const typename _AccessorType::data_handle_type, const _MappingType&, const _AccessorType&)
305 -> mdspan<typename _AccessorType::element_type,