Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove lua parse functions from simgrid.
[simgrid.git] / src / include / surf / surf.h
index 275b481..1281eb6 100644 (file)
@@ -160,6 +160,7 @@ typedef struct surf_cpu_model_extension_public {
   void (*create_resource) (char *name, double power_peak,
                            double power_scale,
                            tmgr_trace_t power_trace,
+                           int core,
                            e_surf_resource_state_t state_initial,
                            tmgr_trace_t state_trace,
                            xbt_dict_t cpu_properties);
@@ -270,6 +271,9 @@ typedef struct surf_model {
   int (*is_suspended) (surf_action_t action);     /**< Return whether an action is suspended */
   void (*set_max_duration) (surf_action_t action, double duration);     /**< Set the max duration of an action*/
   void (*set_priority) (surf_action_t action, double priority);     /**< Set the priority of an action */
+#ifdef HAVE_TRACING
+  void (*set_category) (surf_action_t action, const char *category); /**< Set the category of an action */
+#endif
   double (*get_remains) (surf_action_t action);     /**< Get the remains of an action */
 #ifdef HAVE_LATENCY_BOUND_TRACKING
   int (*get_latency_limited) (surf_action_t action);     /**< Return 1 if action is limited by latency, 0 otherwise */
@@ -402,6 +406,21 @@ XBT_PUBLIC(void) surf_network_model_init_SMPI(const char *filename);
 XBT_PUBLIC(void) surf_network_model_init_LegrandVelho(const char
                                                       *filename);
 
+
+/** \brief Initializes the platform with the network model 'LV08_im'
+ *  \ingroup SURF_models
+ *  \param filename XML platform file name
+ *
+ * This model is adds the lazy management improvement to Legrand and
+ * Velho model. This improvement essentially replaces the list of actions
+ * inside the simulation kernel by a heap in order to reduce the complexity
+ * at each iteration of the simulation kernel.
+ *
+ *  \see surf_workstation_model_init_LegrandVelho()
+ */
+XBT_PUBLIC(void) im_surf_network_model_init_LegrandVelho(const char
+                                                      *filename);
+
 /** \brief Initializes the platform with the network model 'Constant'
  *  \ingroup SURF_models
  *  \param filename XML platform file name
@@ -416,8 +435,6 @@ XBT_PUBLIC(void) surf_network_model_init_LegrandVelho(const char
  */
 XBT_PUBLIC(void) surf_network_model_init_Constant(const char *filename);
 
-XBT_PUBLIC(void) surf_network_model_init_Vivaldi(const char *filename);
-
 /** \brief Initializes the platform with the network model CM02
  *  \ingroup SURF_models
  *  \param filename XML platform file name
@@ -635,7 +652,7 @@ XBT_PUBLIC(double) surf_solve(double max_date);
  *
  *  Return the current time in millisecond.
  */
-XBT_PUBLIC(double) surf_get_clock(void);
+XBT_INLINE XBT_PUBLIC(double) surf_get_clock(void);
 
 /** \brief Exit SURF
  *  \ingroup SURF_simulation
@@ -674,6 +691,7 @@ XBT_PUBLIC(double) get_cpu_power(const char *power);
 XBT_PUBLIC(void) surf_host_create_resource(char *name, double power_peak,
                                            double power_scale,
                                            tmgr_trace_t power_trace,
+                                           int core,
                                            e_surf_resource_state_t
                                            state_initial,
                                            tmgr_trace_t state_trace,
@@ -744,32 +762,6 @@ XBT_PUBLIC(void) surf_add_host_traces(void);
 XBT_PUBLIC(void) surf_add_link_traces(void);
 XBT_PUBLIC(void) surf_wsL07_add_traces(void);
 
-/*
- * init AS from lua console
- * see surf_routing.c
- */
-XBT_PUBLIC(void) routing_AS_init(const char *id, const char *mode);
-XBT_PUBLIC(void) routing_AS_end(const char *id);
-// add host to network element list
-XBT_PUBLIC(void) routing_add_host(const char *host_id);
-//Set a new link on the actual list of link for a route or ASroute
-XBT_PUBLIC(void) routing_add_link(const char *link_id);
-//Set the endpoints for a route
-XBT_PUBLIC(void) routing_set_route(const char *src_id, const char *dst_id);
-//Store the route
-XBT_PUBLIC(void) routing_store_route(void);
-
-/*
- * interface between surf and lua bindings
- * see surfxml_parse.c
- */
-XBT_PUBLIC(void) surf_AS_new(const char *id, const char *mode);
-XBT_PUBLIC(void) surf_AS_finalize(const char *id);
-XBT_PUBLIC(void) surf_route_add_host(const char *id);
-XBT_PUBLIC(void) surf_routing_add_route(const char *src_id,
-                                        const char *dest_id,
-                                        xbt_dynar_t links_id);
-
 #include "surf/surf_resource.h"
 #include "surf/surf_resource_lmm.h"