libstdc++: numericfwd.h Source File

libstdc++

numericfwd.h
Go to the documentation of this file.
1// <parallel/numeric> Forward declarations -*- C++ -*-
2
3// Copyright (C) 2007-2026 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#ifdef _GLIBCXX_SYSHDR
33#pragma GCC system_header
34#endif
35
36#include <parallel/tags.h>
37#include <parallel/settings.h>
38
39namespace std _GLIBCXX_VISIBILITY(default)
40{
41namespace __parallel
42{
43 template<typename _IIter, typename _Tp>
44 _Tp
45 accumulate(_IIter, _IIter, _Tp);
46
47 template<typename _IIter, typename _Tp>
48 _Tp
49 accumulate(_IIter, _IIter, _Tp, __gnu_parallel::sequential_tag);
50
51 template<typename _IIter, typename _Tp>
52 _Tp
53 accumulate(_IIter, _IIter, _Tp, __gnu_parallel::_Parallelism);
54
55 template<typename _IIter, typename _Tp, typename _Tag>
56 _Tp
57 __accumulate_switch(_IIter, _IIter, _Tp, _Tag);
58
59 template<typename _IIter, typename _Tp, typename _BinaryOper>
60 _Tp
61 accumulate(_IIter, _IIter, _Tp, _BinaryOper);
62
63 template<typename _IIter, typename _Tp, typename _BinaryOper>
64 _Tp
65 accumulate(_IIter, _IIter, _Tp, _BinaryOper,
66 __gnu_parallel::sequential_tag);
67
68 template<typename _IIter, typename _Tp, typename _BinaryOper>
69 _Tp
70 accumulate(_IIter, _IIter, _Tp, _BinaryOper,
71 __gnu_parallel::_Parallelism);
72
73 template<typename _IIter, typename _Tp, typename _BinaryOper,
74 typename _Tag>
75 _Tp
76 __accumulate_switch(_IIter, _IIter, _Tp, _BinaryOper, _Tag);
77
78 template<typename _RAIter, typename _Tp, typename _BinaryOper>
79 _Tp
80 __accumulate_switch(_RAIter, _RAIter, _Tp, _BinaryOper,
81 random_access_iterator_tag,
82 __gnu_parallel::_Parallelism __parallelism
83 = __gnu_parallel::parallel_unbalanced);
84
85 template<typename _IIter, typename _OIter>
86 _OIter
87 adjacent_difference(_IIter, _IIter, _OIter);
88
89 template<typename _IIter, typename _OIter, typename _BinaryOper>
90 _OIter
91 adjacent_difference(_IIter, _IIter, _OIter, _BinaryOper);
92
93 template<typename _IIter, typename _OIter>
94 _OIter
95 adjacent_difference(_IIter, _IIter, _OIter,
96 __gnu_parallel::sequential_tag);
97
98 template<typename _IIter, typename _OIter, typename _BinaryOper>
99 _OIter
100 adjacent_difference(_IIter, _IIter, _OIter, _BinaryOper,
101 __gnu_parallel::sequential_tag);
102
103 template<typename _IIter, typename _OIter>
104 _OIter
105 adjacent_difference(_IIter, _IIter, _OIter,
106 __gnu_parallel::_Parallelism);
107
108 template<typename _IIter, typename _OIter, typename _BinaryOper>
109 _OIter
110 adjacent_difference(_IIter, _IIter, _OIter, _BinaryOper,
111 __gnu_parallel::_Parallelism);
112
113 template<typename _IIter, typename _OIter, typename _BinaryOper,
114 typename _Tag1, typename _Tag2>
115 _OIter
116 __adjacent_difference_switch(_IIter, _IIter, _OIter, _BinaryOper,
117 _Tag1, _Tag2);
118
119 template<typename _IIter, typename _OIter, typename _BinaryOper>
120 _OIter
121 __adjacent_difference_switch(_IIter, _IIter, _OIter, _BinaryOper,
122 random_access_iterator_tag,
123 random_access_iterator_tag,
124 __gnu_parallel::_Parallelism __parallelism
125 = __gnu_parallel::parallel_unbalanced);
126
127 template<typename _IIter1, typename _IIter2, typename _Tp>
128 _Tp
129 inner_product(_IIter1, _IIter1, _IIter2, _Tp);
130
131 template<typename _IIter1, typename _IIter2, typename _Tp>
132 _Tp
133 inner_product(_IIter1, _IIter1, _IIter2, _Tp,
134 __gnu_parallel::sequential_tag);
135
136 template<typename _IIter1, typename _IIter2, typename _Tp>
137 _Tp
138 inner_product(_IIter1, _IIter1, _IIter2, _Tp,
139 __gnu_parallel::_Parallelism);
140
141 template<typename _IIter1, typename _IIter2, typename _Tp,
142 typename _BinaryFunction1, typename _BinaryFunction2>
143 _Tp
144 inner_product(_IIter1, _IIter1, _IIter2, _Tp,
145 _BinaryFunction1, _BinaryFunction2);
146
147 template<typename _IIter1, typename _IIter2, typename _Tp,
148 typename _BinaryFunction1, typename _BinaryFunction2>
149 _Tp
150 inner_product(_IIter1, _IIter1, _IIter2, _Tp, _BinaryFunction1,
151 _BinaryFunction2, __gnu_parallel::sequential_tag);
152
153 template<typename _IIter1, typename _IIter2, typename _Tp,
154 typename _BinaryFunction1, typename _BinaryFunction2>
155 _Tp
156 inner_product(_IIter1, _IIter1, _IIter2, _Tp, _BinaryFunction1,
157 _BinaryFunction2, __gnu_parallel::_Parallelism);
158
159 template<typename _RAIter1, typename _RAIter2, typename _Tp,
160 typename _BinaryFunction1, typename _BinaryFunction2>
161 _Tp
162 __inner_product_switch(_RAIter1, _RAIter1, _RAIter2, _Tp, _BinaryFunction1,
163 _BinaryFunction2, random_access_iterator_tag,
164 random_access_iterator_tag,
165 __gnu_parallel::_Parallelism
166 = __gnu_parallel::parallel_unbalanced);
167
168 template<typename _IIter1, typename _IIter2, typename _Tp,
169 typename _BinaryFunction1, typename _BinaryFunction2,
170 typename _Tag1, typename _Tag2>
171 _Tp
172 __inner_product_switch(_IIter1, _IIter1, _IIter2, _Tp, _BinaryFunction1,
173 _BinaryFunction2, _Tag1, _Tag2);
174
175
176 template<typename _IIter, typename _OIter>
177 _OIter
178 partial_sum(_IIter, _IIter, _OIter, __gnu_parallel::sequential_tag);
179
180 template<typename _IIter, typename _OIter, typename _BinaryOper>
181 _OIter
182 partial_sum(_IIter, _IIter, _OIter, _BinaryOper,
183 __gnu_parallel::sequential_tag);
184
185 template<typename _IIter, typename _OIter>
186 _OIter
187 partial_sum(_IIter, _IIter, _OIter __result);
188
189 template<typename _IIter, typename _OIter, typename _BinaryOper>
190 _OIter
191 partial_sum(_IIter, _IIter, _OIter, _BinaryOper);
192
193 template<typename _IIter, typename _OIter, typename _BinaryOper,
194 typename _Tag1, typename _Tag2>
195 _OIter
196 __partial_sum_switch(_IIter, _IIter, _OIter, _BinaryOper, _Tag1, _Tag2);
197
198 template<typename _IIter, typename _OIter, typename _BinaryOper>
199 _OIter
200 __partial_sum_switch(_IIter, _IIter, _OIter, _BinaryOper,
201 random_access_iterator_tag, random_access_iterator_tag);
202} // end namespace
203} // end namespace
204
205#endif /* _GLIBCXX_PARALLEL_NUMERICFWD_H */
settings.h
Runtime settings and tuning parameters, heuristics to decide whether to use parallelized algorithms.
tags.h
Tags for compile-time selection. This file is a GNU parallel extension to the Standard C++ Library.
std
ISO C++ entities toplevel namespace is std.
std::__parallel
GNU parallel code, replaces standard behavior with parallel behavior.
Definition algo.h:64
__gnu_parallel::_Parallelism
_Parallelism
Run-time equivalents for the compile-time tags.
Definition types.h:45
__gnu_parallel::parallel_unbalanced
@ parallel_unbalanced
Parallel unbalanced (equal-sized chunks).
Definition types.h:50