|
SimGrid
3.14.159
Versatile Simulation of Distributed Systems
|
#include <atomic>#include "src/internal_config.h"#include <sys/syscall.h>#include "xbt/parmap.h"#include "xbt/log.h"#include "xbt/function_types.h"#include "xbt/dynar.h"#include "xbt/xbt_os_thread.h"#include "xbt/sysdep.h"#include "src/simix/smx_private.h"Classes | |
| struct | s_xbt_parmap |
| Parallel map structure. More... | |
| struct | s_xbt_parmap_thread_data |
| Thread data transmission structure. More... | |
Typedefs | |
| typedef struct s_xbt_parmap | s_xbt_parmap_t |
| Parallel map structure. More... | |
| typedef struct s_xbt_parmap_thread_data | s_xbt_parmap_thread_data_t |
| Thread data transmission structure. More... | |
| typedef s_xbt_parmap_thread_data_t * | xbt_parmap_thread_data_t |
Enumerations | |
| enum | e_xbt_parmap_flag_t { XBT_PARMAP_WORK, XBT_PARMAP_DESTROY } |
Functions | |
| XBT_LOG_NEW_DEFAULT_SUBCATEGORY (xbt_parmap, xbt, "parmap: parallel map") | |
| static void | xbt_parmap_set_mode (xbt_parmap_t parmap, e_xbt_parmap_mode_t mode) |
| Sets the synchronization mode of a parmap. More... | |
| static void * | xbt_parmap_worker_main (void *arg) |
| Main function of a worker thread. More... | |
| static void | xbt_parmap_work (xbt_parmap_t parmap) |
| static void | xbt_parmap_posix_master_wait (xbt_parmap_t parmap) |
| Starts the parmap: waits for all workers to be ready and returns. More... | |
| static void | xbt_parmap_posix_worker_signal (xbt_parmap_t parmap) |
| Ends the parmap: wakes the controller thread when all workers terminate. More... | |
| static void | xbt_parmap_posix_master_signal (xbt_parmap_t parmap) |
| Wakes all workers and waits for them to finish the tasks. More... | |
| static void | xbt_parmap_posix_worker_wait (xbt_parmap_t parmap, unsigned round) |
| Waits for some work to process. More... | |
| static void | xbt_parmap_busy_master_wait (xbt_parmap_t parmap) |
| Starts the parmap: waits for all workers to be ready and returns. More... | |
| static void | xbt_parmap_busy_worker_signal (xbt_parmap_t parmap) |
| Ends the parmap: wakes the controller thread when all workers terminate. More... | |
| static void | xbt_parmap_busy_master_signal (xbt_parmap_t parmap) |
| Wakes all workers and waits for them to finish the tasks. More... | |
| static void | xbt_parmap_busy_worker_wait (xbt_parmap_t parmap, unsigned round) |
| Waits for some work to process. More... | |
| xbt_parmap_t | xbt_parmap_new (unsigned int num_workers, e_xbt_parmap_mode_t mode) |
| Creates a parallel map object. More... | |
| void | xbt_parmap_destroy (xbt_parmap_t parmap) |
| Destroys a parmap. More... | |
| void | xbt_parmap_apply (xbt_parmap_t parmap, void_f_pvoid_t fun, xbt_dynar_t data) |
| Applies a list of tasks in parallel. More... | |
| void * | xbt_parmap_next (xbt_parmap_t parmap) |
| Returns a next task to process. More... | |
| typedef struct s_xbt_parmap s_xbt_parmap_t |
Parallel map structure.
| typedef struct s_xbt_parmap_thread_data s_xbt_parmap_thread_data_t |
Thread data transmission structure.
| enum e_xbt_parmap_flag_t |
| XBT_LOG_NEW_DEFAULT_SUBCATEGORY | ( | xbt_parmap | , |
| xbt | , | ||
| "parmap: parallel map" | |||
| ) |
|
static |
Sets the synchronization mode of a parmap.
| parmap | a parallel map object |
| mode | the synchronization mode |
Main function of a worker thread.
| arg | the parmap |
|
static |
|
static |
Starts the parmap: waits for all workers to be ready and returns.
This function is called by the controller thread.
| parmap | a parmap |
|
static |
Ends the parmap: wakes the controller thread when all workers terminate.
This function is called by all worker threads when they end (not including the controller).
| parmap | a parmap |
|
static |
Wakes all workers and waits for them to finish the tasks.
This function is called by the controller thread.
| parmap | a parmap |
|
static |
Waits for some work to process.
This function is called by each worker thread (not including the controller) when it has no more work to do.
| parmap | a parmap |
| round | the expected round number |
|
static |
Starts the parmap: waits for all workers to be ready and returns.
This function is called by the controller thread.
| parmap | a parmap |
|
static |
Ends the parmap: wakes the controller thread when all workers terminate.
This function is called by all worker threads when they end.
| parmap | a parmap |
|
static |
Wakes all workers and waits for them to finish the tasks.
This function is called by the controller thread.
| parmap | a parmap |
|
static |
Waits for some work to process.
This function is called by each worker thread (not including the controller) when it has no more work to do.
| parmap | a parmap |
| round | the expected round number |