|
SST
15.1.0
StructuralSimulationToolkit
|
#include <exit.h>
Public Member Functions | |
| Exit (int num_threads, bool single_rank) | |
| Create a new ExitEvent. More... | |
| void | refInc (uint32_t thread) |
| Increment reference count on a given thread. More... | |
| void | refDec (uint32_t thread) |
| Decrement reference count on a given thread. More... | |
| unsigned int | getRefCount () |
| Get the current local reference count. More... | |
| SimTime_t | getEndTime () |
| Gets the end time of the simulation. More... | |
| void | setEndTime (SimTime_t time) |
| Stores the time the simulation has ended. More... | |
| SimTime_t | computeEndTime () |
| Computes the end time of the simulation. More... | |
| void | execute () override |
| Function called when Exit fires in the TimeVortex. | |
| void | check () |
| Function called by SyncManager to check to see if it's time to exit. More... | |
| std::string | toString () const override |
| Creates a string representation of the Exit object. More... | |
| unsigned int | getGlobalCount () |
| Get the global ref_count. More... | |
| NotSerializable(SST::Exit) private | Exit (const Exit &)=delete |
| Exit & | operator= (const Exit &)=delete |
Public Member Functions inherited from SST::Action | |
| bool | isEvent () const override final |
| bool | isAction () const override final |
Public Member Functions inherited from SST::Activity | |
| void | setDeliveryTime (SimTime_t time) |
| Set the time for which this Activity should be delivered. | |
| SimTime_t | getDeliveryTime () const |
| Return the time at which this Activity will be delivered. | |
| int | getPriority () const |
| Return the Priority of this Activity. | |
| void | setOrderTag (uint32_t tag) |
| Sets the order tag. | |
| uint32_t | getOrderTag () const |
| Return the order tag associated with this activity. | |
| uint64_t | getQueueOrder () const |
| Returns the queue order associated with this activity. | |
| void | setQueueOrder (uint64_t order) |
| Set a new Queue order. | |
| virtual void | copyAllDeliveryInfo (const Activity *act) |
Public Member Functions inherited from SST::Core::MemPoolItem | |
| void * | operator new (std::size_t size) noexcept |
| Allocates memory from a memory pool for a new Activity. | |
| void | operator delete (void *ptr) |
| Returns memory for this Activity to the appropriate memory pool. More... | |
| virtual void | print (const std::string &header, Output &out) const |
Public Member Functions inherited from SST::Core::Serialization::serializable_base | |
| virtual const char * | cls_name () const =0 |
| virtual uint32_t | cls_id () const =0 |
| virtual std::string | serialization_name () const =0 |
Data Fields | |
| int | num_threads_ = 0 |
| unsigned int | ref_count_ = 0 |
| unsigned int * | thread_counts_ = nullptr |
| unsigned int | global_count_ = 0 |
| SimTime_t | end_time_ = 0 |
| bool | single_rank_ = true |
| Core::ThreadSafe::Spinlock | slock_ |
Additional Inherited Members | |
Static Public Attributes inherited from SST::Core::Serialization::serializable | |
| static constexpr uint32_t | NullClsId = std::numeric_limits<uint32_t>::max() |
Static Public Attributes inherited from SST::Core::Serialization::serializable_base | |
| static constexpr uint32_t | NullClsId = std::numeric_limits<uint32_t>::max() |
Protected Types inherited from SST::Core::Serialization::serializable_base | |
| enum | cxn_flag_t { ConstructorFlag } |
Protected Member Functions inherited from SST::Action | |
| void | endSimulation () |
| Called to signal to the Simulation object to end the simulation. | |
| void | endSimulation (SimTime_t end) |
| Called to signal to the Simulation object to end the simulation. More... | |
| void | serialize_order (SST::Core::Serialization::serializer &ser) override |
Protected Member Functions inherited from SST::Activity | |
| void | setPriority (uint64_t priority) |
| Set the priority of the Activity. | |
| std::string | getDeliveryTimeInfo () const |
| Gets the delivery time info as a string. More... | |
| void | serialize_order (SST::Core::Serialization::serializer &ser) override |
| ImplementVirtualSerializable (SST::Activity) | |
Static Protected Member Functions inherited from SST::Core::Serialization::serializable_base | |
| static void | serializable_abort (uint32_t line, const char *file, const char *func, const char *obj) |
Tracks the number of components that have requested DoNotEndSim. Once that count reaches 0, the Exit object will end the simulation.
| SST::Exit::Exit | ( | int | num_threads, |
| bool | single_rank | ||
| ) |
Create a new ExitEvent.
| num_threads | number of threads on the rank |
| single_rank | True if there are no other ranks |
References SST::Activity::setPriority().
| void SST::Exit::check | ( | ) |
Function called by SyncManager to check to see if it's time to exit.
This call synchronizes across ranks.
References computeEndTime().
Referenced by execute(), and SST::SyncManager::execute().
| SimTime_t SST::Exit::computeEndTime | ( | ) |
Computes the end time of the simulation.
This call synchronizes across ranks.
References SST::Action::endSimulation().
Referenced by check().
|
inline |
Gets the end time of the simulation.
Referenced by SST::SyncManager::execute().
|
inline |
Get the global ref_count.
This is only valid after check() is called
Referenced by SST::SyncManager::execute().
| unsigned int SST::Exit::getRefCount | ( | ) |
Get the current local reference count.
Referenced by SST::SyncManager::execute().
| void SST::Exit::refDec | ( | uint32_t | thread | ) |
Decrement reference count on a given thread.
| thread | number of Component making call |
References SST::Output::fatal(), SST::Simulation_impl::getCurrentSimCycle(), SST::Simulation_impl::getSimulation(), SST::Simulation_impl::getSimulationOutput(), and SST::Simulation_impl::insertActivity().
Referenced by SST::BaseComponent::primaryComponentOKToEndSim().
| void SST::Exit::refInc | ( | uint32_t | thread | ) |
Increment reference count on a given thread.
| thread | number of Component making call |
Referenced by SST::BaseComponent::primaryComponentDoNotEndSim().
|
inline |
Stores the time the simulation has ended.
| time | Current simulation time |
Referenced by SST::Simulation_impl::endSimulation().
|
overridevirtual |
Creates a string representation of the Exit object.
Reimplemented from SST::Activity.
References SST::Activity::getDeliveryTime(), and SST::Activity::getPriority().