Ipopt Documentation  
 
Loading...
Searching...
No Matches
Ipopt::TimedTask Class Reference

This class is used to collect timing information for a particular task. More...

#include <IpTimedTask.hpp>

Public Member Functions

void Enable ()
 enable the timer
 
void Disable ()
 disable the timer
 
void Reset ()
 Method for resetting time to zero.
 
void Start ()
 Method that is called before execution of the task.
 
void End ()
 Method that is called after execution of the task.
 
void EndIfStarted ()
 Method that is called after execution of the task for which timing might have been started.
 
Number TotalCpuTime () const
 Method returning total CPU time spend for task so far.
 
Number TotalSysTime () const
 Method returning total system time spend for task so far.
 
Number TotalWallclockTime () const
 Method returning total wall clock time spend for task so far.
 
Number StartCpuTime () const
 Method returning start CPU time for started task.
 
Number StartSysTime () const
 Method returning start system time for started task.
 
Number StartWallclockTime () const
 Method returning start wall clock time for started task.
 
bool IsEnabled () const
 
bool IsStarted () const
 
Constructors/Destructors
 TimedTask ()
 Default constructor.
 
 ~TimedTask ()
 Default destructor.
 

Private Member Functions

Default Compiler Generated Methods (Hidden to avoid

implicit creation/calling).

These methods are not implemented and we do not want the compiler to implement them for us, so we declare them private and do not define them. This ensures that they will not be implicitly created/called.

 TimedTask (const TimedTask &)
 Copy Constructor.
 
void operator= (const TimedTask &)
 Default Assignment Operator.
 

Private Attributes

Number start_cputime_
 CPU time at beginning of task.
 
Number total_cputime_
 Total CPU time for task measured so far.
 
Number start_systime_
 System time at beginning of task.
 
Number total_systime_
 Total system time for task measured so far.
 
Number start_walltime_
 Wall clock time at beginning of task.
 
Number total_walltime_
 Total wall clock time for task measured so far.
 
status fields
bool enabled_
 
bool start_called_
 
bool end_called_
 

Detailed Description

This class is used to collect timing information for a particular task.

Definition at line 15 of file IpTimedTask.hpp.

Constructor & Destructor Documentation

◆ TimedTask() [1/2]

Ipopt::TimedTask::TimedTask ( )
inline

Default constructor.

Definition at line 21 of file IpTimedTask.hpp.

◆ ~TimedTask()

Ipopt::TimedTask::~TimedTask ( )
inline

Default destructor.

Definition at line 32 of file IpTimedTask.hpp.

◆ TimedTask() [2/2]

Ipopt::TimedTask::TimedTask ( const TimedTask )
private

Copy Constructor.

Member Function Documentation

◆ Enable()

void Ipopt::TimedTask::Enable ( )
inline

enable the timer

Since
3.14.0

Definition at line 38 of file IpTimedTask.hpp.

◆ Disable()

void Ipopt::TimedTask::Disable ( )
inline

disable the timer

following calls to Start(), End(), and EndIfStarted() have no effect

Since
3.14.0

Definition at line 47 of file IpTimedTask.hpp.

◆ Reset()

void Ipopt::TimedTask::Reset ( )
inline

Method for resetting time to zero.

Definition at line 53 of file IpTimedTask.hpp.

◆ Start()

void Ipopt::TimedTask::Start ( )
inline

Method that is called before execution of the task.

Definition at line 63 of file IpTimedTask.hpp.

◆ End()

void Ipopt::TimedTask::End ( )
inline

Method that is called after execution of the task.

Definition at line 80 of file IpTimedTask.hpp.

◆ EndIfStarted()

void Ipopt::TimedTask::EndIfStarted ( )
inline

Method that is called after execution of the task for which timing might have been started.

This only updates the timing if the timing has indeed been conducted. This is useful to stop timing after catching exceptions.

Definition at line 100 of file IpTimedTask.hpp.

◆ TotalCpuTime()

Number Ipopt::TimedTask::TotalCpuTime ( ) const
inline

Method returning total CPU time spend for task so far.

Definition at line 118 of file IpTimedTask.hpp.

◆ TotalSysTime()

Number Ipopt::TimedTask::TotalSysTime ( ) const
inline

Method returning total system time spend for task so far.

Definition at line 125 of file IpTimedTask.hpp.

◆ TotalWallclockTime()

Number Ipopt::TimedTask::TotalWallclockTime ( ) const
inline

Method returning total wall clock time spend for task so far.

Definition at line 132 of file IpTimedTask.hpp.

◆ StartCpuTime()

Number Ipopt::TimedTask::StartCpuTime ( ) const
inline

Method returning start CPU time for started task.

Since
3.14.0

Definition at line 141 of file IpTimedTask.hpp.

◆ StartSysTime()

Number Ipopt::TimedTask::StartSysTime ( ) const
inline

Method returning start system time for started task.

Since
3.14.0

Definition at line 151 of file IpTimedTask.hpp.

◆ StartWallclockTime()

Number Ipopt::TimedTask::StartWallclockTime ( ) const
inline

Method returning start wall clock time for started task.

Since
3.14.0

Definition at line 161 of file IpTimedTask.hpp.

◆ IsEnabled()

bool Ipopt::TimedTask::IsEnabled ( ) const
inline
Since
3.14.0

Definition at line 169 of file IpTimedTask.hpp.

◆ IsStarted()

bool Ipopt::TimedTask::IsStarted ( ) const
inline
Since
3.14.0

Definition at line 175 of file IpTimedTask.hpp.

◆ operator=()

void Ipopt::TimedTask::operator= ( const TimedTask )
private

Default Assignment Operator.

Member Data Documentation

◆ start_cputime_

Number Ipopt::TimedTask::start_cputime_
private

CPU time at beginning of task.

Definition at line 196 of file IpTimedTask.hpp.

◆ total_cputime_

Number Ipopt::TimedTask::total_cputime_
private

Total CPU time for task measured so far.

Definition at line 198 of file IpTimedTask.hpp.

◆ start_systime_

Number Ipopt::TimedTask::start_systime_
private

System time at beginning of task.

Definition at line 200 of file IpTimedTask.hpp.

◆ total_systime_

Number Ipopt::TimedTask::total_systime_
private

Total system time for task measured so far.

Definition at line 202 of file IpTimedTask.hpp.

◆ start_walltime_

Number Ipopt::TimedTask::start_walltime_
private

Wall clock time at beginning of task.

Definition at line 204 of file IpTimedTask.hpp.

◆ total_walltime_

Number Ipopt::TimedTask::total_walltime_
private

Total wall clock time for task measured so far.

Definition at line 206 of file IpTimedTask.hpp.

◆ enabled_

bool Ipopt::TimedTask::enabled_
private

Definition at line 210 of file IpTimedTask.hpp.

◆ start_called_

bool Ipopt::TimedTask::start_called_
private

Definition at line 211 of file IpTimedTask.hpp.

◆ end_called_

bool Ipopt::TimedTask::end_called_
private

Definition at line 212 of file IpTimedTask.hpp.


The documentation for this class was generated from the following file: