]> AND Private Git Repository - loba.git/commitdiff
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
In compute_loop(), wait the duration of an *lb* iteration if there is nothing to do.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 14 Oct 2011 15:00:59 +0000 (17:00 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 14 Oct 2011 15:01:17 +0000 (17:01 +0200)
The rationale here is that there is no need to go too fast if real_load == 0.0.

process.cpp

index 1414033046365d661c1d3c87ff00eb5e66c5b08a..b6a6d28de457655c88540d934e6be255ed4c83fc 100644 (file)
@@ -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);