__config 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. //===----------------------------------------------------------------------===//
  9. #ifndef _LIBCPP_EXPERIMENTAL_CONFIG
  10. #define _LIBCPP_EXPERIMENTAL_CONFIG
  11. #include <__config>
  12. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  13. # pragma GCC system_header
  14. #endif
  15. #define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL namespace std { namespace experimental {
  16. #define _LIBCPP_END_NAMESPACE_EXPERIMENTAL } }
  17. #define _VSTD_EXPERIMENTAL std::experimental
  18. #define _LIBCPP_BEGIN_NAMESPACE_LFTS _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL inline namespace fundamentals_v1 {
  19. #define _LIBCPP_END_NAMESPACE_LFTS } } }
  20. #define _VSTD_LFTS _VSTD_EXPERIMENTAL::fundamentals_v1
  21. #define _LIBCPP_BEGIN_NAMESPACE_LFTS_V2 _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL inline namespace fundamentals_v2 {
  22. #define _LIBCPP_END_NAMESPACE_LFTS_V2 } } }
  23. #define _VSTD_LFTS_V2 _VSTD_EXPERIMENTAL::fundamentals_v2
  24. #define _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR _LIBCPP_BEGIN_NAMESPACE_LFTS namespace pmr {
  25. #define _LIBCPP_END_NAMESPACE_LFTS_PMR _LIBCPP_END_NAMESPACE_LFTS }
  26. #define _VSTD_LFTS_PMR _VSTD_LFTS::pmr
  27. #if !defined(__cpp_coroutines) || __cpp_coroutines < 201703L
  28. #define _LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES
  29. #endif
  30. #define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_COROUTINES \
  31. _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL inline namespace coroutines_v1 {
  32. #define _LIBCPP_END_NAMESPACE_EXPERIMENTAL_COROUTINES \
  33. } _LIBCPP_END_NAMESPACE_EXPERIMENTAL
  34. #define _VSTD_CORO _VSTD_EXPERIMENTAL::coroutines_v1
  35. #define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD \
  36. _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL inline namespace parallelism_v2 {
  37. #define _LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD \
  38. } _LIBCPP_END_NAMESPACE_EXPERIMENTAL
  39. #define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD_ABI \
  40. _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD namespace simd_abi {
  41. #define _LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD_ABI \
  42. } _LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD
  43. // TODO: support more targets
  44. #if defined(__AVX__)
  45. #define _LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES 32
  46. #else
  47. #define _LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES 16
  48. #endif
  49. #endif