Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / pstl / test / support / stdlib / execution
blobad18c450115a1722302cdf1a34c13c535d43ef9b
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 //===----------------------------------------------------------------------===//
10 #ifndef _TEST_SUPPORT_STDLIB_EXECUTION
11 #define _TEST_SUPPORT_STDLIB_EXECUTION
13 // #include_next <execution> // None of the standard libraries PSTL is built on top have the <execution> header yet.
15 #include <pstl/internal/pstl_config.h>
16 #include <pstl/internal/execution_defs.h>
18 #define _PSTL_EXECUTION_POLICIES_DEFINED 1
20 #if _PSTL_ALGORITHM_FORWARD_DECLARED
21 #    include <pstl/internal/glue_algorithm_impl.h>
22 #endif
24 #if _PSTL_MEMORY_FORWARD_DECLARED
25 #    include <pstl/internal/glue_memory_impl.h>
26 #endif
28 #if _PSTL_NUMERIC_FORWARD_DECLARED
29 #    include <pstl/internal/glue_numeric_impl.h>
30 #endif
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
40 //TODO: __pstl::execution namespace is injected into the pstl::execution namespace when the implementation is not a part of
41 // standard C++ library
42 namespace pstl
44 namespace execution
46 using namespace __pstl::execution;
48 } // namespace pstl
50 #endif /* _TEST_SUPPORT_STDLIB_EXECUTION */