fix comparability
This commit is contained in:
parent
5981d6d6d9
commit
f0b4789e58
@ -57,9 +57,10 @@ auto main(int argc, char *argv[]) -> int {
|
||||
auto dataset_seq = dataset;
|
||||
|
||||
auto t1 = std::chrono::high_resolution_clock::now();
|
||||
algo::MergeSort_mt::sort(dataset_seq, [](int32_t a, int32_t b) {
|
||||
MergeSorterMT<int32_t> msst([](int32_t a, int32_t b) {
|
||||
return (a>b);
|
||||
}, 0);
|
||||
msst.sort(dataset_seq);
|
||||
auto t2 = std::chrono::high_resolution_clock::now();
|
||||
|
||||
auto t_seq = std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1);
|
||||
@ -70,10 +71,10 @@ auto main(int argc, char *argv[]) -> int {
|
||||
const int max_depth = std::log(threads);
|
||||
|
||||
t1 = std::chrono::high_resolution_clock::now();
|
||||
MergeSorterMT<int32_t > ms([](int32_t a, int32_t b) {
|
||||
MergeSorterMT<int32_t > msmt([](int32_t a, int32_t b) {
|
||||
return (a>b);
|
||||
}, max_depth);
|
||||
ms.sort(dataset_par);
|
||||
msmt.sort(dataset_par);
|
||||
t2 = std::chrono::high_resolution_clock::now();
|
||||
|
||||
auto t_par = std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1);
|
||||
|
Loading…
Reference in New Issue
Block a user