From: Frederic Suter Date: Mon, 23 Oct 2017 18:37:32 +0000 (+0200) Subject: another map which is a set X-Git-Tag: v3.18~398 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/fad5cac0b9b8063848d3cb9b726bbfea5b8ebee8?hp=cd077da6be23eb5a0682927d41d8fb104b846aea another map which is a set --- diff --git a/src/instr/instr_resource_utilization.cpp b/src/instr/instr_resource_utilization.cpp index 127e278139..5c2eb80cf1 100644 --- a/src/instr/instr_resource_utilization.cpp +++ b/src/instr/instr_resource_utilization.cpp @@ -5,13 +5,13 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/instr/instr_private.hpp" +#include #include -#include XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_resource, instr, "tracing (un)-categorized resource utilization"); //to check if variables were previously set to 0, otherwise paje won't simulate them -static std::unordered_map platform_variables; +static std::set platform_variables; static void instr_event(double now, double delta, simgrid::instr::Type* variable, container_t resource, double value) { @@ -26,7 +26,7 @@ static void instr_event(double now, double delta, simgrid::instr::Type* variable // check if key exists: if it doesn't, set the variable to zero and mark this in the global map. if (platform_variables.find(key) == platform_variables.end()) { new simgrid::instr::SetVariableEvent(now, resource, variable, 0); - platform_variables[key] = std::string(""); + platform_variables.insert(key); } new simgrid::instr::AddVariableEvent(now, resource, variable, value);