Skip to content

Commit 8a72081

Browse files
authored
Merge pull request #205 from r-devulap/readme-v7.0
update README to include a section on OpenMP
2 parents 41a082c + 61c47d7 commit 8a72081

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,20 @@ benchmark](https://github.com/google/benchmark) frameworks respectively. You
8181
can configure meson to build them both by using `-Dbuild_tests=true` and
8282
`-Dbuild_benchmarks=true`.
8383

84+
## Build using OpenMP
85+
86+
`qsort`, `argsort`, and `keyvalue_qsort` can achieve even greater performance
87+
(up-to 3x speedup) through parallelization with
88+
[OpenMP](https://www.openmp.org/). By default, OpenMP support is disabled; to
89+
enable it, set the `-Duse_openmp=true` flag when configuring Meson. If you are
90+
using only the static SIMD implementations, compile with `-fopenmp
91+
-DXSS_USE_OPENMP`.
92+
93+
OpenMP-based parallel sorting routines are used for arrays larger than a
94+
specific threshold where threading makes sense. The number of threads is
95+
limited to a maximum of 16. You can control the number of threads by setting
96+
the `OMP_NUM_THREADS` environment variable.
97+
8498
## Using x86-simd-sort as a Meson subproject
8599

86100
If you would like to use this as a Meson subproject, then create `subprojects`

0 commit comments

Comments
 (0)