X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/dc63d290001cd127af79685f3cd811e03eebcece..a3fa21a47ddcd5c5cbdd59a45dbcc4686f08dce6:/src/instr/jedule/jedule_platform.cpp diff --git a/src/instr/jedule/jedule_platform.cpp b/src/instr/jedule/jedule_platform.cpp index 1c4ad33d17..47919e0e22 100644 --- a/src/instr/jedule/jedule_platform.cpp +++ b/src/instr/jedule/jedule_platform.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2010-2019. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -46,16 +46,16 @@ void Container::add_child(jed_container_t child) void Container::add_resources(std::vector hosts) { - this->is_lowest = 1; + this->is_lowest_ = 1; this->children.clear(); - this->last_id = 0; + this->last_id_ = 0; //FIXME do we need to sort?: xbt_dynar_sort_strings(host_names); for (auto const& host : hosts) { const char *host_name = sg_host_get_name(host); - this->name2id.insert({host_name, this->last_id}); - (this->last_id)++; + this->name2id.insert({host_name, this->last_id_}); + (this->last_id_)++; host2_simgrid_parent_container.insert({host_name, this}); this->resource_list.push_back(host); } @@ -64,13 +64,13 @@ void Container::add_resources(std::vector hosts) void Container::create_hierarchy(sg_netzone_t from_as) { - if (from_as->get_children()->empty()) { + if (from_as->get_children().empty()) { // I am no AS // add hosts to jedule platform std::vector table = from_as->get_all_hosts(); this->add_resources(table); } else { - for (auto const& nz : *from_as->get_children()) { + for (auto const& nz : from_as->get_children()) { jed_container_t child_container = new simgrid::jedule::Container(std::string(nz->get_cname())); this->add_child(child_container); child_container->create_hierarchy(nz); @@ -176,8 +176,8 @@ static void add_subsets_to(std::vector *subset_list, std::vectorname2id.at(host_name); + jed_container_t parent_cont = host2_simgrid_parent_container.at(host_name); + unsigned int id = parent_cont->name2id.at(host_name); id_list.push_back(id); } unsigned int nb_ids = id_list.size();