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

Private GIT Repository
Use numerical algorithms for stddev computation.
[loba.git] / process.cpp
index 8b316787b8ae1d8654e0f941337a64c993573f24..306687f2f8dd68de8d2bf82218adff88e4ff70d8 100644 (file)
@@ -148,8 +148,9 @@ int process::run()
 
 double process::sum_of_to_send() const
 {
 
 double process::sum_of_to_send() const
 {
-    using namespace std::tr1;
-    using namespace std::tr1::placeholders;
+    using std::tr1::bind;
+    using std::tr1::placeholders::_1;
+    using std::tr1::placeholders::_2;
 
     return std::accumulate(neigh.begin(), neigh.end(), 0.0,
                            bind(std::plus<double>(),
 
     return std::accumulate(neigh.begin(), neigh.end(), 0.0,
                            bind(std::plus<double>(),
@@ -218,8 +219,8 @@ void process::send1_bookkeeping(neighbor& nb)
 
 void process::send()
 {
 
 void process::send()
 {
-    using namespace std::tr1;
-    using namespace std::tr1::placeholders;
+    using std::tr1::bind;
+    using std::tr1::placeholders::_1;
 
     if (opt::bookkeeping) {
         std::for_each(neigh.begin(), neigh.end(),
 
     if (opt::bookkeeping) {
         std::for_each(neigh.begin(), neigh.end(),
@@ -283,8 +284,8 @@ void process::finalize1(neighbor& nb)
 
 void process::finalize()
 {
 
 void process::finalize()
 {
-    using namespace std::tr1;
-    using namespace std::tr1::placeholders;
+    using std::tr1::bind;
+    using std::tr1::placeholders::_1;
 
     finalizing = true;
     total_load_running -= load;
 
     finalizing = true;
     total_load_running -= load;
@@ -303,8 +304,8 @@ void process::finalize()
 
 #define print_loads_generic(vec, verbose, logp, cat)                    \
     if (_XBT_LOG_ISENABLEDV((*cat), logp)) {                            \
 
 #define print_loads_generic(vec, verbose, logp, cat)                    \
     if (_XBT_LOG_ISENABLEDV((*cat), logp)) {                            \
-        using namespace std::tr1;                                       \
-        using namespace std::tr1::placeholders;                         \
+        using std::tr1::bind;                                           \
+        using std::tr1::placeholders::_1;                               \
         XCLOG0(cat, logp, "Neighbor loads:");                           \
         std::for_each(vec.begin(), vec.end(),                           \
                       bind(&neighbor::print, _1, verbose, logp, cat));  \
         XCLOG0(cat, logp, "Neighbor loads:");                           \
         std::for_each(vec.begin(), vec.end(),                           \
                       bind(&neighbor::print, _1, verbose, logp, cat));  \