The ROme OpTimistic Simulator  3.0.0
A General-Purpose Multithreaded Parallel/Distributed Simulation Platform
topology.h
Go to the documentation of this file.
1 
11 #pragma once
12 
13 #include <core/core.h>
14 
15 #include <limits.h>
16 #include <stdint.h>
17 
18 extern void topology_global_init(void);
19 
28 };
29 
39 
40  // FIXME this is bad if the n_lps is more than INT_MAX - 1
41  DIRECTION_INVALID = INT_MAX
42 };
43 
45 extern struct topology_settings_t {
50 } topology_settings;
51 
52 extern __attribute__ ((pure)) lp_id_t RegionsCount(void);
53 extern __attribute__ ((pure)) lp_id_t DirectionsCount(void);
54 extern __attribute__ ((pure)) lp_id_t GetReceiver(lp_id_t from, enum _direction_t direction);
55 extern lp_id_t FindReceiver(void);
TOPOLOGY_RING
@ TOPOLOGY_RING
a ring shaped topology walkable in a single direction
Definition: topology.h:23
DIRECTION_E
@ DIRECTION_E
East direction.
Definition: topology.h:33
DIRECTION_INVALID
@ DIRECTION_INVALID
A generic invalid direction.
Definition: topology.h:41
DIRECTION_SE
@ DIRECTION_SE
South-east direction.
Definition: topology.h:38
topology_settings_t::out_of_topology
lp_id_t out_of_topology
The minimum number of LPs needed for out of the topology logic.
Definition: topology.h:49
DIRECTION_NW
@ DIRECTION_NW
North-west direction.
Definition: topology.h:37
DIRECTION_W
@ DIRECTION_W
West direction.
Definition: topology.h:34
topology_global_init
void topology_global_init(void)
Definition: topology.c:32
TOPOLOGY_BIDRING
@ TOPOLOGY_BIDRING
a ring shaped topology
Definition: topology.h:24
DIRECTION_N
@ DIRECTION_N
North direction.
Definition: topology.h:31
TOPOLOGY_SQUARE
@ TOPOLOGY_SQUARE
square grid topology
Definition: topology.h:22
_topology_geometry_t
_topology_geometry_t
Definition: topology.h:20
TOPOLOGY_MESH
@ TOPOLOGY_MESH
an arbitrary shaped topology
Definition: topology.h:27
TOPOLOGY_HEXAGON
@ TOPOLOGY_HEXAGON
hexagonal grid topology
Definition: topology.h:21
_direction_t
_direction_t
Definition: topology.h:30
lp_id_t
uint64_t lp_id_t
Used to uniquely identify LPs in the simulation.
Definition: core.h:75
core.h
Core ROOT-Sim functionalities.
TOPOLOGY_TORUS
@ TOPOLOGY_TORUS
a torus shaped grid topology (a wrapping around square topology)
Definition: topology.h:25
DIRECTION_SW
@ DIRECTION_SW
South-west direction.
Definition: topology.h:36
topology_settings_t::default_geometry
enum _topology_geometry_t default_geometry
The default geometry to use when nothing else is specified.
Definition: topology.h:47
TOPOLOGY_STAR
@ TOPOLOGY_STAR
a star shaped topology
Definition: topology.h:26
DIRECTION_S
@ DIRECTION_S
South direction.
Definition: topology.h:32
DIRECTION_NE
@ DIRECTION_NE
North-east direction.
Definition: topology.h:35
topology_settings_t
This is declared by the model to setup the topology module.
Definition: topology.h:45