Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
S4U version of actor-yield example
[simgrid.git] / src / surf / surf_private.h
1 /* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef SURF_SURF_PRIVATE_H
7 #define SURF_SURF_PRIVATE_H
8
9 #include "surf/surf.h"
10 #include "surf/maxmin.h"
11 #include "src/surf/trace_mgr.hpp"
12
13 #define NO_MAX_DURATION -1.0
14
15 SG_BEGIN_DECL()
16
17 extern XBT_PRIVATE const char *surf_action_state_names[6];
18
19 /** @ingroup SURF_interface
20  * @brief Possible update mechanisms
21  */
22 typedef enum {
23   UM_FULL,      /**< Full update mechanism: the remaining time of every action is recomputed at each step */
24   UM_LAZY,      /**< Lazy update mechanism: only the modified actions get recomputed.
25                      It may be slower than full if your system is tightly coupled to the point where every action
26                      gets recomputed anyway. In that case, you'd better not try to be cleaver with lazy and go for
27                      a simple full update.  */
28   UM_UNDEFINED  /**< Mechanism not defined */
29 } e_UM_t;
30
31 /* Generic functions common to all models */
32
33 XBT_PRIVATE FILE *surf_fopen(const char *name, const char *mode);
34 XBT_PRIVATE std::ifstream* surf_ifsopen(std::string name);
35
36 /* The __surf_is_absolute_file_path() returns 1 if
37  * file_path is a absolute file path, in the other
38  * case the function returns 0.
39  */
40 XBT_PRIVATE int __surf_is_absolute_file_path(const char *file_path);
41
42 extern XBT_PRIVATE simgrid::trace_mgr::future_evt_set *future_evt_set;
43
44
45 XBT_PUBLIC(void) storage_register_callbacks();
46
47 XBT_PUBLIC(void) generic_get_graph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges, sg_netzone_t rc);
48 XBT_PRIVATE void parse_after_config();
49
50 /********** Tracing **********/
51 /* from surf_instr.c */
52 void TRACE_surf_host_set_speed(double date, const char *resource, double power);
53 void TRACE_surf_link_set_bandwidth(double date, const char *resource, double bandwidth);
54
55 SG_END_DECL()
56
57 #endif