The ROme OpTimistic Simulator  3.0.0
A General-Purpose Multithreaded Parallel/Distributed Simulation Platform
topology.h File Reference

Topology library. More...

#include <core/core.h>
#include <limits.h>
#include <stdint.h>
+ Include dependency graph for topology.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  topology_settings_t
 This is declared by the model to setup the topology module. More...
 

Enumerations

enum  _topology_geometry_t {
  TOPOLOGY_HEXAGON = 1, TOPOLOGY_SQUARE, TOPOLOGY_RING, TOPOLOGY_BIDRING,
  TOPOLOGY_TORUS, TOPOLOGY_STAR, TOPOLOGY_MESH, TOPOLOGY_HEXAGON = 1,
  TOPOLOGY_SQUARE, TOPOLOGY_RING, TOPOLOGY_BIDRING, TOPOLOGY_TORUS,
  TOPOLOGY_STAR, TOPOLOGY_MESH
}
 
enum  _direction_t {
  DIRECTION_N, DIRECTION_S, DIRECTION_E, DIRECTION_W,
  DIRECTION_NE, DIRECTION_SW, DIRECTION_NW, DIRECTION_SE,
  DIRECTION_INVALID = INT_MAX, DIRECTION_N, DIRECTION_S, DIRECTION_E,
  DIRECTION_W, DIRECTION_NE, DIRECTION_SW, DIRECTION_NW,
  DIRECTION_SE, DIRECTION_INVALID = INT_MAX
}
 

Functions

void topology_global_init (void)
 
lp_id_t RegionsCount (void)
 
lp_id_t DirectionsCount (void)
 
lp_id_t GetReceiver (lp_id_t from, enum _direction_t direction)
 
lp_id_t FindReceiver (void)
 

Variables

struct topology_settings_t topology_settings
 

Detailed Description

Topology library.

This library is allows models to setup and query different topologies.

Definition in file topology.h.

Enumeration Type Documentation

◆ _direction_t

Enumerator
DIRECTION_N 

North direction.

DIRECTION_S 

South direction.

DIRECTION_E 

East direction.

DIRECTION_W 

West direction.

DIRECTION_NE 

North-east direction.

DIRECTION_SW 

South-west direction.

DIRECTION_NW 

North-west direction.

DIRECTION_SE 

South-east direction.

DIRECTION_INVALID 

A generic invalid direction.

DIRECTION_N 

North direction.

DIRECTION_S 

South direction.

DIRECTION_E 

East direction.

DIRECTION_W 

West direction.

DIRECTION_NE 

North-east direction.

DIRECTION_SW 

South-west direction.

DIRECTION_NW 

North-west direction.

DIRECTION_SE 

South-east direction.

DIRECTION_INVALID 

A generic invalid direction.

Definition at line 30 of file topology.h.

◆ _topology_geometry_t

Enumerator
TOPOLOGY_HEXAGON 

hexagonal grid topology

TOPOLOGY_SQUARE 

square grid topology

TOPOLOGY_RING 

a ring shaped topology walkable in a single direction

TOPOLOGY_BIDRING 

a ring shaped topology

TOPOLOGY_TORUS 

a torus shaped grid topology (a wrapping around square topology)

TOPOLOGY_STAR 

a star shaped topology

TOPOLOGY_MESH 

an arbitrary shaped topology

TOPOLOGY_HEXAGON 

hexagonal grid topology

TOPOLOGY_SQUARE 

square grid topology

TOPOLOGY_RING 

a ring shaped topology walkable in a single direction

TOPOLOGY_BIDRING 

a ring shaped topology

TOPOLOGY_TORUS 

a torus shaped grid topology (a wrapping around square topology)

TOPOLOGY_STAR 

a star shaped topology

TOPOLOGY_MESH 

an arbitrary shaped topology

Definition at line 20 of file topology.h.

Function Documentation

◆ topology_global_init()

void topology_global_init ( void  )

Initialize the topology module for each LP hosted on the machine. This needs to be called right after LP basic initialization before starting to process events.

Definition at line 32 of file topology.c.