12 #ifndef SST_CORE_EVENT_H 13 #define SST_CORE_EVENT_H 15 #include "sst/core/activity.h" 16 #include "sst/core/sst_types.h" 17 #include "sst/core/ssthandler.h" 60 template <
typename classT,
typename dataT =
void>
66 template <
typename classT, auto funcT,
typename dataT =
void>
77 #if __SST_DEBUG_EVENT_TRACKING__ 88 #ifdef __SST_DEBUG_EVENT_TRACKING__ 90 virtual void printTrackingInfo(
const std::string& header,
Output& out)
const override 93 "%s Event first sent from: %s:%s (type: %s) and last received by %s:%s (type: %s)\n", header.c_str(),
94 first_comp.c_str(), first_port.c_str(), first_type.c_str(), last_comp.c_str(), last_port.c_str(),
98 const std::string& getFirstComponentName() {
return first_comp; }
99 const std::string& getFirstComponentType() {
return first_type; }
100 const std::string& getFirstPort() {
return first_port; }
101 const std::string& getLastComponentName() {
return last_comp; }
102 const std::string& getLastComponentType() {
return last_type; }
103 const std::string& getLastPort() {
return last_port; }
105 void addSendComponent(
const std::string& comp,
const std::string& type,
const std::string& port)
107 if ( first_comp ==
"" ) {
113 void addRecvComponent(
const std::string& comp,
const std::string& type,
const std::string& port)
124 Activity::serialize_order(ser);
126 #ifdef __SST_DEBUG_EVENT_TRACKING__ 145 friend class NullEvent;
146 friend class RankSync;
147 friend class ThreadSync;
148 friend class TimeVortex;
152 void execute(
void)
override;
167 inline void setDeliveryInfo(LinkId_t tag, uintptr_t delivery_info)
170 this->delivery_info = delivery_info;
174 inline Link* getDeliveryLink() {
return reinterpret_cast<Link*
>(delivery_info); }
177 inline LinkId_t getTag(
void)
const {
return getOrderTag(); }
188 uintptr_t delivery_info;
191 static std::atomic<uint64_t> id_counter;
193 #ifdef __SST_DEBUG_EVENT_TRACKING__ 194 std::string first_comp;
195 std::string first_type;
196 std::string first_port;
197 std::string last_comp;
198 std::string last_type;
199 std::string last_port;
221 const ComponentId_t comp_id;
222 const std::string comp_name;
223 const std::string comp_type;
224 const std::string port_name;
227 ComponentId_t
id,
const std::string& cname,
const std::string& ctype,
const std::string& pname) :
239 #endif // SST_CORE_EVENT_H Output object provides consistent method for outputting data to stdout, stderr and/or sst debug file...
Definition: output.h:53
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:35
Handlers with 1 handler defined argument to callback from caller.
Definition: ssthandler.h:210
Base class for all Activities in the SST Event Queue.
Definition: activity.h:45
Base template for the class.
Definition: ssthandler.h:466
Handler class with user-data argument.
Definition: ssthandler.h:284
void setOrderTag(uint32_t tag)
Sets the order tag.
Definition: activity.h:150
void setPriority(uint64_t priority)
Set the priority of the Activity.
Definition: activity.h:181
std::pair< uint64_t, int > id_type
Type definition of unique identifiers.
Definition: event.h:70
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
static const id_type NO_ID
Constant, default value for id_types.
Definition: event.h:72
ImplementVirtualSerializable(SST::Activity) void setQueueOrder(uint64_t order)
Set a new Queue order.
Definition: activity.h:205
Empty Event.
Definition: event.h:208
id_type generateUniqueId()
Generates an ID that is unique across ranks, components and events.
Definition: event.cc:45
Base class for Events - Items sent across links to communicate between components.
Definition: event.h:34
virtual Event * clone()
Clones the event in for the case of a broadcast.
Definition: event.cc:35
uint32_t getOrderTag() const
Return the order tag associated with this activity.
Definition: activity.h:153