sst-core icon indicating copy to clipboard operation
sst-core copied to clipboard

Add SubComponent to "Key Interfaces" documentation.

Open nicmcd opened this issue 4 years ago • 0 comments

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 :)

  1. Components don't have explicit pointers to each other and may execute in different process spaces.
  2. 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.
  3. 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).
  4. Components can obtain pointers to their SubComponents allowing them to execute functionality directly (i.e., zero simulation time required in communication, example: mysubcomp->giveMeInfoRightNow()).
  5. Two SubComponents under the same Component can refer directly to each other via pointers (same functionality as 4).

nicmcd avatar Jun 02 '21 18:06 nicmcd