Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ benchmark](https://github.com/google/benchmark) frameworks respectively. You
can configure meson to build them both by using `-Dbuild_tests=true` and
`-Dbuild_benchmarks=true`.

## Build using OpenMP

`qsort`, `argsort`, and `keyvalue_qsort` can achieve even greater performance
(up-to 3x speedup) through parallelization with
[OpenMP](https://www.openmp.org/). By default, OpenMP support is disabled; to
enable it, set the `-Duse_openmp=true` flag when configuring Meson. If you are
using only the static SIMD implementations, compile with `-fopenmp
-DXSS_USE_OPENMP`.

OpenMP-based parallel sorting routines are used for arrays larger than a
specific threshold where threading makes sense. The number of threads is
limited to a maximum of 16. You can control the number of threads by setting
the `OMP_NUM_THREADS` environment variable.

## Using x86-simd-sort as a Meson subproject

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