From 2faad2e80be43bfda476ad4b8b1470cc8ac930c8 Mon Sep 17 00:00:00 2001 From: FritzFlorian Date: Fri, 3 May 2019 15:54:36 +0200 Subject: [PATCH] Fix typo in invoke_parallel. This resulted from an merge gone wrong. --- lib/pls/include/pls/algorithms/invoke_parallel_impl.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/pls/include/pls/algorithms/invoke_parallel_impl.h b/lib/pls/include/pls/algorithms/invoke_parallel_impl.h index c2ab998..9bfa185 100644 --- a/lib/pls/include/pls/algorithms/invoke_parallel_impl.h +++ b/lib/pls/include/pls/algorithms/invoke_parallel_impl.h @@ -22,7 +22,7 @@ inline void run_body(const Body &internal_body, const abstract_task::id &id) { if (current_task->unique_id() == id) { internal_body(); } else { - fork_join_lambda_by_reference root_body(&internal_body); + fork_join_lambda_by_reference root_body(internal_body); fork_join_task root_task{&root_body, id}; scheduler::execute_task(root_task); } @@ -36,12 +36,13 @@ void invoke_parallel(const Function1 &function1, const Function2 &function2) { using namespace ::pls::internal::base; static abstract_task::id id = unique_id::create(); - auto internal_body = [&](fork_join_sub_task *this_task) { + auto internal_body = [&]() { + auto current_task = fork_join_sub_task::current(); auto sub_task_2 = fork_join_lambda_by_reference(function2); - this_task->spawn_child(sub_task_2); + current_task->spawn_child(sub_task_2); function1(); // Execute first function 'inline' without spawning a sub_task object - this_task->wait_for_all(); + current_task->wait_for_all(); }; internal::run_body(internal_body, id); -- libgit2 0.26.0