14#ifndef SST_CORE_MODEL_CONFIGLINK_H
15#define SST_CORE_MODEL_CONFIGLINK_H
17#include "sst/core/rankInfo.h"
18#include "sst/core/sst_types.h"
31namespace Core::Serialization {
41 static std::map<std::string, uint32_t> lat_to_index;
43 static uint32_t getIndexForLatency(
const char* latency);
44 static std::vector<SimTime_t> initializeLinkLatencyVector();
45 SimTime_t getLatencyFromIndex(uint32_t index);
56 ComponentId_t
component_[2] = { UNSET_COMPONENT_ID, UNSET_COMPONENT_ID };
138 inline LinkId_t
key()
const {
return id_; }
173 os <<
"Link " <<
name_ <<
" (id = " <<
id_ <<
")" << std::endl;
174 os <<
" nonlocal = " <<
nonlocal_ << std::endl;
175 os <<
" component[0] = " <<
component_[0] << std::endl;
176 os <<
" port[0] = " <<
port_[0] << std::endl;
177 os <<
" latency[0] = " <<
latency_[0] << std::endl;
178 os <<
" component[1] = " <<
component_[1] << std::endl;
179 os <<
" port[1] = " <<
port_[1] << std::endl;
180 os <<
" latency[1] = " <<
latency_[1] << std::endl;
209 ConfigLink(LinkId_t
id,
const std::string& n) :
215 void updateLatencies();
223 ComponentId_t component_[2];
224 SimTime_t latency_[2];
237 inline LinkId_t key()
const {
return id_; }
242 if ( latency_[0] < latency_[1] )
return latency_[0];
249 os <<
" Link " << id_ << std::endl;
250 os <<
" component[0] = " << component_[0] << std::endl;
251 os <<
" latency[0] = " << latency_[0] << std::endl;
252 os <<
" component[1] = " << component_[1] << std::endl;
253 os <<
" latency[1] = " << latency_[1] << std::endl;
A Configuration Graph A graph representing Components and Links.
Definition configGraph.h:76
Represents the configuration of a generic Link.
Definition configLink.h:37
bool cross_thread_
Set to true if this is a cross thread link on same rank.
Definition configLink.h:130
std::string port_[2]
Name of the ports the link is connected to.
Definition configLink.h:106
std::string name_
Name of the link.
Definition configLink.h:92
bool cross_rank_
Set to true if this is a cross rank link.
Definition configLink.h:125
LinkId_t key() const
Function used when storing ConfigLinks in a SparseVectorMap.
Definition configLink.h:138
void setAsNonLocal(int which_local, RankInfo remote_rank_info)
Sets the link as a non-local link.
Definition configLink.cc:73
ComponentId_t component_[2]
Components that are connected to this link.
Definition configLink.h:56
std::string latency_str(uint32_t index) const
Gets the latency as a string from the id stored in latency[].
Definition configLink.cc:64
bool no_cut_
Whether or not this link is set to be no-cut.
Definition configLink.h:111
void serialize_order(SST::Core::Serialization::serializer &ser)
Serializes the ConfigLink.
Definition configLink.h:189
bool nonlocal_
Whether this link crosses the graph boundary and is connected on one end to a non-local component.
Definition configLink.h:120
SimTime_t latency_[2]
This is a dual purpose data member.
Definition configLink.h:79
LinkId_t id_
id of the link.
Definition configLink.h:100
SimTime_t getMinLatency() const
Return the minimum latency of this link (from both sides).
Definition configLink.h:143
void print(std::ostream &os) const
Print the Link information.
Definition configLink.h:171
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition serializer.h:43
SimTime_t getMinLatency() const
Return the minimum latency of this link (from both sides).
Definition configLink.h:240
void print(std::ostream &os) const
Print the Link information.
Definition configLink.h:247