From: Arnaud Giersch Date: Tue, 3 Jul 2018 09:19:30 +0000 (+0200) Subject: Add algorithm pstar (not implemented yet). X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/commitdiff_plain/3016db029e1815d651db2e335eee94c165355449?ds=inline;hp=e02cc8b8304d4b290fb9735e01833ae5bdd20dad Add algorithm pstar (not implemented yet). --- diff --git a/loba_pstar.cpp b/loba_pstar.cpp new file mode 100644 index 0000000..fe676eb --- /dev/null +++ b/loba_pstar.cpp @@ -0,0 +1,15 @@ +#include + +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 index 0000000..a1d90a3 --- /dev/null +++ b/loba_pstar.h @@ -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: diff --git a/options.cpp b/options.cpp index b31888f..08c271e 100644 --- a/options.cpp +++ b/options.cpp @@ -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); }