![]() |
ROOT-Sim core
3.0.0-rc.2
A General-Purpose Multi-threaded Parallel/Distributed Simulation Library
|
LP construction functions. More...
#include <arch/platform.h>#include <core/core.h>#include <lib/random/random.h>#include <lp/msg.h>#include <lp/process.h>#include <mm/auto_ckpt.h>#include <mm/model_allocator.h>

Go to the source code of this file.
Classes | |
| struct | lp_ctx |
| A complete LP context. More... | |
Macros | |
| #define | lid_to_nid(lp_id) ((nid_t)((lp_id) * n_nodes / global_config.lps)) |
| Compute the id of the node which hosts a given LP. More... | |
| #define | lid_to_rid(lp_id) ((rid_t)(((lp_id) - lid_node_first) * global_config.n_threads / n_lps_node)) |
| Compute the id of the thread which hosts a given LP. More... | |
| #define | lp_initialized_set() (lp_initialized = true) |
Functions | |
| void | lp_global_init (void) |
| Initialize the global data structures for the LPs. | |
| void | lp_global_fini (void) |
| Finalize the global data structures for the LPs. | |
| void | lp_init (void) |
| Initialize the data structures of the LPs hosted in the calling thread. | |
| void | lp_fini (void) |
| Finalize the data structures of the LPs hosted in the calling thread. | |
Variables | |
| uint64_t | lid_node_first |
| The lowest LP id between the ones hosted on this node. | |
| __thread uint64_t | lid_thread_first |
| The lowest LP id between the ones hosted on this thread. | |
| __thread uint64_t | lid_thread_end |
| One plus the highest LP id between the ones hosted on this thread. | |
| __thread struct lp_ctx * | current_lp |
| A pointer to the currently processed LP context. | |
| struct lp_ctx * | lps |
| A pointer to the LP contexts array. More... | |
| bool | lp_initialized |
LP construction functions.
LP construction functions
| #define lid_to_nid | ( | lp_id | ) | ((nid_t)((lp_id) * n_nodes / global_config.lps)) |
Compute the id of the node which hosts a given LP.
| lp_id | the id of the LP |
lp_id | #define lid_to_rid | ( | lp_id | ) | ((rid_t)(((lp_id) - lid_node_first) * global_config.n_threads / n_lps_node)) |
Compute the id of the thread which hosts a given LP.
| lp_id | the id of the LP |
lp_id Horrible things may happen if lp_id is not locally hosted (use lid_to_nid() to make sure of that!)
|
extern |
A pointer to the LP contexts array.
Valid entries are contained between lid_node_first and lid_node_first + n_lps_node - 1, limits included