1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Replace parallel STL with PPQSort.

PPQSort is supposedly quite fast: https://github.com/GabTux/PPQSort

More importantly, it does not depend on TBB fuckery, so there's no longer
a need to link with an external library that people may or may not have.

The NO_PARALLEL_STL option is out, as it was provided solely to deal with
TBB being not available. Sequential sorting is still used on emscripten.
This commit is contained in:
Bartosz Taudul
2024-09-26 14:38:11 +02:00
parent d400183483
commit 1c1faeff2d
22 changed files with 42 additions and 71 deletions
+3 -3
View File
@@ -102,10 +102,10 @@ public:
const auto se = sb + sortedEnd;
const auto sl = se - 1;
const auto ue = v.end();
#ifdef NO_PARALLEL_SORT
pdqsort_branchless( se, ue, comp );
#ifdef __EMSCRIPTEN__
pdqsort_branchless( sb, se, comp );
#else
std::sort( std::execution::par_unseq, se, ue, comp );
ppqsort::sort( ppqsort::execution::par, sb, se, comp );
#endif
const auto ss = std::lower_bound( sb, se, *se, comp );
const auto uu = std::lower_bound( se, ue, *sl, comp );