X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2202dead030a10e3ef121eb452bc3ee56c8a572b..1b4dc02411d79e4c367d331b85c1b295ec41edff:/src/kernel/lmm/maxmin.cpp diff --git a/src/kernel/lmm/maxmin.cpp b/src/kernel/lmm/maxmin.cpp index 5060a2dac7..a39eaa646b 100644 --- a/src/kernel/lmm/maxmin.cpp +++ b/src/kernel/lmm/maxmin.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2004-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2004-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. */ @@ -202,13 +202,13 @@ void System::variable_mallocator_free_f(void* var) delete static_cast(var); } -Variable* System::variable_new(resource::Action* id, double sharing_weight, double bound, int number_of_constraints) +Variable* System::variable_new(resource::Action* id, double sharing_weight, double bound, size_t number_of_constraints) { - XBT_IN("(sys=%p, id=%p, weight=%f, bound=%f, num_cons =%d)", this, id, sharing_weight, bound, number_of_constraints); + XBT_IN("(sys=%p, id=%p, weight=%f, bound=%f, num_cons =%zu)", this, id, sharing_weight, bound, number_of_constraints); Variable* var = static_cast(xbt_mallocator_get(variable_mallocator_)); var->initialize(id, sharing_weight, bound, number_of_constraints, visited_counter_ - 1); - if (sharing_weight) + if (sharing_weight > 0) variable_set.push_front(*var); else variable_set.push_back(*var); @@ -681,10 +681,10 @@ template void System::lmm_solve(CnstList& cnst_list) delete[] cnst_light_tab; } -/** \brief Attribute the value bound to var->bound. +/** @brief Attribute the value bound to var->bound. * - * \param var the Variable* - * \param bound the new bound to associate with var + * @param var the Variable* + * @param bound the new bound to associate with var * * Makes var->bound equal to bound. Whenever this function is called a change is signed in the system. To * avoid false system changing detection it is a good idea to test (bound != 0) before calling it. @@ -832,7 +832,7 @@ void System::on_disabled_var(Constraint* cnstr) // Anyway, caller functions all call check_concurrency() in the end. } -/* \brief update the weight of a variable, and enable/disable it. +/* @brief update the weight of a variable, and enable/disable it. * @return Returns whether a change was made */ void System::update_variable_weight(Variable* var, double weight) @@ -880,10 +880,10 @@ void System::update_constraint_bound(Constraint* cnst, double bound) cnst->bound = bound; } -/** \brief Update the constraint set propagating recursively to other constraints so the system should not be entirely +/** @brief Update the constraint set propagating recursively to other constraints so the system should not be entirely * computed. * - * \param cnst the Constraint* affected by the change + * @param cnst the Constraint* affected by the change * * A recursive algorithm to optimize the system recalculation selecting only constraints that have changed. Each * constraint change is propagated to the list of constraints for each variable. @@ -932,11 +932,11 @@ void System::remove_all_modified_set() /** * Returns resource load (in flop per second, or byte per second, or similar) * - * If the resource is shared (the default case), the load is sum of resource usage made by every variables located on - * this resource. + * If the resource is shared (the default case), the load is sum of resource usage made by + * every variables located on this resource. * - * If the resource is not shared (ie in FATPIPE mode), then the load is the max (not the sum) of all resource usages - * located on this resource. + * If the resource is not shared (ie in FATPIPE mode), then the load is the max (not the sum) + * of all resource usages located on this resource. */ double Constraint::get_usage() const {