Use parallel sort in find zone menu.

This commit is contained in:
Bartosz Taudul 2020-01-20 23:21:26 +01:00
parent 7d78923967
commit 38e7d12b0b

View File

@ -34,6 +34,7 @@
#include "TracyImGui.hpp" #include "TracyImGui.hpp"
#include "TracyPopcnt.hpp" #include "TracyPopcnt.hpp"
#include "TracyPrint.hpp" #include "TracyPrint.hpp"
#include "TracySort.hpp"
#include "TracyView.hpp" #include "TracyView.hpp"
#include "../imguicolortextedit/TextEditor.h" #include "../imguicolortextedit/TextEditor.h"
@ -8264,7 +8265,11 @@ void View::DrawFindZone()
} }
} }
auto mid = vec.begin() + vszorig; auto mid = vec.begin() + vszorig;
#ifdef NO_PARALLEL_SORT
pdqsort_branchless( mid, vec.end() ); pdqsort_branchless( mid, vec.end() );
#else
std::sort( std::execution::par_unseq, mid, vec.end() );
#endif
std::inplace_merge( vec.begin(), mid, vec.end() ); std::inplace_merge( vec.begin(), mid, vec.end() );
const auto vsz = vec.size(); const auto vsz = vec.size();