Skip to content

Commit 98e2da5

Browse files
committed
Change threshold for OpenMP/tasks from 10k to 100k
1 parent fe14564 commit 98e2da5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/xss-common-qsort.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,14 +663,14 @@ X86_SIMD_SORT_INLINE void xss_qsort(T *arr, arrsize_t arrsize, bool hasnan)
663663

664664
#ifdef XSS_COMPILE_OPENMP
665665

666-
bool use_parallel = arrsize > 10000;
666+
bool use_parallel = arrsize > 100000;
667667

668668
if (use_parallel) {
669669
// This thread limit was determined experimentally; it may be better for it to be the number of physical cores on the system
670670
constexpr int thread_limit = 8;
671671
int thread_count = std::min(thread_limit, omp_get_max_threads());
672672
arrsize_t task_threshold
673-
= std::max((arrsize_t)10000, arrsize / 100);
673+
= std::max((arrsize_t)100000, arrsize / 100);
674674

675675
// We use omp parallel and then omp single to setup the threads that will run the omp task calls in qsort_
676676
// The omp single prevents multiple threads from running the initial qsort_ simultaneously and causing problems

0 commit comments

Comments
 (0)