Simple basecase improvement
This commit is contained in:
parent
ec1d2cdd46
commit
e6c33df2a4
@ -57,6 +57,11 @@ private:
|
|||||||
auto split(std::span<T> &data, int depth, const int &mdepth, std::recursive_mutex &mutex) -> void {
|
auto split(std::span<T> &data, int depth, const int &mdepth, std::recursive_mutex &mutex) -> void {
|
||||||
if (std::distance(data.begin(), data.end()) <= 1) {
|
if (std::distance(data.begin(), data.end()) <= 1) {
|
||||||
return;
|
return;
|
||||||
|
} else if (std::distance(data.begin(), data.end()) == 2) {
|
||||||
|
if(cmp(data[1], data[0])) {
|
||||||
|
std::swap(data[0], data[1]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto mid = data.begin();
|
auto mid = data.begin();
|
||||||
|
Loading…
Reference in New Issue
Block a user