diff options
author | Johannes Singler <singler@ira.uka.de> | 2008-05-07 11:14:05 +0000 |
---|---|---|
committer | Johannes Singler <singler@gcc.gnu.org> | 2008-05-07 11:14:05 +0000 |
commit | a273a425372017288e758c59f6ab0a7304d80d81 (patch) | |
tree | 89c3ec8aa2638ff06b7dc346c1f67655066c1736 /libstdc++-v3 | |
parent | 9562228040b6fc80870b2d7bd60d67af7870390e (diff) | |
download | gcc-a273a425372017288e758c59f6ab0a7304d80d81.zip gcc-a273a425372017288e758c59f6ab0a7304d80d81.tar.gz gcc-a273a425372017288e758c59f6ab0a7304d80d81.tar.bz2 |
quicksort.h: (parallel_sort_qs_conquer) Explicitly request number of threads in the parallel...
2008-05-07 Johannes Singler <singler@ira.uka.de>
* include/parallel/quicksort.h:
(parallel_sort_qs_conquer) Explicitly request number of threads
in the parallel clause.
(parallel_sort_qs) Remove setting the number of threads globally.
From-SVN: r135038
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 7 | ||||
-rw-r--r-- | libstdc++-v3/include/parallel/quicksort.h | 5 |
2 files changed, 8 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index ecba4a3..6bc43b8 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2008-05-07 Johannes Singler <singler@ira.uka.de> + + * include/parallel/quicksort.h: + (parallel_sort_qs_conquer) Explicitly request number of threads + in the parallel clause. + (parallel_sort_qs) Remove setting the number of threads globally. + 2008-05-06 Benjamin Kosnik <bkoz@redhat.com> * include/std/mutex (mutex::mutex): Fix usage of initializing macro. diff --git a/libstdc++-v3/include/parallel/quicksort.h b/libstdc++-v3/include/parallel/quicksort.h index 8ef5b7c..844a5bf 100644 --- a/libstdc++-v3/include/parallel/quicksort.h +++ b/libstdc++-v3/include/parallel/quicksort.h @@ -138,7 +138,7 @@ namespace __gnu_parallel _Settings::get().sort_qs_num_samples_preset, num_threads); -#pragma omp parallel sections +#pragma omp parallel sections num_threads(2) { #pragma omp section parallel_sort_qs_conquer(begin, begin + split, @@ -177,9 +177,6 @@ namespace __gnu_parallel if (num_threads > n) num_threads = static_cast<thread_index_t>(n); - // Hard to avoid. - omp_set_num_threads(num_threads); - parallel_sort_qs_conquer(begin, begin + n, comp, num_threads); } |