![]() |
The ROme OpTimistic Simulator
3.0.0
A General-Purpose Multithreaded Parallel/Distributed Simulation Platform
|
Core ROOT-Sim functionalities. More...
#include <log/log.h>
#include <mm/mm.h>
#include <float.h>
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
Go to the source code of this file.
Macros | |
#define | max(a, b) |
#define | min(a, b) |
#define | CACHE_LINE_SIZE 128 |
The size of a cpu cache line. More... | |
#define | likely(exp) __builtin_expect(!!(exp), 1) |
Optimize the branch as likely taken. | |
#define | unlikely(exp) __builtin_expect((exp), 0) |
Optimize the branch as likely not taken. | |
#define | SIMTIME_MAX DBL_MAX |
The maximum value of the logical simulation time, semantically never. | |
#define | MAX_NODES (1 << 16) |
The maximum number of supported MPI nodes. More... | |
#define | MAX_THREADS (1 << 10) |
The maximum number of supported threads. More... | |
#define | lid_to_nid(lid) (nid_t)(lid / n_lps_node) |
Typedefs | |
typedef double | simtime_t |
The type used to represent logical time in the simulation. | |
typedef uint64_t | lp_id_t |
Used to uniquely identify LPs in the simulation. | |
typedef unsigned | rid_t |
Used to identify in a node the computing resources (threads at the moment) | |
typedef int | nid_t |
Used to identify MPI nodes in a distributed environment. | |
Enumerations | |
enum | rootsim_event { MODEL_INIT = 65532, LP_INIT, LP_FINI, MODEL_FINI, MODEL_INIT = 65532, LP_INIT, LP_FINI, MODEL_FINI } |
Functions | |
void | ProcessEvent (lp_id_t me, simtime_t now, unsigned event_type, const void *content, unsigned size, void *state) |
The total number of threads running in the node. | |
void | ProcessEvent_pr (lp_id_t me, simtime_t now, unsigned event_type, const void *content, unsigned size, void *state) |
bool | CanEnd (lp_id_t me, const void *state) |
Variables | |
lp_id_t | n_lps |
The total number of LPs in the simulation. | |
lp_id_t | n_lps_node |
The total number of LPs hosted in the node. | |
rid_t | n_threads |
The total number of MPI nodes in the simulation. | |
__thread rid_t | rid |
The identifier of the thread. | |
nid_t | n_nodes |
nid_t | nid |
The node identifier of the node. | |
Core ROOT-Sim functionalities.
Core ROOT-Sim functionalities
Definition in file core.h.
#define CACHE_LINE_SIZE 128 |
#define max | ( | a, | |
b | |||
) |
#define MAX_NODES (1 << 16) |
#define MAX_THREADS (1 << 10) |