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