Charades
|
Base class defining basic scheduler functionality. More...
#include <scheduler.h>
Public Member Functions | |
virtual void | groups_created () |
Entry method triggered by QD when all group chares are created. | |
void | start_simulation () |
Methods for starting and stopping the entire simulation. More... | |
void | end_simulation () |
Starts stats reduction. | |
void | finalize_complete () |
void | finalize (CkReductionMsg *m) |
Receives stats reduction and exits. | |
void | print_progress (Time ts) |
Method for printing out basic info about the current progress. | |
bool | schedule_next_lp () |
Calls execute_me() on the next LP in the queue. More... | |
virtual Time | get_min_time () const |
Get the minimum time of any event on this PE. More... | |
virtual void | execute () |
Entry method for executing a scheduler iteration. More... | |
void | register_lp (LPToken *next_token, Time next_ts) |
Update the queue of LPs that are local to this PE. | |
void | unregister_lp (LPToken *next_token) |
void | update_next (LPToken *token, Time ts) |
virtual void | consume (RemoteEvent *e) |
virtual void | produce (RemoteEvent *e) |
virtual void | update_min_cancel (Time ts) |
Public Attributes | |
Globals * | globals |
Global variables per PE. | |
Statistics * | stats |
Statistics for current stat interval. | |
Statistics * | cumulative_stats |
Cumulative stats over all intervals. | |
Protected Attributes | |
string | scheduler_name |
Name of scheduler for print outs. | |
bool | running |
True if there are active execute() messages. | |
double | start_time |
Start wall time for the simulation. | |
double | end_time |
End wall time for the simulation. | |
PEQueue | next_lps |
queue storing LPTokens ordered by next event ts | |
Base class defining basic scheduler functionality.
This requires keeping a heap of LPs ordered by next event, methods for updating this heap, the ability to execute events on these LPs, and basic statistics and global variable management.
|
virtual |
Entry method for executing a scheduler iteration.
Needs to be overridden by each base class to define a scheduler iteration.
|
virtual |
Get the minimum time of any event on this PE.
Return the time of the minimum unexecuted event on this PE.
bool Scheduler::schedule_next_lp | ( | ) |
Calls execute_me() on the next LP in the queue.
Attempt to execute the next LPs next event, returning false if it fails.
void Scheduler::start_simulation | ( | ) |
Methods for starting and stopping the entire simulation.
Sets initial state and calls execute()