Sleipnir C++ API
Loading...
Searching...
No Matches
slp::SolveDiagnostics< Entries > Class Template Reference

#include </home/runner/work/Sleipnir/Sleipnir/include/sleipnir/util/print_diagnostics.hpp>

Public Member Functions

 SolveDiagnostics (bool trace, bool print)
 
 ~SolveDiagnostics ()
 
 SolveDiagnostics (const SolveDiagnostics &)=delete
 
SolveDiagnostics & operator= (const SolveDiagnostics &)=delete
 
SolveTimeTracer & operator[] (TimeTracerIndex< Entries > index)
 

Detailed Description

template<const auto & Entries>
requires (detail::is_valid_time_trace(Entries))
class slp::SolveDiagnostics< Entries >

Owns a solver's tracers and times the whole solve with the root tracer.

When the solve exits, this prints the final solver diagnostics if requested. If tracing is disabled, the tracers don't measure time.

Template Parameters
EntriesTime trace entries.

Constructor & Destructor Documentation

◆ SolveDiagnostics()

template<const auto & Entries>
slp::SolveDiagnostics< Entries >::SolveDiagnostics ( bool  trace,
bool  print 
)
inline

Starts the root tracer.

Parameters
traceWhether the tracers measure time.
printWhether to print the final solver diagnostics on exit. This requires trace to be true.

◆ ~SolveDiagnostics()

template<const auto & Entries>
slp::SolveDiagnostics< Entries >::~SolveDiagnostics ( )
inline

Stops the root tracer and prints the final solver diagnostics if requested.

Member Function Documentation

◆ operator[]()

template<const auto & Entries>
SolveTimeTracer & slp::SolveDiagnostics< Entries >::operator[] ( TimeTracerIndex< Entries >  index)
inline

Returns the tracer with the given ID.

Parameters
indexTime tracer ID, converted to its index at compile time. It must be in the time trace.
Returns
The tracer with the given ID.

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