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"
57 template <
typename classT,
typename dataT =
void>
68 #if __SST_DEBUG_EVENT_TRACKING__
81 inline void setDeliveryInfo(LinkId_t
id,
HandlerBase* f)
83 #ifdef SST_ENFORCE_EVENT_ORDERING
84 enforce_link_order = id;
92 #if !SST_BUILDING_CORE
94 deprecated(
"this function was not intended to be used outside of SST Core and will be removed in SST 12.")))
100 #ifdef SST_ENFORCE_EVENT_ORDERING
101 enforce_link_order = id;
109 #if !SST_BUILDING_CORE
111 deprecated("this function was not intended to be used outside of SST Core and will be removed in SST 12.")))
121 #if !SST_BUILDING_CORE
123 deprecated("this function was not intended to be used outside of SST Core and will be removed in SST 12.")))
133 #if !SST_BUILDING_CORE
135 deprecated("this function was not intended to be used outside of SST Core and will be removed in SST 12.")))
141 #ifdef SST_ENFORCE_EVENT_ORDERING
142 return enforce_link_order;
149 #ifdef __SST_DEBUG_EVENT_TRACKING__
151 virtual void printTrackingInfo(
const std::string& header,
Output& out)
const
154 "%s Event first sent from: %s:%s (type: %s) and last received by %s:%s (type: %s)\n", header.c_str(),
155 first_comp.c_str(), first_port.c_str(), first_type.c_str(), last_comp.c_str(), last_port.c_str(),
159 const std::string& getFirstComponentName() {
return first_comp; }
160 const std::string& getFirstComponentType() {
return first_type; }
161 const std::string& getFirstPort() {
return first_port; }
162 const std::string& getLastComponentName() {
return last_comp; }
163 const std::string& getLastComponentType() {
return last_type; }
164 const std::string& getLastPort() {
return last_port; }
166 void addSendComponent(
const std::string& comp,
const std::string& type,
const std::string& port)
168 if ( first_comp ==
"" ) {
174 void addRecvComponent(
const std::string& comp,
const std::string& type,
const std::string& port)
185 Activity::serialize_order(ser);
186 #ifndef SST_ENFORCE_EVENT_ORDERING
189 #ifdef __SST_DEBUG_EVENT_TRACKING__
210 static std::atomic<uint64_t> id_counter;
213 #ifndef SST_ENFORCE_EVENT_ORDERING
217 #ifdef __SST_DEBUG_EVENT_TRACKING__
218 std::string first_comp;
219 std::string first_type;
220 std::string first_port;
221 std::string last_comp;
222 std::string last_type;
223 std::string last_port;
245 #endif // SST_CORE_EVENT_H
Output object provides consistent method for outputting data to stdout, stderr and/or sst debug file...
Definition: output.h:51
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:34
Definition: ssthandler.h:100
LinkId_t getLinkId(void) const
Gets the link id associated with this event.
Definition: event.h:134
Base class for all Activities in the SST Event Queue.
Definition: activity.h:48
Event Handler class with user-data argument.
Definition: ssthandler.h:115
Null Event.
Definition: event.h:232
Link * delivery_link
Link used for delivery.
Definition: event.h:201
SSTHandlerBase< void, Event *, false > HandlerBase
Base handler for event delivery.
Definition: event.h:37
void execute(void) override
Cause this event to fire.
Definition: event.cc:27
Link * getDeliveryLink()
Gets the link id used for delivery.
Definition: event.h:110
std::pair< uint64_t, int > id_type
Type definition of unique identifiers.
Definition: event.h:61
void setPriority(int priority)
Set the priority of the Activity.
Definition: activity.h:483
static const id_type NO_ID
Constant, default value for id_types.
Definition: event.h:63
void setDeliveryLink(LinkId_t id, Link *link)
Sets the link id used for delivery.
Definition: event.h:93
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:182
void setRemoteEvent()
For use by SST Core only.
Definition: event.h:122
id_type generateUniqueId()
Generates an ID that is unique across ranks, components and events.
Definition: event.cc:43
Base class for Events - Items sent across links to communicate between components.
Definition: event.h:31
Link between two components.
Definition: link.h:31
virtual Event * clone()
Clones the event in for the case of a broadcast.
Definition: event.cc:33
Definition: serializable.h:138