sst-core
sst-core copied to clipboard
Add SubComponent to "Key Interfaces" documentation.
I suggest adding SubComponent to the "Key Interfaces" section of SST-Core documentation: http://sst-simulator.org/SSTDoxygen/11.0.0_docs/html/interfaces.html
Here are the key points that should be understood - if any of these are wrong it is because there isn't documentation :)
- Components don't have explicit pointers to each other and may execute in different process spaces.
- Events between Components must be serializable if the two components execute in different processes (i.e., MPI). It is recommended just to design all inter-component events to be serializable.
- A SubComponent is a slot inside a Component specified by a base class. Any SubComponent derived class can be placed in this slot. This allows structure and functionality to be separately configured (for example, the Component may require a random number generator, the SubComponent is an implementation of a random number generator).
- Components can obtain pointers to their SubComponents allowing them to execute functionality directly (i.e., zero simulation time required in communication, example:
mysubcomp->giveMeInfoRightNow()). - Two SubComponents under the same Component can refer directly to each other via pointers (same functionality as 4).