diff options
author | Zachary Turner <zturner@google.com> | 2017-05-10 01:16:22 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-05-10 01:16:22 +0000 |
commit | 0d9b0f20c70d35a61e5826de1606cc715c1c1b11 (patch) | |
tree | 4fdec414bfef0ad9ec46534de2e40b5df96b69e7 /lld/unittests | |
parent | 47674447f9347d478a80ccb532cfe47bbac3dce3 (diff) |
[Core] Make parallel algorithms match C++ Parallelism TS.
Differential Revision: https://reviews.llvm.org/D33016
Diffstat (limited to 'lld/unittests')
-rw-r--r-- | lld/unittests/CoreTests/ParallelTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/unittests/CoreTests/ParallelTest.cpp b/lld/unittests/CoreTests/ParallelTest.cpp index bd8507026a0..601a2b0839b 100644 --- a/lld/unittests/CoreTests/ParallelTest.cpp +++ b/lld/unittests/CoreTests/ParallelTest.cpp @@ -26,7 +26,7 @@ TEST(Parallel, sort) { for (auto &i : array) i = dist(randEngine); - lld::parallel_sort(std::begin(array), std::end(array)); + sort(lld::parallel::par, std::begin(array), std::end(array)); ASSERT_TRUE(std::is_sorted(std::begin(array), std::end(array))); } @@ -36,7 +36,7 @@ TEST(Parallel, parallel_for) { // writing. uint32_t range[2050]; std::fill(range, range + 2050, 1); - lld::parallel_for(0, 2049, [&range](size_t I) { ++range[I]; }); + for_each_n(lld::parallel::par, 0, 2049, [&range](size_t I) { ++range[I]; }); uint32_t expected[2049]; std::fill(expected, expected + 2049, 2); |