1 // -*- C++ -*- 2 //===-- glue_execution_defs.h ---------------------------------------------===// 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 17 namespace std 18 { 19 // Type trait 20 using __pstl::execution::is_execution_policy; 21 #if __PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT 22 #if __INTEL_COMPILER 23 template <class T> 24 constexpr bool is_execution_policy_v = is_execution_policy<T>::value; 25 #else 26 using __pstl::execution::is_execution_policy_v; 27 #endif 28 #endif 29 30 namespace execution 31 { 32 // Standard C++ policy classes 33 using __pstl::execution::sequenced_policy; 34 #if __PSTL_USE_PAR_POLICIES 35 using __pstl::execution::parallel_policy; 36 using __pstl::execution::parallel_unsequenced_policy; 37 #endif 38 // Standard predefined policy instances 39 using __pstl::execution::seq; 40 #if __PSTL_USE_PAR_POLICIES 41 using __pstl::execution::par; 42 using __pstl::execution::par_unseq; 43 #endif 44 // Implementation-defined names 45 // Unsequenced policy is not yet standard, but for consistency 46 // we include it into namespace std::execution as well 47 using __pstl::execution::unseq; 48 using __pstl::execution::unsequenced_policy; 49 } // namespace execution 50 } // namespace std 51 52 #include "algorithm_impl.h" 53 #include "numeric_impl.h" 54 #include "parallel_backend.h" 55 56 #endif /* __PSTL_glue_execution_defs_H */ 57