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" 21 #include <unordered_set> 42 Exit(
int num_threads,
bool single_rank);
51 void refInc(uint32_t thread);
58 void refDec(uint32_t thread);
105 std::string
toString()
const override;
123 Exit& operator=(
const Exit&) =
delete;
125 int num_threads_ = 0;
126 unsigned int ref_count_ = 0;
127 unsigned int* thread_counts_ =
nullptr;
128 unsigned int global_count_ = 0;
129 SimTime_t end_time_ = 0;
130 bool single_rank_ =
true;
137 #endif // SST_CORE_EXIT_H An Action is a schedulable Activity which is not an Event.
Definition: action.h:26
unsigned int getRefCount()
Get the current local reference count.
Definition: exit.cc:82
void refInc(uint32_t thread)
Increment reference count on a given thread.
Definition: exit.cc:46
Exit Action.
Definition: exit.h:33
void setEndTime(SimTime_t time)
Stores the time the simulation has ended.
Definition: exit.h:79
unsigned int getGlobalCount()
Get the global ref_count.
Definition: exit.h:113
void refDec(uint32_t thread)
Decrement reference count on a given thread.
Definition: exit.cc:54
void check()
Function called by SyncManager to check to see if it's time to exit.
Definition: exit.cc:112
Definition: threadsafe.h:135
Exit(int num_threads, bool single_rank)
Create a new ExitEvent.
Definition: exit.cc:28
SimTime_t getEndTime()
Gets the end time of the simulation.
Definition: exit.h:72
SimTime_t computeEndTime()
Computes the end time of the simulation.
Definition: exit.cc:95
std::string toString() const override
Creates a string representation of the Exit object.
Definition: exit.cc:135
void execute() override
Function called when Exit fires in the TimeVortex.
Definition: exit.cc:88