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

#include <multithreaded_event_container.h>

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

Classes

struct  send_recv_thread_functor
 
struct  vote_thread_functor
 

Public Member Functions

 multithreaded_event_container (parallel_runtime *rt)
 
 ~multithreaded_event_container () throw ()
 
virtual void init_factory_params (sprockit::sim_parameters *params)
 
virtual void finalize_init ()
 
virtual void run ()
 Run the eventmanager. More...
 
virtual void schedule_stop (timestamp until)
 
void multithread_schedule (int srcthread, int dstthread, uint32_t seqnum, event_queue_entry *ev)
 
std::list< event_queue_entry * > & pending_events (int srcthread, int dstthread)
 
virtual void set_interconnect (hw::interconnect *interconn)
 
virtual void receive_incoming_events ()
 
void schedule_incoming (int thread_id, clock_cycle_event_map *mgr)
 
void send_recv_barrier (int thread_id)
 
timestamp time_vote_barrier (int thread_id, timestamp min_time)
 
virtual timestamp vote_next_round (timestamp my_time)
 
event_managerev_man_for_thread (int thread_id) const
 
virtual void finish_stats (stat_collector *main, const std::string &name, timestamp end)
 
- Public Member Functions inherited from sstmac::native::clock_cycle_event_map
 clock_cycle_event_map (parallel_runtime *rt)
 
virtual ~clock_cycle_event_map () throw ()
 
bool vote_to_terminate ()
 
virtual void ipc_schedule (timestamp t, event_loc_id dst, event_loc_id src, uint32_t seqnum, event *ev)
 
- Public Member Functions inherited from sstmac::native::event_map
 event_map (parallel_runtime *rt)
 
 ~event_map () 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...
 
- 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 ()
 
void stop ()
 
int me () const
 
int worker_id () const
 
int nproc () const
 
int nworker () const
 
virtual int lpid () const
 
int thread_id () const
 
int nthread () const
 
- Public Member Functions inherited from sprockit::factory_type
virtual void init_factory_params (sim_parameters *params)
 

Protected Attributes

vote_thread_functor vote_functor_
 
send_recv_thread_functor send_recv_functor_
 
std::vector< multithreaded_subcontainer * > subthreads_
 
thread_barrier send_recv_barrier_
 
thread_barrier vote_barrier_
 
thread_event_schedule_map pending_event_map_
 
std::vector< int > cpu_affinity_
 
int me_
 
int nproc_
 
- Protected Attributes inherited from sstmac::native::clock_cycle_event_map
timestamp next_time_horizon_
 
timestamp lookahead_
 
timestamp no_events_left_time_
 
std::vector< void * > all_incoming_
 
std::vector< std::vector< void * > > thread_incoming_
 
hw::switch_interconnectinterconn_
 
int epoch_
 
- Protected Attributes inherited from sstmac::native::event_map
queue_t queue_
 
- 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

- Public Types inherited from sstmac::native::clock_cycle_event_map
enum  vote_type_t { vote_max, vote_min }
 
- 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
 
- Protected Types inherited from sstmac::native::event_map
typedef std::set< event_queue_entry *, event_comparequeue_t
 
- Protected Member Functions inherited from sstmac::native::clock_cycle_event_map
virtual void schedule_incoming (const std::vector< void * > &mpi_buffers)
 
void do_next_event ()
 
timestamp next_event_time () const
 
virtual timestamp vote_next_round (timestamp my_time, vote_type_t ty)
 
int64_t do_vote (int64_t time, vote_type_t ty=vote_min)
 
- Protected Member Functions inherited from sstmac::native::event_map
event_queue_entrypop_next_event ()
 
void add_event (event_queue_entry *ev)
 Called by schedule. Child class must implement. More...
 
- Protected Member Functions inherited from sstmac::native::event_container
 event_container (parallel_runtime *rt)
 
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)
 
- Static Protected Attributes inherited from sstmac::event_manager
static std::vector< pthread_tpthreads_
 
