From 82d734f7a3b6f08813a9ad6272aa026779c88975 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 23 May 2021 09:04:27 -0600 Subject: Add batching parameter to parallel_for_each parallel_for_each currently requires each thread to process at least 10 elements. However, when indexing, it's fine for a thread to handle just a single CU. This patch parameterizes this, and updates the one user. --- gdb/unittests/parallel-for-selftests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/unittests/parallel-for-selftests.c') diff --git a/gdb/unittests/parallel-for-selftests.c b/gdb/unittests/parallel-for-selftests.c index adfc82f..e0c07e5 100644 --- a/gdb/unittests/parallel-for-selftests.c +++ b/gdb/unittests/parallel-for-selftests.c @@ -52,7 +52,7 @@ test (int n_threads) #define NUMBER 10000 std::atomic counter (0); - gdb::parallel_for_each (0, NUMBER, + gdb::parallel_for_each (1, 0, NUMBER, [&] (int start, int end) { counter += end - start; -- cgit v1.1