Initial PSTL commit
[lldb.git] / pstl / include / pstl / internal / glue_execution_defs.h
1 // -*- C++ -*-
2 //===-- glue_execution_defs.h ---------------------------------------------===//
3 //
4 //                     The LLVM Compiler Infrastructure
5 //
6 // This file is dual licensed under the MIT and the University of Illinois Open
7 // Source Licenses. See LICENSE.TXT for details.
8 //
9 //===----------------------------------------------------------------------===//
10
11 #ifndef __PSTL_glue_execution_defs_H
12 #define __PSTL_glue_execution_defs_H
13
14 #include <type_traits>
15
16 #include "execution_defs.h"
17
18 namespace std
19 {
20 // Type trait
21 using __pstl::execution::is_execution_policy;
22 #if __PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT
23 #if __INTEL_COMPILER
24 template <class T>
25 constexpr bool is_execution_policy_v = is_execution_policy<T>::value;
26 #else
27 using __pstl::execution::is_execution_policy_v;
28 #endif
29 #endif
30
31 namespace execution
32 {
33 // Standard C++ policy classes
34 using __pstl::execution::sequenced_policy;
35 #if __PSTL_USE_PAR_POLICIES
36 using __pstl::execution::parallel_policy;
37 using __pstl::execution::parallel_unsequenced_policy;
38 #endif
39 // Standard predefined policy instances
40 using __pstl::execution::seq;
41 #if __PSTL_USE_PAR_POLICIES
42 using __pstl::execution::par;
43 using __pstl::execution::par_unseq;
44 #endif
45 // Implementation-defined names
46 // Unsequenced policy is not yet standard, but for consistency
47 // we include it into namespace std::execution as well
48 using __pstl::execution::unseq;
49 using __pstl::execution::unsequenced_policy;
50 } // namespace execution
51 } // namespace std
52
53 #endif /* __PSTL_glue_execution_defs_H */