SST  15.1.0
StructuralSimulationToolkit
SST::ConfigLink Class Reference

Represents the configuration of a generic Link. More...

#include <configGraph.h>

Public Member Functions

LinkId_t key () const
 
SimTime_t getMinLatency () const
 Return the minimum latency of this link (from both sides)
 
std::string latency_str (uint32_t index) const
 
void setAsNonLocal (int which_local, RankInfo remote_rank_info)
 Sets the link as a non-local link. More...
 
void print (std::ostream &os) const
 Print the Link information.
 
void serialize_order (SST::Core::Serialization::serializer &ser)
 

Data Fields

ComponentId_t component [2] = { 0, 0 }
 Components that are connected to this link. More...
 
SimTime_t latency [2] = { 0, 0 }
 This is a dual purpose data member. More...
 
std::string name
 Name of the link. More...
 
LinkId_t id = 0
 id of the link. More...
 
LinkId_t order = 0
 This is a dual purpose data member. More...
 
std::string port [2]
 Name of the ports the link is connected to. More...
 
bool no_cut = false
 Whether or not this link is set to be no-cut.
 
bool nonlocal = false
 Whether this link crosses the graph boundary and is connected on one end to a non-local component. More...
 
bool cross_rank = false
 Set to true if this is a cross rank link.
 
bool cross_thread = false
 Set to true if this is a cross thread link on same rank.
 

Friends

class ConfigGraph
 

Detailed Description

Represents the configuration of a generic Link.

Member Function Documentation

◆ setAsNonLocal()

void SST::ConfigLink::setAsNonLocal ( int  which_local,
RankInfo  remote_rank_info 
)

Sets the link as a non-local link.

Parameters
which_localspecifies which index is for the local side of the link
remote_rank_infoRank of the remote side of the link

References component, latency, nonlocal, and port.

Field Documentation

◆ component

ComponentId_t SST::ConfigLink::component[2] = { 0, 0 }

Components that are connected to this link.

They are filled in the order they are attached in. If the link is marked as non-local, then component[1] holds the rank of the remote component.IDs of the connected components

Referenced by SST::ConfigGraph::addLink(), SST::ConfigGraph::addNonLocalLink(), SST::ConfigGraph::checkForStructuralErrors(), SST::ConfigComponent::checkPorts(), SST::Simulation_impl::processGraphInfo(), and setAsNonLocal().

◆ id

LinkId_t SST::ConfigLink::id = 0

id of the link.

This is used primarily to find the link in ConfigGraph::links

Referenced by SST::ConfigGraph::addLink().

◆ latency

SimTime_t SST::ConfigLink::latency[2] = { 0, 0 }

This is a dual purpose data member.

Graph construction - during graph construction, it holds the index into the LinkLatencyVector, which maps the stored index to the actual latency string. This is done to reduce memory usage because we assume there will be a small number of different latencies specified.

Post graph construction - after graph construction, the latency index is replaced with the SimTime_t value representing the specified latency that will be used by the link to add the specified latency to the event.

In both cases, the indices match the indices found in the component array, and represent the latency of the link for events sent from the corresponding component.

If the link is marked as non-local, then latency[1] holds the thread of the remote component.

Referenced by SST::ConfigGraph::addLink(), SST::ConfigGraph::addNonLocalLink(), SST::ConfigGraph::createLink(), and setAsNonLocal().

◆ name

std::string SST::ConfigLink::name

Name of the link.

This is used in three cases:

Errors - if an error is found in the graph construction, the name is used to report the error to the user

Link ordering - the event ordering for links is based on the alphabetized name of the links. The links are sorted by name and order is assigned linearly starting at 1

Parallel load - for parallel load, links that cross partition boundaries are connected by matching link names

Referenced by SST::ConfigGraph::addLink(), SST::ConfigGraph::addNonLocalLink(), SST::ConfigGraph::checkForStructuralErrors(), SST::ConfigComponent::checkPorts(), and SST::ConfigGraph::postCreationCleanup().

◆ nonlocal

bool SST::ConfigLink::nonlocal = false

Whether this link crosses the graph boundary and is connected on one end to a non-local component.

If set to true, there will only be one component connected (information in index 0 for the arrays) and the rank for the remote component will be stored in component[1] and the thread in latency[1].

Referenced by SST::ConfigGraph::addLink(), SST::ConfigGraph::addNonLocalLink(), SST::Simulation_impl::processGraphInfo(), and setAsNonLocal().

◆ order

LinkId_t SST::ConfigLink::order = 0

This is a dual purpose data member.

During graph construction, it counts the number of components currently referencing this link. After graph construction, it is assigned the value used to enforce ordering of events based on the links they were sent on.

See also
Activity::setOrderTag, Link::tag

Referenced by SST::ConfigGraph::addLink(), SST::ConfigGraph::addNonLocalLink(), and SST::ConfigGraph::checkForStructuralErrors().

◆ port

std::string SST::ConfigLink::port[2]

Name of the ports the link is connected to.

The indices match the ones used in the component array

Referenced by SST::ConfigGraph::addLink(), SST::ConfigComponent::checkPorts(), and setAsNonLocal().


The documentation for this class was generated from the following files: