xref: /freebsd/contrib/llvm-project/libcxx/include/__fwd/mdspan.h (revision 5f757f3ff9144b609b3c433dfd370cc6bdc191ad)
106c3fb27SDimitry Andric // -*- C++ -*-
206c3fb27SDimitry Andric //===----------------------------------------------------------------------===//
306c3fb27SDimitry Andric //
406c3fb27SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
506c3fb27SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
606c3fb27SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
706c3fb27SDimitry Andric //
806c3fb27SDimitry Andric //                        Kokkos v. 4.0
906c3fb27SDimitry Andric //       Copyright (2022) National Technology & Engineering
1006c3fb27SDimitry Andric //               Solutions of Sandia, LLC (NTESS).
1106c3fb27SDimitry Andric //
1206c3fb27SDimitry Andric // Under the terms of Contract DE-NA0003525 with NTESS,
1306c3fb27SDimitry Andric // the U.S. Government retains certain rights in this software.
1406c3fb27SDimitry Andric //
1506c3fb27SDimitry Andric //===---------------------------------------------------------------------===//
1606c3fb27SDimitry Andric 
1706c3fb27SDimitry Andric #ifndef _LIBCPP___MDSPAN_LAYOUTS_H
1806c3fb27SDimitry Andric #define _LIBCPP___MDSPAN_LAYOUTS_H
1906c3fb27SDimitry Andric 
2006c3fb27SDimitry Andric #include <__config>
2106c3fb27SDimitry Andric 
2206c3fb27SDimitry Andric #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
2306c3fb27SDimitry Andric #  pragma GCC system_header
2406c3fb27SDimitry Andric #endif
2506c3fb27SDimitry Andric 
2606c3fb27SDimitry Andric _LIBCPP_PUSH_MACROS
2706c3fb27SDimitry Andric #include <__undef_macros>
2806c3fb27SDimitry Andric 
2906c3fb27SDimitry Andric _LIBCPP_BEGIN_NAMESPACE_STD
3006c3fb27SDimitry Andric 
3106c3fb27SDimitry Andric #if _LIBCPP_STD_VER >= 23
3206c3fb27SDimitry Andric 
3306c3fb27SDimitry Andric // Layout policy with a mapping which corresponds to FORTRAN-style array layouts
3406c3fb27SDimitry Andric struct layout_left {
3506c3fb27SDimitry Andric   template <class _Extents>
3606c3fb27SDimitry Andric   class mapping;
3706c3fb27SDimitry Andric };
3806c3fb27SDimitry Andric 
3906c3fb27SDimitry Andric // Layout policy with a mapping which corresponds to C-style array layouts
4006c3fb27SDimitry Andric struct layout_right {
4106c3fb27SDimitry Andric   template <class _Extents>
4206c3fb27SDimitry Andric   class mapping;
4306c3fb27SDimitry Andric };
4406c3fb27SDimitry Andric 
4506c3fb27SDimitry Andric // Layout policy with a unique mapping where strides are arbitrary
4606c3fb27SDimitry Andric struct layout_stride {
47*5f757f3fSDimitry Andric   template <class _Extents>
4806c3fb27SDimitry Andric   class mapping;
4906c3fb27SDimitry Andric };
5006c3fb27SDimitry Andric 
5106c3fb27SDimitry Andric #endif // _LIBCPP_STD_VER >= 23
5206c3fb27SDimitry Andric 
5306c3fb27SDimitry Andric _LIBCPP_END_NAMESPACE_STD
5406c3fb27SDimitry Andric 
5506c3fb27SDimitry Andric _LIBCPP_POP_MACROS
5606c3fb27SDimitry Andric 
5706c3fb27SDimitry Andric #endif // _LIBCPP___MDSPAN_LAYOUTS_H
58