From 330eef4736cebd139309ce1544b9bf58bc021afb Mon Sep 17 00:00:00 2001 From: Guilherme Date: Mon, 6 Feb 2023 14:04:45 +0100 Subject: [PATCH] Fixed alt multi-threaded throughput to use different events --- examples/run/common/throughput_mt_alt.ipp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/run/common/throughput_mt_alt.ipp b/examples/run/common/throughput_mt_alt.ipp index 7772c33b9c..57a61d175b 100644 --- a/examples/run/common/throughput_mt_alt.ipp +++ b/examples/run/common/throughput_mt_alt.ipp @@ -145,8 +145,8 @@ int throughput_mt_alt(std::string_view description, int argc, char* argv[], std::rand() % throughput_cfg.loaded_events; // Launch the processing of the event. - arena.execute([&]() { - group.run([&]() { + arena.execute([&, event]() { + group.run([&, event]() { rec_track_params.fetch_add( algs.at(tbb::this_task_arena::current_thread_index())( input[event].cells, input[event].modules) @@ -177,8 +177,8 @@ int throughput_mt_alt(std::string_view description, int argc, char* argv[], // std::endl; // Launch the processing of the event. - arena.execute([&]() { - group.run([&]() { + arena.execute([&, event]() { + group.run([&, event]() { rec_track_params.fetch_add( algs.at(tbb::this_task_arena::current_thread_index())( input[event].cells, input[event].modules)