X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ca3f81bbdb29e514038a035ae1e3d222a5c7d6b5..d4b2fe80fbab6343e6dce68a12eb522a2e0559b8:/src/kernel/lmm/maxmin.hpp diff --git a/src/kernel/lmm/maxmin.hpp b/src/kernel/lmm/maxmin.hpp index 6ddbb97849..608d6f4ad3 100644 --- a/src/kernel/lmm/maxmin.hpp +++ b/src/kernel/lmm/maxmin.hpp @@ -145,9 +145,9 @@ XBT_PUBLIC(void) bottleneck_solve(lmm_system_t sys); /** Default functions associated to the chosen protocol. When using the lagrangian approach. */ XBT_PUBLIC(void) -lmm_set_default_protocol_function(double (*func_f)(const Variable& var, double x), - double (*func_fp)(const Variable& var, double x), - double (*func_fpi)(const Variable& var, double x)); +set_default_protocol_function(double (*func_f)(const Variable& var, double x), + double (*func_fp)(const Variable& var, double x), + double (*func_fpi)(const Variable& var, double x)); XBT_PUBLIC(double) func_reno_f(const Variable& var, double x); XBT_PUBLIC(double) func_reno_fp(const Variable& var, double x); @@ -168,7 +168,7 @@ XBT_PUBLIC(double) func_vegas_fpi(const Variable& var, double x); * Then, it is used to list all variables involved in constraint through constraint's xxx_element_set lists, or * vice-versa list all constraints for a given variable. */ -XBT_PUBLIC_CLASS s_lmm_element_t +XBT_PUBLIC_CLASS Element { public: int get_concurrency() const; @@ -297,17 +297,14 @@ public: boost::intrusive::list_member_hook<> active_constraint_set_hook; boost::intrusive::list_member_hook<> modified_constraint_set_hook; boost::intrusive::list_member_hook<> saturated_constraint_set_hook; - boost::intrusive::list, - &s_lmm_element_t::enabled_element_set_hook>> + boost::intrusive::list, + &Element::enabled_element_set_hook>> enabled_element_set; - boost::intrusive::list, - &s_lmm_element_t::disabled_element_set_hook>> + boost::intrusive::list, + &Element::disabled_element_set_hook>> disabled_element_set; - boost::intrusive::list, - &s_lmm_element_t::active_element_set_hook>> + boost::intrusive::list, + &Element::active_element_set_hook>> active_element_set; double remaining; double usage; @@ -404,7 +401,7 @@ public: boost::intrusive::list_member_hook<> variable_set_hook; boost::intrusive::list_member_hook<> saturated_variable_set_hook; - std::vector cnsts; + std::vector cnsts; // sharing_weight: variable's impact on the resource during the sharing // if == 0, the variable is not considered by LMM @@ -419,7 +416,7 @@ public: short int concurrency_share; /* The maximum number of elements that variable will add to a constraint */ simgrid::surf::Action* id; int id_int; - unsigned visited; /* used by lmm_update_modified_set */ + unsigned visited; /* used by System::update_modified_set() */ /* \begin{For Lagrange only} */ double mu; double new_mu; @@ -432,11 +429,11 @@ private: static int Global_debug_id; }; -inline void s_lmm_element_t::make_active() +inline void Element::make_active() { constraint->active_element_set.push_front(*this); } -inline void s_lmm_element_t::make_inactive() +inline void Element::make_inactive() { if (active_element_set_hook.is_linked()) simgrid::xbt::intrusive_erase(constraint->active_element_set, *this); @@ -445,16 +442,16 @@ inline void s_lmm_element_t::make_inactive() /** * @brief LMM system */ -XBT_PUBLIC_CLASS s_lmm_system_t +XBT_PUBLIC_CLASS System { public: /** * @brief Create a new Linear MaxMim system * @param selective_update whether we should do lazy updates */ - explicit s_lmm_system_t(bool selective_update); + explicit System(bool selective_update); /** @brief Free an existing Linear MaxMin system */ - ~s_lmm_system_t(); + ~System(); /** * @brief Create a new Linear MaxMin constraint @@ -612,8 +609,8 @@ public: private: bool selective_update_active; /* flag to update partially the system only selecting changed portions */ - unsigned visited_counter; /* used by lmm_update_modified_set and lmm_remove_modified_set to cleverly (un-)flag the - * constraints (more details in these functions) */ + unsigned visited_counter; /* used by System::update_modified_set() and System::remove_all_modified_set() to + * cleverly (un-)flag the constraints (more details in these functions) */ boost::intrusive::list, &Constraint::constraint_set_hook>> constraint_set;