SST/macro
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
sstmac::Simulation Class Reference

#include <driver.h>

Collaboration diagram for sstmac::Simulation:
Collaboration graph

Public Member Functions

 Simulation ()
 
 ~Simulation ()
 
double wallTime () const
 
double simulatedTime () const
 
sim_statsstats ()
 
void finalize ()
 
void waitFork ()
 
pid_t pid () const
 
void setResults (double *results, int numResults)
 
void allocateResults (int nresults)
 
void setStats (const sim_stats &stats)
 
double * results () const
 
bool complete () const
 
void setComplete (bool flag)
 
int numResults () const
 
void setLabel (int idx)
 
int label () const
 
void waitMPIScan ()
 

Private Member Functions

void setPid (pid_t pid)
 
void setPipe (pipe_t p)
 
int readPipe () const
 
int writePipe () const
 
void setParameters (sprockit::sim_parameters *params)
 

Private Attributes

sprockit::sim_parameters params_
 
sim_stats stats_
 
char label_ [256]
 
int label_offset_
 
pid_t pid_
 
pipe_t pfd_
 
double * results_
 
bool complete_
 
int idx_
 
bool allocated_results_
 

Friends

class SimulationQueue
 

Detailed Description

Definition at line 20 of file driver.h.

Constructor & Destructor Documentation

sstmac::Simulation::Simulation ( )
inline

Definition at line 25 of file driver.h.

References ~Simulation().

Here is the call graph for this function:

sstmac::Simulation::~Simulation ( )

Referenced by Simulation().

Member Function Documentation

void sstmac::Simulation::allocateResults ( int  nresults)
inline
bool sstmac::Simulation::complete ( ) const
inline

Definition at line 91 of file driver.h.

References complete_.

void sstmac::Simulation::finalize ( )
int sstmac::Simulation::label ( ) const
inline

Definition at line 111 of file driver.h.

References idx_.

int sstmac::Simulation::numResults ( ) const
inline

Definition at line 101 of file driver.h.

References sim_stats::numResults, and stats_.

Referenced by setResults().

pid_t sstmac::Simulation::pid ( ) const
inline

Definition at line 54 of file driver.h.

References pid_.

Referenced by setPid().

int sstmac::Simulation::readPipe ( ) const
inlineprivate

Definition at line 128 of file driver.h.

References pfd_.

double* sstmac::Simulation::results ( ) const
inline

Definition at line 85 of file driver.h.

References results_.

Referenced by setResults().

void sstmac::Simulation::setComplete ( bool  flag)
inline

Definition at line 96 of file driver.h.

References complete_.

void sstmac::Simulation::setLabel ( int  idx)
inline

Definition at line 106 of file driver.h.

References idx_.

void sstmac::Simulation::setParameters ( sprockit::sim_parameters *  params)
private

Referenced by writePipe().

void sstmac::Simulation::setPid ( pid_t  pid)
inlineprivate

Definition at line 117 of file driver.h.

References pid(), and pid_.

Here is the call graph for this function:

void sstmac::Simulation::setPipe ( pipe_t  p)
inlineprivate

Definition at line 122 of file driver.h.

References pfd_.

void sstmac::Simulation::setResults ( double *  results,
int  numResults 
)
inline

Definition at line 59 of file driver.h.

References allocated_results_, sim_stats::numResults, numResults(), results(), results_, and stats_.

Here is the call graph for this function:

void sstmac::Simulation::setStats ( const sim_stats stats)
inline

Definition at line 80 of file driver.h.

References stats(), and stats_.

Here is the call graph for this function:

double sstmac::Simulation::simulatedTime ( ) const
inline

Definition at line 40 of file driver.h.

References sim_stats::simulatedTime, and stats_.

sim_stats* sstmac::Simulation::stats ( )
inline

Definition at line 45 of file driver.h.

References finalize(), stats_, and waitFork().

Referenced by sstmac::SimulationQueue::buildUp(), and setStats().

Here is the call graph for this function:

void sstmac::Simulation::waitFork ( )

Referenced by stats().

void sstmac::Simulation::waitMPIScan ( )
double sstmac::Simulation::wallTime ( ) const
inline

Definition at line 35 of file driver.h.

References stats_, and sim_stats::wallTime.

int sstmac::Simulation::writePipe ( ) const
inlineprivate

Definition at line 133 of file driver.h.

References pfd_, and setParameters().

Here is the call graph for this function:

Friends And Related Function Documentation

friend class SimulationQueue
friend

Definition at line 22 of file driver.h.

Member Data Documentation

bool sstmac::Simulation::allocated_results_
private

Definition at line 149 of file driver.h.

Referenced by allocateResults(), and setResults().

bool sstmac::Simulation::complete_
private

Definition at line 147 of file driver.h.

Referenced by complete(), and setComplete().

int sstmac::Simulation::idx_
private

Definition at line 148 of file driver.h.

Referenced by label(), and setLabel().

char sstmac::Simulation::label_[256]
private

Definition at line 142 of file driver.h.

int sstmac::Simulation::label_offset_
private

Definition at line 143 of file driver.h.

sprockit::sim_parameters sstmac::Simulation::params_
private

Definition at line 140 of file driver.h.

pipe_t sstmac::Simulation::pfd_
private

Definition at line 145 of file driver.h.

Referenced by readPipe(), setPipe(), and writePipe().

pid_t sstmac::Simulation::pid_
private

Definition at line 144 of file driver.h.

Referenced by pid(), and setPid().

double* sstmac::Simulation::results_
private

Definition at line 146 of file driver.h.

Referenced by allocateResults(), results(), and setResults().

sim_stats sstmac::Simulation::stats_
private

Definition at line 141 of file driver.h.

Referenced by allocateResults(), numResults(), setResults(), setStats(), simulatedTime(), stats(), and wallTime().


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