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

Private GIT Repository
Cosmetics: move around some code.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 15 Feb 2011 10:15:27 +0000 (11:15 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 15 Feb 2011 10:15:27 +0000 (11:15 +0100)
process.cpp

index c104ecdf704d53fd61f6834a2bfc7f5053e64972..470ad41bad93f4ee9b199d9ec1ffefb909228f0b 100644 (file)
@@ -265,32 +265,6 @@ void process::send(neighbor& nb, double amount)
     nb.set_load(nb.get_load() + amount);
 }
 
     nb.set_load(nb.get_load() + amount);
 }
 
-#define print_loads_generic(vec, verbose, logp, cat)                    \
-    if (_XBT_LOG_ISENABLEDV((*cat), logp)) {                            \
-        using std::tr1::bind;                                           \
-        using std::tr1::placeholders::_1;                               \
-        XBT_XCLOG(cat, logp, "My load: %g (real); %g (expected).  "     \
-                  "Neighbor loads:", real_load, expected_load);         \
-        std::for_each(vec.begin(), vec.end(),                           \
-                      bind(&neighbor::print, _1, verbose, logp, cat));  \
-    } else ((void)0)
-
-void process::print_loads(bool verbose,
-                          e_xbt_log_priority_t logp,
-                          xbt_log_category_t cat) const
-{
-    print_loads_generic(neigh, verbose, logp, cat);
-}
-
-void process::print_loads_p(bool verbose,
-                            e_xbt_log_priority_t logp,
-                            xbt_log_category_t cat) const
-{
-    print_loads_generic(pneigh, verbose, logp, cat);
-}
-
-#undef print_loads_generic
-
 void process::ctrl_send(neighbor& nb)
 {
     double info_to_send = get_load();
 void process::ctrl_send(neighbor& nb)
 {
     double info_to_send = get_load();
@@ -395,6 +369,32 @@ void process::handle_message(message* msg, m_host_t from)
     delete msg;
 }
 
     delete msg;
 }
 
+#define print_loads_generic(vec, verbose, logp, cat)                    \
+    if (_XBT_LOG_ISENABLEDV((*cat), logp)) {                            \
+        using std::tr1::bind;                                           \
+        using std::tr1::placeholders::_1;                               \
+        XBT_XCLOG(cat, logp, "My load: %g (real); %g (expected).  "     \
+                  "Neighbor loads:", real_load, expected_load);         \
+        std::for_each(vec.begin(), vec.end(),                           \
+                      bind(&neighbor::print, _1, verbose, logp, cat));  \
+    } else ((void)0)
+
+void process::print_loads(bool verbose,
+                          e_xbt_log_priority_t logp,
+                          xbt_log_category_t cat) const
+{
+    print_loads_generic(neigh, verbose, logp, cat);
+}
+
+void process::print_loads_p(bool verbose,
+                            e_xbt_log_priority_t logp,
+                            xbt_log_category_t cat) const
+{
+    print_loads_generic(pneigh, verbose, logp, cat);
+}
+
+#undef print_loads_generic
+
 // Local variables:
 // mode: c++
 // End:
 // Local variables:
 // mode: c++
 // End: