Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cleanups
[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 XBT_PUBLIC_DATA(xbt_dict_t) watched_hosts_lib;
18
19 extern XBT_PRIVATE const char *surf_action_state_names[6];
20
21 /** @ingroup SURF_interface
22  * @brief Possible update mechanisms
23  */
24 typedef enum {
25   UM_FULL,      /**< Full update mechanism: the remaining time of every action is recomputed at each step */
26   UM_LAZY,      /**< Lazy update mechanism: only the modified actions get recomputed.
27                      It may be slower than full if your system is tightly coupled to the point where every action
28                      gets recomputed anyway. In that case, you'd better not try to be cleaver with lazy and go for
29                      a simple full update.  */
30   UM_UNDEFINED  /**< Mechanism not defined */
31 } e_UM_t;
32
33 /* Generic functions common to all models */
34
35 XBT_PRIVATE FILE *surf_fopen(const char *name, const char *mode);
36
37 /* The __surf_is_absolute_file_path() returns 1 if
38  * file_path is a absolute file path, in the other
39  * case the function returns 0.
40  */
41 XBT_PRIVATE int __surf_is_absolute_file_path(const char *file_path);
42
43 extern XBT_PRIVATE simgrid::trace_mgr::future_evt_set *future_evt_set;
44
45
46 XBT_PUBLIC(void) storage_register_callbacks();
47
48 XBT_PUBLIC(void) generic_get_graph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges, sg_netzone_t rc);
49 XBT_PRIVATE void parse_after_config();
50
51 /********** Tracing **********/
52 /* from surf_instr.c */
53 void TRACE_surf_host_set_speed(double date, const char *resource, double power);
54 void TRACE_surf_link_set_bandwidth(double date, const char *resource, double bandwidth);
55
56 SG_END_DECL()
57
58 #endif /* SURF_SURF_PRIVATE_H */