This commit implements layout_right in support of C++23 mdspan (https://wg21.link/p0009). layout_right is a layout mapping policy whose index mapping corresponds to the memory layout of multidimensional C-arrays, and is thus also referred to as the C-layout. Co-authored-by: Damien L-G <dalg24@gmail.com> Differential Revision: https://reviews.llvm.org/D151267
34 lines
930 B
C++
34 lines
930 B
C++
// -*- C++ -*-
|
||
//===----------------------------------------------------------------------===//
|
||
//
|
||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||
// See https://llvm.org/LICENSE.txt for license information.
|
||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||
//
|
||
//===----------------------------------------------------------------------===//
|
||
|
||
module;
|
||
#include <mdspan>
|
||
|
||
export module std:mdspan;
|
||
export namespace std {
|
||
// [mdspan.extents], class template extents
|
||
using std::extents;
|
||
|
||
// [mdspan.extents.dextents], alias template dextents
|
||
using std::dextents;
|
||
|
||
// [mdspan.layout], layout mapping
|
||
// using std::layout_left;
|
||
using std::layout_right;
|
||
// using std::layout_stride;
|
||
|
||
#if 0
|
||
// [mdspan.accessor.default], class template default_accessor
|
||
using std::default_accessor;
|
||
|
||
// [mdspan.mdspan], class template mdspan
|
||
using std::mdspan;
|
||
#endif
|
||
} // namespace std
|