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

Private GIT Repository
Define process::get_load() and set_load() instead of lb_load().
[loba.git] / process.cpp
index 6d791bdc94e1c6a3a99cfca44ad0b24a57beb155..a74b1149fcdc406358c7ad320aafd85a337d05af 100644 (file)
@@ -83,7 +83,7 @@ int process::run()
     VERB0("Starting...");
     comp_iter = lb_iter = 0;
     while (true) {
     VERB0("Starting...");
     comp_iter = lb_iter = 0;
     while (true) {
-        double ld = lb_load();
+        double ld = get_load();
         if (ld > 0.0) {
             double now = MSG_get_clock();
             if (now < next_iter_after_date)
         if (ld > 0.0) {
             double now = MSG_get_clock();
             if (now < next_iter_after_date)
@@ -105,7 +105,7 @@ int process::run()
 
             print_loads(true, xbt_log_priority_debug);
         }
 
             print_loads(true, xbt_log_priority_debug);
         }
-        lb_load() = ld;
+        set_load(ld);
 
         // send load information, and load (data) if any
         send_all();
 
         // send load information, and load (data) if any
         send_all();
@@ -130,7 +130,7 @@ int process::run()
         // block on receiving unless there is something to compute or
         // to send
         double timeout;
         // block on receiving unless there is something to compute or
         // to send
         double timeout;
-        if (real_load != 0 || lb_load() != prev_load_broadcast)
+        if (real_load != 0 || get_load() != prev_load_broadcast)
             timeout = 0.0;
         else if (opt::min_iter_duration)
             timeout = opt::min_iter_duration;
             timeout = 0.0;
         else if (opt::min_iter_duration)
             timeout = opt::min_iter_duration;