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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user