Commit a273a425 by Johannes Singler Committed by Johannes Singler

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
parent 95622280
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.
......
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment