Lines Matching defs:mdspan
22 #include <__fwd/mdspan.h>
66 class mdspan {
69 "mdspan: Extents template parameter must be a specialization of extents.");
70 static_assert(!is_array_v<_ElementType>, "mdspan: ElementType template parameter may not be an array type");
71 static_assert(!is_abstract_v<_ElementType>, "mdspan: ElementType template parameter may not be an abstract class");
73 "mdspan: ElementType template parameter must match AccessorPolicy::element_type");
75 "mdspan: LayoutPolicy template parameter is invalid. A common mistake is to pass a layout mapping "
102 // [mdspan.mdspan.cons], mdspan constructors, assignment, and destructor
104 _LIBCPP_HIDE_FROM_ABI constexpr mdspan()
108 _LIBCPP_HIDE_FROM_ABI constexpr mdspan(const mdspan&) = default;
109 _LIBCPP_HIDE_FROM_ABI constexpr mdspan(mdspan&&) = default;
116 _LIBCPP_HIDE_FROM_ABI explicit constexpr mdspan(data_handle_type __p, _OtherIndexTypes... __exts)
125 _LIBCPP_HIDE_FROM_ABI constexpr mdspan(data_handle_type __p, const array<_OtherIndexType, _Size>& __exts)
134 _LIBCPP_HIDE_FROM_ABI constexpr mdspan(data_handle_type __p, span<_OtherIndexType, _Size> __exts)
137 _LIBCPP_HIDE_FROM_ABI constexpr mdspan(data_handle_type __p, const extents_type& __exts)
141 _LIBCPP_HIDE_FROM_ABI constexpr mdspan(data_handle_type __p, const mapping_type& __m)
145 _LIBCPP_HIDE_FROM_ABI constexpr mdspan(data_handle_type __p, const mapping_type& __m, const accessor_type& __a)
153 _LIBCPP_HIDE_FROM_ABI constexpr mdspan(
154 const mdspan<_OtherElementType, _OtherExtents, _OtherLayoutPolicy, _OtherAccessor>& __other)
157 "mdspan: incompatible data_handle_type for mdspan construction");
159 is_constructible_v<extents_type, _OtherExtents>, "mdspan: incompatible extents for mdspan construction");
169 // e.g. mdspan<int, dextents<char,1>, non_checking_layout> m =
170 // mdspan<int, dextents<unsigned, 1>, non_checking_layout>(ptr, 200); leads to an extent of -56 on m
174 "mdspan: conversion mismatch of source dynamic extents with static extents");
179 _LIBCPP_HIDE_FROM_ABI constexpr mdspan& operator=(const mdspan&) = default;
180 _LIBCPP_HIDE_FROM_ABI constexpr mdspan& operator=(mdspan&&) = default;
183 // [mdspan.mdspan.members], members
193 "mdspan: operator[] out of bounds access");
223 "mdspan: size() is not representable as size_type");
235 _LIBCPP_HIDE_FROM_ABI friend constexpr void swap(mdspan& __x, mdspan& __y) noexcept {
246 // per LWG-4021 "mdspan::is_always_meow() should be noexcept"
266 friend class mdspan;
272 explicit mdspan(_ElementType*,
273 _OtherIndexTypes...) -> mdspan<_ElementType, extents<size_t, __maybe_static_ext<_OtherIndexTypes>...>>;
277 explicit mdspan(_ElementType*,
278 _OtherIndexTypes...) -> mdspan<_ElementType, dextents<size_t, sizeof...(_OtherIndexTypes)>>;
283 mdspan(_Pointer&&) -> mdspan<remove_pointer_t<remove_reference_t<_Pointer>>, extents<size_t>>;
287 mdspan(_CArray&) -> mdspan<remove_all_extents_t<_CArray>, extents<size_t, extent_v<_CArray, 0>>>;
290 mdspan(_ElementType*, const array<_OtherIndexType, _Size>&) -> mdspan<_ElementType, dextents<size_t, _Size>>;
293 mdspan(_ElementType*, span<_OtherIndexType, _Size>) -> mdspan<_ElementType, dextents<size_t, _Size>>;
299 mdspan(_ElementType*, const extents<_OtherIndexType, _ExtentsPack...>&)
300 -> mdspan<_ElementType, extents<_OtherIndexType, _ExtentsPack...>>;
303 mdspan(_ElementType*, const _MappingType&)
304 -> mdspan<_ElementType, typename _MappingType::extents_type, typename _MappingType::layout_type>;
307 mdspan(const typename _AccessorType::data_handle_type, const _MappingType&, const _AccessorType&)
308 -> mdspan<typename _AccessorType::element_type,