]> git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/include/parallel/numericfwd.h
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / include / parallel / numericfwd.h
1 // <parallel/numeric> Forward declarations -*- C++ -*-
2
3 // Copyright (C) 2007-2023 Free Software Foundation, Inc.
4 //
5 // This file is part of the GNU ISO C++ Library. This library is free
6 // software; you can redistribute it and/or modify it under the terms
7 // of the GNU General Public License as published by the Free Software
8 // Foundation; either version 3, or (at your option) any later
9 // version.
10
11 // This library is distributed in the hope that it will be useful, but
12 // WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // General Public License for more details.
15
16 // Under Section 7 of GPL version 3, you are granted additional
17 // permissions described in the GCC Runtime Library Exception, version
18 // 3.1, as published by the Free Software Foundation.
19
20 // You should have received a copy of the GNU General Public License and
21 // a copy of the GCC Runtime Library Exception along with this program;
22 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 // <http://www.gnu.org/licenses/>.
24
25 /** @file parallel/numericfwd.h
26 * This file is a GNU parallel extension to the Standard C++ Library.
27 */
28
29 #ifndef _GLIBCXX_PARALLEL_NUMERICFWD_H
30 #define _GLIBCXX_PARALLEL_NUMERICFWD_H 1
31
32 #pragma GCC system_header
33
34 #include <parallel/tags.h>
35 #include <parallel/settings.h>
36
37 namespace std _GLIBCXX_VISIBILITY(default)
38 {
39 namespace __parallel
40 {
41 template<typename _IIter, typename _Tp>
42 _Tp
43 accumulate(_IIter, _IIter, _Tp);
44
45 template<typename _IIter, typename _Tp>
46 _Tp
47 accumulate(_IIter, _IIter, _Tp, __gnu_parallel::sequential_tag);
48
49 template<typename _IIter, typename _Tp>
50 _Tp
51 accumulate(_IIter, _IIter, _Tp, __gnu_parallel::_Parallelism);
52
53 template<typename _IIter, typename _Tp, typename _Tag>
54 _Tp
55 __accumulate_switch(_IIter, _IIter, _Tp, _Tag);
56
57 template<typename _IIter, typename _Tp, typename _BinaryOper>
58 _Tp
59 accumulate(_IIter, _IIter, _Tp, _BinaryOper);
60
61 template<typename _IIter, typename _Tp, typename _BinaryOper>
62 _Tp
63 accumulate(_IIter, _IIter, _Tp, _BinaryOper,
64 __gnu_parallel::sequential_tag);
65
66 template<typename _IIter, typename _Tp, typename _BinaryOper>
67 _Tp
68 accumulate(_IIter, _IIter, _Tp, _BinaryOper,
69 __gnu_parallel::_Parallelism);
70
71 template<typename _IIter, typename _Tp, typename _BinaryOper,
72 typename _Tag>
73 _Tp
74 __accumulate_switch(_IIter, _IIter, _Tp, _BinaryOper, _Tag);
75
76 template<typename _RAIter, typename _Tp, typename _BinaryOper>
77 _Tp
78 __accumulate_switch(_RAIter, _RAIter, _Tp, _BinaryOper,
79 random_access_iterator_tag,
80 __gnu_parallel::_Parallelism __parallelism
81 = __gnu_parallel::parallel_unbalanced);
82
83 template<typename _IIter, typename _OIter>
84 _OIter
85 adjacent_difference(_IIter, _IIter, _OIter);
86
87 template<typename _IIter, typename _OIter, typename _BinaryOper>
88 _OIter
89 adjacent_difference(_IIter, _IIter, _OIter, _BinaryOper);
90
91 template<typename _IIter, typename _OIter>
92 _OIter
93 adjacent_difference(_IIter, _IIter, _OIter,
94 __gnu_parallel::sequential_tag);
95
96 template<typename _IIter, typename _OIter, typename _BinaryOper>
97 _OIter
98 adjacent_difference(_IIter, _IIter, _OIter, _BinaryOper,
99 __gnu_parallel::sequential_tag);
100
101 template<typename _IIter, typename _OIter>
102 _OIter
103 adjacent_difference(_IIter, _IIter, _OIter,
104 __gnu_parallel::_Parallelism);
105
106 template<typename _IIter, typename _OIter, typename _BinaryOper>
107 _OIter
108 adjacent_difference(_IIter, _IIter, _OIter, _BinaryOper,
109 __gnu_parallel::_Parallelism);
110
111 template<typename _IIter, typename _OIter, typename _BinaryOper,
112 typename _Tag1, typename _Tag2>
113 _OIter
114 __adjacent_difference_switch(_IIter, _IIter, _OIter, _BinaryOper,
115 _Tag1, _Tag2);
116
117 template<typename _IIter, typename _OIter, typename _BinaryOper>
118 _OIter
119 __adjacent_difference_switch(_IIter, _IIter, _OIter, _BinaryOper,
120 random_access_iterator_tag,
121 random_access_iterator_tag,
122 __gnu_parallel::_Parallelism __parallelism
123 = __gnu_parallel::parallel_unbalanced);
124
125 template<typename _IIter1, typename _IIter2, typename _Tp>
126 _Tp
127 inner_product(_IIter1, _IIter1, _IIter2, _Tp);
128
129 template<typename _IIter1, typename _IIter2, typename _Tp>
130 _Tp
131 inner_product(_IIter1, _IIter1, _IIter2, _Tp,
132 __gnu_parallel::sequential_tag);
133
134 template<typename _IIter1, typename _IIter2, typename _Tp>
135 _Tp
136 inner_product(_IIter1, _IIter1, _IIter2, _Tp,
137 __gnu_parallel::_Parallelism);
138
139 template<typename _IIter1, typename _IIter2, typename _Tp,
140 typename _BinaryFunction1, typename _BinaryFunction2>
141 _Tp
142 inner_product(_IIter1, _IIter1, _IIter2, _Tp,
143 _BinaryFunction1, _BinaryFunction2);
144
145 template<typename _IIter1, typename _IIter2, typename _Tp,
146 typename _BinaryFunction1, typename _BinaryFunction2>
147 _Tp
148 inner_product(_IIter1, _IIter1, _IIter2, _Tp, _BinaryFunction1,
149 _BinaryFunction2, __gnu_parallel::sequential_tag);
150
151 template<typename _IIter1, typename _IIter2, typename _Tp,
152 typename _BinaryFunction1, typename _BinaryFunction2>
153 _Tp
154 inner_product(_IIter1, _IIter1, _IIter2, _Tp, _BinaryFunction1,
155 _BinaryFunction2, __gnu_parallel::_Parallelism);
156
157 template<typename _RAIter1, typename _RAIter2, typename _Tp,
158 typename _BinaryFunction1, typename _BinaryFunction2>
159 _Tp
160 __inner_product_switch(_RAIter1, _RAIter1, _RAIter2, _Tp, _BinaryFunction1,
161 _BinaryFunction2, random_access_iterator_tag,
162 random_access_iterator_tag,
163 __gnu_parallel::_Parallelism
164 = __gnu_parallel::parallel_unbalanced);
165
166 template<typename _IIter1, typename _IIter2, typename _Tp,
167 typename _BinaryFunction1, typename _BinaryFunction2,
168 typename _Tag1, typename _Tag2>
169 _Tp
170 __inner_product_switch(_IIter1, _IIter1, _IIter2, _Tp, _BinaryFunction1,
171 _BinaryFunction2, _Tag1, _Tag2);
172
173
174 template<typename _IIter, typename _OIter>
175 _OIter
176 partial_sum(_IIter, _IIter, _OIter, __gnu_parallel::sequential_tag);
177
178 template<typename _IIter, typename _OIter, typename _BinaryOper>
179 _OIter
180 partial_sum(_IIter, _IIter, _OIter, _BinaryOper,
181 __gnu_parallel::sequential_tag);
182
183 template<typename _IIter, typename _OIter>
184 _OIter
185 partial_sum(_IIter, _IIter, _OIter __result);
186
187 template<typename _IIter, typename _OIter, typename _BinaryOper>
188 _OIter
189 partial_sum(_IIter, _IIter, _OIter, _BinaryOper);
190
191 template<typename _IIter, typename _OIter, typename _BinaryOper,
192 typename _Tag1, typename _Tag2>
193 _OIter
194 __partial_sum_switch(_IIter, _IIter, _OIter, _BinaryOper, _Tag1, _Tag2);
195
196 template<typename _IIter, typename _OIter, typename _BinaryOper>
197 _OIter
198 __partial_sum_switch(_IIter, _IIter, _OIter, _BinaryOper,
199 random_access_iterator_tag, random_access_iterator_tag);
200 } // end namespace
201 } // end namespace
202
203 #endif /* _GLIBCXX_PARALLEL_NUMERICFWD_H */