X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a9361ff5f9057e93ed0bbdfac0eab6e5ba8aeab8..dccf1b41e9c7b5a696f01abceaa2779fe65f154f:/include/simgrid/jedule/jedule_platform.hpp diff --git a/include/simgrid/jedule/jedule_platform.hpp b/include/simgrid/jedule/jedule_platform.hpp index 3efd11cf4a..6c0055ed00 100644 --- a/include/simgrid/jedule/jedule_platform.hpp +++ b/include/simgrid/jedule/jedule_platform.hpp @@ -13,7 +13,6 @@ #include #include #include - #if HAVE_JEDULE namespace simgrid { @@ -27,7 +26,7 @@ private: int is_lowest = 0; public: std::string name; - std::unordered_map name2id; + std::unordered_map name2id; Container *parent = nullptr; std::vector children; std::vector resource_list; @@ -40,38 +39,21 @@ public: void printResources(FILE *file); }; -} -} -SG_BEGIN_DECL() -typedef simgrid::jedule::Container * jed_container_t; - -/* FIXME: jedule_container should be objectified too */ -/** selection of a subset of resources from the original set */ -struct jed_res_subset { - jed_container_t parent; +XBT_PUBLIC_CLASS Subset { +public: + Subset(int s, int n, Container* p); + virtual ~Subset()=default; int start_idx; // start idx in resource_list of container int nres; // number of resources spanning starting at start_idx + Container *parent; }; -typedef struct jed_res_subset s_jed_res_subset_t, *jed_res_subset_t; - -/** - * it is assumed that the host_names in the entire system are unique that means that we don't need parent references - * - * subset_list must be allocated - * host_names is the list of host_names associated with an event - */ -void jed_simgrid_get_resource_selection_by_hosts(xbt_dynar_t subset_list, std::vector* host_list); - -/* - global: - hash host_id -> container - container: - hash host_id -> jed_host_id - list <- [ jed_host_ids ] - list <- sort( list ) - list_chunks <- chunk( list ) -> [ 1, 3-5, 7-9 ] -*/ +} +} +SG_BEGIN_DECL() +typedef simgrid::jedule::Container * jed_container_t; +typedef simgrid::jedule::Subset * jed_subset_t; +void get_resource_selection_by_hosts(std::vector* subset_list, std::vector *host_list); SG_END_DECL()