SST/macro
|
Base type for implementations of an engine that is able to schedule events and advance simulation time in the right order. More...
#include <event_manager.h>
Classes | |
struct | stats_entry |
Public Member Functions | |
virtual std::string | to_string () const |
bool | is_complete () |
virtual void | init_factory_params (sprockit::sim_parameters *params) |
virtual | ~event_manager () |
Goodbye. More... | |
virtual void | clear (timestamp zero_time=timestamp(0))=0 |
Clear all events and set time back to a zero of your choice. More... | |
virtual void | run ()=0 |
Run the eventmanager. More... | |
virtual bool | empty () const =0 |
timestamp | now () const |
void | register_stat (stat_collector *stat, bool reduce_all=true, bool dump_all=false, bool dump_main=true) |
stat_collector * | register_thread_unique_stat (stat_collector *stat, bool reduce_all=true, bool dump_all=false, bool dump_main=true) |
virtual void | cancel_all_messages (event_loc_id canceled_loc)=0 |
partition * | topology_partition () const |
parallel_runtime * | runtime () 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_manager * | ev_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 () |
Static Public Member Functions | |
static int | current_thread_id () |
Static Public Attributes | |
static event_manager * | global |
Protected Member Functions | |
event_manager (parallel_runtime *rt) | |
void | set_now (const timestamp &ts) |
Protected Attributes | |
bool | complete_ |
bool | stopped_ |
bool | finish_on_stop_ |
parallel_runtime * | rt_ |
int | thread_id_ |
int | me_ |
int | nproc_ |
int | nthread_ |
Static Protected Attributes | |
static std::vector< pthread_t > | pthreads_ |
static std::vector< pthread_attr_t > | pthread_attrs_ |
Private Member Functions | |
virtual void | schedule (timestamp start_time, uint32_t seqnum, event_queue_entry *event_queue_entry)=0 |
Private Attributes | |
std::map< std::string, stats_entry > | stats_ |
timestamp | now_ |
Friends | |
class | event_scheduler |
class | native::manager |
class | native::macro_manager |
Base type for implementations of an engine that is able to schedule events and advance simulation time in the right order.
Definition at line 47 of file event_manager.h.
|
virtual |
Goodbye.
|
inlineprotected |
Definition at line 197 of file event_manager.h.
References set_now().
|
pure virtual |
Implemented in sstmac::native::event_heap, sstmac::native::event_map, and sstmac::native::event_calendar.
Referenced by now().
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.
Implemented in sstmac::native::event_heap, sstmac::native::event_map, and sstmac::native::event_calendar.
|
static |
Referenced by nthread().
|
pure virtual |
|
virtual |
Reimplemented in sstmac::native::multithreaded_event_container.
Referenced by nthread().
void sstmac::event_manager::finish_stats | ( | ) |
Referenced by now().
|
virtual |
Reimplemented in sstmac::native::multithreaded_event_container.
|
virtual |
Reimplemented in sstmac::native::event_container, sstmac::native::multithreaded_event_container, sstmac::native::event_calendar, and sstmac::native::clock_cycle_event_map.
Referenced by is_complete().
|
virtual |
Reimplemented in sstmac::native::clock_cycle_event_map.
Referenced by nworker().
|
inline |
Definition at line 61 of file event_manager.h.
References complete_, and init_factory_params().
|
inlinevirtual |
Definition at line 170 of file event_manager.h.
|
inline |
Definition at line 129 of file event_manager.h.
References me_.
|
virtual |
Reimplemented in sstmac::native::multithreaded_event_container, and sstmac::native::multithreaded_subcontainer.
Referenced by nworker().
|
inline |
Definition at line 87 of file event_manager.h.
References cancel_all_messages(), finish_stats(), main, now_, register_stat(), register_thread_unique_stat(), runtime(), and topology_partition().
Referenced by sstmac::event_scheduler::now().
|
inline |
Definition at line 142 of file event_manager.h.
References nproc_.
|
inline |
Definition at line 180 of file event_manager.h.
References current_thread_id(), ev_man_for_thread(), nthread_, schedule_stop(), set_interconnect(), and thread_id().
Referenced by sstmac::event_scheduler::nthread().
|
inline |
Definition at line 147 of file event_manager.h.
References ipc_schedule(), multithread_schedule(), nproc_, and nthread_.
void sstmac::event_manager::register_stat | ( | stat_collector * | stat, |
bool | reduce_all = true , |
||
bool | dump_all = false , |
||
bool | dump_main = true |
||
) |
Referenced by now().
stat_collector* sstmac::event_manager::register_thread_unique_stat | ( | stat_collector * | stat, |
bool | reduce_all = true , |
||
bool | dump_all = false , |
||
bool | dump_main = true |
||
) |
Referenced by now().
|
pure virtual |
Run the eventmanager.
The eventmanager shall return control when no more messages remain.
Implemented in sstmac::native::multithreaded_event_container, sstmac::native::event_container, sstmac::native::clock_cycle_event_map, and sstmac::native::multithreaded_subcontainer.
parallel_runtime* sstmac::event_manager::runtime | ( | ) | const |
Referenced by now().
|
privatepure virtual |
Implemented in sstmac::native::event_container.
|
virtual |
Reimplemented in sstmac::native::multithreaded_event_container.
Referenced by nthread().
|
virtual |
Reimplemented in sstmac::native::multithreaded_event_container, and sstmac::native::clock_cycle_event_map.
Referenced by nthread().
|
protected |
Referenced by event_manager().
|
inline |
Definition at line 121 of file event_manager.h.
References stopped_.
|
inline |
Definition at line 175 of file event_manager.h.
References thread_id_.
Referenced by nthread(), and sstmac::native::multithreaded_subcontainer::~multithreaded_subcontainer().
|
inlinevirtual |
Definition at line 56 of file event_manager.h.
|
inline |
Definition at line 137 of file event_manager.h.
References me_, nthread_, and thread_id_.
|
friend |
Definition at line 50 of file event_manager.h.
|
friend |
Definition at line 52 of file event_manager.h.
|
friend |
Definition at line 51 of file event_manager.h.
|
protected |
Definition at line 212 of file event_manager.h.
Referenced by is_complete().
|
protected |
Definition at line 214 of file event_manager.h.
|
static |
Definition at line 68 of file event_manager.h.
|
protected |
Definition at line 218 of file event_manager.h.
Referenced by me(), and worker_id().
|
private |
Definition at line 238 of file event_manager.h.
Referenced by now().
|
protected |
Definition at line 220 of file event_manager.h.
|
protected |
Definition at line 222 of file event_manager.h.
Referenced by nthread(), nworker(), and worker_id().
|
staticprotected |
Definition at line 225 of file event_manager.h.
|
staticprotected |
Definition at line 224 of file event_manager.h.
|
protected |
Definition at line 215 of file event_manager.h.
|
private |
Definition at line 236 of file event_manager.h.
|
protected |
Definition at line 213 of file event_manager.h.
Referenced by stop().
|
protected |
Definition at line 216 of file event_manager.h.
Referenced by thread_id(), and worker_id().