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

Private GIT Repository
Add algorithm pstar (not implemented yet).
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 3 Jul 2018 09:19:30 +0000 (11:19 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 3 Jul 2018 09:21:43 +0000 (11:21 +0200)
loba_pstar.cpp [new file with mode: 0644]
loba_pstar.h [new file with mode: 0644]
options.cpp

diff --git a/loba_pstar.cpp b/loba_pstar.cpp
new file mode 100644 (file)
index 0000000..fe676eb
--- /dev/null
@@ -0,0 +1,15 @@
+#include <xbt/log.h>
+
+XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(loba);
+
+#include "loba_pstar.h"
+
+void loba_pstar::load_balance()
+{
+    // write code here...
+    xbt_die("Load-balancing algorithm \"pstar\" not implemented!");
+}
+
+// Local variables:
+// mode: c++
+// End:
diff --git a/loba_pstar.h b/loba_pstar.h
new file mode 100644 (file)
index 0000000..a1d90a3
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef LOBA_PSTAR_H
+#define LOBA_PSTAR_H
+
+#include "process.h"
+
+class loba_pstar: public process {
+public:
+    loba_pstar(int argc, char* argv[]): process(argc, argv) { }
+    ~loba_pstar()                                           { }
+
+private:
+    void load_balance();
+};
+
+#endif //!LOBA_PSTAR_H
+
+// Local variables:
+// mode: c++
+// End:
index b31888f90f13b0b2b96e99c12687ffdbfae923e0..08c271e371fa83b4eb96bfcfc0826597e2f86904 100644 (file)
@@ -18,6 +18,7 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(main);
 #include "loba_makhoul.h"
 #include "loba_makhoul2.h"
 #include "loba_makhoul3.h"
+#include "loba_pstar.h"
 #include "loba_simple.h"
 #include "misc.h"
 
@@ -105,6 +106,8 @@ namespace opt {
                    loba_makhoul3);
         NOL_INSERT("none", "no load-balancing (for testing only)",
                    process);
+        NOL_INSERT("pstar", "balance with pstar strategy",
+                   loba_pstar);
         NOL_INSERT("simple", "balance with least loaded neighbor",
                    loba_simple);
     }