MLIR  19.0.0git
Public Member Functions | List of all members
mlir::TimingScope Class Reference

An RAII-style wrapper around a timer that ensures the timer is properly started and stopped. More...

#include "mlir/Support/Timing.h"

Public Member Functions

 TimingScope ()
 
 TimingScope (const Timer &other)
 
 TimingScope (Timer &&other)
 
 TimingScope (TimingScope &&other)
 
 ~TimingScope ()
 
TimingScopeoperator= (TimingScope &&other)
 
 operator bool () const
 Check if the timing scope actually contains a valid timer. More...
 
 TimingScope (const TimingScope &)=delete
 
TimingScopeoperator= (const TimingScope &)=delete
 
void stop ()
 Manually stop the timer early. More...
 
template<typename... Args>
TimingScope nest (Args... args)
 Create a nested timing scope. More...
 
void hide ()
 Hide the timer in timing reports and directly show its children. More...
 

Detailed Description

An RAII-style wrapper around a timer that ensures the timer is properly started and stopped.

Definition at line 272 of file Timing.h.

Constructor & Destructor Documentation

◆ TimingScope() [1/5]

mlir::TimingScope::TimingScope ( )
inline

Definition at line 274 of file Timing.h.

Referenced by nest().

◆ TimingScope() [2/5]

mlir::TimingScope::TimingScope ( const Timer other)
inline

Definition at line 275 of file Timing.h.

References mlir::Timer::start().

◆ TimingScope() [3/5]

mlir::TimingScope::TimingScope ( Timer &&  other)
inline

Definition at line 279 of file Timing.h.

References mlir::Timer::start().

◆ TimingScope() [4/5]

mlir::TimingScope::TimingScope ( TimingScope &&  other)
inline

Definition at line 283 of file Timing.h.

◆ ~TimingScope()

mlir::TimingScope::~TimingScope ( )
inline

Definition at line 284 of file Timing.h.

References stop().

◆ TimingScope() [5/5]

mlir::TimingScope::TimingScope ( const TimingScope )
delete

Member Function Documentation

◆ hide()

void mlir::TimingScope::hide ( )
inline

Hide the timer in timing reports and directly show its children.

Definition at line 316 of file Timing.h.

References mlir::Timer::hide().

◆ nest()

template<typename... Args>
TimingScope mlir::TimingScope::nest ( Args...  args)
inline

Create a nested timing scope.

This returns a new TimingScope with a timer nested within the current scope. In this fashion, the time in this scope may be further subdivided in a more fine-grained fashion.

Definition at line 311 of file Timing.h.

References mlir::Timer::nest(), and TimingScope().

Referenced by performActions().

◆ operator bool()

mlir::TimingScope::operator bool ( ) const
inlineexplicit

Check if the timing scope actually contains a valid timer.

Definition at line 293 of file Timing.h.

◆ operator=() [1/2]

TimingScope& mlir::TimingScope::operator= ( const TimingScope )
delete

◆ operator=() [2/2]

TimingScope& mlir::TimingScope::operator= ( TimingScope &&  other)
inline

Definition at line 286 of file Timing.h.

References stop().

◆ stop()

void mlir::TimingScope::stop ( )
inline

Manually stop the timer early.

Definition at line 300 of file Timing.h.

References mlir::Timer::stop().

Referenced by operator=(), and ~TimingScope().


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