|
SST 16.0.0
Structural Simulation Toolkit
|
A class to convert between a component's view of time and the core's view of time. More...
#include <timeConverter.h>
Public Member Functions | |
| TimeConverter () | |
| Do not directly invoke this constructor from Components to get a TimeConverter. | |
| TimeConverter (const std::string &time) | |
| Create a TimeConverter for the time specified as a UnitAlgebra. | |
| TimeConverter (const UnitAlgebra &time) | |
| Create a TimeConverter for the time specified as a UnitAlgebra. | |
| TimeConverter (const char *time) | |
| Create a TimeConverter for the time specified as a UnitAlgebra. | |
| SimTime_t | convertToCoreTime (SimTime_t time) const |
| Converts from the component's view to the core's view of time. | |
| SimTime_t | convertFromCoreTime (SimTime_t time) const |
| Converts from the core's view to the components's view of time. | |
| SimTime_t | getFactor () const |
| void | reset () |
| Resets a TimeConverter to uninitialized state (factor = 0). | |
| UnitAlgebra | getPeriod () const |
| ~TimeConverter () | |
| TimeConverter* returned by the core should never be deleted by Elements. | |
| bool | isInitialized () const |
| Function to check to see if the TimeConverter is initialized (non-zero factor). | |
| operator bool () const | |
| Conversion to bool. | |
Friends | |
| class | TimeLord |
| class | SyncManager |
| class | SST::Core::Serialization::serialize_impl< TimeConverter > |
| class | SST::Core::Serialization::serialize_impl< TimeConverter * > |
A class to convert between a component's view of time and the core's view of time.
|
inline |
Do not directly invoke this constructor from Components to get a TimeConverter.
Instead, use the BaseComponent API functions and the constructor that uses a TimeConverter* to create a TimeConverter.
Referenced by TimeConverter().
| SST::TimeConverter::TimeConverter | ( | const std::string & | time | ) |
Create a TimeConverter for the time specified as a UnitAlgebra.
The time must be in seconds, or it also supports a unit of Hz, which will give you the time for the period of that frequency. You may also use an SI prefix as part of the unit.
| time | Time to base the TimeConverter on |
References SST::Simulation::getSimulation(), and SST::Simulation::timeLord.
| SST::TimeConverter::TimeConverter | ( | const UnitAlgebra & | time | ) |
Create a TimeConverter for the time specified as a UnitAlgebra.
The time must be in seconds, or it also supports a unit of Hz, which will give you the time for the period of that frequency.
| time | Time to base the TimeConverter on |
References SST::Simulation::getSimulation(), and SST::Simulation::timeLord.
|
inline |
Create a TimeConverter for the time specified as a UnitAlgebra.
The time must be in seconds, or it also supports a unit of Hz, which will give you the time for the period of that frequency. You may also use an SI prefix as part of the unit.
| time | Time to base the TimeConverter on |
References TimeConverter().
|
inline |
TimeConverter* returned by the core should never be deleted by Elements.
This was moved to public due to needing to support ObjectMaps.
|
inline |
Converts from the core's view to the components's view of time.
The result is truncated, not rounded.
| time | time to convert from core time |
Referenced by SST::BaseComponent::getCurrentSimTime(), SST::BaseComponent::getCurrentSimTimeMicro(), SST::BaseComponent::getCurrentSimTimeMilli(), and SST::BaseComponent::getCurrentSimTimeNano().
|
inline |
Converts from the component's view to the core's view of time.
| time | time to convert to core time |
Referenced by SST::Link::addRecvLatency(), SST::Link::addSendLatency(), and SST::Link::send().
|
inline |
Referenced by SST::BaseComponent::configureLink(), SST::BaseComponent::getCurrentSimTimeMicro(), SST::BaseComponent::getCurrentSimTimeMilli(), SST::BaseComponent::getCurrentSimTimeNano(), SST::Simulation::getNextClockCycle(), SST::TimeLord::getSimCycles(), SST::RankSyncParallelSkip::RankSyncParallelSkip(), SST::RankSyncSerialSkip::RankSyncSerialSkip(), SST::Statistics::StatisticProcessingEngine::registerStatisticWithEngine(), SST::Simulation::reregisterClock(), SST::Link::setDefaultTimeBase(), and SST::Simulation::unregisterClock().
| UnitAlgebra SST::TimeConverter::getPeriod | ( | ) | const |
References SST::TimeLord::getTimeBase(), and SST::Simulation::getTimeLord().
|
inline |
Function to check to see if the TimeConverter is initialized (non-zero factor).
|
inlineexplicit |
Conversion to bool.
This will allow !tc to work to check if it has been initialized (has a non-zero factor).