forked from kokkos/kokkos
-
Notifications
You must be signed in to change notification settings - Fork 3
/
layout_stride.hpp
564 lines (502 loc) · 20.7 KB
/
layout_stride.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
//@HEADER
// ************************************************************************
//
// Kokkos v. 4.0
// Copyright (2022) National Technology & Engineering
// Solutions of Sandia, LLC (NTESS).
//
// Under the terms of Contract DE-NA0003525 with NTESS,
// the U.S. Government retains certain rights in this software.
//
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions.
// See https://kokkos.org/LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//@HEADER
#pragma once
#include "macros.hpp"
#include "extents.hpp"
#include "trait_backports.hpp"
#include "compressed_pair.hpp"
#if !defined(_MDSPAN_USE_ATTRIBUTE_NO_UNIQUE_ADDRESS)
# include "no_unique_address.hpp"
#endif
#include <algorithm>
#include <numeric>
#include <array>
#ifdef __cpp_lib_span
#include <span>
#endif
#if defined(_MDSPAN_USE_CONCEPTS) && MDSPAN_HAS_CXX_20 && defined(__cpp_lib_concepts)
# include <concepts>
#endif
namespace MDSPAN_IMPL_STANDARD_NAMESPACE {
struct layout_left {
template<class Extents>
class mapping;
};
struct layout_right {
template<class Extents>
class mapping;
};
namespace detail {
template<class Layout, class Mapping>
constexpr bool __is_mapping_of =
std::is_same<typename Layout::template mapping<typename Mapping::extents_type>, Mapping>::value;
#if defined(_MDSPAN_USE_CONCEPTS) && MDSPAN_HAS_CXX_20
# if !defined(__cpp_lib_concepts)
namespace internal {
namespace detail {
template <typename _Tp, typename _Up>
concept __same_as = std::is_same_v<_Tp, _Up>;
} // namespace detail
template <class T, class U>
concept __same_as = detail::__same_as<T, U> && detail::__same_as<U, T>;
} // namespace internal
# endif
template<class M>
concept __layout_mapping_alike = requires {
requires __is_extents<typename M::extents_type>::value;
#if defined(__cpp_lib_concepts)
{ M::is_always_strided() } -> std::same_as<bool>;
{ M::is_always_exhaustive() } -> std::same_as<bool>;
{ M::is_always_unique() } -> std::same_as<bool>;
#else
{ M::is_always_strided() } -> internal::__same_as<bool>;
{ M::is_always_exhaustive() } -> internal::__same_as<bool>;
{ M::is_always_unique() } -> internal::__same_as<bool>;
#endif
std::bool_constant<M::is_always_strided()>::value;
std::bool_constant<M::is_always_exhaustive()>::value;
std::bool_constant<M::is_always_unique()>::value;
};
#endif
} // namespace detail
struct layout_stride {
template <class Extents>
class mapping
#if !defined(_MDSPAN_USE_ATTRIBUTE_NO_UNIQUE_ADDRESS)
: private detail::__no_unique_address_emulation<
detail::__compressed_pair<
Extents,
detail::possibly_empty_array<typename Extents::index_type, Extents::rank()>
>
>
#endif
{
public:
using extents_type = Extents;
using index_type = typename extents_type::index_type;
using size_type = typename extents_type::size_type;
using rank_type = typename extents_type::rank_type;
using layout_type = layout_stride;
// This could be a `requires`, but I think it's better and clearer as a `static_assert`.
static_assert(detail::__is_extents_v<Extents>,
MDSPAN_IMPL_STANDARD_NAMESPACE_STRING "::layout_stride::mapping must be instantiated with a specialization of " MDSPAN_IMPL_STANDARD_NAMESPACE_STRING "::extents.");
private:
//----------------------------------------------------------------------------
using __strides_storage_t = detail::possibly_empty_array<index_type, extents_type::rank()>;
using __member_pair_t = detail::__compressed_pair<extents_type, __strides_storage_t>;
#if defined(_MDSPAN_USE_ATTRIBUTE_NO_UNIQUE_ADDRESS)
_MDSPAN_NO_UNIQUE_ADDRESS __member_pair_t __members;
#else
using __base_t = detail::__no_unique_address_emulation<__member_pair_t>;
#endif
MDSPAN_FORCE_INLINE_FUNCTION constexpr __strides_storage_t const&
__strides_storage() const noexcept {
#if defined(_MDSPAN_USE_ATTRIBUTE_NO_UNIQUE_ADDRESS)
return __members.__second();
#else
return this->__base_t::__ref().__second();
#endif
}
MDSPAN_FORCE_INLINE_FUNCTION _MDSPAN_CONSTEXPR_14 __strides_storage_t&
__strides_storage() noexcept {
#if defined(_MDSPAN_USE_ATTRIBUTE_NO_UNIQUE_ADDRESS)
return __members.__second();
#else
return this->__base_t::__ref().__second();
#endif
}
template<class SizeType, size_t ... Ep, size_t ... Idx>
_MDSPAN_HOST_DEVICE
constexpr index_type __get_size(::MDSPAN_IMPL_STANDARD_NAMESPACE::extents<SizeType, Ep...>,std::integer_sequence<size_t, Idx...>) const {
return _MDSPAN_FOLD_TIMES_RIGHT( static_cast<index_type>(extents().extent(Idx)), 1 );
}
//----------------------------------------------------------------------------
template <class>
friend class mapping;
//----------------------------------------------------------------------------
// Workaround for non-deducibility of the index sequence template parameter if it's given at the top level
template <class>
struct __deduction_workaround;
template <size_t... Idxs>
struct __deduction_workaround<std::index_sequence<Idxs...>>
{
template <class OtherExtents>
MDSPAN_INLINE_FUNCTION
static constexpr bool _eq_impl(mapping const& self, mapping<OtherExtents> const& other) noexcept {
using common_t = std::common_type_t<index_type, typename OtherExtents::index_type>;
return _MDSPAN_FOLD_AND((static_cast<common_t>(self.stride(Idxs)) == static_cast<common_t>(other.stride(Idxs))) /* && ... */)
&& _MDSPAN_FOLD_AND((static_cast<common_t>(self.extents().extent(Idxs)) == static_cast<common_t>(other.extents().extent(Idxs))) /* || ... */);
}
template <class OtherExtents>
MDSPAN_INLINE_FUNCTION
static constexpr bool _not_eq_impl(mapping const& self, mapping<OtherExtents> const& other) noexcept {
using common_t = std::common_type_t<index_type, typename OtherExtents::index_type>;
return _MDSPAN_FOLD_OR((static_cast<common_t>(self.stride(Idxs)) != static_cast<common_t>(other.stride(Idxs))) /* || ... */)
|| _MDSPAN_FOLD_OR((static_cast<common_t>(self.extents().extent(Idxs)) != static_cast<common_t>(other.extents().extent(Idxs))) /* || ... */);
}
template <class... Integral>
MDSPAN_FORCE_INLINE_FUNCTION
static constexpr size_t _call_op_impl(mapping const& self, Integral... idxs) noexcept {
return _MDSPAN_FOLD_PLUS_RIGHT((idxs * self.stride(Idxs)), /* + ... + */ 0);
}
MDSPAN_INLINE_FUNCTION
static constexpr size_t _req_span_size_impl(mapping const& self) noexcept {
// assumes no negative strides; not sure if I'm allowed to assume that or not
return __impl::_call_op_impl(self, (self.extents().template __extent<Idxs>() - 1)...) + 1;
}
template<class OtherMapping>
MDSPAN_INLINE_FUNCTION
static constexpr const __strides_storage_t fill_strides(const OtherMapping& map) {
return __strides_storage_t{static_cast<index_type>(map.stride(Idxs))...};
}
MDSPAN_INLINE_FUNCTION
static constexpr const __strides_storage_t& fill_strides(const __strides_storage_t& s) {
return s;
}
template<class IntegralType>
MDSPAN_INLINE_FUNCTION
static constexpr const __strides_storage_t fill_strides(const std::array<IntegralType,extents_type::rank()>& s) {
return __strides_storage_t{static_cast<index_type>(s[Idxs])...};
}
#ifdef __cpp_lib_span
template<class IntegralType>
MDSPAN_INLINE_FUNCTION
static constexpr const __strides_storage_t fill_strides(const std::span<IntegralType,extents_type::rank()>& s) {
return __strides_storage_t{static_cast<index_type>(s[Idxs])...};
}
#endif
MDSPAN_INLINE_FUNCTION
static constexpr std::array<index_type, extents_type::rank()> return_strides(const __strides_storage_t& s) {
return std::array<index_type, extents_type::rank()>{s[Idxs]...};
}
template<size_t K>
MDSPAN_INLINE_FUNCTION
static constexpr size_t __return_zero() { return 0; }
template<class Mapping>
MDSPAN_INLINE_FUNCTION
static constexpr typename Mapping::index_type
__OFFSET(const Mapping& m) { return m(__return_zero<Idxs>()...); }
};
// Can't use defaulted parameter in the __deduction_workaround template because of a bug in MSVC warning C4348.
using __impl = __deduction_workaround<std::make_index_sequence<Extents::rank()>>;
static constexpr __strides_storage_t strides_storage(std::true_type) {
__strides_storage_t s{};
extents_type e;
index_type stride = 1;
for(int r = static_cast<int>(extents_type::rank() - 1); r >= 0; r--) {
s[r] = stride;
stride *= e.extent(r);
}
return s;
}
static constexpr __strides_storage_t strides_storage(std::false_type) {
return {};
}
//----------------------------------------------------------------------------
#if defined(_MDSPAN_USE_ATTRIBUTE_NO_UNIQUE_ADDRESS)
MDSPAN_INLINE_FUNCTION constexpr explicit
mapping(__member_pair_t&& __m) : __members(::std::move(__m)) {}
#else
MDSPAN_INLINE_FUNCTION constexpr explicit
mapping(__base_t&& __b) : __base_t(::std::move(__b)) {}
#endif
public:
//--------------------------------------------------------------------------------
MDSPAN_INLINE_FUNCTION_DEFAULTED constexpr mapping() noexcept
#if defined(_MDSPAN_USE_ATTRIBUTE_NO_UNIQUE_ADDRESS)
: __members{
#else
: __base_t(__base_t{__member_pair_t(
#endif
extents_type(),
__strides_storage_t(strides_storage(std::integral_constant<bool, (extents_type::rank() > 0)>{}))
#if defined(_MDSPAN_USE_ATTRIBUTE_NO_UNIQUE_ADDRESS)
}
#else
)})
#endif
{}
MDSPAN_INLINE_FUNCTION_DEFAULTED constexpr mapping(mapping const&) noexcept = default;
MDSPAN_TEMPLATE_REQUIRES(
class IntegralTypes,
/* requires */ (
// MSVC 19.32 does not like using index_type here, requires the typename Extents::index_type
// error C2641: cannot deduce template arguments for 'MDSPAN_IMPL_STANDARD_NAMESPACE::layout_stride::mapping'
_MDSPAN_TRAIT(std::is_convertible, const std::remove_const_t<IntegralTypes>&, typename Extents::index_type) &&
_MDSPAN_TRAIT(std::is_nothrow_constructible, typename Extents::index_type, const std::remove_const_t<IntegralTypes>&)
)
)
MDSPAN_INLINE_FUNCTION
constexpr
mapping(
extents_type const& e,
std::array<IntegralTypes, extents_type::rank()> const& s
) noexcept
#if defined(_MDSPAN_USE_ATTRIBUTE_NO_UNIQUE_ADDRESS)
: __members{
#else
: __base_t(__base_t{__member_pair_t(
#endif
e, __strides_storage_t(__impl::fill_strides(s))
#if defined(_MDSPAN_USE_ATTRIBUTE_NO_UNIQUE_ADDRESS)
}
#else
)})
#endif
{
/*
* TODO: check preconditions
* - s[i] > 0 is true for all i in the range [0, rank_ ).
* - REQUIRED-SPAN-SIZE(e, s) is a representable value of type index_type ([basic.fundamental]).
* - If rank_ is greater than 0, then there exists a permutation P of the integers in the
* range [0, rank_), such that s[ pi ] >= s[ pi − 1 ] * e.extent( pi − 1 ) is true for
* all i in the range [1, rank_ ), where pi is the ith element of P.
*/
}
#ifdef __cpp_lib_span
MDSPAN_TEMPLATE_REQUIRES(
class IntegralTypes,
/* requires */ (
// MSVC 19.32 does not like using index_type here, requires the typename Extents::index_type
// error C2641: cannot deduce template arguments for 'MDSPAN_IMPL_STANDARD_NAMESPACE::layout_stride::mapping'
_MDSPAN_TRAIT(std::is_convertible, const std::remove_const_t<IntegralTypes>&, typename Extents::index_type) &&
_MDSPAN_TRAIT(std::is_nothrow_constructible, typename Extents::index_type, const std::remove_const_t<IntegralTypes>&)
)
)
MDSPAN_INLINE_FUNCTION
constexpr
mapping(
extents_type const& e,
std::span<IntegralTypes, extents_type::rank()> const& s
) noexcept
#if defined(_MDSPAN_USE_ATTRIBUTE_NO_UNIQUE_ADDRESS)
: __members{
#else
: __base_t(__base_t{__member_pair_t(
#endif
e, __strides_storage_t(__impl::fill_strides(s))
#if defined(_MDSPAN_USE_ATTRIBUTE_NO_UNIQUE_ADDRESS)
}
#else
)})
#endif
{
/*
* TODO: check preconditions
* - s[i] > 0 is true for all i in the range [0, rank_ ).
* - REQUIRED-SPAN-SIZE(e, s) is a representable value of type index_type ([basic.fundamental]).
* - If rank_ is greater than 0, then there exists a permutation P of the integers in the
* range [0, rank_), such that s[ pi ] >= s[ pi − 1 ] * e.extent( pi − 1 ) is true for
* all i in the range [1, rank_ ), where pi is the ith element of P.
*/
}
#endif // __cpp_lib_span
#if !(defined(_MDSPAN_USE_CONCEPTS) && MDSPAN_HAS_CXX_20)
MDSPAN_TEMPLATE_REQUIRES(
class StridedLayoutMapping,
/* requires */ (
_MDSPAN_TRAIT(std::is_constructible, extents_type, typename StridedLayoutMapping::extents_type) &&
detail::__is_mapping_of<typename StridedLayoutMapping::layout_type, StridedLayoutMapping> &&
StridedLayoutMapping::is_always_unique() &&
StridedLayoutMapping::is_always_strided()
)
)
#else
template<class StridedLayoutMapping>
requires(
detail::__layout_mapping_alike<StridedLayoutMapping> &&
_MDSPAN_TRAIT(std::is_constructible, extents_type, typename StridedLayoutMapping::extents_type) &&
StridedLayoutMapping::is_always_unique() &&
StridedLayoutMapping::is_always_strided()
)
#endif
MDSPAN_CONDITIONAL_EXPLICIT(
!(std::is_convertible<typename StridedLayoutMapping::extents_type, extents_type>::value &&
(detail::__is_mapping_of<layout_left, StridedLayoutMapping> ||
detail::__is_mapping_of<layout_right, StridedLayoutMapping> ||
detail::__is_mapping_of<layout_stride, StridedLayoutMapping>))
) // needs two () due to comma
MDSPAN_INLINE_FUNCTION _MDSPAN_CONSTEXPR_14
mapping(StridedLayoutMapping const& other) noexcept // NOLINT(google-explicit-constructor)
#if defined(_MDSPAN_USE_ATTRIBUTE_NO_UNIQUE_ADDRESS)
: __members{
#else
: __base_t(__base_t{__member_pair_t(
#endif
other.extents(), __strides_storage_t(__impl::fill_strides(other))
#if defined(_MDSPAN_USE_ATTRIBUTE_NO_UNIQUE_ADDRESS)
}
#else
)})
#endif
{
/*
* TODO: check preconditions
* - other.stride(i) > 0 is true for all i in the range [0, rank_ ).
* - other.required_span_size() is a representable value of type index_type ([basic.fundamental]).
* - OFFSET(other) == 0
*/
}
//--------------------------------------------------------------------------------
MDSPAN_INLINE_FUNCTION_DEFAULTED _MDSPAN_CONSTEXPR_14_DEFAULTED
mapping& operator=(mapping const&) noexcept = default;
MDSPAN_INLINE_FUNCTION constexpr const extents_type& extents() const noexcept {
#if defined(_MDSPAN_USE_ATTRIBUTE_NO_UNIQUE_ADDRESS)
return __members.__first();
#else
return this->__base_t::__ref().__first();
#endif
};
MDSPAN_INLINE_FUNCTION
constexpr std::array< index_type, extents_type::rank() > strides() const noexcept {
return __impl::return_strides(__strides_storage());
}
MDSPAN_INLINE_FUNCTION
constexpr index_type required_span_size() const noexcept {
index_type span_size = 1;
for(unsigned r = 0; r < extents_type::rank(); r++) {
// Return early if any of the extents are zero
if(extents().extent(r)==0) return 0;
span_size += ( static_cast<index_type>(extents().extent(r) - 1 ) * __strides_storage()[r]);
}
return span_size;
}
MDSPAN_TEMPLATE_REQUIRES(
class... Indices,
/* requires */ (
sizeof...(Indices) == Extents::rank() &&
(detail::are_valid_indices<index_type, Indices...>())
)
)
MDSPAN_FORCE_INLINE_FUNCTION
constexpr index_type operator()(Indices... idxs) const noexcept {
return static_cast<index_type>(__impl::_call_op_impl(*this, static_cast<index_type>(idxs)...));
}
MDSPAN_INLINE_FUNCTION static constexpr bool is_always_unique() noexcept { return true; }
MDSPAN_INLINE_FUNCTION static constexpr bool is_always_exhaustive() noexcept {
return false;
}
MDSPAN_INLINE_FUNCTION static constexpr bool is_always_strided() noexcept { return true; }
MDSPAN_INLINE_FUNCTION static constexpr bool is_unique() noexcept { return true; }
MDSPAN_INLINE_FUNCTION _MDSPAN_CONSTEXPR_14 bool is_exhaustive() const noexcept {
if constexpr (extents_type::rank() == 0)
return true;
else {
index_type span_size = required_span_size();
if (span_size == static_cast<index_type>(0)) {
if constexpr (extents_type::rank() == 1) {
return stride(0) == 1;
} else {
rank_type r_largest = 0;
for (rank_type r = 1; r < extents_type::rank(); r++) {
if (stride(r) > stride(r_largest)) {
r_largest = r;
}
}
for (rank_type r = 0; r < extents_type::rank(); r++) {
if (extents().extent(r) == 0 && r != r_largest) {
return false;
}
}
return true;
}
} else {
return required_span_size() == __get_size(extents(), std::make_index_sequence<extents_type::rank()>());
}
}
}
MDSPAN_INLINE_FUNCTION static constexpr bool is_strided() noexcept { return true; }
MDSPAN_INLINE_FUNCTION
constexpr index_type stride(rank_type r) const noexcept {
return __strides_storage()[r];
}
#if !(defined(_MDSPAN_USE_CONCEPTS) && MDSPAN_HAS_CXX_20)
MDSPAN_TEMPLATE_REQUIRES(
class StridedLayoutMapping,
/* requires */ (
detail::__is_mapping_of<typename StridedLayoutMapping::layout_type, StridedLayoutMapping> &&
(extents_type::rank() == StridedLayoutMapping::extents_type::rank()) &&
StridedLayoutMapping::is_always_strided()
)
)
#else
template<class StridedLayoutMapping>
requires(
detail::__layout_mapping_alike<StridedLayoutMapping> &&
(extents_type::rank() == StridedLayoutMapping::extents_type::rank()) &&
StridedLayoutMapping::is_always_strided()
)
#endif
MDSPAN_INLINE_FUNCTION
friend constexpr bool operator==(const mapping& x, const StridedLayoutMapping& y) noexcept {
bool strides_match = true;
if constexpr (extents_type::rank() > 0) {
using common_t = std::common_type_t<index_type, typename StridedLayoutMapping::index_type>;
for(rank_type r = 0; r < extents_type::rank(); r++)
strides_match = strides_match && (static_cast<common_t>(x.stride(r)) == static_cast<common_t>(y.stride(r)));
}
return (x.extents() == y.extents()) &&
(__impl::__OFFSET(y) == static_cast<typename StridedLayoutMapping::index_type>(0)) &&
strides_match;
}
// This one is not technically part of the proposal. Just here to make implementation a bit more optimal hopefully
MDSPAN_TEMPLATE_REQUIRES(
class OtherExtents,
/* requires */ (
(extents_type::rank() == OtherExtents::rank())
)
)
MDSPAN_INLINE_FUNCTION
friend constexpr bool operator==(mapping const& lhs, mapping<OtherExtents> const& rhs) noexcept {
return __impl::_eq_impl(lhs, rhs);
}
#if !MDSPAN_HAS_CXX_20
MDSPAN_TEMPLATE_REQUIRES(
class StridedLayoutMapping,
/* requires */ (
detail::__is_mapping_of<typename StridedLayoutMapping::layout_type, StridedLayoutMapping> &&
(extents_type::rank() == StridedLayoutMapping::extents_type::rank()) &&
StridedLayoutMapping::is_always_strided()
)
)
MDSPAN_INLINE_FUNCTION
friend constexpr bool operator!=(const mapping& x, const StridedLayoutMapping& y) noexcept {
return not (x == y);
}
MDSPAN_TEMPLATE_REQUIRES(
class OtherExtents,
/* requires */ (
(extents_type::rank() == OtherExtents::rank())
)
)
MDSPAN_INLINE_FUNCTION
friend constexpr bool operator!=(mapping const& lhs, mapping<OtherExtents> const& rhs) noexcept {
return __impl::_not_eq_impl(lhs, rhs);
}
#endif
// [mdspan.submdspan.mapping], submdspan mapping specialization
template<class... SliceSpecifiers>
MDSPAN_INLINE_FUNCTION
constexpr auto submdspan_mapping_impl(
SliceSpecifiers... slices) const;
template<class... SliceSpecifiers>
friend constexpr auto submdspan_mapping(
const mapping& src, SliceSpecifiers... slices) {
return src.submdspan_mapping_impl(slices...);
}
};
};
} // end namespace MDSPAN_IMPL_STANDARD_NAMESPACE