Charades
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Scheduler Class Reference

Base class defining basic scheduler functionality. More...

#include <scheduler.h>

Inheritance diagram for Scheduler:

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

Globalsglobals
 Global variables per PE.
 
Statisticsstats
 Statistics for current stat interval.
 
Statisticscumulative_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
 

Detailed Description

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.

Member Function Documentation

◆ execute()

void Scheduler::execute ( )
virtual

Entry method for executing a scheduler iteration.

Needs to be overridden by each base class to define a scheduler iteration.

◆ get_min_time()

Time Scheduler::get_min_time ( ) const
virtual

Get the minimum time of any event on this PE.

Return the time of the minimum unexecuted event on this PE.

◆ schedule_next_lp()

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.

◆ start_simulation()

void Scheduler::start_simulation ( )

Methods for starting and stopping the entire simulation.

Sets initial state and calls execute()


The documentation for this class was generated from the following files: