]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/libstdc++-v3/contrib/libstdc++-v3-4.3.3/include/parallel/numericfwd.h
update
[l4.git] / l4 / pkg / libstdc++-v3 / contrib / libstdc++-v3-4.3.3 / include / parallel / numericfwd.h
1 // <numeric> parallel extensions -*- C++ -*-
2
3 // Copyright (C) 2007, 2008 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 2, 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 // You should have received a copy of the GNU General Public License
17 // along with this library; see the file COPYING.  If not, write to
18 // the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
19 // MA 02111-1307, USA.
20
21 // As a special exception, you may use this file as part of a free
22 // software library without restriction.  Specifically, if other files
23 // instantiate templates or use macros or inline functions from this
24 // file, or you compile this file and link it with other files to
25 // produce an executable, this file does not by itself cause the
26 // resulting executable to be covered by the GNU General Public
27 // License.  This exception does not however invalidate any other
28 // reasons why the executable file might be covered by the GNU General
29 // Public License.
30
31 /** @file parallel/numericfwd.h
32  *  This file is a GNU parallel extension to the Standard C++ Library.
33  */
34
35 #ifndef _GLIBCXX_PARALLEL_NUMERICFWD_H
36 #define _GLIBCXX_PARALLEL_NUMERICFWD_H 1
37
38 #pragma GCC system_header
39
40 #include <parallel/tags.h>
41 #include <parallel/settings.h>
42
43 namespace std
44 {
45 namespace __parallel
46 {
47   template<typename _IIter, typename _Tp>
48     _Tp
49     accumulate(_IIter, _IIter, _Tp);
50
51   template<typename _IIter, typename _Tp>
52     _Tp
53     accumulate(_IIter, _IIter, _Tp, __gnu_parallel::sequential_tag);
54
55   template<typename _IIter, typename _Tp>
56     _Tp
57     accumulate(_IIter, _IIter, _Tp, __gnu_parallel::_Parallelism);
58
59   template<typename _IIter, typename _Tp, typename _Tag>
60     _Tp
61     accumulate_switch(_IIter, _IIter, _Tp, _Tag);
62
63   template<typename _IIter, typename _Tp, typename _BinaryOper>
64     _Tp
65     accumulate(_IIter, _IIter, _Tp, _BinaryOper);
66
67   template<typename _IIter, typename _Tp, typename _BinaryOper>
68     _Tp
69     accumulate(_IIter, _IIter, _Tp, _BinaryOper,
70                __gnu_parallel::sequential_tag);
71
72   template<typename _IIter, typename _Tp, typename _BinaryOper>
73     _Tp
74     accumulate(_IIter, _IIter, _Tp, _BinaryOper,
75                __gnu_parallel::_Parallelism);
76
77   template<typename _IIter, typename _Tp, typename _BinaryOper,
78            typename _Tag>
79     _Tp
80     accumulate_switch(_IIter, _IIter, _Tp, _BinaryOper, _Tag);
81
82   template<typename _RAIter, typename _Tp, typename _BinaryOper>
83     _Tp
84     accumulate_switch(_RAIter, _RAIter, _Tp, _BinaryOper,
85                       random_access_iterator_tag,
86                       __gnu_parallel::_Parallelism);
87
88   template<typename _IIter, typename _OIter>
89     _OIter
90     adjacent_difference(_IIter, _IIter, _OIter);
91
92   template<typename _IIter, typename _OIter, typename _BinaryOper>
93     _OIter
94     adjacent_difference(_IIter, _IIter, _OIter, _BinaryOper);
95
96   template<typename _IIter, typename _OIter>
97     _OIter
98     adjacent_difference(_IIter, _IIter, _OIter,
99                         __gnu_parallel::sequential_tag);
100
101   template<typename _IIter, typename _OIter, typename _BinaryOper>
102     _OIter
103     adjacent_difference(_IIter, _IIter, _OIter, _BinaryOper, 
104                         __gnu_parallel::sequential_tag);
105
106   template<typename _IIter, typename _OIter>
107     _OIter
108     adjacent_difference(_IIter, _IIter, _OIter,
109                         __gnu_parallel::_Parallelism);
110
111   template<typename _IIter, typename _OIter, typename _BinaryOper>
112     _OIter
113     adjacent_difference(_IIter, _IIter, _OIter, _BinaryOper, 
114                         __gnu_parallel::_Parallelism);
115
116   template<typename _IIter, typename _OIter, typename _BinaryOper,
117            typename _Tag1, typename _Tag2>
118     _OIter
119     adjacent_difference_switch(_IIter, _IIter, _OIter, _BinaryOper,
120                                _Tag1, _Tag2);
121
122   template<typename _IIter, typename _OIter, typename _BinaryOper>
123     _OIter
124     adjacent_difference_switch(_IIter, _IIter, _OIter, _BinaryOper, 
125                                random_access_iterator_tag, 
126                                random_access_iterator_tag, 
127                                __gnu_parallel::_Parallelism);
128
129   template<typename _IIter1, typename _IIter2, typename _Tp>
130     _Tp
131     inner_product(_IIter1, _IIter1, _IIter2, _Tp);
132
133   template<typename _IIter1, typename _IIter2, typename _Tp>
134     _Tp
135     inner_product(_IIter1, _IIter1, _IIter2, _Tp,
136                   __gnu_parallel::sequential_tag);
137
138   template<typename _IIter1, typename _IIter2, typename _Tp>
139     _Tp
140     inner_product(_IIter1, _IIter1, _IIter2, _Tp,
141                   __gnu_parallel::_Parallelism);
142
143   template<typename _IIter1, typename _IIter2, typename _Tp,
144            typename _BinaryFunction1, typename _BinaryFunction2>
145     _Tp
146     inner_product(_IIter1, _IIter1, _IIter2, _Tp,
147                   _BinaryFunction1, _BinaryFunction2);
148
149   template<typename _IIter1, typename _IIter2, typename _Tp,
150            typename _BinaryFunction1, typename _BinaryFunction2>
151     _Tp
152     inner_product(_IIter1, _IIter1, _IIter2, _Tp, _BinaryFunction1,
153                   _BinaryFunction2, __gnu_parallel::sequential_tag);
154
155   template<typename _IIter1, typename _IIter2, typename _Tp,
156            typename BinaryFunction1, typename BinaryFunction2>
157     _Tp
158     inner_product(_IIter1, _IIter1, _IIter2, _Tp, BinaryFunction1,
159                   BinaryFunction2, __gnu_parallel::_Parallelism);
160
161   template<typename _RAIter1, typename _RAIter2, typename _Tp,
162            typename BinaryFunction1, typename BinaryFunction2>
163     _Tp
164     inner_product_switch(_RAIter1, _RAIter1, _RAIter2, _Tp, BinaryFunction1, 
165                          BinaryFunction2, random_access_iterator_tag, 
166                          random_access_iterator_tag, 
167                          __gnu_parallel::_Parallelism);
168
169   template<typename _IIter1, typename _IIter2, typename _Tp,
170            typename _BinaryFunction1, typename _BinaryFunction2,
171            typename _Tag1, typename _Tag2>
172     _Tp
173     inner_product_switch(_IIter1, _IIter1, _IIter2, _Tp, _BinaryFunction1, 
174                          _BinaryFunction2, _Tag1, _Tag2);
175
176
177   template<typename _IIter, typename _OIter>
178     _OIter
179     partial_sum(_IIter, _IIter, _OIter, __gnu_parallel::sequential_tag);
180
181   template<typename _IIter, typename _OIter, typename _BinaryOper>
182     _OIter
183     partial_sum(_IIter, _IIter, _OIter, _BinaryOper,
184                 __gnu_parallel::sequential_tag);
185
186   template<typename _IIter, typename _OIter>
187     _OIter
188     partial_sum(_IIter, _IIter, _OIter result);
189
190   template<typename _IIter, typename _OIter, typename _BinaryOper>
191     _OIter
192     partial_sum(_IIter, _IIter, _OIter, _BinaryOper);
193
194   template<typename _IIter, typename _OIter, typename _BinaryOper,
195            typename _Tag1, typename _Tag2>
196     _OIter
197     partial_sum_switch(_IIter, _IIter, _OIter, _BinaryOper, _Tag1, _Tag2);
198
199   template<typename _IIter, typename _OIter, typename _BinaryOper>
200     _OIter
201     partial_sum_switch(_IIter, _IIter, _OIter, _BinaryOper,
202                        random_access_iterator_tag, random_access_iterator_tag);
203 } // end namespace
204 } // end namespace
205
206 #endif