mdspan.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // -*- 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. #ifndef _LIBCPP___MDSPAN_LAYOUTS_H
  17. #define _LIBCPP___MDSPAN_LAYOUTS_H
  18. #include <__config>
  19. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  20. # pragma GCC system_header
  21. #endif
  22. _LIBCPP_PUSH_MACROS
  23. #include <__undef_macros>
  24. _LIBCPP_BEGIN_NAMESPACE_STD
  25. #if _LIBCPP_STD_VER >= 23
  26. // Layout policy with a mapping which corresponds to FORTRAN-style array layouts
  27. struct layout_left {
  28. template <class _Extents>
  29. class mapping;
  30. };
  31. // Layout policy with a mapping which corresponds to C-style array layouts
  32. struct layout_right {
  33. template <class _Extents>
  34. class mapping;
  35. };
  36. // Layout policy with a unique mapping where strides are arbitrary
  37. struct layout_stride {
  38. template <class _Extents>
  39. class mapping;
  40. };
  41. #endif // _LIBCPP_STD_VER >= 23
  42. _LIBCPP_END_NAMESPACE_STD
  43. _LIBCPP_POP_MACROS
  44. #endif // _LIBCPP___MDSPAN_LAYOUTS_H