X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d3154c75960afc4f3fe7e53c835e35f2584ed97a..5b52e25dc0e3d17cdbe0323f922d7bb4fc238af3:/src/include/surf/maxmin.h diff --git a/src/include/surf/maxmin.h b/src/include/surf/maxmin.h index 9aa09d257c..6ba38d1ca2 100644 --- a/src/include/surf/maxmin.h +++ b/src/include/surf/maxmin.h @@ -1,13 +1,12 @@ -/* Copyright (c) 2004-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2004-2017. 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. */ -#ifndef _SURF_MAXMIN_H -#define _SURF_MAXMIN_H +#ifndef SURF_MAXMIN_H +#define SURF_MAXMIN_H -#include "src/portable.h" +#include "src/internal_config.h" #include "xbt/misc.h" #include "xbt/asserts.h" #include "surf/datatypes.h" @@ -124,8 +123,9 @@ XBT_PUBLIC_DATA(double) sg_maxmin_precision; XBT_PUBLIC_DATA(double) sg_surf_precision; +XBT_PUBLIC_DATA(int) sg_concurrency_limit; -static XBT_INLINE void double_update(double *variable, double value, double precision) +static inline void double_update(double *variable, double value, double precision) { //printf("Updating %g -= %g +- %g\n",*variable,value,precision); //xbt_assert(value==0 || value>precision); @@ -137,12 +137,12 @@ static XBT_INLINE void double_update(double *variable, double value, double prec *variable = 0.0; } -static XBT_INLINE int double_positive(double value, double precision) +static inline int double_positive(double value, double precision) { return (value > precision); } -static XBT_INLINE int double_equals(double value1, double value2, double precision) +static inline int double_equals(double value1, double value2, double precision) { return (fabs(value1 - value2) < precision); } @@ -152,9 +152,9 @@ SG_BEGIN_DECL() /** @{ @ingroup SURF_lmm */ /** * @brief Create a new Linear MaxMim system - * @param selective_update [description] + * @param selective_update whether we should do lazy updates */ -XBT_PUBLIC(lmm_system_t) lmm_system_new(int selective_update); +XBT_PUBLIC(lmm_system_t) lmm_system_new(bool selective_update); /** * @brief Free an existing Linear MaxMin system @@ -335,7 +335,7 @@ XBT_PUBLIC(lmm_variable_t) lmm_get_var_from_cnst(lmm_system_t sys, lmm_constrain * * @return A variable associated to a constraint */ -XBT_PUBLIC(lmm_variable_t) lmm_get_var_from_cnst_safe(lmm_system_t /*sys*/, lmm_constraint_t cnst, +XBT_PUBLIC(lmm_variable_t) lmm_get_var_from_cnst_safe(lmm_system_t sys, lmm_constraint_t cnst, lmm_element_t * elem, lmm_element_t * nextelem, int * numelem); /** @@ -452,4 +452,4 @@ XBT_PUBLIC(double func_vegas_fpi) (lmm_variable_t var, double x); /** @} */ SG_END_DECL() -#endif /* _SURF_MAXMIN_H */ +#endif