Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
629feb6675d7e9c497755659a7930c8dce004120
[simgrid.git] / include / simgrid / forward.h
1 /* Copyright (c) 2004-2015. 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
7 #ifndef SG_PLATF_TYPES_H
8 #define SG_PLATF_TYPES_H
9
10 #ifdef __cplusplus
11
12 namespace simgrid {
13   namespace s4u {
14     class Host;
15   }
16   namespace surf {
17     class Resource;
18     class Cpu;
19     class NetCard;
20     class As;
21     class Link;
22   }
23   namespace trace_mgr {
24     class future_evt_set;
25   }
26 }
27
28 typedef simgrid::s4u::Host simgrid_Host;
29 typedef simgrid::surf::As surf_As;
30 typedef simgrid::surf::Cpu surf_Cpu;
31 typedef simgrid::surf::NetCard surf_NetCard;
32 typedef simgrid::surf::Link Link;
33 typedef simgrid::surf::Resource surf_Resource;
34
35 #else
36
37 typedef struct simgrid_Host simgrid_Host;
38 typedef struct surf_As surf_As;
39 typedef struct surf_Cpu surf_Cpu;
40 typedef struct surf_NetCard surf_NetCard;
41 typedef struct surf_Resource surf_Resource;
42 typedef struct Link Link;
43 #endif
44
45 typedef simgrid_Host* sg_host_t;
46 typedef surf_As *AS_t;
47 typedef surf_Cpu *surf_cpu_t;
48 typedef surf_NetCard *sg_netcard_t;
49 typedef surf_Resource *sg_resource_t;
50
51 // Types which are in fact dictelmt:
52 typedef struct s_xbt_dictelm *sg_storage_t;
53
54 typedef struct tmgr_trace *tmgr_trace_t; /**< Opaque structure defining an availability trace */
55
56 typedef enum {
57   SURF_LINK_FULLDUPLEX = 2,
58   SURF_LINK_SHARED = 1,
59   SURF_LINK_FATPIPE = 0
60 } e_surf_link_sharing_policy_t;
61
62 typedef enum {
63   SURF_TRACE_CONNECT_KIND_HOST_AVAIL = 4,
64   SURF_TRACE_CONNECT_KIND_SPEED = 3,
65   SURF_TRACE_CONNECT_KIND_LINK_AVAIL = 2,
66   SURF_TRACE_CONNECT_KIND_BANDWIDTH = 1,
67   SURF_TRACE_CONNECT_KIND_LATENCY = 0
68 } e_surf_trace_connect_kind_t;
69
70 typedef enum {
71   SURF_PROCESS_ON_FAILURE_DIE = 1,
72   SURF_PROCESS_ON_FAILURE_RESTART = 0
73 } e_surf_process_on_failure_t;
74
75
76 /** @ingroup m_datatypes_management_details
77  * @brief Type for any simgrid size
78  */
79 typedef unsigned long long sg_size_t;
80
81 /** @ingroup m_datatypes_management_details
82  * @brief Type for any simgrid offset
83  */
84 typedef long long sg_offset_t;
85
86 #endif