X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/014983949544db9a324cece29a0ccc46b1e3e1f3..4d5ec9803b74d0f3e9c002a92a748bd08b6640ac:/deployment.h diff --git a/deployment.h b/deployment.h index 3cbe6ae..e1e0d92 100644 --- a/deployment.h +++ b/deployment.h @@ -3,11 +3,14 @@ #include +// Deploy an application automatically, according to the global parameters void MY_launch_application(); +// Base class for deployment generators... class deployment_generator { public: deployment_generator(); + virtual ~deployment_generator() { } size_t size() const { return hosts.size(); } void set_load(int host, double load); @@ -15,10 +18,13 @@ public: void set_link(int host1, int host2); virtual void generate() = 0; + void distribute_load(); void deploy(); private: struct host_parameters { + host_parameters(): load(0.0) { } + double load; std::vector neighbors; }; @@ -31,13 +37,13 @@ private: public: void generate(); \ } +DEPLOYMENT(btree); +DEPLOYMENT(clique); +DEPLOYMENT(hcube); DEPLOYMENT(line); DEPLOYMENT(ring); DEPLOYMENT(star); -DEPLOYMENT(clique); -DEPLOYMENT(btree); -// DEPLOYMENT(torus); -DEPLOYMENT(hcube); +DEPLOYMENT(torus); #undef DEPLOYMENT