SST/macro
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
sstmac::native::event_calendar Class Reference

An event manager that relies on the eventcontainer template base class to manage events with a multimap template parameter. More...

#include <event_calendar.h>

Inheritance diagram for sstmac::native::event_calendar:
Inheritance graph
Collaboration diagram for sstmac::native::event_calendar:
Collaboration graph

Public Member Functions

virtual void init_factory_params (sprockit::sim_parameters *params)
 
 ~event_calendar () throw ()
 
void clear (timestamp zero_time=timestamp(0))
 Clear all events and set time back to a zero of your choice. More...
 
void cancel_all_messages (event_loc_id mod)
 
bool empty () const
 
- Public Member Functions inherited from sstmac::native::event_container
virtual ~event_container () throw ()
 Goodbye. More...
 
virtual void run ()
 Run the eventmanager. More...
 
- Public Member Functions inherited from sstmac::event_manager
virtual std::string to_string () const
 
bool is_complete ()
 
virtual ~event_manager ()
 Goodbye. More...
 
timestamp now () const
 
void register_stat (stat_collector *stat, bool reduce_all=true, bool dump_all=false, bool dump_main=true)
 
stat_collectorregister_thread_unique_stat (stat_collector *stat, bool reduce_all=true, bool dump_all=false, bool dump_main=true)
 
partitiontopology_partition () const
 
parallel_runtimeruntime () const
 
void finish_stats ()
 
virtual void finish_stats (stat_collector *main, const std::string &name, timestamp end)
 
void stop ()
 
int me () const
 
int worker_id () const
 
int nproc () const
 
int nworker () const
 
virtual void ipc_schedule (timestamp t, event_loc_id dst, event_loc_id src, uint32_t seqnum, event *ev)
 
virtual void multithread_schedule (int srcthread, int dstthread, uint32_t seqnum, event_queue_entry *ev)
 
virtual int lpid () const
 
int thread_id () const
 
int nthread () const
 
virtual event_managerev_man_for_thread (int thread_id) const
 
virtual void set_interconnect (hw::interconnect *interconn)
 
virtual void schedule_stop (timestamp until)
 
- Public Member Functions inherited from sprockit::factory_type
virtual void init_factory_params (sim_parameters *params)
 
virtual void finalize_init ()
 

Protected Member Functions

eventpop_next_event ()
 
eventpop_next_event_in_search_window ()
 
void go_do_one_event ()
 
void add_event (event *ev)
 
void go_to_next_epoch ()
 
- Protected Member Functions inherited from sstmac::native::event_container
 event_container (parallel_runtime *rt)
 
virtual void do_next_event ()
 
virtual void add_event (event_queue_entry *ev)=0
 Called by schedule. Child class must implement. More...
 
virtual bool vote_to_terminate ()
 
void schedule (timestamp start_time, uint32_t seqnum, event_queue_entry *ev)
 Set off the given eventhandler at the given time. More...
 
void finish ()
 Called at end of run(). More...
 
- Protected Member Functions inherited from sstmac::event_manager
 event_manager (parallel_runtime *rt)
 
void set_now (const timestamp &ts)
 

Protected Attributes

int num_events_left_
 
long num_ticks_epoch_
 
long num_epochs_
 
long current_window_idx_
 
long current_epoch_start_idx_
 
long num_ticks_search_window_
 
long current_search_window_
 
long num_windows_epoch_
 
int epoch_number_
 
std::vector< uint32_t > search_windows_
 
std::vector< std::list< event * > > future_epochs_
 
std::vector< event * > current_epoch_
 
- Protected Attributes inherited from sstmac::native::event_container
bool running_
 Sentinel to track whether the event handler is running or not. More...
 
timestamp last_update_sim_
 Time of last event executed. More...
 
- Protected Attributes inherited from sstmac::event_manager
bool complete_
 
bool stopped_
 
bool finish_on_stop_
 
parallel_runtimert_
 
int thread_id_
 
int me_
 
int nproc_
 
int nthread_
 

Additional Inherited Members

- Static Public Member Functions inherited from sstmac::event_manager
static int current_thread_id ()
 
- Static Public Attributes inherited from sstmac::event_manager
static event_managerglobal
 
- Static Protected Attributes inherited from sstmac::event_manager
static std::vector< pthread_tpthreads_
 
static std::vector< pthread_attr_tpthread_attrs_
 

Detailed Description

An event manager that relies on the eventcontainer template base class to manage events with a multimap template parameter.

Definition at line 29 of file event_calendar.h.

Constructor & Destructor Documentation

sstmac::native::event_calendar::~event_calendar ( )
throw (
)

Member Function Documentation

void sstmac::native::event_calendar::add_event ( event ev)
protected

Referenced by empty().

void sstmac::native::event_calendar::cancel_all_messages ( event_loc_id  mod)
virtual

Implements sstmac::event_manager.

void sstmac::native::event_calendar::clear ( timestamp  zero_time = timestamp(0))
virtual

Clear all events and set time back to a zero of your choice.

This call shall not be permitted while the event manager is running.

Implements sstmac::event_manager.

bool sstmac::native::event_calendar::empty ( ) const
inlinevirtual

Implements sstmac::native::event_container.

Definition at line 46 of file event_calendar.h.

References add_event(), go_do_one_event(), go_to_next_epoch(), num_events_left_, pop_next_event(), and pop_next_event_in_search_window().

Here is the call graph for this function:

void sstmac::native::event_calendar::go_do_one_event ( )
protected

Referenced by empty().

void sstmac::native::event_calendar::go_to_next_epoch ( )
protected

Referenced by empty().

virtual void sstmac::native::event_calendar::init_factory_params ( sprockit::sim_parameters *  params)
virtual

Reimplemented from sstmac::native::event_container.

event* sstmac::native::event_calendar::pop_next_event ( )
protectedvirtual

Implements sstmac::native::event_container.

Referenced by empty().

event* sstmac::native::event_calendar::pop_next_event_in_search_window ( )
protected

Referenced by empty().

Member Data Documentation

std::vector<event*> sstmac::native::event_calendar::current_epoch_
protected

Definition at line 89 of file event_calendar.h.

long sstmac::native::event_calendar::current_epoch_start_idx_
protected

Definition at line 75 of file event_calendar.h.

long sstmac::native::event_calendar::current_search_window_
protected

Definition at line 79 of file event_calendar.h.

long sstmac::native::event_calendar::current_window_idx_
protected

Definition at line 73 of file event_calendar.h.

int sstmac::native::event_calendar::epoch_number_
protected

Definition at line 83 of file event_calendar.h.

std::vector<std::list<event*> > sstmac::native::event_calendar::future_epochs_
protected

Definition at line 87 of file event_calendar.h.

long sstmac::native::event_calendar::num_epochs_
protected

Definition at line 71 of file event_calendar.h.

int sstmac::native::event_calendar::num_events_left_
protected

Definition at line 67 of file event_calendar.h.

Referenced by empty().

long sstmac::native::event_calendar::num_ticks_epoch_
protected

Definition at line 69 of file event_calendar.h.

long sstmac::native::event_calendar::num_ticks_search_window_
protected

Definition at line 77 of file event_calendar.h.

long sstmac::native::event_calendar::num_windows_epoch_
protected

Definition at line 81 of file event_calendar.h.

std::vector<uint32_t> sstmac::native::event_calendar::search_windows_
protected

Definition at line 85 of file event_calendar.h.


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