Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add the trace library and fixed a few source of potential bugs in heap.
[simgrid.git] / src / surf / maxmin_private.h
index 1a1e4e6..0404784 100644 (file)
@@ -3,6 +3,9 @@
 /* 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_PRIVATE_H
+#define _SURF_MAXMIN_PRIVATE_H
+
 #include "surf/maxmin.h"
 #include "xbt/swag.h"
 
@@ -13,7 +16,7 @@ typedef struct lmm_element {
 
   lmm_constraint_t constraint;
   lmm_variable_t variable;
-  FLOAT value;  
+  xbt_maxmin_float_t value;
 } s_lmm_element_t, *lmm_element_t;
 #define insert_elem_in_constraint(elem) xbt_swag_insert(elem,&(elem->constraint->element_set))
 #define insert_active_elem_in_constraint(elem) xbt_swag_insert(elem,&(elem->constraint->active_element_set))
@@ -27,9 +30,9 @@ typedef struct lmm_constraint {
 
   s_xbt_swag_t element_set;    /* a list of lmm_mat_element_t */
   s_xbt_swag_t active_element_set;     /* a list of lmm_mat_element_t */
-  FLOAT bound;
-  FLOAT remaining;
-  FLOAT usage;
+  xbt_maxmin_float_t bound;
+  xbt_maxmin_float_t remaining;
+  xbt_maxmin_float_t usage;
   char *id;
 } s_lmm_constraint_t;
 
@@ -41,9 +44,9 @@ typedef struct lmm_variable {
   s_lmm_element_t *cnsts;
   int cnsts_size;
   int cnsts_number;
-  FLOAT weight;
-  FLOAT bound;
-  FLOAT value;
+  xbt_maxmin_float_t weight;
+  xbt_maxmin_float_t bound;
+  xbt_maxmin_float_t value;
   char *id;
 } s_lmm_variable_t;
 
@@ -54,7 +57,7 @@ typedef struct lmm_system {
   s_xbt_swag_t active_constraint_set;  /* a list of lmm_constraint_t */
 
   s_xbt_swag_t saturated_variable_set; /* a list of lmm_variable_t */
-  s_xbt_swag_t saturated_constraint_set;/* a list of lmm_constraint_t_t */
+  s_xbt_swag_t saturated_constraint_set;       /* a list of lmm_constraint_t_t */
 } s_lmm_system_t;
 
 #define extract_variable(sys) xbt_swag_extract(xbt_swag_getFirst(&(sys->variable_set)),&(sys->variable_set))
@@ -72,5 +75,4 @@ typedef struct lmm_system {
 static void lmm_var_free(lmm_system_t sys, lmm_variable_t var);
 static void lmm_cnst_free(lmm_system_t sys, lmm_constraint_t cnst);
 
-/* #define UNDEFINED_VALUE -1.0 */
-#define UNUSED_CONSTRAINT -2.0
+#endif                         /* _SURF_MAXMIN_PRIVATE_H */