X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4be1b32b731cc2a3a6e8bef09d782a19280d6ddf..042a36bef77ecda07440c4ff365eeaeadb40c008:/src/include/surf/maxmin.h diff --git a/src/include/surf/maxmin.h b/src/include/surf/maxmin.h index cf32554faa..3449a32667 100644 --- a/src/include/surf/maxmin.h +++ b/src/include/surf/maxmin.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2004-2014. The SimGrid Team. +/* Copyright (c) 2004-2015. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -7,12 +7,11 @@ #ifndef _SURF_MAXMIN_H #define _SURF_MAXMIN_H -#include "portable.h" +#include "src/portable.h" #include "xbt/misc.h" #include "xbt/asserts.h" #include "surf/datatypes.h" #include -//#include /** @addtogroup SURF_lmm @@ -87,8 +86,8 @@ * to consrtaint and the communications to variables. */ -extern double sg_maxmin_precision; -extern double sg_surf_precision; +XBT_PUBLIC_DATA(double) sg_maxmin_precision; +XBT_PUBLIC_DATA(double) sg_surf_precision; static XBT_INLINE void double_update(double *variable, double value, double precision) { @@ -284,6 +283,23 @@ XBT_PUBLIC(lmm_variable_t) lmm_get_var_from_cnst(lmm_system_t sys, lmm_constraint_t cnst, lmm_element_t * elem); +/** + * @brief Get a var associated to a constraint + * @details Get the first variable of the next variable of elem if elem is not NULL + * + * @param cnst A constraint + * @param elem A element of constraint of the constraint or NULL + * @param nextelem A element of constraint of the constraint or NULL, the one after elem + * @param numelem parameter representing the number of elements to go + * + * @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, + lmm_element_t * elem, + lmm_element_t * nextelem, + int * numelem); + /** * @brief Get the first active constraint of a system *