+#define print_loads_generic(vec, verbose, logp, cat) \
+ if (_XBT_LOG_ISENABLEDV((*cat), logp)) { \
+ using std::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(), \
+ std::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
+