libstdc++
numericfwd.h
Go to the documentation of this file.
00001 // <numeric> parallel extensions -*- C++ -*-
00002 
00003 // Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
00004 //
00005 // This file is part of the GNU ISO C++ Library.  This library is free
00006 // software; you can redistribute it and/or modify it under the terms
00007 // of the GNU General Public License as published by the Free Software
00008 // Foundation; either version 3, or (at your option) any later
00009 // version.
00010 
00011 // This library is distributed in the hope that it will be useful, but
00012 // WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // General Public License for more details.
00015 
00016 // Under Section 7 of GPL version 3, you are granted additional
00017 // permissions described in the GCC Runtime Library Exception, version
00018 // 3.1, as published by the Free Software Foundation.
00019 
00020 // You should have received a copy of the GNU General Public License and
00021 // a copy of the GCC Runtime Library Exception along with this program;
00022 // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
00023 // <http://www.gnu.org/licenses/>.
00024 
00025 /** @file parallel/numericfwd.h
00026  *  This file is a GNU parallel extension to the Standard C++ Library.
00027  */
00028 
00029 #ifndef _GLIBCXX_PARALLEL_NUMERICFWD_H
00030 #define _GLIBCXX_PARALLEL_NUMERICFWD_H 1
00031 
00032 #pragma GCC system_header
00033 
00034 #include <parallel/tags.h>
00035 #include <parallel/settings.h>
00036 
00037 namespace std _GLIBCXX_VISIBILITY(default)
00038 {
00039 namespace __parallel
00040 {
00041   template<typename _IIter, typename _Tp>
00042     _Tp
00043     accumulate(_IIter, _IIter, _Tp);
00044 
00045   template<typename _IIter, typename _Tp>
00046     _Tp
00047     accumulate(_IIter, _IIter, _Tp, __gnu_parallel::sequential_tag);
00048 
00049   template<typename _IIter, typename _Tp>
00050     _Tp
00051     accumulate(_IIter, _IIter, _Tp, __gnu_parallel::_Parallelism);
00052 
00053   template<typename _IIter, typename _Tp, typename _Tag>
00054     _Tp
00055     __accumulate_switch(_IIter, _IIter, _Tp, _Tag);
00056 
00057   template<typename _IIter, typename _Tp, typename _BinaryOper>
00058     _Tp
00059     accumulate(_IIter, _IIter, _Tp, _BinaryOper);
00060 
00061   template<typename _IIter, typename _Tp, typename _BinaryOper>
00062     _Tp
00063     accumulate(_IIter, _IIter, _Tp, _BinaryOper,
00064                __gnu_parallel::sequential_tag);
00065 
00066   template<typename _IIter, typename _Tp, typename _BinaryOper>
00067     _Tp
00068     accumulate(_IIter, _IIter, _Tp, _BinaryOper,
00069                __gnu_parallel::_Parallelism);
00070 
00071   template<typename _IIter, typename _Tp, typename _BinaryOper,
00072            typename _Tag>
00073     _Tp
00074     __accumulate_switch(_IIter, _IIter, _Tp, _BinaryOper, _Tag);
00075 
00076   template<typename _RAIter, typename _Tp, typename _BinaryOper>
00077     _Tp
00078     __accumulate_switch(_RAIter, _RAIter, _Tp, _BinaryOper,
00079                       random_access_iterator_tag,
00080                       __gnu_parallel::_Parallelism __parallelism
00081                       = __gnu_parallel::parallel_unbalanced);
00082 
00083   template<typename _IIter, typename _OIter>
00084     _OIter
00085     adjacent_difference(_IIter, _IIter, _OIter);
00086 
00087   template<typename _IIter, typename _OIter, typename _BinaryOper>
00088     _OIter
00089     adjacent_difference(_IIter, _IIter, _OIter, _BinaryOper);
00090 
00091   template<typename _IIter, typename _OIter>
00092     _OIter
00093     adjacent_difference(_IIter, _IIter, _OIter,
00094                         __gnu_parallel::sequential_tag);
00095 
00096   template<typename _IIter, typename _OIter, typename _BinaryOper>
00097     _OIter
00098     adjacent_difference(_IIter, _IIter, _OIter, _BinaryOper, 
00099                         __gnu_parallel::sequential_tag);
00100 
00101   template<typename _IIter, typename _OIter>
00102     _OIter
00103     adjacent_difference(_IIter, _IIter, _OIter,
00104                         __gnu_parallel::_Parallelism);
00105 
00106   template<typename _IIter, typename _OIter, typename _BinaryOper>
00107     _OIter
00108     adjacent_difference(_IIter, _IIter, _OIter, _BinaryOper, 
00109                         __gnu_parallel::_Parallelism);
00110 
00111   template<typename _IIter, typename _OIter, typename _BinaryOper,
00112            typename _Tag1, typename _Tag2>
00113     _OIter
00114     __adjacent_difference_switch(_IIter, _IIter, _OIter, _BinaryOper,
00115                                _Tag1, _Tag2);
00116 
00117   template<typename _IIter, typename _OIter, typename _BinaryOper>
00118     _OIter
00119     __adjacent_difference_switch(_IIter, _IIter, _OIter, _BinaryOper, 
00120                                random_access_iterator_tag, 
00121                                random_access_iterator_tag, 
00122                                __gnu_parallel::_Parallelism __parallelism
00123                                = __gnu_parallel::parallel_unbalanced);
00124 
00125   template<typename _IIter1, typename _IIter2, typename _Tp>
00126     _Tp
00127     inner_product(_IIter1, _IIter1, _IIter2, _Tp);
00128 
00129   template<typename _IIter1, typename _IIter2, typename _Tp>
00130     _Tp
00131     inner_product(_IIter1, _IIter1, _IIter2, _Tp,
00132                   __gnu_parallel::sequential_tag);
00133 
00134   template<typename _IIter1, typename _IIter2, typename _Tp>
00135     _Tp
00136     inner_product(_IIter1, _IIter1, _IIter2, _Tp,
00137                   __gnu_parallel::_Parallelism);
00138 
00139   template<typename _IIter1, typename _IIter2, typename _Tp,
00140            typename _BinaryFunction1, typename _BinaryFunction2>
00141     _Tp
00142     inner_product(_IIter1, _IIter1, _IIter2, _Tp,
00143                   _BinaryFunction1, _BinaryFunction2);
00144 
00145   template<typename _IIter1, typename _IIter2, typename _Tp,
00146            typename _BinaryFunction1, typename _BinaryFunction2>
00147     _Tp
00148     inner_product(_IIter1, _IIter1, _IIter2, _Tp, _BinaryFunction1,
00149                   _BinaryFunction2, __gnu_parallel::sequential_tag);
00150 
00151   template<typename _IIter1, typename _IIter2, typename _Tp,
00152            typename BinaryFunction1, typename BinaryFunction2>
00153     _Tp
00154     inner_product(_IIter1, _IIter1, _IIter2, _Tp, BinaryFunction1,
00155                   BinaryFunction2, __gnu_parallel::_Parallelism);
00156 
00157   template<typename _RAIter1, typename _RAIter2, typename _Tp,
00158            typename BinaryFunction1, typename BinaryFunction2>
00159     _Tp
00160     __inner_product_switch(_RAIter1, _RAIter1, _RAIter2, _Tp, BinaryFunction1,
00161                          BinaryFunction2, random_access_iterator_tag, 
00162                          random_access_iterator_tag, 
00163                          __gnu_parallel::_Parallelism
00164                          = __gnu_parallel::parallel_unbalanced);
00165 
00166   template<typename _IIter1, typename _IIter2, typename _Tp,
00167            typename _BinaryFunction1, typename _BinaryFunction2,
00168            typename _Tag1, typename _Tag2>
00169     _Tp
00170     __inner_product_switch(_IIter1, _IIter1, _IIter2, _Tp, _BinaryFunction1, 
00171                          _BinaryFunction2, _Tag1, _Tag2);
00172 
00173 
00174   template<typename _IIter, typename _OIter>
00175     _OIter
00176     partial_sum(_IIter, _IIter, _OIter, __gnu_parallel::sequential_tag);
00177 
00178   template<typename _IIter, typename _OIter, typename _BinaryOper>
00179     _OIter
00180     partial_sum(_IIter, _IIter, _OIter, _BinaryOper,
00181                 __gnu_parallel::sequential_tag);
00182 
00183   template<typename _IIter, typename _OIter>
00184     _OIter
00185     partial_sum(_IIter, _IIter, _OIter __result);
00186 
00187   template<typename _IIter, typename _OIter, typename _BinaryOper>
00188     _OIter
00189     partial_sum(_IIter, _IIter, _OIter, _BinaryOper);
00190 
00191   template<typename _IIter, typename _OIter, typename _BinaryOper,
00192            typename _Tag1, typename _Tag2>
00193     _OIter
00194     __partial_sum_switch(_IIter, _IIter, _OIter, _BinaryOper, _Tag1, _Tag2);
00195 
00196   template<typename _IIter, typename _OIter, typename _BinaryOper>
00197     _OIter
00198     __partial_sum_switch(_IIter, _IIter, _OIter, _BinaryOper,
00199                        random_access_iterator_tag, random_access_iterator_tag);
00200 } // end namespace
00201 } // end namespace
00202 
00203 #endif /* _GLIBCXX_PARALLEL_NUMERICFWD_H */