blob: 8889567a047f6ec8ccc0654f3cbaf6013f68dbc8 [file] [log] [blame]
Christian Trottcfa096d2023-06-29 14:06:471// -*- C++ -*-
2//===----------------------------------------------------------------------===//
3//
4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7//
8// Kokkos v. 4.0
9// Copyright (2022) National Technology & Engineering
10// Solutions of Sandia, LLC (NTESS).
11//
12// Under the terms of Contract DE-NA0003525 with NTESS,
13// the U.S. Government retains certain rights in this software.
14//
15//===---------------------------------------------------------------------===//
16
17#ifndef _LIBCPP___MDSPAN_LAYOUTS_H
18#define _LIBCPP___MDSPAN_LAYOUTS_H
19
20#include <__config>
21
22#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
23# pragma GCC system_header
24#endif
25
26_LIBCPP_PUSH_MACROS
27#include <__undef_macros>
28
29_LIBCPP_BEGIN_NAMESPACE_STD
30
31#if _LIBCPP_STD_VER >= 23
32
Christian Trottcfa096d2023-06-29 14:06:4733// Layout policy with a mapping which corresponds to FORTRAN-style array layouts
34struct layout_left {
Nikolas Klauser1e24b4d2023-07-25 02:53:3935 template <class _Extents>
Christian Trottb4ff8932023-06-29 19:36:0736 class mapping;
Christian Trottcfa096d2023-06-29 14:06:4737};
Christian Trottcfa096d2023-06-29 14:06:4738
39// Layout policy with a mapping which corresponds to C-style array layouts
40struct layout_right {
Nikolas Klauser1e24b4d2023-07-25 02:53:3941 template <class _Extents>
Christian Trottcfa096d2023-06-29 14:06:4742 class mapping;
43};
44
Christian Trottcfa096d2023-06-29 14:06:4745// Layout policy with a unique mapping where strides are arbitrary
46struct layout_stride {
Christian Trott639a0982023-10-20 14:13:5247 template <class _Extents>
48 class mapping;
Christian Trottcfa096d2023-06-29 14:06:4749};
Christian Trottcfa096d2023-06-29 14:06:4750
51#endif // _LIBCPP_STD_VER >= 23
52
53_LIBCPP_END_NAMESPACE_STD
54
55_LIBCPP_POP_MACROS
56
57#endif // _LIBCPP___MDSPAN_LAYOUTS_H