1// -*- C++ -*-
2//===-- execution ---------------------------------------------------------===//
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 _TEST_SUPPORT_STDLIB_EXECUTION
11#define _TEST_SUPPORT_STDLIB_EXECUTION
12
13// #include_next <execution> // None of the standard libraries PSTL is built on top have the <execution> header yet.
14
15#include <pstl/internal/pstl_config.h>
16#include <pstl/internal/execution_defs.h>
17
18#define _PSTL_EXECUTION_POLICIES_DEFINED 1
19
20#if _PSTL_ALGORITHM_FORWARD_DECLARED
21# include <pstl/internal/glue_algorithm_impl.h>
22#endif
23
24#if _PSTL_MEMORY_FORWARD_DECLARED
25# include <pstl/internal/glue_memory_impl.h>
26#endif
27
28#if _PSTL_NUMERIC_FORWARD_DECLARED
29# include <pstl/internal/glue_numeric_impl.h>
30#endif
31
32#if _PSTL_CPP17_EXECUTION_POLICIES_PRESENT
33_PSTL_PRAGMA_MESSAGE_POLICIES("The <Parallel STL> execution policies are defined in the namespace __pstl::execution")
34#else
35# include <pstl/internal/glue_execution_defs.h>
36_PSTL_PRAGMA_MESSAGE_POLICIES(
37 "The <Parallel STL> execution policies are injected into the standard namespace std::execution")
38#endif
39
40//TODO: __pstl::execution namespace is injected into the pstl::execution namespace when the implementation is not a part of
41// standard C++ library
42namespace pstl
43{
44namespace execution
45{
46using namespace __pstl::execution;
47}
48} // namespace pstl
49
50#endif /* _TEST_SUPPORT_STDLIB_EXECUTION */
51

source code of pstl/test/support/stdlib/execution