Christian Trott cfa096d9c9 [libc++][mdspan] Implement layout_right
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
2023-06-29 10:12:17 -04:00

34 lines
930 B
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// -*- 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