|
SST 16.1.0
Structural Simulation Toolkit
|
Link between two components. More...
#include <link.h>
Data Structures | |
| class | AttachPoint |
| Attach point for inspecting, modifying or dropping events sent on the Link. More... | |
Public Member Functions | |
| void | addSendLatency (int cycles, const std::string &timebase) |
| Set additional Latency to be added to events being sent out of this Link. | |
| void | addSendLatency (SimTime_t cycles, TimeConverter timebase) |
| Set additional Latency to be added to events being sent out of this Link. | |
| void | addRecvLatency (int cycles, const std::string &timebase) |
| Set additional latency to be added on to events coming in on this Link. | |
| void | addRecvLatency (SimTime_t cycles, TimeConverter timebase) |
| Set additional latency to be added on to events coming in on this Link. | |
| void | setFunctor (Event::HandlerBase *functor) |
| Set the callback function to be called when a message is delivered. | |
| void | replaceFunctor (Event::HandlerBase *functor) |
| Replace the callback function to be called when a message is delivered. | |
| Event::HandlerBase * | getFunctor () |
| Get the callback function to be called when a message is delivered. | |
| void | send (SimTime_t delay, TimeConverter tc, Event *event) |
| Sends an Event over a Link with an additional delay specified with a TimeConverter. | |
| void | send (SimTime_t delay, Event *event) |
| Sends an event over a Link with additional delay specified by the Link's default timebase. | |
| void | send (Event *event) |
| Send an Event with no additional delay. | |
| Event * | recv () |
| Retrieve a pending Event from the Link. | |
| void | setDefaultTimeBase (TimeConverter tc) |
| Manually set the default defaultTimeBase. | |
| TimeConverter | getDefaultTimeBase () |
| Return the default timebase for this Link. | |
| LinkId_t | getId () |
| Return the ID of this Link. | |
| void | sendUntimedData (Event *data) |
| Send data during the init() or complete() phase. | |
| Event * | recvUntimedData () |
| Receive an Event (if any) during the init() or complete() phase. | |
| bool | isConfigured () |
| Return whether Link has been configured. | |
Protected Member Functions | |
| void | setAsSyncLink () |
| void | setDeliveryInfo (uintptr_t info) |
| Set the delivery_info for the Link. | |
| void | setTag (uint32_t new_tag) |
| Set the tag field for event link ordering. | |
| SimTime_t | getLatency () |
| Get the latency on the link in units of core atomic time base. | |
| uintptr_t | getDeliveryInfo () |
| Get the delivery_info for the link. | |
| Link * | getPairLink () |
| Get the pair_link. | |
| void | send_impl (SimTime_t delay, Event *event) |
| Sends an Event over a Link with an additional delay specified with a TimeConverter. | |
Static Protected Member Functions | |
| static void | updateEventDeliveryInfo (Event *event, uintptr_t delivery_info) |
| Updates the delivery info in an event. | |
Protected Attributes | |
| ActivityQueue * | send_queue |
| Queue of events to be received by the owning component. | |
| uintptr_t | delivery_info |
| Holds the delivery information. | |
| SimTime_t | defaultTimeBase |
| Timebase used if no other timebase is specified. | |
| SimTime_t | latency |
| Latency of the Link. | |
| Link * | pair_link |
| Pointer to the opposite side of this Link. | |
Static Protected Attributes | |
| static bool | is_restart_same_parallelism = false |
| Variable used by Link restarts to know whether stored rank data for remote links is still valid (i.e. | |
Friends | |
| class | SST::Core::Serialization::serialize_impl< Link * > |
| class | LinkPair |
| class | RankSync |
| class | ThreadSync |
| class | Simulation |
| class | SyncManager |
| class | ComponentInfo |
| class | BaseComponent |
Link between two components.
Carries events
| void SST::Link::addRecvLatency | ( | int | cycles, |
| const std::string & | timebase ) |
Set additional latency to be added on to events coming in on this Link.
| cycles | Number of cycles to be added |
| timebase | Base units of cycles |
References SST::TimeLord::getSimCycles(), SST::Simulation::getSimulation(), SST::Simulation::getTimeLord(), latency, and pair_link.
| void SST::Link::addRecvLatency | ( | SimTime_t | cycles, |
| TimeConverter | timebase ) |
Set additional latency to be added on to events coming in on this Link.
| cycles | Number of cycles to be added |
| timebase | Base units of cycles |
References SST::TimeConverter::convertToCoreTime(), latency, and pair_link.
| void SST::Link::addSendLatency | ( | int | cycles, |
| const std::string & | timebase ) |
Set additional Latency to be added to events being sent out of this Link.
| cycles | Number of cycles to be added |
| timebase | Base units of cycles |
References SST::TimeLord::getSimCycles(), SST::Simulation::getSimulation(), SST::Simulation::getTimeLord(), and latency.
| void SST::Link::addSendLatency | ( | SimTime_t | cycles, |
| TimeConverter | timebase ) |
Set additional Latency to be added to events being sent out of this Link.
| cycles | Number of cycles to be added |
| timebase | Base units of cycles |
References SST::TimeConverter::convertToCoreTime(), and latency.
| TimeConverter SST::Link::getDefaultTimeBase | ( | ) |
Return the default timebase for this Link.
References defaultTimeBase, SST::Simulation::getSimulation(), SST::TimeLord::getTimeConverter(), and SST::Simulation::getTimeLord().
|
inlineprotected |
Get the delivery_info for the link.
References delivery_info.
| Event::HandlerBase * SST::Link::getFunctor | ( | ) |
Get the callback function to be called when a message is delivered.
Polling Links will return nullptr.
References delivery_info, and pair_link.
|
inline |
Return the ID of this Link.
Referenced by SST::RankSyncParallelSkip::registerLink(), SST::RankSyncSerialSkip::registerLink(), and SST::ThreadSyncSimpleSkip::registerLink().
|
inlineprotected |
Get the latency on the link in units of core atomic time base.
NOTE: This is a core only API and not part of the public stable API
References latency.
|
inlineprotected |
Get the pair_link.
References pair_link.
|
inline |
| Event * SST::Link::recv | ( | ) |
Retrieve a pending Event from the Link.
For Links which do not have a set event handler, they can be polled with this function. Returns nullptr if there is no pending Event. Not available for HANDLER-type Links.
References SST::ActivityQueue::empty(), SST::Output::fatal(), SST::ActivityQueue::front(), SST::Simulation::getCurrentSimCycle(), SST::Activity::getDeliveryTime(), SST::Simulation::getSimulation(), SST::Simulation::getSimulationOutput(), pair_link, SST::ActivityQueue::pop(), and send_queue.
| Event * SST::Link::recvUntimedData | ( | ) |
Receive an Event (if any) during the init() or complete() phase.
References SST::ActivityQueue::empty(), SST::ActivityQueue::front(), SST::Activity::getDeliveryTime(), SST::Simulation::getSimulation(), pair_link, SST::ActivityQueue::pop(), and send_queue.
| void SST::Link::replaceFunctor | ( | Event::HandlerBase * | functor | ) |
Replace the callback function to be called when a message is delivered.
Any previous handler will be deleted. Not available for Polling Links.
| functor | Functor to call when message is delivered |
References delivery_info, SST::Output::fatal(), SST::Simulation::getSimulation(), SST::Simulation::getSimulationOutput(), pair_link, and SST::SSTHandlerBase< returnT, argT >::transferAttachedToolInfo().
|
inline |
|
inline |
Sends an event over a Link with additional delay specified by the Link's default timebase.
References defaultTimeBase, and send_impl().
|
inline |
Sends an Event over a Link with an additional delay specified with a TimeConverter.
I.e. the total delay is the Link's delay + the additional specified delay.
| delay | Additional delay |
| tc | TimeConverter to specify timebase for the additional delay |
| event | Event to send |
References SST::TimeConverter::convertToCoreTime(), and send_impl().
|
protected |
Sends an Event over a Link with an additional delay specified with a TimeConverter.
I.e. the total delay is the Link's delay + the additional specified delay.
| delay | Additional total delay to add in units of the core timebase |
| event | Event to send |
References delivery_info, SST::Output::fatal(), SST::Simulation::getSimulation(), SST::Simulation::getSimulationOutput(), SST::ActivityQueue::insert(), latency, pair_link, and send_queue.
| void SST::Link::sendUntimedData | ( | Event * | data | ) |
Send data during the init() or complete() phase.
| Data | event to send |
References delivery_info, SST::Output::fatal(), SST::Simulation::getSimulation(), SST::Simulation::getSimulationOutput(), SST::ActivityQueue::insert(), pair_link, send_queue, and SST::Activity::setDeliveryTime().
| void SST::Link::setDefaultTimeBase | ( | TimeConverter | tc | ) |
Manually set the default defaultTimeBase.
| tc | TimeConverter object for the timebase |
References defaultTimeBase, and SST::TimeConverter::getFactor().
|
inlineprotected |
Set the delivery_info for the Link.
References delivery_info.
| void SST::Link::setFunctor | ( | Event::HandlerBase * | functor | ) |
Set the callback function to be called when a message is delivered.
Not available for Polling Links.
| functor | Functor to call when message is delivered |
References delivery_info, SST::Output::fatal(), SST::Simulation::getSimulation(), SST::Simulation::getSimulationOutput(), and pair_link.
|
inlineprotected |
|
inlinestaticprotected |
Updates the delivery info in an event.
This is used during a restart and is implemented here because Link is a friend of Event.
| event | Event to update |
| delivery_info | New delivery info (pointer to handler cast as uintptr_t) |
References delivery_info.
|
protected |
Timebase used if no other timebase is specified.
Used to specify the units for added delays when sending, such as in Link::send(). Often set by the Component::registerClock() function if the regAll argument is true.
Referenced by SST::BaseComponent::configureLink(), getDefaultTimeBase(), send(), and setDefaultTimeBase().
|
protected |
Holds the delivery information.
This is stored as a uintptr_t, but is actually a pointer converted using reinterpret_cast. For Links connected to a Component/SubComponent, this holds a pointer to the delivery functor. For Links connected to a Sync object, this holds a pointer to the remote Link to send the event on after synchronization.
Referenced by getDeliveryInfo(), SST::ThreadSync::getDeliveryInfo(), getFunctor(), replaceFunctor(), send_impl(), sendUntimedData(), setDeliveryInfo(), setFunctor(), and updateEventDeliveryInfo().
|
staticprotected |
Variable used by Link restarts to know whether stored rank data for remote links is still valid (i.e.
did we restart with the exact same rank/thread count or not).
|
protected |
Latency of the Link.
It is used by the partitioner as the weight. This latency is added to the delay put on the event by the component.
Referenced by addRecvLatency(), addRecvLatency(), addSendLatency(), addSendLatency(), getLatency(), SST::ThreadSync::getLatency(), and send_impl().
|
protected |
Pointer to the opposite side of this Link.
Referenced by addRecvLatency(), addRecvLatency(), getFunctor(), getPairLink(), SST::ThreadSync::getPairLink(), recv(), recvUntimedData(), replaceFunctor(), send_impl(), sendUntimedData(), setFunctor(), and setTag().
|
protected |
Queue of events to be received by the owning component.
Referenced by recv(), recvUntimedData(), send_impl(), and sendUntimedData().