Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics (reorder)
[simgrid.git] / src / surf / surf_private.hpp
1 /* Copyright (c) 2004-2018. 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_HPP
7 #define SURF_SURF_PRIVATE_HPP
8
9 #include "src/surf/trace_mgr.hpp"
10 #include "surf/surf.hpp"
11
12 #define NO_MAX_DURATION -1.0
13
14 extern "C" {
15
16 /** @ingroup SURF_interface
17  * @brief Possible update mechanisms
18  */
19 enum e_UM_t {
20   UM_FULL,     /**< Full update mechanism: the remaining time of every action is recomputed at each step */
21   UM_LAZY,     /**< Lazy update mechanism: only the modified actions get recomputed.
22                     It may be slower than full if your system is tightly coupled to the point where every action
23                     gets recomputed anyway. In that case, you'd better not try to be cleaver with lazy and go for
24                     a simple full update.  */
25   UM_UNDEFINED /**< Mechanism not defined */
26 };
27
28 /* Generic functions common to all models */
29
30 XBT_PRIVATE FILE* surf_fopen(const char* name, const char* mode);
31 XBT_PRIVATE std::ifstream* surf_ifsopen(std::string name);
32
33 /* The __surf_is_absolute_file_path() returns 1 if
34  * file_path is a absolute file path, in the other
35  * case the function returns 0.
36  */
37 XBT_PRIVATE int __surf_is_absolute_file_path(const char* file_path);
38
39 extern XBT_PRIVATE simgrid::trace_mgr::future_evt_set* future_evt_set;
40
41 XBT_PUBLIC void storage_register_callbacks();
42
43 XBT_PRIVATE void parse_after_config();
44
45 /********** Tracing **********/
46 /* from surf_instr.c */
47 void TRACE_surf_host_set_speed(double date, const char* resource, double power);
48 void TRACE_surf_link_set_bandwidth(double date, const char* resource, double bandwidth);
49 }
50
51 #endif