12 #ifndef SST_CORE_CORE_EXIT_H 13 #define SST_CORE_CORE_EXIT_H 15 #include "sst/core/action.h" 16 #include "sst/core/sst_types.h" 17 #include "sst/core/threadsafe.h" 20 #include <unordered_set> 24 #define _EXIT_DBG(fmt, args...) __DBG(DBG_EXIT, Exit, fmt, ##args) 50 Exit(
int num_threads,
bool single_rank);
54 bool refInc(ComponentId_t, uint32_t thread);
56 bool refDec(ComponentId_t, uint32_t thread);
58 unsigned int getRefCount();
83 void print(
const std::string& header,
Output& out)
const override 86 "%s Exit Action to be delivered at %" PRIu64
" with priority %d\n", header.c_str(),
getDeliveryTime(),
91 unsigned int getGlobalCount() {
return global_count; }
103 void operator=(
Exit const&);
109 unsigned int m_refCount;
110 unsigned int* m_thread_counts;
111 unsigned int global_count;
112 std::unordered_set<ComponentId_t> m_idSet;
115 Core::ThreadSafe::Spinlock slock;
122 #endif // SST_CORE_EXIT_H Output object provides consistent method for outputting data to stdout, stderr and/or sst debug file...
Definition: output.h:53
An Action is a schedulable Activity which is not an Event.
Definition: action.h:26
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:35
int getPriority() const
Return the Priority of this Activity.
Definition: activity.h:147
bool refInc(ComponentId_t, uint32_t thread)
Increment Reference Count for a given Component ID.
Definition: exit.cc:52
bool refDec(ComponentId_t, uint32_t thread)
Decrement Reference Count for a given Component ID.
Definition: exit.cc:87
void print(const std::string &header, Output &out) const override
Definition: exit.h:83
Exit Event Action.
Definition: exit.h:34
void setEndTime(SimTime_t time)
Stores the time the simulation has ended.
Definition: exit.h:69
void output(uint32_t line, const char *file, const char *func, const char *format,...) const
Output the message with formatting as specified by the format parameter.
Definition: output.h:184
SimTime_t getDeliveryTime() const
Return the time at which this Activity will be delivered.
Definition: activity.h:144
Exit(int num_threads, bool single_rank)
Create a new ExitEvent.
Definition: exit.cc:31
void serialize_order(SST::Core::Serialization::serializer &ser) override
TODO to enable different partitioning on restart, will need to associate m_thread_counts and m_idSet ...
Definition: exit.cc:188
void execute(void) override
Function which will be called when the time for this Activity comes to pass.
Definition: exit.cc:133
SimTime_t getEndTime()
Gets the end time of the simulation.
Definition: exit.h:63
SimTime_t computeEndTime()
Computes the end time of the simulation.
Definition: exit.cc:143