A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Debuging surf Reno and Vegas with lagrange optimization approach
[simgrid.git]
/
src
/
include
/
surf
/
maxmin.h
diff --git
a/src/include/surf/maxmin.h
b/src/include/surf/maxmin.h
index
81a1a3e
..
7ba136b
100644
(file)
--- a/
src/include/surf/maxmin.h
+++ b/
src/include/surf/maxmin.h
@@
-10,10
+10,17
@@
#include "xbt/misc.h"
#include "portable.h"
#include "xbt/misc.h"
#include "portable.h"
+
+#define MAXMIN_PRECISION 0.00001
static XBT_INLINE void double_update(double *variable, double value)
{
*variable -= value;
static XBT_INLINE void double_update(double *variable, double value)
{
*variable -= value;
- if(*variable< 0.00001) *variable = 0.0;
+ if(*variable< MAXMIN_PRECISION) *variable = 0.0;
+}
+
+static XBT_INLINE int double_positive(double value)
+{
+ return (value>MAXMIN_PRECISION);
}
typedef struct lmm_variable *lmm_variable_t;
}
typedef struct lmm_variable *lmm_variable_t;