12 #ifndef SST_CORE_COMPONENTINFO_H 13 #define SST_CORE_COMPONENTINFO_H 15 #include <sst/core/sst_types.h> 16 #include <sst/core/params.h> 18 #include <unordered_set> 27 class ConfigComponent;
28 class ComponentInfoMap;
30 namespace Statistics {
43 const ComponentId_t id;
44 const std::string name;
45 const std::string slot_name;
47 const std::string type;
51 std::vector<ComponentInfo> subComponents;
54 statEnableList_t * enabledStats;
55 std::vector<double> coordinates;
57 inline void setComponent(
BaseComponent* comp) { component = comp; }
61 void finalizeLinkConfiguration();
62 void prepareForComplete();
73 inline ComponentId_t getID()
const {
return id; }
75 inline const std::string& getName()
const {
return name; }
77 inline const std::string& getSlotName()
const {
return slot_name; }
79 inline int getSlotNum()
const {
return slot_num; }
81 inline const std::string& getType()
const {
return type; }
83 inline BaseComponent* getComponent()
const {
return component; }
85 inline LinkMap* getLinkMap()
const {
return link_map; }
87 inline const Params* getParams()
const {
return params; }
90 inline std::vector<ComponentInfo>& getSubComponents() {
return subComponents; }
92 ComponentInfo* findSubComponent(std::string slot,
int slot_num);
94 std::vector<LinkId_t> getAllLinkIds()
const;
96 statEnableList_t* getStatEnableList() {
return enabledStats; }
100 std::hash<std::string> hash;
101 return hash(info->name);
107 return lhs->name == rhs->name;
113 std::hash<ComponentId_t> hash;
114 return hash(info->id);
120 return lhs->id == rhs->id;
128 std::unordered_set<ComponentInfo*, ComponentInfo::HashID, ComponentInfo::EqualsID> dataByID;
131 typedef std::unordered_set<ComponentInfo*, ComponentInfo::HashID, ComponentInfo::EqualsID>::const_iterator const_iterator;
133 const_iterator begin()
const {
134 return dataByID.begin();
137 const_iterator end()
const {
138 return dataByID.end();
144 dataByID.insert(info);
149 auto value = dataByID.find(&infoKey);
150 if ( value == dataByID.end() )
return NULL;
151 if ( SUBCOMPONENT_ID_MASK(key) != 0 ) {
153 return (*value)->findSubComponent(key);
159 return dataByID.empty();
163 for (
auto i : dataByID ) {
172 #endif // SST_CORE_COMPONENTINFO_H Main control class for a SST Simulation.
Definition: simulation.h:72
std::vector< Statistics::StatisticInfo > statEnableList_t
Definition: componentInfo.h:37
Maps port names to the Links that are connected to it.
Definition: linkMap.h:28
Represents the configuration of a generic component.
Definition: configGraph.h:195
Definition: componentInfo.h:118
Definition: componentInfo.h:126
Definition: componentInfo.h:98
Main component object for the simulation.
Definition: baseComponent.h:104
Definition: componentInfo.h:111
Definition: componentInfo.h:105
Parameter store.
Definition: params.h:45
Definition: componentInfo.h:34