From bc67025ba7f1dd101f3f62c10cb80a5a52ac3fd7 Mon Sep 17 00:00:00 2001 From: William Kong Date: Mon, 27 Jan 2025 23:12:17 +0000 Subject: [PATCH] Clean up and fix the documentation of ForkJoin.h --- Eigen/src/ThreadPool/ForkJoin.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Eigen/src/ThreadPool/ForkJoin.h b/Eigen/src/ThreadPool/ForkJoin.h index a04c54a01..46dac49f1 100644 --- a/Eigen/src/ThreadPool/ForkJoin.h +++ b/Eigen/src/ThreadPool/ForkJoin.h @@ -31,7 +31,7 @@ namespace Eigen { // where `s_{j+1} - s_{j}` and `end - s_n` are roughly within a factor of two of `granularity`. For a unary // task function `g(k)`, the same operation is applied with // -// f(i,j) = [&](){ for(int k=i; k static void ParallelFor(int start, int end, int granularity, DoFnType do_func, Eigen::ThreadPool* thread_pool) { if (start >= end) return; @@ -87,8 +87,7 @@ class ForkJoinScheduler { } private: - // Schedules `right_thunk`, runs `left_thunk` and runs other tasks until - // `right_thunk` has finished. + // Schedules `right_thunk`, runs `left_thunk`, and runs other tasks until `right_thunk` has finished. template static void ForkJoin(LeftType&& left_thunk, RightType&& right_thunk, Eigen::ThreadPool* thread_pool) { std::atomic right_done(false);