static std::vector< pthread_attr_tpthread_attrs_
 

Detailed Description

Definition at line 39 of file multithreaded_event_container.h.

Constructor & Destructor Documentation

sstmac::native::multithreaded_event_container::multithreaded_event_container ( parallel_runtime rt)
inline

Definition at line 43 of file multithreaded_event_container.h.

sstmac::native::multithreaded_event_container::~multithreaded_event_container ( )
throw (
)
inline

Definition at line 46 of file multithreaded_event_container.h.

References sstmac::run().

Here is the call graph for this function:

Member Function Documentation

event_manager* sstmac::native::multithreaded_event_container::ev_man_for_thread ( int  thread_id) const
virtual

Reimplemented from sstmac::event_manager.

virtual void sstmac::native::multithreaded_event_container::finalize_init ( )
virtual
virtual void sstmac::native::multithreaded_event_container::finish_stats ( stat_collector main,
const std::string &  name,
timestamp  end 
)
virtual

Reimplemented from sstmac::event_manager.

virtual void sstmac::native::multithreaded_event_container::init_factory_params ( sprockit::sim_parameters *  params)
virtual
void sstmac::native::multithreaded_event_container::multithread_schedule ( int  srcthread,
int  dstthread,
uint32_t  seqnum,
event_queue_entry ev 
)
virtual

Reimplemented from sstmac::event_manager.

std::list<event_queue_entry*>& sstmac::native::multithreaded_event_container::pending_events ( int  srcthread,
int  dstthread 
)
inline

Definition at line 68 of file multithreaded_event_container.h.

References main.

virtual void sstmac::native::multithreaded_event_container::receive_incoming_events ( )
virtual
virtual void sstmac::native::multithreaded_event_container::run ( )
virtual

Run the eventmanager.

The eventmanager shall return control when no more messages remain.

Reimplemented from sstmac::native::clock_cycle_event_map.

void sstmac::native::multithreaded_event_container::schedule_incoming ( int  thread_id,
clock_cycle_event_map mgr 
)
virtual void sstmac::native::multithreaded_event_container::schedule_stop ( timestamp  until)
virtual

Reimplemented from sstmac::event_manager.

void sstmac::native::multithreaded_event_container::send_recv_barrier ( int  thread_id)
virtual void sstmac::native::multithreaded_event_container::set_interconnect ( hw::interconnect *  interconn)
virtual
timestamp sstmac::native::multithreaded_event_container::time_vote_barrier ( int  thread_id,
timestamp  min_time 
)
virtual timestamp sstmac::native::multithreaded_event_container::vote_next_round ( timestamp  my_time)
virtual

Member Data Documentation

std::vector<int> sstmac::native::multithreaded_event_container::cpu_affinity_
protected

Definition at line 123 of file multithreaded_event_container.h.

int sstmac::native::multithreaded_event_container::me_
protected

Definition at line 124 of file multithreaded_event_container.h.

int sstmac::native::multithreaded_event_container::nproc_
protected

Definition at line 125 of file multithreaded_event_container.h.

thread_event_schedule_map sstmac::native::multithreaded_event_container::pending_event_map_
protected

Definition at line 121 of file multithreaded_event_container.h.

thread_barrier sstmac::native::multithreaded_event_container::send_recv_barrier_
protected

Definition at line 118 of file multithreaded_event_container.h.

send_recv_thread_functor sstmac::native::multithreaded_event_container::send_recv_functor_
protected

Definition at line 114 of file multithreaded_event_container.h.

std::vector<multithreaded_subcontainer*> sstmac::native::multithreaded_event_container::subthreads_
protected

Definition at line 116 of file multithreaded_event_container.h.

thread_barrier sstmac::native::multithreaded_event_container::vote_barrier_
protected

Definition at line 119 of file multithreaded_event_container.h.

vote_thread_functor sstmac::native::multithreaded_event_container::vote_functor_
protected

Definition at line 104 of file multithreaded_event_container.h.


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