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

Private GIT Repository
Wip++...
[loba.git] / process.h
index 3baabbfddad931a25f1fe689faef32b6ca8882e3..a49c6efcd41e376189683c7761126db8abe0d859 100644 (file)
--- a/process.h
+++ b/process.h
@@ -1,8 +1,9 @@
 #ifndef PROCESS_H
 #define PROCESS_H
 
+#include <map>
 #include <vector>
-#include <xbt/log.h>
+#include <msg/msg.h>
 #include "communicator.h"
 #include "neighbor.h"
 
@@ -13,18 +14,29 @@ public:
     int run();
 
 private:
-    communicator comm;
     std::vector<neighbor> neigh;
-    double load;
-    double expected_load;
+    std::map<m_host_t, neighbor*> rev_neigh;
 
+    communicator comm;
     int ctrl_close_pending;
     int data_close_pending;
 
+    unsigned iter;
+
+    double load;
+    double expected_load;
+
     void compute();
+    virtual double load_balance(double my_load);
+    void send1_no_bookkeeping(neighbor& nb);
+    void send1_bookkeeping(neighbor& nb);
+    void send();
     bool receive(bool wait_for_close);
+    void finalize1(neighbor& nb);
     void finalize();
     void print_loads(e_xbt_log_priority_t logp = xbt_log_priority_info);
+
+    void insert_neighbor_in_map(neighbor& nb);
 };
 
 #endif // !PROCESS_H