xref: /freebsd/contrib/llvm-project/libcxx/include/__fwd/mdspan.h (revision 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e)
1*06c3fb27SDimitry Andric // -*- C++ -*-
2*06c3fb27SDimitry Andric //===----------------------------------------------------------------------===//
3*06c3fb27SDimitry Andric //
4*06c3fb27SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5*06c3fb27SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
6*06c3fb27SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7*06c3fb27SDimitry Andric //
8*06c3fb27SDimitry Andric //                        Kokkos v. 4.0
9*06c3fb27SDimitry Andric //       Copyright (2022) National Technology & Engineering
10*06c3fb27SDimitry Andric //               Solutions of Sandia, LLC (NTESS).
11*06c3fb27SDimitry Andric //
12*06c3fb27SDimitry Andric // Under the terms of Contract DE-NA0003525 with NTESS,
13*06c3fb27SDimitry Andric // the U.S. Government retains certain rights in this software.
14*06c3fb27SDimitry Andric //
15*06c3fb27SDimitry Andric //===---------------------------------------------------------------------===//
16*06c3fb27SDimitry Andric 
17*06c3fb27SDimitry Andric #ifndef _LIBCPP___MDSPAN_LAYOUTS_H
18*06c3fb27SDimitry Andric #define _LIBCPP___MDSPAN_LAYOUTS_H
19*06c3fb27SDimitry Andric 
20*06c3fb27SDimitry Andric #include <__config>
21*06c3fb27SDimitry Andric 
22*06c3fb27SDimitry Andric #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
23*06c3fb27SDimitry Andric #  pragma GCC system_header
24*06c3fb27SDimitry Andric #endif
25*06c3fb27SDimitry Andric 
26*06c3fb27SDimitry Andric _LIBCPP_PUSH_MACROS
27*06c3fb27SDimitry Andric #include <__undef_macros>
28*06c3fb27SDimitry Andric 
29*06c3fb27SDimitry Andric _LIBCPP_BEGIN_NAMESPACE_STD
30*06c3fb27SDimitry Andric 
31*06c3fb27SDimitry Andric #if _LIBCPP_STD_VER >= 23
32*06c3fb27SDimitry Andric 
33*06c3fb27SDimitry Andric // Layout policy with a mapping which corresponds to FORTRAN-style array layouts
34*06c3fb27SDimitry Andric struct layout_left {
35*06c3fb27SDimitry Andric   template <class _Extents>
36*06c3fb27SDimitry Andric   class mapping;
37*06c3fb27SDimitry Andric };
38*06c3fb27SDimitry Andric 
39*06c3fb27SDimitry Andric // Layout policy with a mapping which corresponds to C-style array layouts
40*06c3fb27SDimitry Andric struct layout_right {
41*06c3fb27SDimitry Andric   template <class _Extents>
42*06c3fb27SDimitry Andric   class mapping;
43*06c3fb27SDimitry Andric };
44*06c3fb27SDimitry Andric 
45*06c3fb27SDimitry Andric /*
46*06c3fb27SDimitry Andric // Will be implemented with follow on revision
47*06c3fb27SDimitry Andric // Layout policy with a unique mapping where strides are arbitrary
48*06c3fb27SDimitry Andric struct layout_stride {
49*06c3fb27SDimitry Andric   template<class Extents>
50*06c3fb27SDimitry Andric     class mapping;
51*06c3fb27SDimitry Andric };
52*06c3fb27SDimitry Andric */
53*06c3fb27SDimitry Andric 
54*06c3fb27SDimitry Andric #endif // _LIBCPP_STD_VER >= 23
55*06c3fb27SDimitry Andric 
56*06c3fb27SDimitry Andric _LIBCPP_END_NAMESPACE_STD
57*06c3fb27SDimitry Andric 
58*06c3fb27SDimitry Andric _LIBCPP_POP_MACROS
59*06c3fb27SDimitry Andric 
60*06c3fb27SDimitry Andric #endif // _LIBCPP___MDSPAN_LAYOUTS_H
61