xref: /llvm-project/pstl/include/pstl/internal/omp/parallel_transform_scan.h (revision 843c12d6a0cdfd64c5a92e24eb58ba9ee17ca1ee)
1 // -*- C++ -*-
2 // -*-===----------------------------------------------------------------------===//
3 //
4 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5 //
6 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
7 // See https://llvm.org/LICENSE.txt for license information.
8 //
9 //===----------------------------------------------------------------------===//
10 
11 #ifndef _PSTL_INTERNAL_OMP_PARALLEL_TRANSFORM_SCAN_H
12 #define _PSTL_INTERNAL_OMP_PARALLEL_TRANSFORM_SCAN_H
13 
14 #include "util.h"
15 
16 namespace __pstl
17 {
18 namespace __omp_backend
19 {
20 
21 template <class _ExecutionPolicy, class _Index, class _Up, class _Tp, class _Cp, class _Rp, class _Sp>
22 _Tp
__parallel_transform_scan(__pstl::__internal::__openmp_backend_tag,_ExecutionPolicy &&,_Index __n,_Up,_Tp __init,_Cp,_Rp,_Sp __scan)23 __parallel_transform_scan(__pstl::__internal::__openmp_backend_tag, _ExecutionPolicy&&, _Index __n, _Up /* __u */,
24                           _Tp __init, _Cp /* __combine */, _Rp /* __brick_reduce */, _Sp __scan)
25 {
26     // TODO: parallelize this function.
27     return __scan(_Index(0), __n, __init);
28 }
29 
30 } // namespace __omp_backend
31 } // namespace __pstl
32 #endif // _PSTL_INTERNAL_OMP_PARALLEL_TRANSFORM_SCAN_H
33