aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/26_numerics
diff options
context:
space:
mode:
authorJohannes Singler <singler@kit.edu>2011-01-26 09:18:48 +0000
committerJohannes Singler <singler@gcc.gnu.org>2011-01-26 09:18:48 +0000
commit52fe3d5beeb035fb4ae717f79f9825bf1898b67c (patch)
tree7b9ee2bee4f87566cbb90b64e074cf85209740bb /libstdc++-v3/testsuite/26_numerics
parent8717f52fde18aeab7d3021933ceb092048c7d561 (diff)
downloadgcc-52fe3d5beeb035fb4ae717f79f9825bf1898b67c.zip
gcc-52fe3d5beeb035fb4ae717f79f9825bf1898b67c.tar.gz
gcc-52fe3d5beeb035fb4ae717f79f9825bf1898b67c.tar.bz2
numeric (inner_product, [...]): Qualify subsequent call with __gnu_parallel instead of _GLIBCXX_STD_P to...
2011-01-26 Johannes Singler <singler@kit.edu> * include/parallel/numeric (inner_product, partial_sum): Qualify subsequent call with __gnu_parallel instead of _GLIBCXX_STD_P to reenable parallel execution without ambiguity. * include/parallel/algobase.h (equal): Likewise. * include/parallel/algo.h (find_first_of, search_n, merge, nth_element, partial_sort, max_element, min_element): Likewise. * testsuite/25_algorithms/headers/algorithm/ parallel_algorithm_mixed1.cc (main): Add respective test cases. * testsuite/25_algorithms/headers/algorithm/ parallel_algorithm_mixed2.cc (main): Likewise. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed1.cc (main): Likewise. * testsuite/26_numerics/headers/numeric/ parallel_numeric_mixed2.cc (main): Likewise. From-SVN: r169280
Diffstat (limited to 'libstdc++-v3/testsuite/26_numerics')
-rw-r--r--libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric_mixed1.cc11
-rw-r--r--libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric_mixed2.cc11
2 files changed, 22 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric_mixed1.cc b/libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric_mixed1.cc
index 59e70f6..a1ce8f05 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric_mixed1.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric_mixed1.cc
@@ -32,6 +32,17 @@ void test()
const value_type c(0);
vector_type v(10);
+
std::accumulate(v.begin(), v.end(), value_type(1));
+ std::accumulate(v.begin(), v.end(), value_type(1), std::plus<value_type>());
__gnu_parallel::accumulate(v.begin(), v.end(), value_type(1));
+ __gnu_parallel::accumulate(v.begin(), v.end(), value_type(1),
+ std::plus<value_type>());
+
+ std::inner_product(v.begin(), v.end(), v.begin(), value_type(1));
+ std::inner_product(v.begin(), v.end(), v.begin(), value_type(1),
+ std::multiplies<value_type>(), std::plus<value_type>());
+ __gnu_parallel::inner_product(v.begin(), v.end(), v.begin(), value_type(1));
+ __gnu_parallel::inner_product(v.begin(), v.end(), v.begin(), value_type(1),
+ std::multiplies<value_type>(), std::plus<value_type>());
}
diff --git a/libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric_mixed2.cc b/libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric_mixed2.cc
index 189f5b9..a38d925 100644
--- a/libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric_mixed2.cc
+++ b/libstdc++-v3/testsuite/26_numerics/headers/numeric/parallel_numeric_mixed2.cc
@@ -37,6 +37,17 @@ void test()
const value_type c(0);
vector_type v(10);
+
std::accumulate(v.begin(), v.end(), value_type(1));
+ std::accumulate(v.begin(), v.end(), value_type(1), std::plus<value_type>());
__gnu_parallel::accumulate(v.begin(), v.end(), value_type(1));
+ __gnu_parallel::accumulate(v.begin(), v.end(), value_type(1),
+ std::plus<value_type>());
+
+ std::inner_product(v.begin(), v.end(), v.begin(), value_type(1));
+ std::inner_product(v.begin(), v.end(), v.begin(), value_type(1),
+ std::multiplies<value_type>(), std::plus<value_type>());
+ __gnu_parallel::inner_product(v.begin(), v.end(), v.begin(), value_type(1));
+ __gnu_parallel::inner_product(v.begin(), v.end(), v.begin(), value_type(1),
+ std::multiplies<value_type>(), std::plus<value_type>());
}