cParsimSynchronizer Class Reference¶
|
Parallel Simulation API
|
Public Member Functions | |
| cParsimSynchronizer () | |
| virtual | ~cParsimSynchronizer () |
| virtual std::string | str () const override |
| virtual void | setContext (cSimulation *sim, cParsimPartition *seg, cParsimCommunications *co) |
| virtual void | startRun () override=0 |
| virtual void | endRun () override=0 |
| virtual cEvent * | guessNextEvent () override |
| virtual cEvent * | takeNextEvent () override=0 |
| virtual void | processOutgoingMessage (cMessage *msg, const SendOptions &options, int procId, int moduleId, int gateId, void *data)=0 |
Description
Abstract base class for parallel simulation algorithms. Subclasses implement the "null message algorithm" and others.
Task of this layer is to implement conservative synchronization, that is, block the execution at time points where it is not safe to proceed since events from other partitions will (may) arrive before the next local event.
Synchronizer integrates into the simulation kernel via the takeNextEvent() and processOutgoingMessage() functions:
- takeNextEvent() is the scheduler function (comes from cScheduler)
- processOutgoingMessage() is invoked when messages are sent out of the partition, from gates (see cProxyGate) of placeholder modules (cPlaceholderModule) via cParsimPartition.
Constructor & Destructor Documentation
◆ cParsimSynchronizer()
|
inline |
Constructor.
◆ ~cParsimSynchronizer()
|
inlinevirtual |
Destructor.
Member Function Documentation
◆ str()
|
overridevirtual |
Return "parsim scheduler" as description.
◆ setContext()
|
inlinevirtual |
Pass cParsimSynchronizer the objects it has to cooperate with.
Reimplemented in cNullMessageProtocol.
◆ startRun()
|
overridepure virtual |
Called at the beginning of a simulation run.
Implemented in cIdealSimulationProtocol, cISPEventLogger, cNoSynchronization, and cNullMessageProtocol.
◆ endRun()
|
overridepure virtual |
Called at the end of a simulation run.
Implemented in cIdealSimulationProtocol, cISPEventLogger, cNoSynchronization, and cNullMessageProtocol.
◆ guessNextEvent()
|
overridevirtual |
Returns the first event in the Future Event Set.
◆ takeNextEvent()
|
overridepure virtual |
Scheduler function – it comes from cScheduler interface.
Implemented in cIdealSimulationProtocol, cISPEventLogger, cNoSynchronization, and cNullMessageProtocol.
◆ processOutgoingMessage()
|
pure virtual |
Hook, called when a cMessage is sent out of the partition. It is provided here so that the synchronizer can potentially perform optimizations, such as piggybacking null messages (see null message algorithm) on outgoing messages.
Implemented in cISPEventLogger, cNullMessageProtocol, and cParsimProtocolBase.
Generated on for Parallel Simulation API by