From 9539c77f2b5e0eef8d06da7a7ddd1d5546ba0731 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Fri, 14 Oct 2011 17:00:59 +0200 Subject: [PATCH] In compute_loop(), wait the duration of an *lb* iteration if there is nothing to do. The rationale here is that there is no need to go too fast if real_load == 0.0. --- process.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/process.cpp b/process.cpp index 1414033..b6a6d28 100644 --- a/process.cpp +++ b/process.cpp @@ -205,8 +205,10 @@ void process::compute_loop() while (still_running()) { do { - // receive (do not block if there is something to compute) - data_receive(real_load > 0.0 ? 0.0 : opt::min_comp_iter_duration); + // receive + // if there is something to compute, do not block + // else, block the duration of an *lb* iteration + data_receive(real_load > 0.0 ? 0.0 : opt::min_lb_iter_duration); // send comm.data_flush(false); -- 2.39.5