SST 15.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 (TimeConverter *tc) | |
Create a new TimeConverter object from a TimeConverter* Use this to create a local TimeConverter from a TimeConverter* returned by the BaseComponent and other public APIs. | |
TimeConverter (std::nullptr_t UNUSED(tc)) | |
TimeConverter () | |
Do not directly invoke this constructor from Components to get a TimeConverter. | |
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 intialized (non-zero factor) | |
operator bool () const | |
Conversion to bool. | |
Friends | |
class | TimeLord |
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 |
Create a new TimeConverter object from a TimeConverter* Use this to create a local TimeConverter from a TimeConverter* returned by the BaseComponent and other public APIs.
tc | TimeConverter to initialize factor from |
References TimeConverter().
Referenced by TimeConverter().
|
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.
|
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::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::Simulation_impl::getNextClockCycle(), SST::TimeLord::getSimCycles(), SST::RankSyncParallelSkip::RankSyncParallelSkip(), SST::RankSyncSerialSkip::RankSyncSerialSkip(), SST::Simulation_impl::reregisterClock(), SST::Link::setDefaultTimeBase(), SST::Link::setDefaultTimeBase(), and SST::Simulation_impl::unregisterClock().
UnitAlgebra SST::TimeConverter::getPeriod | ( | ) | const |
References SST::TimeLord::getTimeBase(), and SST::Simulation_impl::getTimeLord().
|
inline |
Function to check to see if the TimeConverter is intialized (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).