Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove unnecessry files
[simgrid.git] / src / surf / surf_private.h
1 /* Copyright (c) 2004-2013. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
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 "surf/trace_mgr.h"
12 #include "xbt/log.h"
13 #include "surf/surfxml_parse.h"
14 #include "surf/random_mgr.h"
15 #include "instr/instr_private.h"
16 #include "surf/surfxml_parse_values.h"
17
18 #define NO_MAX_DURATION -1.0
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 extern xbt_dict_t watched_hosts_lib;
25
26 extern const char *surf_action_state_names[6];
27
28 typedef enum {
29   UM_FULL,
30   UM_LAZY,
31   UM_UNDEFINED
32 } e_UM_t;
33
34 /* Generic functions common to all models */
35
36 FILE *surf_fopen(const char *name, const char *mode);
37
38 extern tmgr_history_t history;
39
40 /* The __surf_is_absolute_file_path() returns 1 if
41  * file_path is a absolute file path, in the other
42  * case the function returns 0.
43  */
44 int __surf_is_absolute_file_path(const char *file_path);
45
46 /**
47  * Routing logic
48  */
49
50 typedef struct s_model_type {
51   const char *name;
52   const char *desc;
53   AS_t (*create) ();
54   void (*end) (AS_t as);
55 } s_routing_model_description_t, *routing_model_description_t;
56
57 /* This enum used in the routing structure helps knowing in which situation we are. */
58 typedef enum {
59   SURF_ROUTING_NULL = 0,   /**< Undefined type                                   */
60   SURF_ROUTING_BASE,       /**< Base case: use simple link lists for routing     */
61   SURF_ROUTING_RECURSIVE   /**< Recursive case: also return gateway informations */
62 } e_surf_routing_hierarchy_t;
63
64 XBT_PUBLIC(void) routing_model_create(void *loopback);
65 XBT_PUBLIC(void) routing_exit(void);
66 XBT_PUBLIC(void) storage_register_callbacks(void);
67
68 /* ***************************************** */
69 /* TUTORIAL: New TAG                         */
70 XBT_PUBLIC(void) gpu_register_callbacks(void);
71 /* ***************************************** */
72
73 XBT_PUBLIC(void) routing_register_callbacks(void);
74 XBT_PUBLIC(void) generic_free_route(sg_platf_route_cbarg_t route); // FIXME rename to routing_route_free
75  // FIXME: make previous function private to routing again?
76
77
78 XBT_PUBLIC(void) routing_get_route_and_latency(sg_routing_edge_t src, sg_routing_edge_t dst,
79                               xbt_dynar_t * route, double *latency);
80
81 XBT_PUBLIC(void) generic_get_graph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges, AS_t rc);
82 /**
83  * Resource protected methods
84  */
85 XBT_PUBLIC(void) surfxml_bufferstack_push(int _new);
86 XBT_PUBLIC(void) surfxml_bufferstack_pop(int _new);
87
88 XBT_PUBLIC_DATA(int) surfxml_bufferstack_size;
89
90 /********** Tracing **********/
91 /* from surf_instr.c */
92 void TRACE_surf_host_set_power(double date, const char *resource, double power);
93 void TRACE_surf_link_set_bandwidth(double date, const char *resource, double bandwidth);
94
95 #ifdef __cplusplus
96 }
97 #endif
98
99 #endif                          /* _SURF_SURF_PRIVATE_H */