#ifndef __PAN_COMM_UTIL_H__ #define __PAN_COMM_UTIL_H__
#include "pan_sys.h"
Utility functions that depend on the communication subsystem.
void pan_comm_util_init(int *argc, char *argv[]); void pan_comm_util_end(void);
Initialise or exit this module.
int pan_clock_sync(int n_syncs, pan_time_p shift, pan_time_p std);
Global synchronization. All processes must call this function at the same time.
void pan_clock_set_timeout(pan_time_p timeout, pan_time_p uc_delay); void pan_clock_get_timeout(pan_time_p timeout, pan_time_p uc_delay); int pan_clock_get_shift(pan_time_p timeout, pan_time_p d_timeout);
Handles for operation/enquiry.
Barrier that is implemented on top of the Panda interface modules.
int pan_barrier_create(int n_partners); void pan_barrier_clear(int b);
void pan_barrier_sync(int b);
Synchronize all threads that have called pan_barrier_sync(b). Only one thread per process can call pan_barrier_sync(). The calling thread is blocked, other threads in the same process may continue.
void pan_barrier(void);
Synchronize using the predefined barrier, which is initialised to n_partners = pan_nr_processes(). Typically used to synchronize all processes in a Panda run.
Reset/print the statistics of the following modules:
void pan_stats_print_reset(void);
Atomically print and reset statistics
void pan_stats_reset(void);
Reset statistics
#endif