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 _PSTL_GLUE_EXECUTION_DEFS_H 11 #define _PSTL_GLUE_EXECUTION_DEFS_H 12 13 #include <type_traits> 14 15 #include "execution_defs.h" 16 #include "pstl_config.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::parallel_policy; 35 using __pstl::execution::parallel_unsequenced_policy; 36 using __pstl::execution::sequenced_policy; 37 38 // Standard predefined policy instances 39 using __pstl::execution::par; 40 using __pstl::execution::par_unseq; 41 using __pstl::execution::seq; 42 43 // Implementation-defined names 44 // Unsequenced policy is not yet standard, but for consistency 45 // we include it into namespace std::execution as well 46 using __pstl::execution::unseq; 47 using __pstl::execution::unsequenced_policy; 48 } // namespace execution 49 } // namespace std 50 51 #include "algorithm_impl.h" 52 #include "numeric_impl.h" 53 #include "parallel_backend.h" 54 55 #endif /* _PSTL_GLUE_EXECUTION_DEFS_H */ 56