From: Arnaud Giersch Date: Fri, 14 Oct 2011 15:00:59 +0000 (+0200) Subject: In compute_loop(), wait the duration of an *lb* iteration if there is nothing to do. X-Git-Tag: exp_20120216~15 X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/commitdiff_plain/9539c77f2b5e0eef8d06da7a7ddd1d5546ba0731?ds=inline 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. --- 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);