glue_execution_defs.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. #ifndef _PSTL_GLUE_EXECUTION_DEFS_H
  10. #define _PSTL_GLUE_EXECUTION_DEFS_H
  11. #include <type_traits>
  12. #include "execution_defs.h"
  13. namespace std
  14. {
  15. // Type trait
  16. using __pstl::execution::is_execution_policy;
  17. #if _PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT
  18. # if __INTEL_COMPILER
  19. template <class T>
  20. constexpr bool is_execution_policy_v = is_execution_policy<T>::value;
  21. # else
  22. using __pstl::execution::is_execution_policy_v;
  23. # endif
  24. #endif
  25. namespace execution
  26. {
  27. // Standard C++ policy classes
  28. using __pstl::execution::parallel_policy;
  29. using __pstl::execution::parallel_unsequenced_policy;
  30. using __pstl::execution::sequenced_policy;
  31. // Standard predefined policy instances
  32. using __pstl::execution::par;
  33. using __pstl::execution::par_unseq;
  34. using __pstl::execution::seq;
  35. // Implementation-defined names
  36. // Unsequenced policy is not yet standard, but for consistency
  37. // we include it into namespace std::execution as well
  38. using __pstl::execution::unseq;
  39. using __pstl::execution::unsequenced_policy;
  40. } // namespace execution
  41. } // namespace std
  42. #include "algorithm_impl.h"
  43. #include "numeric_impl.h"
  44. #include "parallel_backend.h"
  45. #endif /* _PSTL_GLUE_EXECUTION_DEFS_H */