You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

numericfwd.h 7.3KB

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