1 //===----------------------------------------------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKEND_H 10 #define _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKEND_H 11 12 #include <__config> 13 14 /* 15 16 // _Functor takes a subrange for [__first, __last) that should be executed in serial 17 template <class _RandomAccessIterator, class _Functor> 18 void __parallel_for(_RandomAccessIterator __first, _RandomAccessIterator __last, _Functor __func); 19 20 template <class _Iterator, class _UnaryOp, class _Tp, class _BinaryOp, class _Reduction> 21 _Tp __parallel_transform_reduce(_Iterator __first, _Iterator __last, _UnaryOp, _Tp __init, _BinaryOp, _Reduction); 22 23 // Cancel the execution of other jobs - they aren't needed anymore 24 void __cancel_execution(); 25 26 template <class _RandomAccessIterator1, 27 class _RandomAccessIterator2, 28 class _RandomAccessIterator3, 29 class _Compare, 30 class _LeafMerge> 31 void __parallel_merge( 32 _RandomAccessIterator1 __first1, 33 _RandomAccessIterator1 __last1, 34 _RandomAccessIterator2 __first2, 35 _RandomAccessIterator2 __last2, 36 _RandomAccessIterator3 __outit, 37 _Compare __comp, 38 _LeafMerge __leaf_merge); 39 40 template <class _RandomAccessIterator, class _Comp, class _LeafSort> 41 void __parallel_stable_sort(_RandomAccessIterator __first, 42 _RandomAccessIterator __last, 43 _Comp __comp, 44 _LeafSort __leaf_sort); 45 46 TODO: Document the parallel backend 47 */ 48 49 #include <__algorithm/pstl_backends/cpu_backends/any_of.h> 50 #include <__algorithm/pstl_backends/cpu_backends/backend.h> 51 #include <__algorithm/pstl_backends/cpu_backends/fill.h> 52 #include <__algorithm/pstl_backends/cpu_backends/find_if.h> 53 #include <__algorithm/pstl_backends/cpu_backends/for_each.h> 54 #include <__algorithm/pstl_backends/cpu_backends/merge.h> 55 #include <__algorithm/pstl_backends/cpu_backends/stable_sort.h> 56 #include <__algorithm/pstl_backends/cpu_backends/transform.h> 57 #include <__algorithm/pstl_backends/cpu_backends/transform_reduce.h> 58 59 #endif // _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKEND_H 60