File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,20 @@ benchmark](https://github.com/google/benchmark) frameworks respectively. You
8181can 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
86100If you would like to use this as a Meson subproject, then create ` subprojects `
You can’t perform that action at this time.
0 commit comments